Skip to content

Commit

Permalink
47. add users full name to offline order import
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrakovich committed Oct 6, 2024
1 parent 8391fd5 commit 1c05ef8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/1c-tabes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
| F=ID | ID object | C | 9 | 0 |
| F=CODE | object code | C | 24 | 0 |
| F=DESCR | object description | C | 100 | 0 |
| F=ISMARK | Flag Object is Marke| C | 1 | 0 |
| F=ISMARK | Flag is Market | C | 1 | 0 |
| F=VERSTAMP | Version stamp | C | 6 | 0 |
| F=SP5896 | (P)Артикул | C | 30 | 0 |
| F=SP5897 | (P)Товар | C | 9 | 0 |
Expand Down Expand Up @@ -59,7 +59,7 @@
| F=ID | ID object | C | 9 | 0 |
| F=CODE | object code | C | 12 | 0 |
| F=DESCR | ФИО пользователя | C | 50 | 0 |
| F=ISMARK | Flag Object is Marke | C | 1 | 0 |
| F=ISMARK | Flag is Market | C | 1 | 0 |
| F=VERSTAMP | Version stamp | C | 6 | 0 |
| F=SP6089 | (P)ДисконтнаяКарта | C | 9 | 0 |
| F=SP6090 | (P)КодДК | C | 13 | 0 |
Expand All @@ -79,3 +79,7 @@
| F=SP6108 | (P)ДатаВозврата | D | 8 | 0 |
| F=SP6109 | (P)ВремяВозврата | C | 8 | 0 |
| F=SP6110 | (P)НомерВозврата | C | 10 | 0 |
| F=SP6126 | (P)ФИО | C | 99 | 0 |
| F=SP6129 | (P)Фамилия | C | 32 | 0 |
| F=SP6130 | (P)Имя | C | 32 | 0 |
| F=SP6131 | (P)Отчество | C | 32 | 0 |
4 changes: 3 additions & 1 deletion src/app/Jobs/OneC/UpdateOfflineOrdersJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ private function findOrCreateUser(OfflineOrder1C $order): ?User
->firstOrCreate([], [
'phone' => $phone,
'discount_card_number' => $order->SP6089,
'first_name' => $order->DESCR,
'first_name' => $order->SP6130,
'last_name' => $order->SP6129,
'patronymic_name' => $order->SP6131,
]);

if (!$user->wasRecentlyCreated) {
Expand Down
4 changes: 4 additions & 0 deletions src/app/Models/OneC/OfflineOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* @property string $SP6108 ДатаВозврата
* @property string $SP6109 ВремяВозврата
* @property string $SP6110 НомерВозврата
* @property string $SP6126 ФИО
* @property string $SP6129 Фамилия
* @property string $SP6130 Имя
* @property string $SP6131 Отчество
*
* @property-read Stock|null $stock
* @property-read Product|null $product
Expand Down

0 comments on commit 1c05ef8

Please sign in to comment.