@things-factory/warehouse-base 4.3.534 → 4.3.536

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.
@@ -20,6 +20,7 @@ class PosController extends warehouse_controller_1.WarehouseController {
20
20
  // status: INVENTORY_STATUS.STORED,
21
21
  // locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
22
22
  // })
23
+ var _a;
23
24
  // let inventories: Inventory[] = await qb.getMany()
24
25
  // let inventoryTotalQty: number = 0
25
26
  // let inventoryTotalLockedQty: number = 0
@@ -51,7 +52,8 @@ class PosController extends warehouse_controller_1.WarehouseController {
51
52
  dateTime: new Date().toISOString(),
52
53
  stockTakeType
53
54
  };
54
- if (account.platform == 'xilnex') {
55
+ let disableStockAdjustRecord = ((_a = account.accountSettings) === null || _a === void 0 ? void 0 : _a.disableStockAdjustRecord) == 1 ? true : false;
56
+ if (account.platform == 'xilnex' && !disableStockAdjustRecord) {
55
57
  const stockAdjustRecord = await integration_accounting_1.AccountingAPI.createStockAdjustRecord(account, {
56
58
  xilnexInv: inventoryProduct
57
59
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pos-controller.js","sourceRoot":"","sources":["../../../server/controllers/ecommerce/pos-controller.ts"],"names":[],"mappings":";;;AAGA,mFAAkF;AAIlF,sFAAiF;AACjF,kEAA6D;AAE7D,MAAa,aAAc,SAAQ,0CAAmB;IACpD,KAAK,CAAC,cAAc,CAClB,EAAiB,EACjB,OAAmB,EACnB,MAAc,EACd,QAAkB,EAClB,OAAgB,EAChB,cAAsB,EACtB,aAAqB,EACrB,iBAAyB;QAEzB,iEAAiE;QACjE,8CAA8C;QAC9C,+CAA+C;QAC/C,mDAAmD;QACnD,iDAAiD;QACjD,0CAA0C;QAC1C,yDAAyD;QACzD,qBAAqB;QACrB,2BAA2B;QAC3B,+BAA+B;QAC/B,6BAA6B;QAC7B,uCAAuC;QACvC,uEAAuE;QACvE,OAAO;QAEP,oDAAoD;QACpD,oCAAoC;QACpC,0CAA0C;QAE1C,iCAAiC;QACjC,sEAAsE;QACtE,gCAAgC;QAChC,mBAAmB;QACnB,UAAU;QAEV,4EAA4E;QAC5E,sCAAsC;QACtC,mBAAmB;QACnB,UAAU;QAEV,2EAA2E;QAE3E,oCAAoC;QACpC,wBAAwB;QACxB,0BAA0B;QAC1B,sCAAsC;QACtC,0CAA0C;QAC1C,oBAAoB;QACpB,MAAM;QAEN,wCAAwC;QACxC,4FAA4F;QAC5F,MAAM;QACN,IAAI;QACJ,MAAM,gBAAgB,GAAQ;YAC5B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,cAAc,EAAE,cAAc;YAC9B,QAAQ,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAClC,aAAa;SACd,CAAA;QAED,IAAI,OAAO,CAAC,QAAQ,IAAI,QAAQ,EAAE;YAChC,MAAM,iBAAiB,GAAQ,MAAM,sCAAa,CAAC,uBAAuB,CAAC,OAAO,EAAE;gBAClF,SAAS,EAAE,gBAAgB;aAC5B,CAAC,CAAA;YACF,MAAM,EAAE,CAAC,aAAa,CAAC,kCAAe,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,EAAE,EAAE,SAAS,EAAE,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAA;SAC/G;IACH,CAAC;CACF;AAtED,sCAsEC"}
1
+ {"version":3,"file":"pos-controller.js","sourceRoot":"","sources":["../../../server/controllers/ecommerce/pos-controller.ts"],"names":[],"mappings":";;;AAGA,mFAG+C;AAI/C,sFAAiF;AACjF,kEAA6D;AAE7D,MAAa,aAAc,SAAQ,0CAAmB;IACpD,KAAK,CAAC,cAAc,CAClB,EAAiB,EACjB,OAAmB,EACnB,MAAc,EACd,QAAkB,EAClB,OAAgB,EAChB,cAAsB,EACtB,aAAqB,EACrB,iBAAyB;QAEzB,iEAAiE;QACjE,8CAA8C;QA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CACF;AAxED,sCAwEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/warehouse-base",
3
- "version": "4.3.534",
3
+ "version": "4.3.536",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -23,14 +23,14 @@
23
23
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
24
24
  },
25
25
  "dependencies": {
26
- "@things-factory/biz-base": "^4.3.534",
27
- "@things-factory/id-rule-base": "^4.3.534",
28
- "@things-factory/integration-accounting": "^4.3.534",
29
- "@things-factory/integration-powrup": "^4.3.534",
30
- "@things-factory/integration-sellercraft": "^4.3.534",
31
- "@things-factory/marketplace-base": "^4.3.534",
32
- "@things-factory/product-base": "^4.3.534",
33
- "@things-factory/setting-base": "^4.3.534"
26
+ "@things-factory/biz-base": "^4.3.535",
27
+ "@things-factory/id-rule-base": "^4.3.535",
28
+ "@things-factory/integration-accounting": "^4.3.536",
29
+ "@things-factory/integration-powrup": "^4.3.536",
30
+ "@things-factory/integration-sellercraft": "^4.3.536",
31
+ "@things-factory/marketplace-base": "^4.3.536",
32
+ "@things-factory/product-base": "^4.3.535",
33
+ "@things-factory/setting-base": "^4.3.535"
34
34
  },
35
- "gitHead": "f106f97fc688c4e335b17a4c3fe9711ee31ea566"
35
+ "gitHead": "49cdab239e10ed9594af6de554f76de622af75af"
36
36
  }
@@ -1,7 +1,10 @@
1
1
  import { EntityManager } from 'typeorm'
2
2
 
3
3
  import { Bizplace } from '@things-factory/biz-base'
4
- import { Accounting, AccountingAPI } from '@things-factory/integration-accounting'
4
+ import {
5
+ Accounting,
6
+ AccountingAPI
7
+ } from '@things-factory/integration-accounting'
5
8
  import { Product } from '@things-factory/product-base'
6
9
  import { Domain } from '@things-factory/shell'
7
10
 
@@ -71,7 +74,9 @@ export class PosController extends WarehouseController {
71
74
  stockTakeType
72
75
  }
73
76
 
74
- if (account.platform == 'xilnex') {
77
+ let disableStockAdjustRecord: boolean = account.accountSettings?.disableStockAdjustRecord == 1 ? true : false
78
+
79
+ if (account.platform == 'xilnex' && !disableStockAdjustRecord) {
75
80
  const stockAdjustRecord: any = await AccountingAPI.createStockAdjustRecord(account, {
76
81
  xilnexInv: inventoryProduct
77
82
  })