@things-factory/sales-base 4.0.36 → 4.0.40

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.
Files changed (106) hide show
  1. package/dist-server/controllers/ecommerce/sellercraft-controller.js +4 -3
  2. package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
  3. package/dist-server/service/arrival-notice/arrival-notice-mutation.js +42 -35
  4. package/dist-server/service/arrival-notice/arrival-notice-mutation.js.map +1 -1
  5. package/dist-server/service/arrival-notice/arrival-notice-query.js +91 -79
  6. package/dist-server/service/arrival-notice/arrival-notice-query.js.map +1 -1
  7. package/dist-server/service/arrival-notice/arrival-notice-types.js +8 -0
  8. package/dist-server/service/arrival-notice/arrival-notice-types.js.map +1 -1
  9. package/dist-server/service/arrival-notice/arrival-notice.js +20 -15
  10. package/dist-server/service/arrival-notice/arrival-notice.js.map +1 -1
  11. package/dist-server/service/delivery-order/delivery-order-mutation.js +28 -26
  12. package/dist-server/service/delivery-order/delivery-order-mutation.js.map +1 -1
  13. package/dist-server/service/delivery-order/delivery-order-query.js +14 -14
  14. package/dist-server/service/delivery-order/delivery-order-query.js.map +1 -1
  15. package/dist-server/service/delivery-order/delivery-order-summary-report.js +145 -0
  16. package/dist-server/service/delivery-order/delivery-order-summary-report.js.map +1 -0
  17. package/dist-server/service/delivery-order/delivery-order.js +16 -13
  18. package/dist-server/service/delivery-order/delivery-order.js.map +1 -1
  19. package/dist-server/service/delivery-order/index.js +3 -1
  20. package/dist-server/service/delivery-order/index.js.map +1 -1
  21. package/dist-server/service/index.js +12 -4
  22. package/dist-server/service/index.js.map +1 -1
  23. package/dist-server/service/invoice/invoice-mutation.js +21 -3
  24. package/dist-server/service/invoice/invoice-mutation.js.map +1 -1
  25. package/dist-server/service/invoice/invoice-query.js +5 -7
  26. package/dist-server/service/invoice/invoice-query.js.map +1 -1
  27. package/dist-server/service/invoice/invoice-types.js +302 -20
  28. package/dist-server/service/invoice/invoice-types.js.map +1 -1
  29. package/dist-server/service/invoice/invoice.js +190 -26
  30. package/dist-server/service/invoice/invoice.js.map +1 -1
  31. package/dist-server/service/invoice-product/index.js +21 -0
  32. package/dist-server/service/invoice-product/index.js.map +1 -0
  33. package/dist-server/service/invoice-product/invoice-product-mutation.js +70 -0
  34. package/dist-server/service/invoice-product/invoice-product-mutation.js.map +1 -0
  35. package/dist-server/service/invoice-product/invoice-product-query.js +95 -0
  36. package/dist-server/service/invoice-product/invoice-product-query.js.map +1 -0
  37. package/dist-server/service/invoice-product/invoice-product-types.js +125 -0
  38. package/dist-server/service/invoice-product/invoice-product-types.js.map +1 -0
  39. package/dist-server/service/invoice-product/invoice-product.js +117 -0
  40. package/dist-server/service/invoice-product/invoice-product.js.map +1 -0
  41. package/dist-server/service/order-inventory/order-inventory-query.js +9 -7
  42. package/dist-server/service/order-inventory/order-inventory-query.js.map +1 -1
  43. package/dist-server/service/order-inventory/order-inventory-types.js +11 -11
  44. package/dist-server/service/order-inventory/order-inventory-types.js.map +1 -1
  45. package/dist-server/service/order-inventory/order-inventory.js +31 -25
  46. package/dist-server/service/order-inventory/order-inventory.js.map +1 -1
  47. package/dist-server/service/order-product/order-product.js +26 -21
  48. package/dist-server/service/order-product/order-product.js.map +1 -1
  49. package/dist-server/service/order-vas/order-vas.js +34 -27
  50. package/dist-server/service/order-vas/order-vas.js.map +1 -1
  51. package/dist-server/service/others/other-query.js +4 -2
  52. package/dist-server/service/others/other-query.js.map +1 -1
  53. package/dist-server/service/others/other-types.js +42 -0
  54. package/dist-server/service/others/other-types.js.map +1 -1
  55. package/dist-server/service/purchase-order/purchase-order-mutation.js +23 -36
  56. package/dist-server/service/purchase-order/purchase-order-mutation.js.map +1 -1
  57. package/dist-server/service/release-good/release-good-mutation.js +84 -82
  58. package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
  59. package/dist-server/service/release-good/release-good-query.js +8 -9
  60. package/dist-server/service/release-good/release-good-query.js.map +1 -1
  61. package/dist-server/service/release-good/release-good.js +2 -0
  62. package/dist-server/service/release-good/release-good.js.map +1 -1
  63. package/dist-server/service/return-order/return-order-mutation.js +21 -6
  64. package/dist-server/service/return-order/return-order-mutation.js.map +1 -1
  65. package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.js +9 -5
  66. package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.js.map +1 -1
  67. package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.js +3 -2
  68. package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.js.map +1 -1
  69. package/dist-server/utils/order-no-generator.js +7 -0
  70. package/dist-server/utils/order-no-generator.js.map +1 -1
  71. package/package.json +12 -12
  72. package/server/controllers/ecommerce/sellercraft-controller.ts +2 -1
  73. package/server/service/arrival-notice/arrival-notice-mutation.ts +11 -15
  74. package/server/service/arrival-notice/arrival-notice-query.ts +94 -78
  75. package/server/service/arrival-notice/arrival-notice-types.ts +6 -0
  76. package/server/service/arrival-notice/arrival-notice.ts +6 -1
  77. package/server/service/delivery-order/delivery-order-mutation.ts +4 -8
  78. package/server/service/delivery-order/delivery-order-query.ts +4 -4
  79. package/server/service/delivery-order/delivery-order-summary-report.ts +152 -0
  80. package/server/service/delivery-order/delivery-order.ts +4 -1
  81. package/server/service/delivery-order/index.ts +3 -1
  82. package/server/service/index.ts +20 -12
  83. package/server/service/invoice/invoice-mutation.ts +45 -7
  84. package/server/service/invoice/invoice-query.ts +6 -6
  85. package/server/service/invoice/invoice-types.ts +231 -18
  86. package/server/service/invoice/invoice.ts +154 -20
  87. package/server/service/invoice-product/index.ts +9 -0
  88. package/server/service/invoice-product/invoice-product-mutation.ts +54 -0
  89. package/server/service/invoice-product/invoice-product-query.ts +55 -0
  90. package/server/service/invoice-product/invoice-product-types.ts +80 -0
  91. package/server/service/invoice-product/invoice-product.ts +93 -0
  92. package/server/service/order-inventory/order-inventory-query.ts +3 -1
  93. package/server/service/order-inventory/order-inventory-types.ts +11 -11
  94. package/server/service/order-inventory/order-inventory.ts +11 -13
  95. package/server/service/order-product/order-product.ts +13 -13
  96. package/server/service/order-vas/order-vas.ts +15 -15
  97. package/server/service/others/other-query.ts +9 -15
  98. package/server/service/others/other-types.ts +31 -0
  99. package/server/service/purchase-order/purchase-order-mutation.ts +19 -21
  100. package/server/service/release-good/release-good-mutation.ts +64 -58
  101. package/server/service/release-good/release-good-query.ts +6 -12
  102. package/server/service/release-good/release-good.ts +2 -0
  103. package/server/service/return-order/return-order-mutation.ts +30 -6
  104. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.ts +8 -5
  105. package/server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.ts +3 -2
  106. package/server/utils/order-no-generator.ts +11 -0
