@things-factory/warehouse-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/warehouse-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,
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@things-factory/biz-base": "^4.3.24",
|
|
28
28
|
"@things-factory/id-rule-base": "^4.3.24",
|
|
29
|
-
"@things-factory/integration-sellercraft": "^4.3.
|
|
30
|
-
"@things-factory/marketplace-base": "^4.3.
|
|
29
|
+
"@things-factory/integration-sellercraft": "^4.3.25",
|
|
30
|
+
"@things-factory/marketplace-base": "^4.3.25",
|
|
31
31
|
"@things-factory/product-base": "^4.3.24",
|
|
32
32
|
"@things-factory/setting-base": "^4.3.24"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "bdcecd8454d7a76df3c5676a39440d57bc21d5cb"
|
|
35
35
|
}
|
|
@@ -9,7 +9,6 @@ import { buildQuery, Domain, Filter, ListParam, Pagination, Sorting } from '@thi
|
|
|
9
9
|
|
|
10
10
|
import { INVENTORY_STATUS, LOCATION_TYPE } from '../../constants'
|
|
11
11
|
import { InventoryChange } from '../inventory-change/inventory-change'
|
|
12
|
-
import { InventoryItem } from '../inventory-item/inventory-item'
|
|
13
12
|
import { Inventory } from './inventory'
|
|
14
13
|
import { InventoryBundleGroupDetail, InventoryList } from './inventory-types'
|
|
15
14
|
|
|
@@ -155,8 +154,8 @@ export class InventoryQuery {
|
|
|
155
154
|
item.product['productDetails'] = productDetails
|
|
156
155
|
return {
|
|
157
156
|
...item,
|
|
158
|
-
remainQty: item.qty - item.lockedQty ? item.lockedQty : 0,
|
|
159
|
-
remainUomValue: item.uomValue - item.lockedUomValue ? item.lockedUomValue : 0,
|
|
157
|
+
remainQty: item.qty - (item.lockedQty ? item.lockedQty : 0),
|
|
158
|
+
remainUomValue: item.uomValue - (item.lockedUomValue ? item.lockedUomValue : 0),
|
|
160
159
|
serialNumbers: inventoryItems[0]?.serialNumbers
|
|
161
160
|
}
|
|
162
161
|
})
|
|
@@ -1166,7 +1166,7 @@ export class InventoryHistoryQuery {
|
|
|
1166
1166
|
inner join bizplaces bz on bz.id = rih.bizplace_id
|
|
1167
1167
|
inner join locations loc on loc.id = rih.location_id
|
|
1168
1168
|
inner join warehouses wh on wh.id = loc.warehouse_id
|
|
1169
|
-
|
|
1169
|
+
left join order_inventories oi on oi.inventory_id = rih.inventory_id
|
|
1170
1170
|
group by rih.inventory_id,rih.domain_id,rih.pallet_id,rih.carton_id,rih.qty,rih.uom_value,rih.uom,rih.last_seq,rih.created_at, rih.initial_inbound_at,rih.unit_cost,rih.reusable_pallet_id,
|
|
1171
1171
|
rih.batch_id,plt.name,rih.batch_id_ref,rih.product_id,rih.packing_type,rih.bizplace_id,rih.location_id,prd.id,bz.id,loc.id,wh.name,rih.remark,rih.expiration_date,rih.manufacture_date,rih.status
|
|
1172
1172
|
having 1=1 and (case when rih.status = 'TERMINATED' and SUM(CASE WHEN oi.status = 'LOADING' or (oi.status = 'SORTING' AND oi.type = 'RELEASE_OF_GOODS') THEN oi.release_qty ELSE 0 END) > 0 then rih.status = 'TERMINATED' else rih.status <> 'TERMINATED' end)
|
|
@@ -1199,7 +1199,7 @@ export class InventoryHistoryQuery {
|
|
|
1199
1199
|
inner join bizplaces bz on bz.id = rih.bizplace_id
|
|
1200
1200
|
inner join locations loc on loc.id = rih.location_id
|
|
1201
1201
|
inner join warehouses wh on wh.id = loc.warehouse_id
|
|
1202
|
-
|
|
1202
|
+
left join order_inventories oi on oi.inventory_id = rih.inventory_id
|
|
1203
1203
|
group by rih.inventory_id,rih.domain_id,rih.pallet_id,rih.carton_id,rih.qty,rih.uom_value,rih.uom,rih.last_seq,rih.created_at, rih.initial_inbound_at,rih.unit_cost,rih.reusable_pallet_id,
|
|
1204
1204
|
rih.batch_id,plt.name,rih.batch_id_ref,rih.product_id,rih.packing_type,rih.bizplace_id,rih.location_id,prd.id,bz.id,loc.id,wh.name,rih.remark,rih.expiration_date,rih.manufacture_date,rih.status
|
|
1205
1205
|
having 1=1 and (case when rih.status = 'TERMINATED' and SUM(CASE WHEN oi.status = 'LOADING' or (oi.status = 'SORTING' AND oi.type = 'RELEASE_OF_GOODS') THEN oi.release_qty ELSE 0 END) > 0 then rih.status = 'TERMINATED' else rih.status <> 'TERMINATED' end)
|
|
@@ -349,7 +349,7 @@ export async function getProductBundleInventory(
|
|
|
349
349
|
from json_populate_recordset(NULL::order_products,'${orderProductsJson}') src
|
|
350
350
|
inner join product_details pd ON src.product_id = pd.product_id and src.packing_type = pd.packing_type and src.packing_size = pd.packing_size and src.uom = pd.uom
|
|
351
351
|
inner join product_bundle_settings pbs on pbs.product_detail_id = pd.id
|
|
352
|
-
inner join product_bundles pb on pb.id = pbs.product_bundle_id
|
|
352
|
+
inner join product_bundles pb on pb.id = pbs.product_bundle_id and pb.status = 'ACTIVATED'
|
|
353
353
|
where pb.domain_id = $1
|
|
354
354
|
group by pb.id, pb.sku, pb.name
|
|
355
355
|
) pb
|