@things-factory/worksheet-base 4.3.33 → 4.3.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/worksheet-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.34",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"@things-factory/document-template-base": "^4.3.32",
|
|
30
30
|
"@things-factory/id-rule-base": "^4.3.32",
|
|
31
31
|
"@things-factory/integration-lmd": "^4.3.32",
|
|
32
|
-
"@things-factory/integration-marketplace": "^4.3.
|
|
33
|
-
"@things-factory/integration-sellercraft": "^4.3.
|
|
32
|
+
"@things-factory/integration-marketplace": "^4.3.34",
|
|
33
|
+
"@things-factory/integration-sellercraft": "^4.3.34",
|
|
34
34
|
"@things-factory/integration-sftp": "^4.3.33",
|
|
35
|
-
"@things-factory/marketplace-base": "^4.3.
|
|
35
|
+
"@things-factory/marketplace-base": "^4.3.34",
|
|
36
36
|
"@things-factory/notification": "^4.3.32",
|
|
37
|
-
"@things-factory/sales-base": "^4.3.
|
|
37
|
+
"@things-factory/sales-base": "^4.3.34",
|
|
38
38
|
"@things-factory/setting-base": "^4.3.32",
|
|
39
39
|
"@things-factory/shell": "^4.3.32",
|
|
40
40
|
"@things-factory/transport-base": "^4.3.32",
|
|
41
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
41
|
+
"@things-factory/warehouse-base": "^4.3.34"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "feaae0d28d92c8eccb6b1ae8dbedd43c460e2d32"
|
|
44
44
|
}
|
|
@@ -4,9 +4,10 @@ import { MarketplaceOrder, MarketplaceOrderShipping } from '@things-factory/mark
|
|
|
4
4
|
import { ORDER_INVENTORY_STATUS, OrderInventory, OrderProduct, OrderVas } from '@things-factory/sales-base'
|
|
5
5
|
import { Setting } from '@things-factory/setting-base'
|
|
6
6
|
import { Domain } from '@things-factory/shell'
|
|
7
|
+
import { Inventory, INVENTORY_STATUS, InventoryHistory } from '@things-factory/warehouse-base'
|
|
7
8
|
|
|
8
9
|
import { WORKSHEET_TYPE } from '../../../constants'
|
|
9
|
-
import { Worksheet } from '../../../entities'
|
|
10
|
+
import { Worksheet, WorksheetDetail } from '../../../entities'
|
|
10
11
|
|
|
11
12
|
interface WorksheetInterface extends Worksheet {
|
|
12
13
|
orderProducts: OrderProduct[]
|
|
@@ -109,6 +110,39 @@ export const worksheetResolver = {
|
|
|
109
110
|
},
|
|
110
111
|
relations: ['targetProduct']
|
|
111
112
|
})
|
|
113
|
+
|
|
114
|
+
// update inventory data >> unloaded inventory history data
|
|
115
|
+
if (
|
|
116
|
+
worksheet.type === WORKSHEET_TYPE.PUTAWAY &&
|
|
117
|
+
worksheet.worksheetDetails.every(wsd => wsd.targetInventory.inventory)
|
|
118
|
+
) {
|
|
119
|
+
worksheet.worksheetDetails = await Promise.all(
|
|
120
|
+
worksheet.worksheetDetails.map(async (wsd: WorksheetDetail) => {
|
|
121
|
+
let inventory: Inventory = wsd.targetInventory.inventory
|
|
122
|
+
|
|
123
|
+
let foundUnloadedHistory: InventoryHistory = await getRepository(InventoryHistory).findOne({
|
|
124
|
+
where: { inventory, refOrderId: worksheet.arrivalNotice.id, status: INVENTORY_STATUS.UNLOADED },
|
|
125
|
+
relations: ['location', 'product']
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
wsd.targetInventory.inventory = {
|
|
129
|
+
...inventory,
|
|
130
|
+
qty: foundUnloadedHistory?.qty,
|
|
131
|
+
uomValue: foundUnloadedHistory?.uomValue,
|
|
132
|
+
location: foundUnloadedHistory?.location,
|
|
133
|
+
product: foundUnloadedHistory?.product,
|
|
134
|
+
cartonId: foundUnloadedHistory?.cartonId,
|
|
135
|
+
batchId: foundUnloadedHistory?.batchId,
|
|
136
|
+
batchIdRef: foundUnloadedHistory?.batchIdRef,
|
|
137
|
+
packingType: foundUnloadedHistory?.packingType,
|
|
138
|
+
packingSize: foundUnloadedHistory?.packingSize,
|
|
139
|
+
uom: foundUnloadedHistory?.uom
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return wsd
|
|
143
|
+
})
|
|
144
|
+
)
|
|
145
|
+
}
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
if (worksheet.type === WORKSHEET_TYPE.BATCH_PICKING) {
|
|
@@ -6,6 +6,7 @@ import { DeliveryInfo } from './delivery-info'
|
|
|
6
6
|
import { DeliveryOrderInfo } from './delivery-order-info'
|
|
7
7
|
import { DeliveryWorksheet } from './delivery-worksheet'
|
|
8
8
|
import { ExecutingWorksheet } from './executing-worksheet'
|
|
9
|
+
import { FindReleaseOrdersByTaskNo } from './find-release-orders-by-task-no'
|
|
9
10
|
import { GoodsDeliveryNote } from './goods-delivery-note'
|
|
10
11
|
import { InventoryCheckWorksheet } from './inventory-check-worksheet'
|
|
11
12
|
import { LoadedWorksheetDetail } from './loaded-worksheet-detail'
|
|
@@ -22,7 +23,6 @@ import { WorksheetInfo } from './worksheet-info'
|
|
|
22
23
|
import { WorksheetList } from './worksheet-list'
|
|
23
24
|
import { WorksheetPatch } from './worksheet-patch'
|
|
24
25
|
import { WorksheetWithPagination } from './worksheet-with-pagination'
|
|
25
|
-
import { FindReleaseOrdersByTaskNo } from './find-release-orders-by-task-no'
|
|
26
26
|
|
|
27
27
|
export const Mutation = /* GraphQL */ `
|
|
28
28
|
createWorksheet (
|
|
@@ -210,7 +210,7 @@ export const Mutation = /* GraphQL */ `
|
|
|
210
210
|
|
|
211
211
|
cycleCountAdjustment (
|
|
212
212
|
cycleCountNo: String!
|
|
213
|
-
): Boolean @transaction
|
|
213
|
+
): Boolean @privilege(category: "inventory_adjustment_approval", privilege: "mutation") @transaction
|
|
214
214
|
|
|
215
215
|
undoUnloading (
|
|
216
216
|
orderType: String!
|