@@ -8,10 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
+ var _a, _b;
11
12
  Object.defineProperty(exports, "__esModule", { value: true });
12
13
  exports.InvoicePatch = exports.NewInvoice = exports.InvoiceList = void 0;
13
14
  const type_graphql_1 = require("type-graphql");
14
- const purchase_order_types_1 = require("../purchase-order/purchase-order-types");
15
+ const shell_1 = require("@things-factory/shell");
16
+ const invoice_product_types_1 = require("../invoice-product/invoice-product-types");
15
17
  const invoice_1 = require("./invoice");
16
18
  let InvoiceList = class InvoiceList {
17
19
  };
@@ -36,7 +38,15 @@ __decorate([
36
38
  __decorate([
37
39
  (0, type_graphql_1.Field)(),
38
40
  __metadata("design:type", String)
39
- ], NewInvoice.prototype, "customer", void 0);
41
+ ], NewInvoice.prototype, "refNo1", void 0);
42
+ __decorate([
43
+ (0, type_graphql_1.Field)(),
44
+ __metadata("design:type", String)
45
+ ], NewInvoice.prototype, "refNo2", void 0);
46
+ __decorate([
47
+ (0, type_graphql_1.Field)(),
48
+ __metadata("design:type", String)
49
+ ], NewInvoice.prototype, "refNo3", void 0);
40
50
  __decorate([
41
51
  (0, type_graphql_1.Field)(),
42
52
  __metadata("design:type", String)
@@ -44,23 +54,155 @@ __decorate([
44
54
  __decorate([
45
55
  (0, type_graphql_1.Field)(),
46
56
  __metadata("design:type", String)
47
- ], NewInvoice.prototype, "paymentDue", void 0);
57
+ ], NewInvoice.prototype, "contactPointRefId", void 0);
58
+ __decorate([
59
+ (0, type_graphql_1.Field)(),
60
+ __metadata("design:type", String)
61
+ ], NewInvoice.prototype, "from", void 0);
62
+ __decorate([
63
+ (0, type_graphql_1.Field)(),
64
+ __metadata("design:type", String)
65
+ ], NewInvoice.prototype, "fromContactPhone", void 0);
66
+ __decorate([
67
+ (0, type_graphql_1.Field)(),
68
+ __metadata("design:type", String)
69
+ ], NewInvoice.prototype, "fromAddress1", void 0);
70
+ __decorate([
71
+ (0, type_graphql_1.Field)(),
72
+ __metadata("design:type", String)
73
+ ], NewInvoice.prototype, "fromAddress2", void 0);
74
+ __decorate([
75
+ (0, type_graphql_1.Field)(),
76
+ __metadata("design:type", String)
77
+ ], NewInvoice.prototype, "fromAddress3", void 0);
78
+ __decorate([
79
+ (0, type_graphql_1.Field)(),
80
+ __metadata("design:type", String)
81
+ ], NewInvoice.prototype, "fromAddress4", void 0);
82
+ __decorate([
83
+ (0, type_graphql_1.Field)(),
84
+ __metadata("design:type", String)
85
+ ], NewInvoice.prototype, "fromAddress5", void 0);
48
86
  __decorate([
49
87
  (0, type_graphql_1.Field)(),
50
88
  __metadata("design:type", String)
51
- ], NewInvoice.prototype, "version", void 0);
89
+ ], NewInvoice.prototype, "fromPostcode", void 0);
52
90
  __decorate([
53
- (0, type_graphql_1.Field)(type => purchase_order_types_1.PurchaseOrderPatch),
54
- __metadata("design:type", purchase_order_types_1.PurchaseOrderPatch)
55
- ], NewInvoice.prototype, "purchaseOrder", void 0);
91
+ (0, type_graphql_1.Field)(),
92
+ __metadata("design:type", String)
93
+ ], NewInvoice.prototype, "fromCity", void 0);
94
+ __decorate([
95
+ (0, type_graphql_1.Field)(),
96
+ __metadata("design:type", String)
97
+ ], NewInvoice.prototype, "fromState", void 0);
98
+ __decorate([
99
+ (0, type_graphql_1.Field)(),
100
+ __metadata("design:type", String)
101
+ ], NewInvoice.prototype, "fromCountry", void 0);
102
+ __decorate([
103
+ (0, type_graphql_1.Field)(),
104
+ __metadata("design:type", String)
105
+ ], NewInvoice.prototype, "deliverTo", void 0);
106
+ __decorate([
107
+ (0, type_graphql_1.Field)(),
108
+ __metadata("design:type", String)
109
+ ], NewInvoice.prototype, "deliverToPhone", void 0);
56
110
  __decorate([
57
111
  (0, type_graphql_1.Field)(),
58
112
  __metadata("design:type", String)
59
- ], NewInvoice.prototype, "state", void 0);
113
+ ], NewInvoice.prototype, "deliveryAddress1", void 0);
114
+ __decorate([
115
+ (0, type_graphql_1.Field)(),
116
+ __metadata("design:type", String)
117
+ ], NewInvoice.prototype, "deliveryAddress2", void 0);
118
+ __decorate([
119
+ (0, type_graphql_1.Field)(),
120
+ __metadata("design:type", String)
121
+ ], NewInvoice.prototype, "deliveryAddress3", void 0);
122
+ __decorate([
123
+ (0, type_graphql_1.Field)(),
124
+ __metadata("design:type", String)
125
+ ], NewInvoice.prototype, "deliveryAddress4", void 0);
126
+ __decorate([
127
+ (0, type_graphql_1.Field)(),
128
+ __metadata("design:type", String)
129
+ ], NewInvoice.prototype, "deliveryAddress5", void 0);
130
+ __decorate([
131
+ (0, type_graphql_1.Field)(),
132
+ __metadata("design:type", String)
133
+ ], NewInvoice.prototype, "deliveryCity", void 0);
134
+ __decorate([
135
+ (0, type_graphql_1.Field)(),
136
+ __metadata("design:type", String)
137
+ ], NewInvoice.prototype, "deliveryState", void 0);
138
+ __decorate([
139
+ (0, type_graphql_1.Field)(),
140
+ __metadata("design:type", String)
141
+ ], NewInvoice.prototype, "deliveryCountry", void 0);
142
+ __decorate([
143
+ (0, type_graphql_1.Field)(),
144
+ __metadata("design:type", String)
145
+ ], NewInvoice.prototype, "deliveryPostcode", void 0);
146
+ __decorate([
147
+ (0, type_graphql_1.Field)(),
148
+ __metadata("design:type", String)
149
+ ], NewInvoice.prototype, "billTo", void 0);
150
+ __decorate([
151
+ (0, type_graphql_1.Field)(),
152
+ __metadata("design:type", String)
153
+ ], NewInvoice.prototype, "billToPhone", void 0);
154
+ __decorate([
155
+ (0, type_graphql_1.Field)(),
156
+ __metadata("design:type", String)
157
+ ], NewInvoice.prototype, "billingAddress1", void 0);
158
+ __decorate([
159
+ (0, type_graphql_1.Field)(),
160
+ __metadata("design:type", String)
161
+ ], NewInvoice.prototype, "billingAddress2", void 0);
162
+ __decorate([
163
+ (0, type_graphql_1.Field)(),
164
+ __metadata("design:type", String)
165
+ ], NewInvoice.prototype, "billingAddress3", void 0);
166
+ __decorate([
167
+ (0, type_graphql_1.Field)(),
168
+ __metadata("design:type", String)
169
+ ], NewInvoice.prototype, "billingAddress4", void 0);
170
+ __decorate([
171
+ (0, type_graphql_1.Field)(),
172
+ __metadata("design:type", String)
173
+ ], NewInvoice.prototype, "billingAddress5", void 0);
174
+ __decorate([
175
+ (0, type_graphql_1.Field)(),
176
+ __metadata("design:type", String)
177
+ ], NewInvoice.prototype, "billingPostcode", void 0);
178
+ __decorate([
179
+ (0, type_graphql_1.Field)(),
180
+ __metadata("design:type", String)
181
+ ], NewInvoice.prototype, "billingCity", void 0);
182
+ __decorate([
183
+ (0, type_graphql_1.Field)(),
184
+ __metadata("design:type", String)
185
+ ], NewInvoice.prototype, "billingState", void 0);
186
+ __decorate([
187
+ (0, type_graphql_1.Field)(),
188
+ __metadata("design:type", String)
189
+ ], NewInvoice.prototype, "billingCountry", void 0);
190
+ __decorate([
191
+ (0, type_graphql_1.Field)(),
192
+ __metadata("design:type", String)
193
+ ], NewInvoice.prototype, "paymentDue", void 0);
60
194
  __decorate([
61
195
  (0, type_graphql_1.Field)({ nullable: true }),
62
196
  __metadata("design:type", String)
63
197
  ], NewInvoice.prototype, "description", void 0);
