@things-factory/warehouse-base 7.0.1-alpha.100 → 7.0.1-alpha.102

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": "7.0.1-alpha.100",
3
+ "version": "7.0.1-alpha.102",
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": "^7.0.1-alpha.100",
28
- "@things-factory/id-rule-base": "^7.0.1-alpha.100",
29
- "@things-factory/integration-sellercraft": "^7.0.1-alpha.100",
30
- "@things-factory/marketplace-base": "^7.0.1-alpha.100",
31
- "@things-factory/product-base": "^7.0.1-alpha.100",
32
- "@things-factory/setting-base": "^7.0.1-alpha.100"
27
+ "@things-factory/biz-base": "^7.0.1-alpha.102",
28
+ "@things-factory/id-rule-base": "^7.0.1-alpha.102",
29
+ "@things-factory/integration-sellercraft": "^7.0.1-alpha.102",
30
+ "@things-factory/marketplace-base": "^7.0.1-alpha.102",
31
+ "@things-factory/product-base": "^7.0.1-alpha.102",
32
+ "@things-factory/setting-base": "^7.0.1-alpha.102"
33
33
  },
34
- "gitHead": "f5062c5559383d06fc8f9f870b56163952557c70"
34
+ "gitHead": "2bce598261c2d7377ea008ee687358480a2869bc"
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'
@@ -636,7 +636,7 @@ export async function approveInventoryChanges(patches: any, context: ResolverCon
636
636
  // Check Change of existing inventory quantity
637
637
  if (newRecord.qty != null && newRecord.qty != inventory.qty) {
638
638
  newHistoryRecord.qty = newRecord.qty - inventory.qty
639
- if (newRecord.qty < 1) {
639
+ if (newRecord.qty <= 0) {
640
640
  newRecord.qty = 0
641
641
  newRecord.uomValue = 0
642
642
  }