@things-factory/sales-base 4.1.29 → 4.1.33
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/dist-server/service/invoice/invoice-mutation.js +4 -0
- package/dist-server/service/invoice/invoice-mutation.js.map +1 -1
- package/dist-server/service/invoice/invoice-types.js +47 -47
- package/dist-server/service/invoice/invoice-types.js.map +1 -1
- package/dist-server/service/invoice/invoice.js +10 -4
- package/dist-server/service/invoice/invoice.js.map +1 -1
- package/dist-server/service/invoice-product/invoice-product-types.js +2 -12
- package/dist-server/service/invoice-product/invoice-product-types.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-types.js +8 -0
- package/dist-server/service/order-inventory/order-inventory-types.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory.js +101 -41
- package/dist-server/service/order-inventory/order-inventory.js.map +1 -1
- package/dist-server/service/release-good/release-good-mutation.js +3 -1
- package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
- package/package.json +3 -3
- package/server/service/invoice/invoice-mutation.ts +5 -0
- package/server/service/invoice/invoice-types.ts +49 -49
- package/server/service/invoice/invoice.ts +9 -4
- package/server/service/invoice-product/invoice-product-types.ts +2 -10
- package/server/service/order-inventory/order-inventory-types.ts +6 -0
- package/server/service/order-inventory/order-inventory.ts +77 -27
- package/server/service/release-good/release-good-mutation.ts +3 -1
|
@@ -19,19 +19,19 @@ export class NewInvoice {
|
|
|
19
19
|
@Field()
|
|
20
20
|
name: string
|
|
21
21
|
|
|
22
|
-
@Field()
|
|
22
|
+
@Field({ nullable: true })
|
|
23
23
|
refNo1: string
|
|
24
24
|
|
|
25
|
-
@Field()
|
|
25
|
+
@Field({ nullable: true })
|
|
26
26
|
refNo2: string
|
|
27
27
|
|
|
28
|
-
@Field()
|
|
28
|
+
@Field({ nullable: true })
|
|
29
29
|
refNo3: string
|
|
30
30
|
|
|
31
|
-
@Field()
|
|
31
|
+
@Field({ nullable: true })
|
|
32
32
|
issuedOn: string
|
|
33
33
|
|
|
34
|
-
@Field()
|
|
34
|
+
@Field({ nullable: true })
|
|
35
35
|
contactPointRefId: string
|
|
36
36
|
|
|
37
37
|
@Field()
|
|
@@ -40,31 +40,31 @@ export class NewInvoice {
|
|
|
40
40
|
@Field()
|
|
41
41
|
fromContactPhone: string
|
|
42
42
|
|
|
43
|
-
@Field()
|
|
43
|
+
@Field({ nullable: true })
|
|
44
44
|
fromAddress1: string
|
|
45
45
|
|
|
46
|
-
@Field()
|
|
46
|
+
@Field({ nullable: true })
|
|
47
47
|
fromAddress2: string
|
|
48
48
|
|
|
49
|
-
@Field()
|
|
49
|
+
@Field({ nullable: true })
|
|
50
50
|
fromAddress3: string
|
|
51
51
|
|
|
52
|
-
@Field()
|
|
52
|
+
@Field({ nullable: true })
|
|
53
53
|
fromAddress4: string
|
|
54
54
|
|
|
55
|
-
@Field()
|
|
55
|
+
@Field({ nullable: true })
|
|
56
56
|
fromAddress5: string
|
|
57
57
|
|
|
58
|
-
@Field()
|
|
58
|
+
@Field({ nullable: true })
|
|
59
59
|
fromPostcode: string
|
|
60
60
|
|
|
61
|
-
@Field()
|
|
61
|
+
@Field({ nullable: true })
|
|
62
62
|
fromCity: string
|
|
63
63
|
|
|
64
|
-
@Field()
|
|
64
|
+
@Field({ nullable: true })
|
|
65
65
|
fromState: string
|
|
66
66
|
|
|
67
|
-
@Field()
|
|
67
|
+
@Field({ nullable: true })
|
|
68
68
|
fromCountry: string
|
|
69
69
|
|
|
70
70
|
@Field()
|
|
@@ -76,16 +76,16 @@ export class NewInvoice {
|
|
|
76
76
|
@Field()
|
|
77
77
|
deliveryAddress1: string
|
|
78
78
|
|
|
79
|
-
@Field()
|
|
79
|
+
@Field({ nullable: true })
|
|
80
80
|
deliveryAddress2: string
|
|
81
81
|
|
|
82
|
-
@Field()
|
|
82
|
+
@Field({ nullable: true })
|
|
83
83
|
deliveryAddress3: string
|
|
84
84
|
|
|
85
|
-
@Field()
|
|
85
|
+
@Field({ nullable: true })
|
|
86
86
|
deliveryAddress4: string
|
|
87
87
|
|
|
88
|
-
@Field()
|
|
88
|
+
@Field({ nullable: true })
|
|
89
89
|
deliveryAddress5: string
|
|
90
90
|
|
|
91
91
|
@Field()
|
|
@@ -109,16 +109,16 @@ export class NewInvoice {
|
|
|
109
109
|
@Field()
|
|
110
110
|
billingAddress1: string
|
|
111
111
|
|
|
112
|
-
@Field()
|
|
112
|
+
@Field({ nullable: true })
|
|
113
113
|
billingAddress2: string
|
|
114
114
|
|
|
115
|
-
@Field()
|
|
115
|
+
@Field({ nullable: true })
|
|
116
116
|
billingAddress3: string
|
|
117
117
|
|
|
118
|
-
@Field()
|
|
118
|
+
@Field({ nullable: true })
|
|
119
119
|
billingAddress4: string
|
|
120
120
|
|
|
121
|
-
@Field()
|
|
121
|
+
@Field({ nullable: true })
|
|
122
122
|
billingAddress5: string
|
|
123
123
|
|
|
124
124
|
@Field()
|
|
@@ -133,13 +133,13 @@ export class NewInvoice {
|
|
|
133
133
|
@Field()
|
|
134
134
|
billingCountry: string
|
|
135
135
|
|
|
136
|
-
@Field()
|
|
137
|
-
paymentDue:
|
|
136
|
+
@Field({ nullable: true })
|
|
137
|
+
paymentDue: string
|
|
138
138
|
|
|
139
139
|
@Field({ nullable: true })
|
|
140
140
|
description: string
|
|
141
141
|
|
|
142
|
-
@Field(type => [NewInvoiceProduct])
|
|
142
|
+
@Field(type => [NewInvoiceProduct], { nullable: true })
|
|
143
143
|
invoiceProducts: NewInvoiceProduct[]
|
|
144
144
|
|
|
145
145
|
@Field(type => ObjectRef)
|
|
@@ -151,19 +151,19 @@ export class InvoicePatch {
|
|
|
151
151
|
@Field({ nullable: true })
|
|
152
152
|
name: string
|
|
153
153
|
|
|
154
|
-
@Field()
|
|
154
|
+
@Field({ nullable: true })
|
|
155
155
|
refNo1: string
|
|
156
156
|
|
|
157
|
-
@Field()
|
|
157
|
+
@Field({ nullable: true })
|
|
158
158
|
refNo2: string
|
|
159
159
|
|
|
160
|
-
@Field()
|
|
160
|
+
@Field({ nullable: true })
|
|
161
161
|
refNo3: string
|
|
162
162
|
|
|
163
|
-
@Field()
|
|
163
|
+
@Field({ nullable: true })
|
|
164
164
|
issuedOn: string
|
|
165
165
|
|
|
166
|
-
@Field()
|
|
166
|
+
@Field({ nullable: true })
|
|
167
167
|
contactPointRefId: string
|
|
168
168
|
|
|
169
169
|
@Field()
|
|
@@ -172,31 +172,31 @@ export class InvoicePatch {
|
|
|
172
172
|
@Field()
|
|
173
173
|
fromContactPhone: string
|
|
174
174
|
|
|
175
|
-
@Field()
|
|
175
|
+
@Field({ nullable: true })
|
|
176
176
|
fromAddress1: string
|
|
177
177
|
|
|
178
|
-
@Field()
|
|
178
|
+
@Field({ nullable: true })
|
|
179
179
|
fromAddress2: string
|
|
180
180
|
|
|
181
|
-
@Field()
|
|
181
|
+
@Field({ nullable: true })
|
|
182
182
|
fromAddress3: string
|
|
183
183
|
|
|
184
|
-
@Field()
|
|
184
|
+
@Field({ nullable: true })
|
|
185
185
|
fromAddress4: string
|
|
186
186
|
|
|
187
|
-
@Field()
|
|
187
|
+
@Field({ nullable: true })
|
|
188
188
|
fromAddress5: string
|
|
189
189
|
|
|
190
|
-
@Field()
|
|
190
|
+
@Field({ nullable: true })
|
|
191
191
|
fromPostcode: string
|
|
192
192
|
|
|
193
|
-
@Field()
|
|
193
|
+
@Field({ nullable: true })
|
|
194
194
|
fromCity: string
|
|
195
195
|
|
|
196
|
-
@Field()
|
|
196
|
+
@Field({ nullable: true })
|
|
197
197
|
fromState: string
|
|
198
198
|
|
|
199
|
-
@Field()
|
|
199
|
+
@Field({ nullable: true })
|
|
200
200
|
fromCountry: string
|
|
201
201
|
|
|
202
202
|
@Field()
|
|
@@ -208,16 +208,16 @@ export class InvoicePatch {
|
|
|
208
208
|
@Field()
|
|
209
209
|
deliveryAddress1: string
|
|
210
210
|
|
|
211
|
-
@Field()
|
|
211
|
+
@Field({ nullable: true })
|
|
212
212
|
deliveryAddress2: string
|
|
213
213
|
|
|
214
|
-
@Field()
|
|
214
|
+
@Field({ nullable: true })
|
|
215
215
|
deliveryAddress3: string
|
|
216
216
|
|
|
217
|
-
@Field()
|
|
217
|
+
@Field({ nullable: true })
|
|
218
218
|
deliveryAddress4: string
|
|
219
219
|
|
|
220
|
-
@Field()
|
|
220
|
+
@Field({ nullable: true })
|
|
221
221
|
deliveryAddress5: string
|
|
222
222
|
|
|
223
223
|
@Field()
|
|
@@ -241,16 +241,16 @@ export class InvoicePatch {
|
|
|
241
241
|
@Field()
|
|
242
242
|
billingAddress1: string
|
|
243
243
|
|
|
244
|
-
@Field()
|
|
244
|
+
@Field({ nullable: true })
|
|
245
245
|
billingAddress2: string
|
|
246
246
|
|
|
247
|
-
@Field()
|
|
247
|
+
@Field({ nullable: true })
|
|
248
248
|
billingAddress3: string
|
|
249
249
|
|
|
250
|
-
@Field()
|
|
250
|
+
@Field({ nullable: true })
|
|
251
251
|
billingAddress4: string
|
|
252
252
|
|
|
253
|
-
@Field()
|
|
253
|
+
@Field({ nullable: true })
|
|
254
254
|
billingAddress5: string
|
|
255
255
|
|
|
256
256
|
@Field()
|
|
@@ -265,8 +265,8 @@ export class InvoicePatch {
|
|
|
265
265
|
@Field()
|
|
266
266
|
billingCountry: string
|
|
267
267
|
|
|
268
|
-
@Field()
|
|
269
|
-
paymentDue:
|
|
268
|
+
@Field({ nullable: true })
|
|
269
|
+
paymentDue: string
|
|
270
270
|
|
|
271
271
|
@Field({ nullable: true })
|
|
272
272
|
description: string
|
|
@@ -43,26 +43,28 @@ export class Invoice {
|
|
|
43
43
|
description: string
|
|
44
44
|
|
|
45
45
|
@OneToMany(type => InvoiceProduct, invoiceProduct => invoiceProduct.invoice)
|
|
46
|
+
@Field(type => [InvoiceProduct], { nullable: true })
|
|
46
47
|
invoiceProducts: InvoiceProduct[]
|
|
47
48
|
|
|
48
49
|
@OneToOne(type => ReleaseGood, { nullable: true })
|
|
50
|
+
@Field(type => ReleaseGood, { nullable: true })
|
|
49
51
|
@JoinColumn()
|
|
50
52
|
releaseGood: ReleaseGood
|
|
51
53
|
|
|
52
54
|
@Column({ default: '' })
|
|
53
|
-
@Field()
|
|
55
|
+
@Field({ nullable: true })
|
|
54
56
|
refNo1: string
|
|
55
57
|
|
|
56
58
|
@Column({ default: '' })
|
|
57
|
-
@Field()
|
|
59
|
+
@Field({ nullable: true })
|
|
58
60
|
refNo2: string
|
|
59
61
|
|
|
60
62
|
@Column({ default: '' })
|
|
61
|
-
@Field()
|
|
63
|
+
@Field({ nullable: true })
|
|
62
64
|
refNo3: string
|
|
63
65
|
|
|
64
66
|
@Column({ nullable: true })
|
|
65
|
-
@Field()
|
|
67
|
+
@Field({ nullable: true })
|
|
66
68
|
issuedOn: Date
|
|
67
69
|
|
|
68
70
|
@Column({ type: 'uuid', nullable: true })
|
|
@@ -201,6 +203,9 @@ export class Invoice {
|
|
|
201
203
|
@Field()
|
|
202
204
|
billingCountry: string
|
|
203
205
|
|
|
206
|
+
@Field({ nullable: true })
|
|
207
|
+
paymentDue: string
|
|
208
|
+
|
|
204
209
|
@CreateDateColumn()
|
|
205
210
|
@Field()
|
|
206
211
|
createdAt: Date
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Field, Float, InputType, Int, ObjectType } from 'type-graphql'
|
|
2
2
|
|
|
3
|
-
import { ObjectRef } from '@things-factory/shell'
|
|
4
|
-
|
|
5
3
|
import { InvoiceProduct } from './invoice-product'
|
|
6
4
|
|
|
7
5
|
@ObjectType()
|
|
@@ -30,16 +28,13 @@ export class NewInvoiceProduct {
|
|
|
30
28
|
@Field({ nullable: true })
|
|
31
29
|
description: string
|
|
32
30
|
|
|
33
|
-
@Field(type => ObjectRef)
|
|
34
|
-
invoice: ObjectRef
|
|
35
|
-
|
|
36
31
|
@Field(type => ProductInput)
|
|
37
32
|
product: ProductInput
|
|
38
33
|
|
|
39
34
|
@Field(type => Int)
|
|
40
35
|
qty: number
|
|
41
36
|
|
|
42
|
-
@Field(type => Float, { nullable:
|
|
37
|
+
@Field(type => Float, { nullable: true })
|
|
43
38
|
otherCharges: number
|
|
44
39
|
|
|
45
40
|
@Field(type => Float)
|
|
@@ -60,16 +55,13 @@ export class InvoiceProductPatch {
|
|
|
60
55
|
@Field({ nullable: true })
|
|
61
56
|
description: string
|
|
62
57
|
|
|
63
|
-
@Field(type => ObjectRef)
|
|
64
|
-
invoice: ObjectRef
|
|
65
|
-
|
|
66
58
|
@Field(type => ProductInput)
|
|
67
59
|
product: ProductInput
|
|
68
60
|
|
|
69
61
|
@Field(type => Int)
|
|
70
62
|
qty: number
|
|
71
63
|
|
|
72
|
-
@Field(type => Float, { nullable:
|
|
64
|
+
@Field(type => Float, { nullable: true })
|
|
73
65
|
otherCharges: number
|
|
74
66
|
|
|
75
67
|
@Field(type => Float)
|
|
@@ -103,6 +103,12 @@ export class NewOrderInventory {
|
|
|
103
103
|
|
|
104
104
|
@Field(type => Float, { nullable: true })
|
|
105
105
|
returnUomValue: number
|
|
106
|
+
|
|
107
|
+
@Field(type => Int, { nullable: true })
|
|
108
|
+
returnToLocationQty: number
|
|
109
|
+
|
|
110
|
+
@Field(type => Float, { nullable: true })
|
|
111
|
+
returnToLocationUomValue: number
|
|
106
112
|
}
|
|
107
113
|
|
|
108
114
|
@InputType()
|
|
@@ -52,6 +52,7 @@ import { TransferOrder } from '../transfer-order/transfer-order'
|
|
|
52
52
|
],
|
|
53
53
|
{ unique: true }
|
|
54
54
|
)
|
|
55
|
+
|
|
55
56
|
@Index('ix_order-inventory_4', (orderInventory: OrderInventory) => [
|
|
56
57
|
orderInventory.status,
|
|
57
58
|
orderInventory.batchId,
|
|
@@ -62,6 +63,7 @@ import { TransferOrder } from '../transfer-order/transfer-order'
|
|
|
62
63
|
orderInventory.releaseQty,
|
|
63
64
|
orderInventory.uom
|
|
64
65
|
])
|
|
66
|
+
|
|
65
67
|
@ObjectType()
|
|
66
68
|
export class OrderInventory {
|
|
67
69
|
@PrimaryGeneratedColumn('uuid')
|
|
@@ -147,9 +149,6 @@ export class OrderInventory {
|
|
|
147
149
|
@RelationId((orderInventory: OrderInventory) => orderInventory.releaseGood)
|
|
148
150
|
releaseGoodId: string
|
|
149
151
|
|
|
150
|
-
@Field({ nullable: true })
|
|
151
|
-
releaseGoodName: string
|
|
152
|
-
|
|
153
152
|
@ManyToOne(type => InventoryCheck)
|
|
154
153
|
@Field(type => InventoryCheck, { nullable: true })
|
|
155
154
|
inventoryCheck: InventoryCheck
|
|
@@ -254,38 +253,25 @@ export class OrderInventory {
|
|
|
254
253
|
@Field({ nullable: true })
|
|
255
254
|
releaseUomValue: number
|
|
256
255
|
|
|
257
|
-
@Field({ nullable: true })
|
|
258
|
-
releaseUomValueWithUom: string
|
|
259
|
-
|
|
260
256
|
@Column({ nullable: true })
|
|
261
257
|
@Field({ nullable: true })
|
|
262
258
|
uom: string
|
|
263
259
|
|
|
260
|
+
@Column({ nullable: true, type: 'float' })
|
|
264
261
|
@Field({ nullable: true })
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
@Field({ nullable: true })
|
|
268
|
-
productSKU: string
|
|
269
|
-
|
|
270
|
-
@Field({ nullable: true })
|
|
271
|
-
productBrand: string
|
|
272
|
-
|
|
273
|
-
@Field({ nullable: true })
|
|
274
|
-
pallet: string
|
|
275
|
-
|
|
276
|
-
@Field({ nullable: true })
|
|
277
|
-
palletId: string
|
|
262
|
+
returnQty: number
|
|
278
263
|
|
|
264
|
+
@Column({ nullable: true, type: 'float' })
|
|
279
265
|
@Field({ nullable: true })
|
|
280
|
-
|
|
266
|
+
returnUomValue: number
|
|
281
267
|
|
|
282
268
|
@Column({ nullable: true, type: 'float' })
|
|
283
269
|
@Field({ nullable: true })
|
|
284
|
-
|
|
270
|
+
returnToLocationQty: number
|
|
285
271
|
|
|
286
272
|
@Column({ nullable: true, type: 'float' })
|
|
287
273
|
@Field({ nullable: true })
|
|
288
|
-
|
|
274
|
+
returnToLocationUomValue: number
|
|
289
275
|
|
|
290
276
|
@Column({ nullable: true })
|
|
291
277
|
@Field({ nullable: true })
|
|
@@ -314,20 +300,45 @@ export class OrderInventory {
|
|
|
314
300
|
@Field({ nullable: true })
|
|
315
301
|
status: string
|
|
316
302
|
|
|
303
|
+
@ManyToOne(type => User)
|
|
304
|
+
@Field(type => User, { nullable: true })
|
|
305
|
+
pickedByUser: User
|
|
306
|
+
|
|
307
|
+
@Column({ nullable: true })
|
|
317
308
|
@Field({ nullable: true })
|
|
318
|
-
|
|
309
|
+
pickedBy: string
|
|
319
310
|
|
|
311
|
+
@Column({ nullable: true })
|
|
320
312
|
@Field({ nullable: true })
|
|
321
|
-
|
|
313
|
+
pickedAt: Date
|
|
322
314
|
|
|
315
|
+
@ManyToOne(type => User)
|
|
316
|
+
@Field(type => User, { nullable: true })
|
|
317
|
+
packedByUser: User
|
|
318
|
+
|
|
319
|
+
@Column({ nullable: true })
|
|
323
320
|
@Field({ nullable: true })
|
|
324
|
-
|
|
321
|
+
packedBy: string
|
|
325
322
|
|
|
323
|
+
@Column({ nullable: true })
|
|
326
324
|
@Field({ nullable: true })
|
|
327
|
-
|
|
325
|
+
packedAt: Date
|
|
326
|
+
|
|
327
|
+
@ManyToOne(type => User)
|
|
328
|
+
@Field(type => User, { nullable: true })
|
|
329
|
+
loadedByUser: User
|
|
330
|
+
|
|
331
|
+
@Column({ nullable: true })
|
|
332
|
+
@Field({ nullable: true })
|
|
333
|
+
loadedBy: string
|
|
328
334
|
|
|
335
|
+
@Column({ nullable: true })
|
|
329
336
|
@Field({ nullable: true })
|
|
330
|
-
|
|
337
|
+
loadedAt: Date
|
|
338
|
+
|
|
339
|
+
@Column({ nullable: true })
|
|
340
|
+
@Field({ nullable: true })
|
|
341
|
+
shippedAt: Date
|
|
331
342
|
|
|
332
343
|
@CreateDateColumn()
|
|
333
344
|
@Field()
|
|
@@ -350,4 +361,43 @@ export class OrderInventory {
|
|
|
350
361
|
|
|
351
362
|
@RelationId((orderInventory: OrderInventory) => orderInventory.updater)
|
|
352
363
|
updaterId: string
|
|
364
|
+
|
|
365
|
+
@Field({ nullable: true })
|
|
366
|
+
remainQty: number
|
|
367
|
+
|
|
368
|
+
@Field({ nullable: true })
|
|
369
|
+
remainUomValue: string
|
|
370
|
+
|
|
371
|
+
@Field({ nullable: true })
|
|
372
|
+
remainUomValueWithUom: string
|
|
373
|
+
|
|
374
|
+
@Field({ nullable: true })
|
|
375
|
+
isError: boolean
|
|
376
|
+
|
|
377
|
+
@Field({ nullable: true })
|
|
378
|
+
groupType: string
|
|
379
|
+
|
|
380
|
+
@Field({ nullable: true })
|
|
381
|
+
releaseUomValueWithUom: string
|
|
382
|
+
|
|
383
|
+
@Field({ nullable: true })
|
|
384
|
+
releaseGoodName: string
|
|
385
|
+
|
|
386
|
+
@Field({ nullable: true })
|
|
387
|
+
productName: string
|
|
388
|
+
|
|
389
|
+
@Field({ nullable: true })
|
|
390
|
+
productSKU: string
|
|
391
|
+
|
|
392
|
+
@Field({ nullable: true })
|
|
393
|
+
productBrand: string
|
|
394
|
+
|
|
395
|
+
@Field({ nullable: true })
|
|
396
|
+
pallet: string
|
|
397
|
+
|
|
398
|
+
@Field({ nullable: true })
|
|
399
|
+
palletId: string
|
|
400
|
+
|
|
401
|
+
@Field({ nullable: true })
|
|
402
|
+
extraJsonData: string
|
|
353
403
|
}
|
|
@@ -823,7 +823,9 @@ export async function confirmReleaseGood(name: string, context: any, tx?: Entity
|
|
|
823
823
|
if (foundMarketplaceProductVariations) {
|
|
824
824
|
await Promise.all(
|
|
825
825
|
foundMarketplaceProductVariations.map(async variation => {
|
|
826
|
-
variation.
|
|
826
|
+
if (variation.marketplaceProduct.marketplaceStore.reserveEnabled) {
|
|
827
|
+
variation.reserveQty -= oi.releaseQty
|
|
828
|
+
}
|
|
827
829
|
|
|
828
830
|
await tx.getRepository(MarketplaceProductVariation).save(variation)
|
|
829
831
|
})
|