198
+ __decorate([
199
+ (0, type_graphql_1.Field)(type => [invoice_product_types_1.NewInvoiceProduct]),
200
+ __metadata("design:type", Array)
201
+ ], NewInvoice.prototype, "invoiceProducts", void 0);
202
+ __decorate([
203
+ (0, type_graphql_1.Field)(type => shell_1.ObjectRef),
204
+ __metadata("design:type", typeof (_a = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _a : Object)
205
+ ], NewInvoice.prototype, "releaseGood", void 0);
64
206
  NewInvoice = __decorate([
65
207
  (0, type_graphql_1.InputType)()
66
208
  ], NewInvoice);
@@ -72,33 +214,173 @@ __decorate([
72
214
  __metadata("design:type", String)
73
215
  ], InvoicePatch.prototype, "name", void 0);
74
216
  __decorate([
75
- (0, type_graphql_1.Field)({ nullable: true }),
217
+ (0, type_graphql_1.Field)(),
76
218
  __metadata("design:type", String)
77
- ], InvoicePatch.prototype, "customer", void 0);
219
+ ], InvoicePatch.prototype, "refNo1", void 0);
78
220
  __decorate([
79
- (0, type_graphql_1.Field)({ nullable: true }),
221
+ (0, type_graphql_1.Field)(),
222
+ __metadata("design:type", String)
223
+ ], InvoicePatch.prototype, "refNo2", void 0);
224
+ __decorate([
225
+ (0, type_graphql_1.Field)(),
226
+ __metadata("design:type", String)
227
+ ], InvoicePatch.prototype, "refNo3", void 0);
228
+ __decorate([
229
+ (0, type_graphql_1.Field)(),
80
230
  __metadata("design:type", String)
81
231
  ], InvoicePatch.prototype, "issuedOn", void 0);
