@things-factory/warehouse-base 6.2.142 → 6.2.147

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.142",
3
+ "version": "6.2.147",
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.139",
28
- "@things-factory/id-rule-base": "^6.2.139",
29
- "@things-factory/integration-sellercraft": "^6.2.140",
30
- "@things-factory/marketplace-base": "^6.2.142",
31
- "@things-factory/product-base": "^6.2.142",
32
- "@things-factory/setting-base": "^6.2.139"
27
+ "@things-factory/biz-base": "^6.2.147",
28
+ "@things-factory/id-rule-base": "^6.2.147",
29
+ "@things-factory/integration-sellercraft": "^6.2.147",
30
+ "@things-factory/marketplace-base": "^6.2.147",
31
+ "@things-factory/product-base": "^6.2.147",
32
+ "@things-factory/setting-base": "^6.2.147"
33
33
  },
34
- "gitHead": "78bb2ad1a9d851be0c6ea0e176ccbab61c3b6cc8"
34
+ "gitHead": "4b93b26f0edfea36d6273d1caf736477a5e2ceed"
35
35
  }
@@ -229,6 +229,7 @@ export class InventoryQuery {
229
229
  .addSelect('product.primaryUnit', 'primaryUnit')
230
230
  .addSelect('product.auxUnit1', 'auxUnit1')
231
231
  .addSelect('product.minQty', 'minQty')
232
+ .addSelect('product.maxQty', 'maxQty')
232
233
  .addSelect('i.product_color', 'productColor')
233
234
  .addSelect('i.product_quality', 'productQuality')
234
235
  .addSelect('i.work_category', 'workCategory')
@@ -1,5 +1,5 @@
1
1
  import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
2
- import { In, MoreThan, Not, Equal } from 'typeorm'
2
+ import { Equal, In, MoreThan, Not } from 'typeorm'
3
3
 
4
4
  import { Bizplace } from '@things-factory/biz-base'
5
5
  import { generateId } from '@things-factory/id-rule-base'
@@ -677,7 +677,7 @@ export async function approveInventoryChanges(patches: any, context: ResolverCon
677
677
  // Check Change of existing inventory quantity
678
678
  if (newRecord.qty != null && newRecord.qty != inventory.qty) {
679
679
  newHistoryRecord.qty = newRecord.qty - inventory.qty
680
- if (newRecord.qty < 1) {
680
+ if (newRecord.qty <= 0) {
681
681
  newRecord.qty = 0
682
682
  newRecord.uomValue = 0
683
683
  }