@things-factory/warehouse-base 6.2.148 → 6.2.149
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": "6.2.
|
|
3
|
+
"version": "6.2.149",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/biz-base": "^6.2.
|
|
27
|
+
"@things-factory/biz-base": "^6.2.149",
|
|
28
28
|
"@things-factory/id-rule-base": "^6.2.147",
|
|
29
|
-
"@things-factory/integration-sellercraft": "^6.2.
|
|
30
|
-
"@things-factory/marketplace-base": "^6.2.
|
|
31
|
-
"@things-factory/product-base": "^6.2.
|
|
29
|
+
"@things-factory/integration-sellercraft": "^6.2.149",
|
|
30
|
+
"@things-factory/marketplace-base": "^6.2.149",
|
|
31
|
+
"@things-factory/product-base": "^6.2.149",
|
|
32
32
|
"@things-factory/setting-base": "^6.2.147"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "adb6670393456383495523244763b982fe8ae857"
|
|
35
35
|
}
|
|
@@ -826,6 +826,7 @@ export class InventoryQuery {
|
|
|
826
826
|
let availableStockFilter = params.filters.find(filter => filter.name == 'availableStock')
|
|
827
827
|
let lowStockFilter = params.filters.find(filter => filter.name == 'lowStock')
|
|
828
828
|
let overStockFilter = params.filters.find(filter => filter.name == 'overStock')
|
|
829
|
+
let warehouseNameFilter = params.filters.find(filter => filter.name == 'warehouseName')
|
|
829
830
|
|
|
830
831
|
if (bizplaceFilter) {
|
|
831
832
|
const bizplaceQueryBuilder: SelectQueryBuilder<Bizplace> = getRepository(Bizplace).createQueryBuilder('b')
|
|
@@ -904,6 +905,11 @@ export class InventoryQuery {
|
|
|
904
905
|
COALESCE("ProductDetailBizplaceSetting"."max_qty", "Product"."max_qty",0) < SUM("Inventory"."qty")`
|
|
905
906
|
}
|
|
906
907
|
|
|
908
|
+
let warehouseQuery = ''
|
|
909
|
+
if (warehouseNameFilter?.value) {
|
|
910
|
+
warehouseQuery = `AND "Warehouse"."name" like '%${warehouseNameFilter.value}%'`
|
|
911
|
+
}
|
|
912
|
+
|
|
907
913
|
await tx.query(
|
|
908
914
|
`
|
|
909
915
|
create temp table temp_inv_history AS
|
|
@@ -928,6 +934,7 @@ export class InventoryQuery {
|
|
|
928
934
|
AND "Inventory"."domain_id" = $1
|
|
929
935
|
${bizplaceQuery}
|
|
930
936
|
${productQuery}
|
|
937
|
+
${warehouseQuery}
|
|
931
938
|
GROUP BY "Product"."id", "ProductRef"."id", "Bizplace"."id", "ProductDetailBizplaceSetting"."id", "Warehouse"."id"
|
|
932
939
|
HAVING 1 = 1
|
|
933
940
|
${availableStockQuery}
|