82
232
  __decorate([
83
- (0, type_graphql_1.Field)({ nullable: true }),
233
+ (0, type_graphql_1.Field)(),
84
234
  __metadata("design:type", String)
85
- ], InvoicePatch.prototype, "paymentDue", void 0);
235
+ ], InvoicePatch.prototype, "contactPointRefId", void 0);
86
236
  __decorate([
87
- (0, type_graphql_1.Field)({ nullable: true }),
237
+ (0, type_graphql_1.Field)(),
88
238
  __metadata("design:type", String)
89
- ], InvoicePatch.prototype, "version", void 0);
239
+ ], InvoicePatch.prototype, "from", void 0);
90
240
  __decorate([
91
- (0, type_graphql_1.Field)(type => purchase_order_types_1.PurchaseOrderPatch, { nullable: true }),
92
- __metadata("design:type", purchase_order_types_1.PurchaseOrderPatch)
93
- ], InvoicePatch.prototype, "purchaseOrder", void 0);
241
+ (0, type_graphql_1.Field)(),
242
+ __metadata("design:type", String)
243
+ ], InvoicePatch.prototype, "fromContactPhone", void 0);
94
244
  __decorate([
95
- (0, type_graphql_1.Field)({ nullable: true }),
245
+ (0, type_graphql_1.Field)(),
246
+ __metadata("design:type", String)
247
+ ], InvoicePatch.prototype, "fromAddress1", void 0);
248
+ __decorate([
249
+ (0, type_graphql_1.Field)(),
250
+ __metadata("design:type", String)
251
+ ], InvoicePatch.prototype, "fromAddress2", void 0);
252
+ __decorate([
253
+ (0, type_graphql_1.Field)(),
254
+ __metadata("design:type", String)
255
+ ], InvoicePatch.prototype, "fromAddress3", void 0);
256
+ __decorate([
257
+ (0, type_graphql_1.Field)(),
258
+ __metadata("design:type", String)
259
+ ], InvoicePatch.prototype, "fromAddress4", void 0);
260
+ __decorate([
261
+ (0, type_graphql_1.Field)(),
262
+ __metadata("design:type", String)
263
+ ], InvoicePatch.prototype, "fromAddress5", void 0);
264
+ __decorate([
265
+ (0, type_graphql_1.Field)(),
266
+ __metadata("design:type", String)
267
+ ], InvoicePatch.prototype, "fromPostcode", void 0);
268
+ __decorate([
269
+ (0, type_graphql_1.Field)(),
270
+ __metadata("design:type", String)
271
+ ], InvoicePatch.prototype, "fromCity", void 0);
272
+ __decorate([
273
+ (0, type_graphql_1.Field)(),
274
+ __metadata("design:type", String)
275
+ ], InvoicePatch.prototype, "fromState", void 0);
276
+ __decorate([
277
+ (0, type_graphql_1.Field)(),
278
+ __metadata("design:type", String)
279
+ ], InvoicePatch.prototype, "fromCountry", void 0);
280
+ __decorate([
281
+ (0, type_graphql_1.Field)(),
282
+ __metadata("design:type", String)
283
+ ], InvoicePatch.prototype, "deliverTo", void 0);
284
+ __decorate([
285
+ (0, type_graphql_1.Field)(),
286
+ __metadata("design:type", String)
287
+ ], InvoicePatch.prototype, "deliverToPhone", void 0);
288
+ __decorate([
289
+ (0, type_graphql_1.Field)(),
290
+ __metadata("design:type", String)
291
+ ], InvoicePatch.prototype, "deliveryAddress1", void 0);
292
+ __decorate([
293
+ (0, type_graphql_1.Field)(),
294
+ __metadata("design:type", String)
295
+ ], InvoicePatch.prototype, "deliveryAddress2", void 0);
296
+ __decorate([
297
+ (0, type_graphql_1.Field)(),
298
+ __metadata("design:type", String)
299
+ ], InvoicePatch.prototype, "deliveryAddress3", void 0);
300
+ __decorate([
301
+ (0, type_graphql_1.Field)(),
96
302
  __metadata("design:type", String)
97
- ], InvoicePatch.prototype, "state", void 0);
303
+ ], InvoicePatch.prototype, "deliveryAddress4", void 0);
304
+ __decorate([
305
+ (0, type_graphql_1.Field)(),
306
+ __metadata("design:type", String)
307
+ ], InvoicePatch.prototype, "deliveryAddress5", void 0);
308
+ __decorate([
309
+ (0, type_graphql_1.Field)(),
310
+ __metadata("design:type", String)
311
+ ], InvoicePatch.prototype, "deliveryCity", void 0);
312
+ __decorate([
313
+ (0, type_graphql_1.Field)(),
314
+ __metadata("design:type", String)
315
+ ], InvoicePatch.prototype, "deliveryState", void 0);
316
+ __decorate([
317
+ (0, type_graphql_1.Field)(),
318
+ __metadata("design:type", String)
319
+ ], InvoicePatch.prototype, "deliveryCountry", void 0);
320
+ __decorate([
321
+ (0, type_graphql_1.Field)(),
322
+ __metadata("design:type", String)
323
+ ], InvoicePatch.prototype, "deliveryPostcode", void 0);
324
+ __decorate([
325
+ (0, type_graphql_1.Field)(),
326
+ __metadata("design:type", String)
327
+ ], InvoicePatch.prototype, "billTo", void 0);
328
+ __decorate([
329
+ (0, type_graphql_1.Field)(),
330
+ __metadata("design:type", String)
331
+ ], InvoicePatch.prototype, "billToPhone", void 0);
332
+ __decorate([
333
+ (0, type_graphql_1.Field)(),
334
+ __metadata("design:type", String)
335
+ ], InvoicePatch.prototype, "billingAddress1", void 0);
336
+ __decorate([
337
+ (0, type_graphql_1.Field)(),
338
+ __metadata("design:type", String)
339
+ ], InvoicePatch.prototype, "billingAddress2", void 0);
340
+ __decorate([
341
+ (0, type_graphql_1.Field)(),
342
+ __metadata("design:type", String)
343
+ ], InvoicePatch.prototype, "billingAddress3", void 0);
344
+ __decorate([
345
+ (0, type_graphql_1.Field)(),
346
+ __metadata("design:type", String)
347
+ ], InvoicePatch.prototype, "billingAddress4", void 0);
348
+ __decorate([
349
+ (0, type_graphql_1.Field)(),
350
+ __metadata("design:type", String)
351
+ ], InvoicePatch.prototype, "billingAddress5", void 0);
352
+ __decorate([
353
+ (0, type_graphql_1.Field)(),
354
+ __metadata("design:type", String)
355
+ ], InvoicePatch.prototype, "billingPostcode", void 0);
356
+ __decorate([
357
+ (0, type_graphql_1.Field)(),
358
+ __metadata("design:type", String)
359
+ ], InvoicePatch.prototype, "billingCity", void 0);
360
+ __decorate([
361
+ (0, type_graphql_1.Field)(),
362
+ __metadata("design:type", String)
363
+ ], InvoicePatch.prototype, "billingState", void 0);
364
+ __decorate([
365
+ (0, type_graphql_1.Field)(),
366
+ __metadata("design:type", String)
367
+ ], InvoicePatch.prototype, "billingCountry", void 0);
368
+ __decorate([
369
+ (0, type_graphql_1.Field)(),
370
+ __metadata("design:type", String)
371
+ ], InvoicePatch.prototype, "paymentDue", void 0);
98
372
  __decorate([
99
373
  (0, type_graphql_1.Field)({ nullable: true }),
100
374
  __metadata("design:type", String)
101
375
  ], InvoicePatch.prototype, "description", void 0);
