Skip to content

Commit

Permalink
45. add collection for updating product in 1C
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrakovich committed Oct 8, 2024
1 parent 6ace9d0 commit 0504e67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/1c-tabes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
| SP6122 | Страна | text | | 0 |
| SP6123 | Фабрика | text | | 0 |
| SP6124 | Тип (категория) | text | | 0 |
| SP6125 | (P)СезонСайт | C | 32 | 0 |

## TABLE SC5925: Справочник ОстаткиТоваров
| Name | Descr | Type | Length | Precision |
Expand Down Expand Up @@ -85,7 +86,7 @@
| F=SP6131 | (P)Отчество | C | 32 | 0 |


## TABLE SC3964: Справочник ДисконтныеКарты
## TABLE SC3964: Справочник ДисконтныеКарты
| # Name | Descr | Type | Length | Precision |
| ----------- | -------------------- | ---- | ------ | --------- |
| F=ID | ID object | C | 9 | 0 |
Expand Down
1 change: 1 addition & 0 deletions src/app/Listeners/OneC/UpdateProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function handle(ProductCreated|ProductUpdated $event): void
'SP6122' => $product->countryOfOrigin?->name,
'SP6123' => $product->manufacturer?->name,
'SP6124' => $product->category->name,
'SP6125' => $product->collection->name,
], fn ($value) => !is_null($value)));
}
}
2 changes: 2 additions & 0 deletions src/app/Models/OneC/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @property string $SP6122 Страна
* @property string $SP6123 Фабрика
* @property string $SP6124 Тип (категория)
* @property string $SP6125 СезонСайт (коллекция)
*/
class Product extends AbstractOneCModel
{
Expand All @@ -31,6 +32,7 @@ class Product extends AbstractOneCModel
'SP6122',
'SP6123',
'SP6124',
'SP6125',
];

/**
Expand Down

0 comments on commit 0504e67

Please sign in to comment.