@things-factory/warehouse-base 6.2.140 → 6.2.142

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.140",
3
+ "version": "6.2.142",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -27,9 +27,9 @@
27
27
  "@things-factory/biz-base": "^6.2.139",
28
28
  "@things-factory/id-rule-base": "^6.2.139",
29
29
  "@things-factory/integration-sellercraft": "^6.2.140",
30
- "@things-factory/marketplace-base": "^6.2.140",
31
- "@things-factory/product-base": "^6.2.139",
30
+ "@things-factory/marketplace-base": "^6.2.142",
31
+ "@things-factory/product-base": "^6.2.142",
32
32
  "@things-factory/setting-base": "^6.2.139"
33
33
  },
34
- "gitHead": "aa99f06916839efd1616697529c8b1a08bdebde1"
34
+ "gitHead": "78bb2ad1a9d851be0c6ea0e176ccbab61c3b6cc8"
35
35
  }
@@ -4,7 +4,7 @@ import { Column, CreateDateColumn, Entity, Index, ManyToOne, OneToMany, PrimaryG
4
4
  import { User } from '@things-factory/auth-base'
5
5
  import { Bizplace } from '@things-factory/biz-base'
6
6
  import { Product, ProductDetail } from '@things-factory/product-base'
7
- import { Domain, ScalarDate } from '@things-factory/shell'
7
+ import { Domain, ScalarDate, roundTransformer } from '@things-factory/shell'
8
8
 
9
9
  import { InventoryChange } from '../inventory-change/inventory-change'
10
10
  import { InventoryItem } from '../inventory-item/inventory-item'
@@ -118,11 +118,11 @@ export class Inventory {
118
118
  @Field(type => ScalarDate, { nullable: true })
119
119
  manufactureDate: Date
120
120
 
121
- @Column('float', { nullable: true })
121
+ @Column('float', { nullable: true, transformer: roundTransformer })
122
122
  @Field({ nullable: true })
123
123
  costPrice: number
124
124
 
125
- @Column('float', { nullable: true })
125
+ @Column('float', { nullable: true, transformer: roundTransformer })
126
126
  @Field({ nullable: true })
127
127
  sellPrice: number
128
128
 
@@ -130,7 +130,7 @@ export class Inventory {
130
130
  @Field({ nullable: true })
131
131
  packingType: string
132
132
 
133
- @Column('float', { nullable: true, default: 1 })
133
+ @Column('float', { nullable: true, default: 1, transformer: roundTransformer })
134
134
  @Field({ nullable: true })
135
135
  packingSize: number
136
136
 
@@ -142,23 +142,23 @@ export class Inventory {
142
142
  @Field({ nullable: true })
143
143
  uom: string
144
144
 
145
- @Column('float', { nullable: true })
145
+ @Column('float', { nullable: true, transformer: roundTransformer })
146
146
  @Field({ nullable: true })
147
147
  uomValue: number
148
148
 
149
- @Column('float', { nullable: true })
149
+ @Column('float', { nullable: true, transformer: roundTransformer })
150
150
  @Field({ nullable: true })
151
151
  lockedUomValue: number
152
152
 
153
- @Column('float')
153
+ @Column('float', { transformer: roundTransformer })
154
154
  @Field({ nullable: true })
155
155
  qty: number
156
156
 
157
- @Column('float', { nullable: true })
157
+ @Column('float', { nullable: true, transformer: roundTransformer })
158
158
  @Field({ nullable: true })
159
159
  lockedQty: number
160
160
 
161
- @Column('float', { nullable: true })
161
+ @Column('float', { nullable: true, transformer: roundTransformer })
162
162
  @Field({ nullable: true })
163
163
  unitCost: number
164
164
 
@@ -248,6 +248,10 @@ export class Inventory {
248
248
  @Field({ nullable: true })
249
249
  auxInfo2?: string
250
250
 
251
+ @Column({ nullable: true })
252
+ @Field({ nullable: true })
253
+ auxInfo3?: string
254
+
251
255
  @Field(type => Float, { nullable: true })
252
256
  averageUnitCost: number
253
257
 
@@ -1,19 +1,10 @@
1
1
  import { Field, ID, ObjectType } from 'type-graphql'
2
- import {
3
- Column,
4
- CreateDateColumn,
5
- Entity,
6
- Index,
7
- ManyToOne,
8
- PrimaryGeneratedColumn,
9
- RelationId,
10
- UpdateDateColumn
11
- } from 'typeorm'
2
+ import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
12
3
 
13
4
  import { User } from '@things-factory/auth-base'
14
5
  import { Bizplace } from '@things-factory/biz-base'
15
6
  import { Product, ProductDetail } from '@things-factory/product-base'
16
- import { Domain, ScalarDate } from '@things-factory/shell'
7
+ import { Domain, ScalarDate, roundTransformer } from '@things-factory/shell'
17
8
 
18
9
  import { InventoryHistory } from '../inventory-history/inventory-history'
19
10
  import { InventoryItemChange } from '../inventory-item-change/inventory-item-change'
@@ -24,10 +15,7 @@ import { Location } from '../location/location'
24
15
  @Index('ix_inventory-change_0', (inventoryChange: InventoryChange) => [inventoryChange.domain, inventoryChange.id], {
25
16
  unique: true
26
17
  })
27
- @Index('ix_inventory-change_1', (inventoryChange: InventoryChange) => [
28
- inventoryChange.domain,
29
- inventoryChange.inventory
30
- ])
18
+ @Index('ix_inventory-change_1', (inventoryChange: InventoryChange) => [inventoryChange.domain, inventoryChange.inventory])
31
19
  @ObjectType()
32
20
  export class InventoryChange {
33
21
  @PrimaryGeneratedColumn('uuid')
@@ -92,7 +80,7 @@ export class InventoryChange {
92
80
  @Field({ nullable: true })
93
81
  packingType: string
94
82
 
95
- @Column('float', { nullable: true })
83
+ @Column('float', { nullable: true, transformer: roundTransformer })
96
84
  @Field({ nullable: true })
97
85
  packingSize: number
98
86
 
@@ -100,19 +88,19 @@ export class InventoryChange {
100
88
  @Field({ nullable: true })
101
89
  uom: string
102
90
 
103
- @Column('float', { nullable: true })
91
+ @Column('float', { nullable: true, transformer: roundTransformer })
104
92
  @Field({ nullable: true })
105
93
  weight: number
106
94
 
107
- @Column('float', { nullable: true })
95
+ @Column('float', { nullable: true, transformer: roundTransformer })
108
96
  @Field({ nullable: true })
109
97
  uomValue: number
110
98
 
111
- @Column('float', { nullable: true })
99
+ @Column('float', { nullable: true, transformer: roundTransformer })
112
100
  @Field({ nullable: true })
113
101
  qty: number
114
102
 
115
- @Column('float', { nullable: true })
103
+ @Column('float', { nullable: true, transformer: roundTransformer })
116
104
  @Field({ nullable: true })
117
105
  unitCost: number
118
106
 
@@ -1,19 +1,10 @@
1
1
  import { Field, ID, ObjectType } from 'type-graphql'
2
- import {
3
- Column,
4
- CreateDateColumn,
5
- Entity,
6
- Index,
7
- ManyToOne,
8
- PrimaryGeneratedColumn,
9
- RelationId,
10
- UpdateDateColumn
11
- } from 'typeorm'
2
+ import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
12
3
 
13
4
  import { User } from '@things-factory/auth-base'
14
5
  import { Bizplace } from '@things-factory/biz-base'
15
6
  import { Product, ProductDetail } from '@things-factory/product-base'
16
- import { Domain, ScalarDate } from '@things-factory/shell'
7
+ import { Domain, ScalarDate, roundTransformer } from '@things-factory/shell'
17
8
 
18
9
  import { Inventory } from '../inventory/inventory'
19
10
  import { Location } from '../location/location'
@@ -21,20 +12,9 @@ import { Pallet } from '../pallet/pallet'
21
12
  import { Warehouse } from '../warehouse/warehouse'
22
13
 
23
14
  @Entity()
24
- @Index(
25
- 'ix_inventory-history_0',
26
- (inventoryHistory: InventoryHistory) => [inventoryHistory.domain, inventoryHistory.name],
27
- { unique: true }
28
- )
29
- @Index('ix_inventory-history_1', (inventoryHistory: InventoryHistory) => [
30
- inventoryHistory.domain,
31
- inventoryHistory.palletId
32
- ])
33
- @Index('ix_inventory-history_2', (inventoryHistory: InventoryHistory) => [
34
- inventoryHistory.inventory,
35
- inventoryHistory.transactionType,
36
- inventoryHistory.refOrderId
37
- ])
15
+ @Index('ix_inventory-history_0', (inventoryHistory: InventoryHistory) => [inventoryHistory.domain, inventoryHistory.name], { unique: true })
16
+ @Index('ix_inventory-history_1', (inventoryHistory: InventoryHistory) => [inventoryHistory.domain, inventoryHistory.palletId])
17
+ @Index('ix_inventory-history_2', (inventoryHistory: InventoryHistory) => [inventoryHistory.inventory, inventoryHistory.transactionType, inventoryHistory.refOrderId])
38
18
  @ObjectType()
39
19
  export class InventoryHistory {
40
20
  @PrimaryGeneratedColumn('uuid')
@@ -119,15 +99,15 @@ export class InventoryHistory {
119
99
  @Field()
120
100
  packingType?: string
121
101
 
122
- @Column('float', { nullable: true, default: 1 })
102
+ @Column('float', { nullable: true, default: 1, transformer: roundTransformer })
123
103
  @Field({ nullable: true })
124
104
  packingSize?: number
125
105
 
126
- @Column('float')
106
+ @Column('float', { transformer: roundTransformer })
127
107
  @Field({ nullable: true })
128
108
  qty?: number
129
109
 
130
- @Column('float', { default: 0, nullable: true })
110
+ @Column('float', { default: 0, nullable: true, transformer: roundTransformer })
131
111
  @Field({ nullable: true })
132
112
  openingQty?: number
133
113
 
@@ -135,15 +115,15 @@ export class InventoryHistory {
135
115
  @Field({ nullable: true })
136
116
  uom?: string
137
117
 
138
- @Column('float', { nullable: true })
118
+ @Column('float', { nullable: true, transformer: roundTransformer })
139
119
  @Field({ nullable: true })
140
120
  uomValue?: number
141
121
 
142
- @Column('float', { default: 0, nullable: true })
122
+ @Column('float', { default: 0, nullable: true, transformer: roundTransformer })
143
123
  @Field({ nullable: true })
144
124
  openingUomValue?: number
145
125
 
146
- @Column('float', { nullable: true })
126
+ @Column('float', { nullable: true, transformer: roundTransformer })
147
127
  @Field({ nullable: true })
148
128
  unitCost?: number
149
129
 
@@ -175,6 +155,10 @@ export class InventoryHistory {
175
155
  @Field(type => ScalarDate, { nullable: true })
176
156
  manufactureDate?: Date
177
157
 
158
+ @Column({ nullable: true })
159
+ @Field({ nullable: true })
160
+ auxInfo3?: string
161
+
178
162
  @ManyToOne(type => User, { nullable: true })
179
163
  @Field({ nullable: true })
180
164
  creator?: User
@@ -1,18 +1,9 @@
1
1
  import { Field, Float, ID, ObjectType } from 'type-graphql'
2
- import {
3
- Column,
4
- CreateDateColumn,
5
- Entity,
6
- Index,
7
- ManyToOne,
8
- PrimaryGeneratedColumn,
9
- RelationId,
10
- UpdateDateColumn
11
- } from 'typeorm'
2
+ import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'
12
3
 
13
4
  import { User } from '@things-factory/auth-base'
14
5
  import { Bizplace } from '@things-factory/biz-base'
15
- import { Domain } from '@things-factory/shell'
6
+ import { Domain, roundTransformer } from '@things-factory/shell'
16
7
 
17
8
  import { Inventory } from '../inventory/inventory'
18
9
 
@@ -39,11 +30,11 @@ export class Movement {
39
30
  @Field()
40
31
  inventory: Inventory
41
32
 
42
- @Column('float')
33
+ @Column('float', { transformer: roundTransformer })
43
34
  @Field(type => Float)
44
35
  inQty: number
45
36
 
46
- @Column('float')
37
+ @Column('float', { transformer: roundTransformer })
47
38
  @Field(type => Float)
48
39
  outQty: number
49
40