376
+ __decorate([
377
+ (0, type_graphql_1.Field)(type => [invoice_product_types_1.InvoiceProductPatch], { nullable: true }),
378
+ __metadata("design:type", Array)
379
+ ], InvoicePatch.prototype, "invoiceProducts", void 0);
380
+ __decorate([
381
+ (0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
382
+ __metadata("design:type", typeof (_b = typeof shell_1.ObjectRef !== "undefined" && shell_1.ObjectRef) === "function" ? _b : Object)
383
+ ], InvoicePatch.prototype, "releaseGood", void 0);
102
384
  InvoicePatch = __decorate([
103
385
  (0, type_graphql_1.InputType)()
104
386
  ], InvoicePatch);
@@ -1 +1 @@
1
- {"version":3,"file":"invoice-types.js","sourceRoot":"","sources":["../../../server/service/invoice/invoice-types.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAgE;AAChE,iFAA2E;AAC3E,uCAAmC;AAGnC,IAAa,WAAW,GAAxB,MAAa,WAAW;CAMvB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,iBAAO,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC7B;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC1B;AALF,WAAW;IADvB,IAAA,yBAAU,GAAE;GACA,WAAW,CAMvB;AANY,kCAAW;AASxB,IAAa,UAAU,GAAvB,MAAa,UAAU;CAwBtB,CAAA;AAtBC;IADC,IAAA,oBAAK,GAAE;;wCACI;AAGZ;IADC,IAAA,oBAAK,GAAE;;4CACQ;AAGhB;IADC,IAAA,oBAAK,GAAE;;4CACQ;AAGhB;IADC,IAAA,oBAAK,GAAE;;8CACU;AAGlB;IADC,IAAA,oBAAK,GAAE;;2CACO;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,yCAAkB,CAAC;8BACnB,yCAAkB;iDAAA;AAGjC;IADC,IAAA,oBAAK,GAAE;;yCACK;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAvBR,UAAU;IADtB,IAAA,wBAAS,GAAE;GACC,UAAU,CAwBtB;AAxBY,gCAAU;AA2BvB,IAAa,YAAY,GAAzB,MAAa,YAAY;CAwBxB,CAAA;AAtBC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACd;AAGZ;IADC,IAAA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AAE,IAAI,EAAE,CAAC;;qDACnB;AAGtC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;kDAChC,iBAAS,oBAAT,iBAAS;iDAAA;AAhIX,YAAY;IADxB,IAAA,wBAAS,GAAE;GACC,YAAY,CAiIxB;AAjIY,oCAAY"}
@@ -8,15 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var _a, _b, _c, _d;
11
+ var _a, _b, _c;
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Invoice = void 0;
14
- const auth_base_1 = require("@things-factory/auth-base");
15
- const biz_base_1 = require("@things-factory/biz-base");
16
- const shell_1 = require("@things-factory/shell");
17
14
  const type_graphql_1 = require("type-graphql");
18
15
  const typeorm_1 = require("typeorm");
19
- const __1 = require("../");
16
+ const auth_base_1 = require("@things-factory/auth-base");
17
+ const shell_1 = require("@things-factory/shell");
18
+ const invoice_product_1 = require("../invoice-product/invoice-product");
19
+ const release_good_1 = require("../release-good/release-good");
20
20
  let Invoice = class Invoice {
21
21
  };
22
22
  __decorate([
@@ -39,45 +39,209 @@ __decorate([
39
39
  __metadata("design:type", String)
40
40
  ], Invoice.prototype, "name", void 0);
41
41
  __decorate([
42
- (0, typeorm_1.ManyToOne)(type => biz_base_1.Bizplace),
43
- (0, type_graphql_1.Field)(type => biz_base_1.Bizplace, { nullable: true }),
44
- __metadata("design:type", typeof (_b = typeof biz_base_1.Bizplace !== "undefined" && biz_base_1.Bizplace) === "function" ? _b : Object)
45
- ], Invoice.prototype, "customer", void 0);
42
+ (0, typeorm_1.Column)({ nullable: true }),
43
+ (0, type_graphql_1.Field)({ nullable: true }),
44
+ __metadata("design:type", String)
45
+ ], Invoice.prototype, "description", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.OneToMany)(type => invoice_product_1.InvoiceProduct, invoiceProduct => invoiceProduct.invoice),
48
+ __metadata("design:type", Array)
49
+ ], Invoice.prototype, "invoiceProducts", void 0);
46
50
  __decorate([
47
- (0, typeorm_1.RelationId)((invoice) => invoice.customer),
51
+ (0, typeorm_1.OneToOne)(type => release_good_1.ReleaseGood, { nullable: true }),
52
+ (0, typeorm_1.JoinColumn)(),
53
+ __metadata("design:type", release_good_1.ReleaseGood)
54
+ ], Invoice.prototype, "releaseGood", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ default: '' }),
57
+ (0, type_graphql_1.Field)(),
58
+ __metadata("design:type", String)
59
+ ], Invoice.prototype, "refNo1", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ default: '' }),
62
+ (0, type_graphql_1.Field)(),
63
+ __metadata("design:type", String)
64
+ ], Invoice.prototype, "refNo2", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ default: '' }),
67
+ (0, type_graphql_1.Field)(),
48
68
  __metadata("design:type", String)
