@things-factory/sales-base 4.3.24 → 4.3.25
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/sales-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.25",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"@things-factory/auth-base": "^4.3.24",
|
|
29
29
|
"@things-factory/biz-base": "^4.3.24",
|
|
30
30
|
"@things-factory/code-base": "^4.3.24",
|
|
31
|
-
"@things-factory/integration-sftp": "^4.3.
|
|
31
|
+
"@things-factory/integration-sftp": "^4.3.25",
|
|
32
32
|
"@things-factory/notification": "^4.3.24",
|
|
33
33
|
"@things-factory/product-base": "^4.3.24",
|
|
34
34
|
"@things-factory/setting-base": "^4.3.24",
|
|
35
35
|
"@things-factory/shell": "^4.3.23",
|
|
36
36
|
"@things-factory/transport-base": "^4.3.24",
|
|
37
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
37
|
+
"@things-factory/warehouse-base": "^4.3.25"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bdcecd8454d7a76df3c5676a39440d57bc21d5cb"
|
|
40
40
|
}
|
|
@@ -23,13 +23,16 @@ export class OtherQuery {
|
|
|
23
23
|
@Directive('@privilege(category: "inventory", privilege: "query")')
|
|
24
24
|
@Directive('@transaction')
|
|
25
25
|
@Query(returns => InventoryProductGroupList)
|
|
26
|
-
async allBizplaceProductInventory(
|
|
26
|
+
async allBizplaceProductInventory(
|
|
27
|
+
@Ctx() context: any,
|
|
28
|
+
@Args() params: ListParam
|
|
29
|
+
): Promise<InventoryProductGroupList> {
|
|
27
30
|
const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =
|
|
28
31
|
context.state
|
|
29
32
|
|
|
30
33
|
let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)
|
|
31
34
|
|
|
32
|
-
let bizplaceId: any = params.filters.find(filter => filter.name === '
|
|
35
|
+
let bizplaceId: any = params.filters.find(filter => filter.name === 'bizplace_id').value
|
|
33
36
|
let foundPermittedBizplace: Bizplace
|
|
34
37
|
let companyBizplace: Bizplace
|
|
35
38
|
|
|
@@ -200,11 +203,11 @@ export class OtherQuery {
|
|
|
200
203
|
inventory:
|
|
201
204
|
total > 0
|
|
202
205
|
? {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
...items[0],
|
|
207
|
+
remainQty: total > 0 ? items[0].remainQty : null,
|
|
208
|
+
remainUomValue: total > 0 ? items[0].remainUomValue : null,
|
|
209
|
+
remainUomValueWithUom: total > 0 ? items[0].remainUomValueWithUom : ''
|
|
210
|
+
}
|
|
208
211
|
: null,
|
|
209
212
|
productId: total > 0 ? items[0].productId : null,
|
|
210
213
|
productSKU: total > 0 ? items[0].productSKU : orderInventory.productSKU,
|
|
@@ -339,7 +342,7 @@ export class OtherQuery {
|
|
|
339
342
|
let productDetail: ProductDetail
|
|
340
343
|
const hasConditions: boolean = Boolean(
|
|
341
344
|
(orderProduct?.packingType && orderProduct?.packingType.trim() != '') ||
|
|
342
|
-
|
|
345
|
+
(orderProduct?.uom && orderProduct?.uom.trim() != '')
|
|
343
346
|
)
|
|
344
347
|
let productDetailCondition: any = { product: foundProduct }
|
|
345
348
|
|
|
@@ -362,8 +365,8 @@ export class OtherQuery {
|
|
|
362
365
|
? productDetail.uomValue
|
|
363
366
|
: null
|
|
364
367
|
: orderProduct?.uomValue
|
|
365
|
-
|
|
366
|
-
|
|
368
|
+
? orderProduct.uomValue
|
|
369
|
+
: productDetail.uomValue
|
|
367
370
|
|
|
368
371
|
newOrderProduct = {
|
|
369
372
|
...orderProduct,
|