@things-factory/warehouse-base 4.3.514 → 4.3.515

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.
@@ -1525,7 +1525,7 @@ async function massageInventoryPalletSummary(tx, params, bizplace, context) {
1525
1525
  else 0 end
1526
1526
  else 0 end) as opening_qty,
1527
1527
  SUM(case when invHistory.created_at >= $1 and invHistory.created_at <= $2 then
1528
- case when (invHistory.transaction_type = 'UNLOADING' or invHistory.transaction_type = 'NEW') then 1 else 0 end
1528
+ case when (invHistory.transaction_type = 'UNLOADING' or invHistory.transaction_type = 'NEW' or invHistory.transaction_type = 'CANCEL_ORDER') then 1 else 0 end
1529
1529
  else 0 end) as total_in_qty,
1530
1530
  SUM(case when invHistory.created_at >= $1 and invHistory.created_at <= $2 then
1531
1531
  case when invHistory.status = 'TERMINATED' AND invHistory.transaction_type <> 'ADJUSTMENT' then -1 else 0 end
@@ -1541,7 +1541,7 @@ async function massageInventoryPalletSummary(tx, params, bizplace, context) {
1541
1541
  prd.sku as product_sku, prd.name as product_name, prd.description as product_description, prd.type AS product_type
1542
1542
  from temp_inv_history invh
1543
1543
  inner join temp_products prd on prd.id = invh.product_id
1544
- where (transaction_type = 'UNLOADING' or invh.transaction_type = 'NEW')
1544
+ where (transaction_type = 'UNLOADING' or invh.transaction_type = 'NEW' or invh.transaction_type = 'CANCEL_ORDER')
1545
1545
  and invh.created_at >= $1
1546
1546
  ) as invIn where rn = 1
1547
1547
  union all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/warehouse-base",
3
- "version": "4.3.514",
3
+ "version": "4.3.515",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -32,5 +32,5 @@
32
32
  "@things-factory/product-base": "^4.3.495",
33
33
  "@things-factory/setting-base": "^4.3.452"
34
34
  },
35
- "gitHead": "35fd9143a02a229fbc164b30e6204f16c27f6a89"
35
+ "gitHead": "f916cbe75616628eadc2efbeead208978e43b50e"
36
36
  }
@@ -1714,7 +1714,7 @@ async function massageInventoryPalletSummary(tx: EntityManager, params: ListPara
1714
1714
  else 0 end
1715
1715
  else 0 end) as opening_qty,
1716
1716
  SUM(case when invHistory.created_at >= $1 and invHistory.created_at <= $2 then
1717
- case when (invHistory.transaction_type = 'UNLOADING' or invHistory.transaction_type = 'NEW') then 1 else 0 end
1717
+ case when (invHistory.transaction_type = 'UNLOADING' or invHistory.transaction_type = 'NEW' or invHistory.transaction_type = 'CANCEL_ORDER') then 1 else 0 end
1718
1718
  else 0 end) as total_in_qty,
1719
1719
  SUM(case when invHistory.created_at >= $1 and invHistory.created_at <= $2 then
1720
1720
  case when invHistory.status = 'TERMINATED' AND invHistory.transaction_type <> 'ADJUSTMENT' then -1 else 0 end
@@ -1730,7 +1730,7 @@ async function massageInventoryPalletSummary(tx: EntityManager, params: ListPara
1730
1730
  prd.sku as product_sku, prd.name as product_name, prd.description as product_description, prd.type AS product_type
1731
1731
  from temp_inv_history invh
1732
1732
  inner join temp_products prd on prd.id = invh.product_id
1733
- where (transaction_type = 'UNLOADING' or invh.transaction_type = 'NEW')
1733
+ where (transaction_type = 'UNLOADING' or invh.transaction_type = 'NEW' or invh.transaction_type = 'CANCEL_ORDER')
1734
1734
  and invh.created_at >= $1
1735
1735
  ) as invIn where rn = 1
1736
1736
  union all