49
- ], Invoice.prototype, "customerId", void 0);
69
+ ], Invoice.prototype, "refNo3", void 0);
50
70
  __decorate([
51
- (0, typeorm_1.Column)('date'),
71
+ (0, typeorm_1.Column)({ nullable: true }),
52
72
  (0, type_graphql_1.Field)(),
53
73
  __metadata("design:type", Date)
54
74
  ], Invoice.prototype, "issuedOn", void 0);
55
75
  __decorate([
56
- (0, typeorm_1.Column)('date'),
76
+ (0, typeorm_1.Column)({ type: 'uuid', nullable: true }),
77
+ (0, type_graphql_1.Field)({ nullable: true }),
78
+ __metadata("design:type", String)
79
+ ], Invoice.prototype, "contactPointRefId", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)(),
57
82
  (0, type_graphql_1.Field)(),
58
- __metadata("design:type", Date)
59
- ], Invoice.prototype, "paymentDue", void 0);
83
+ __metadata("design:type", String)
84
+ ], Invoice.prototype, "from", void 0);
60
85
  __decorate([
61
86
  (0, typeorm_1.Column)(),
62
87
  (0, type_graphql_1.Field)(),
63
88
  __metadata("design:type", String)
64
- ], Invoice.prototype, "version", void 0);
89
+ ], Invoice.prototype, "fromContactPhone", void 0);
65
90
  __decorate([
66
- (0, typeorm_1.OneToOne)(type => __1.PurchaseOrder),
67
- (0, typeorm_1.JoinColumn)(),
68
- (0, type_graphql_1.Field)(type => __1.PurchaseOrder, { nullable: true }),
69
- __metadata("design:type", __1.PurchaseOrder)
70
- ], Invoice.prototype, "purchaseOrder", void 0);
91
+ (0, typeorm_1.Column)({ nullable: true }),
92
+ (0, type_graphql_1.Field)({ nullable: true }),
93
+ __metadata("design:type", String)
94
+ ], Invoice.prototype, "fromAddress1", void 0);
95
+ __decorate([
96
+ (0, typeorm_1.Column)({ nullable: true }),
97
+ (0, type_graphql_1.Field)({ nullable: true }),
98
+ __metadata("design:type", String)
99
+ ], Invoice.prototype, "fromAddress2", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.Column)({ nullable: true }),
102
+ (0, type_graphql_1.Field)({ nullable: true }),
103
+ __metadata("design:type", String)
104
+ ], Invoice.prototype, "fromAddress3", void 0);
105
+ __decorate([
106
+ (0, typeorm_1.Column)({ nullable: true }),
107
+ (0, type_graphql_1.Field)({ nullable: true }),
108
+ __metadata("design:type", String)
109
+ ], Invoice.prototype, "fromAddress4", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.Column)({ nullable: true }),
112
+ (0, type_graphql_1.Field)({ nullable: true }),
113
+ __metadata("design:type", String)
114
+ ], Invoice.prototype, "fromAddress5", void 0);
115
+ __decorate([
116
+ (0, typeorm_1.Column)({ nullable: true }),
117
+ (0, type_graphql_1.Field)({ nullable: true }),
118
+ __metadata("design:type", String)
119
+ ], Invoice.prototype, "fromPostcode", void 0);
120
+ __decorate([
121
+ (0, typeorm_1.Column)({ nullable: true }),
122
+ (0, type_graphql_1.Field)({ nullable: true }),
123
+ __metadata("design:type", String)
124
+ ], Invoice.prototype, "fromCity", void 0);
125
+ __decorate([
126
+ (0, typeorm_1.Column)({ nullable: true }),
127
+ (0, type_graphql_1.Field)({ nullable: true }),
128
+ __metadata("design:type", String)
129
+ ], Invoice.prototype, "fromState", void 0);
130
+ __decorate([
131
+ (0, typeorm_1.Column)({ nullable: true }),
132
+ (0, type_graphql_1.Field)({ nullable: true }),
133
+ __metadata("design:type", String)
134
+ ], Invoice.prototype, "fromCountry", void 0);
135
+ __decorate([
136
+ (0, typeorm_1.Column)(),
137
+ (0, type_graphql_1.Field)(),
138
+ __metadata("design:type", String)
139
+ ], Invoice.prototype, "deliverTo", void 0);
71
140
  __decorate([
72
141
  (0, typeorm_1.Column)(),
73
142
  (0, type_graphql_1.Field)(),
74
143
  __metadata("design:type", String)
75
- ], Invoice.prototype, "state", void 0);
144
+ ], Invoice.prototype, "deliverToPhone", void 0);
145
+ __decorate([
146
+ (0, typeorm_1.Column)(),
147
+ (0, type_graphql_1.Field)(),
148
+ __metadata("design:type", String)
149
+ ], Invoice.prototype, "deliveryAddress1", void 0);
76
150
  __decorate([
77
151
  (0, typeorm_1.Column)({ nullable: true }),
78
152
  (0, type_graphql_1.Field)({ nullable: true }),
79
153
  __metadata("design:type", String)
80
- ], Invoice.prototype, "description", void 0);
154
+ ], Invoice.prototype, "deliveryAddress2", void 0);
155
+ __decorate([
156
+ (0, typeorm_1.Column)({ nullable: true }),
157
+ (0, type_graphql_1.Field)({ nullable: true }),
158
+ __metadata("design:type", String)
159
+ ], Invoice.prototype, "deliveryAddress3", void 0);
160
+ __decorate([
161
+ (0, typeorm_1.Column)({ nullable: true }),
162
+ (0, type_graphql_1.Field)({ nullable: true }),
163
+ __metadata("design:type", String)
164
+ ], Invoice.prototype, "deliveryAddress4", void 0);
165
+ __decorate([
166
+ (0, typeorm_1.Column)({ nullable: true }),
167
+ (0, type_graphql_1.Field)({ nullable: true }),
168
+ __metadata("design:type", String)
169
+ ], Invoice.prototype, "deliveryAddress5", void 0);
170
+ __decorate([
171
+ (0, typeorm_1.Column)(),
172
+ (0, type_graphql_1.Field)(),
173
+ __metadata("design:type", String)
174
+ ], Invoice.prototype, "deliveryPostcode", void 0);
175
+ __decorate([
176
+ (0, typeorm_1.Column)(),
177
+ (0, type_graphql_1.Field)(),
178
+ __metadata("design:type", String)
179
+ ], Invoice.prototype, "deliveryCity", void 0);
180
+ __decorate([
181
+ (0, typeorm_1.Column)(),
182
+ (0, type_graphql_1.Field)(),
183
+ __metadata("design:type", String)
184
+ ], Invoice.prototype, "deliveryState", void 0);
185
+ __decorate([
186
+ (0, typeorm_1.Column)(),
187
+ (0, type_graphql_1.Field)(),
188
+ __metadata("design:type", String)
189
+ ], Invoice.prototype, "deliveryCountry", void 0);
190
+ __decorate([
191
+ (0, typeorm_1.Column)(),
192
+ (0, type_graphql_1.Field)(),
193
+ __metadata("design:type", String)
194
+ ], Invoice.prototype, "billTo", void 0);
195
+ __decorate([
196
+ (0, typeorm_1.Column)(),
197
+ (0, type_graphql_1.Field)(),
198
+ __metadata("design:type", String)
199
+ ], Invoice.prototype, "billToPhone", void 0);
200
+ __decorate([
201
+ (0, typeorm_1.Column)(),
202
+ (0, type_graphql_1.Field)(),
203
+ __metadata("design:type", String)
204
+ ], Invoice.prototype, "billingAddress1", void 0);
205
+ __decorate([
206
+ (0, typeorm_1.Column)({ nullable: true }),
207
+ (0, type_graphql_1.Field)({ nullable: true }),
208
+ __metadata("design:type", String)
209
+ ], Invoice.prototype, "billingAddress2", void 0);
210
+ __decorate([
211
+ (0, typeorm_1.Column)({ nullable: true }),
212
+ (0, type_graphql_1.Field)({ nullable: true }),
213
+ __metadata("design:type", String)
214
+ ], Invoice.prototype, "billingAddress3", void 0);
215
+ __decorate([
216
+ (0, typeorm_1.Column)({ nullable: true }),
217
+ (0, type_graphql_1.Field)({ nullable: true }),
218
+ __metadata("design:type", String)
219
+ ], Invoice.prototype, "billingAddress4", void 0);
220
+ __decorate([
221
+ (0, typeorm_1.Column)({ nullable: true }),
222
+ (0, type_graphql_1.Field)({ nullable: true }),
223
+ __metadata("design:type", String)
224
+ ], Invoice.prototype, "billingAddress5", void 0);
225
+ __decorate([
226
+ (0, typeorm_1.Column)(),
227
+ (0, type_graphql_1.Field)(),
228
+ __metadata("design:type", String)
229
+ ], Invoice.prototype, "billingPostcode", void 0);
230
+ __decorate([
231
+ (0, typeorm_1.Column)(),
232
+ (0, type_graphql_1.Field)(),
233
+ __metadata("design:type", String)
234
+ ], Invoice.prototype, "billingCity", void 0);
235
+ __decorate([
236
+ (0, typeorm_1.Column)(),
237
+ (0, type_graphql_1.Field)(),
238
+ __metadata("design:type", String)
239
+ ], Invoice.prototype, "billingState", void 0);
240
+ __decorate([
241
+ (0, typeorm_1.Column)(),
242
+ (0, type_graphql_1.Field)(),
243
+ __metadata("design:type", String)
244
+ ], Invoice.prototype, "billingCountry", void 0);
81
245
  __decorate([
82
246
  (0, typeorm_1.CreateDateColumn)(),
83
247
  (0, type_graphql_1.Field)(),
@@ -91,7 +255,7 @@ __decorate([
91
255
  __decorate([
92
256
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User),
93
257
  (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
94
- __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
258
+ __metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
95
259
  ], Invoice.prototype, "creator", void 0);
96
260
  __decorate([
97
261
  (0, typeorm_1.RelationId)((invoice) => invoice.creator),
@@ -100,7 +264,7 @@ __decorate([
100
264
  __decorate([
101
265
  (0, typeorm_1.ManyToOne)(type => auth_base_1.User),
102
266
  (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
103
- __metadata("design:type", typeof (_d = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _d : Object)
267
+ __metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
104
268
  ], Invoice.prototype, "updater", void 0);
105
269
  __decorate([
106
270
  (0, typeorm_1.RelationId)((invoice) => invoice.updater),
@@ -108,7 +272,7 @@ __decorate([
108
272
  ], Invoice.prototype, "updaterId", void 0);
109
273
  Invoice = __decorate([
110
274
  (0, typeorm_1.Entity)(),
111
- (0, typeorm_1.Index)('ix_invoice_0', (invoice) => [invoice.domain, invoice.name, invoice.customer]),
275
+ (0, typeorm_1.Index)('ix_invoice_0', (invoice) => [invoice.id], { unique: true }),
112
276
  (0, type_graphql_1.ObjectType)()
113
277
  ], Invoice);
114
278
  exports.Invoice = Invoice;