@shushed/helpers 0.0.229 → 0.0.230-fix-erp-780-20260109153230
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/cjs/contracts/index.js +1 -5
- package/dist/cjs/contracts/product-draft.schema.json +5 -159
- package/dist/cjs/dist-dereferenced/index.js +1 -5
- package/dist/cjs/dist-dereferenced/messages/product-draft.js +1 -1
- package/dist/cjs/dist-dereferenced/product-draft.js +1 -1
- package/dist/cjs/src-public/airtable.js +59 -96
- package/dist/cjs/src-public/bcOrder.js +6 -2
- package/dist/cjs/src-public/centra.js +5 -56
- package/dist/cjs/src-public/env.js +1 -1
- package/dist/cjs/src-public/index.js +1 -3
- package/dist/cjs/src-public/pubsub.js +10 -36
- package/dist/cjs/src-public/runtime.js +9 -48
- package/dist/cjs/src-public/utils.js +0 -3
- package/dist/package.json +2 -3
- package/dist/types/contracts/index.d.ts +0 -2
- package/dist/types/dist-dereferenced/index.d.ts +0 -2
- package/dist/types/dist-dereferenced/messages/product-draft.d.ts +1 -148
- package/dist/types/dist-dereferenced/product-draft.d.ts +1 -148
- package/dist/types/dist-types/index.d.ts +0 -2
- package/dist/types/dist-types/messages/product-draft.d.ts +4 -23
- package/dist/types/dist-types/product-draft.d.ts +4 -23
- package/dist/types/src-public/airtable.d.ts +9 -0
- package/dist/types/src-public/centra.d.ts +0 -3
- package/dist/types/src-public/env.d.ts +1 -1
- package/dist/types/src-public/index.d.ts +0 -1
- package/dist/types/src-public/pubsub.d.ts +1 -4
- package/dist/types/src-public/runtime.d.ts +4 -17
- package/dist/types/src-public/types.d.ts +0 -6
- package/dist/types/src-public/utils.d.ts +1 -1
- package/package.json +3 -4
- package/dist/cjs/contracts/purchase-orderline.schema.json +0 -135
- package/dist/cjs/contracts/stock-movement.schema.json +0 -144
- package/dist/cjs/dist-dereferenced/purchase-orderline.js +0 -4
- package/dist/cjs/dist-dereferenced/stock-movement.js +0 -4
- package/dist/cjs/dist-types/purchase-orderline.js +0 -2
- package/dist/cjs/dist-types/stock-movement.js +0 -2
- package/dist/cjs/src-public/sitoo.js +0 -349
- package/dist/types/dist-dereferenced/purchase-orderline.d.ts +0 -114
- package/dist/types/dist-dereferenced/stock-movement.d.ts +0 -110
- package/dist/types/dist-types/purchase-orderline.d.ts +0 -31
- package/dist/types/dist-types/stock-movement.d.ts +0 -30
- package/dist/types/src-public/sitoo.d.ts +0 -254
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SitooOrderItemType = exports.SitooPaymentState = exports.SitooOrderType = exports.SitooOrderState = void 0;
|
|
7
|
-
const crypto_1 = __importDefault(require("crypto"));
|
|
8
|
-
const lodash_groupby_1 = __importDefault(require("lodash.groupby"));
|
|
9
|
-
const env_1 = __importDefault(require("./env"));
|
|
10
|
-
const SITOO_TR_TYPE_MANUAL_IN = 10;
|
|
11
|
-
const SITOO_TR_TYPE_MANUAL_OUT = 20;
|
|
12
|
-
var SitooOrderState;
|
|
13
|
-
(function (SitooOrderState) {
|
|
14
|
-
SitooOrderState[SitooOrderState["Abandoned"] = -1] = "Abandoned";
|
|
15
|
-
SitooOrderState[SitooOrderState["Open"] = 0] = "Open";
|
|
16
|
-
SitooOrderState[SitooOrderState["Closed"] = 10] = "Closed";
|
|
17
|
-
SitooOrderState[SitooOrderState["Cancelled"] = 20] = "Cancelled";
|
|
18
|
-
})(SitooOrderState || (exports.SitooOrderState = SitooOrderState = {}));
|
|
19
|
-
var SitooOrderType;
|
|
20
|
-
(function (SitooOrderType) {
|
|
21
|
-
SitooOrderType[SitooOrderType["Order"] = 10] = "Order";
|
|
22
|
-
SitooOrderType[SitooOrderType["Booking"] = 100] = "Booking";
|
|
23
|
-
SitooOrderType[SitooOrderType["POSParked"] = 110] = "POSParked";
|
|
24
|
-
})(SitooOrderType || (exports.SitooOrderType = SitooOrderType = {}));
|
|
25
|
-
var SitooPaymentState;
|
|
26
|
-
(function (SitooPaymentState) {
|
|
27
|
-
SitooPaymentState[SitooPaymentState["None"] = 0] = "None";
|
|
28
|
-
SitooPaymentState[SitooPaymentState["Pending"] = 10] = "Pending";
|
|
29
|
-
SitooPaymentState[SitooPaymentState["Reserved"] = 15] = "Reserved";
|
|
30
|
-
SitooPaymentState[SitooPaymentState["Successful"] = 20] = "Successful";
|
|
31
|
-
SitooPaymentState[SitooPaymentState["Cancelled"] = 30] = "Cancelled";
|
|
32
|
-
SitooPaymentState[SitooPaymentState["Failed"] = 40] = "Failed";
|
|
33
|
-
})(SitooPaymentState || (exports.SitooPaymentState = SitooPaymentState = {}));
|
|
34
|
-
var SitooOrderItemType;
|
|
35
|
-
(function (SitooOrderItemType) {
|
|
36
|
-
SitooOrderItemType[SitooOrderItemType["Product"] = 10] = "Product";
|
|
37
|
-
SitooOrderItemType[SitooOrderItemType["Discount"] = 20] = "Discount";
|
|
38
|
-
})(SitooOrderItemType || (exports.SitooOrderItemType = SitooOrderItemType = {}));
|
|
39
|
-
const BATCH_SIZE = 900;
|
|
40
|
-
class SitooHelper extends env_1.default {
|
|
41
|
-
opts;
|
|
42
|
-
shaToken;
|
|
43
|
-
baseUrl;
|
|
44
|
-
siteId;
|
|
45
|
-
constructor(options, opts) {
|
|
46
|
-
super(options);
|
|
47
|
-
this.opts = opts;
|
|
48
|
-
this.shaToken = crypto_1.default.createHash('sha256').update(opts.accessToken).digest('hex').slice(0, 8);
|
|
49
|
-
this.baseUrl = opts.sitooBaseUrl.replace(/\/$/, '');
|
|
50
|
-
this.siteId = opts.sitooSiteId;
|
|
51
|
-
}
|
|
52
|
-
async getAllOrders(options) {
|
|
53
|
-
const allOrders = [];
|
|
54
|
-
const pageSize = 100;
|
|
55
|
-
let start = 0;
|
|
56
|
-
let hasMore = true;
|
|
57
|
-
while (hasMore) {
|
|
58
|
-
const queryParams = new URLSearchParams();
|
|
59
|
-
queryParams.set('num', pageSize.toString());
|
|
60
|
-
queryParams.set('start', start.toString());
|
|
61
|
-
queryParams.set('sort', 'orderid');
|
|
62
|
-
if (options?.fromTimestamp !== undefined) {
|
|
63
|
-
queryParams.set('orderdatefrom', options.fromTimestamp.toString());
|
|
64
|
-
}
|
|
65
|
-
if (options?.untilTimestamp !== undefined) {
|
|
66
|
-
queryParams.set('orderdateto', options.untilTimestamp.toString());
|
|
67
|
-
}
|
|
68
|
-
if (options?.filterByState !== undefined) {
|
|
69
|
-
queryParams.set('orderstate', options.filterByState.toString());
|
|
70
|
-
}
|
|
71
|
-
const url = `${this.baseUrl}/sites/${this.siteId}/orders.json?${queryParams.toString()}`;
|
|
72
|
-
const response = await fetch(url, {
|
|
73
|
-
method: 'GET',
|
|
74
|
-
headers: {
|
|
75
|
-
'Authorization': `Basic ${this.opts.accessToken}`,
|
|
76
|
-
'Content-Type': 'application/json',
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
if (!response.ok) {
|
|
80
|
-
const errorText = await response.text().catch(() => 'Unknown error');
|
|
81
|
-
throw new Error(`Sitoo API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
82
|
-
}
|
|
83
|
-
const envelope = await response.json();
|
|
84
|
-
allOrders.push(...envelope.items);
|
|
85
|
-
if (envelope.items.length < pageSize) {
|
|
86
|
-
hasMore = false;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
start += envelope.items.length;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return allOrders;
|
|
93
|
-
}
|
|
94
|
-
async getSitooWarehouses() {
|
|
95
|
-
const url = `${this.baseUrl}/sites/${this.siteId}/warehouses.json`;
|
|
96
|
-
const response = await fetch(url, {
|
|
97
|
-
method: 'GET',
|
|
98
|
-
headers: {
|
|
99
|
-
'Authorization': `Basic ${this.opts.accessToken}`,
|
|
100
|
-
'Content-Type': 'application/json',
|
|
101
|
-
},
|
|
102
|
-
});
|
|
103
|
-
if (!response.ok) {
|
|
104
|
-
const errorText = await response.text().catch(() => 'Unknown error');
|
|
105
|
-
throw new Error(`Sitoo API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
106
|
-
}
|
|
107
|
-
const data = await response.json();
|
|
108
|
-
const nameToId = {};
|
|
109
|
-
const warehouses = {};
|
|
110
|
-
for (const warehouse of data.items) {
|
|
111
|
-
nameToId[warehouse.name] = warehouse.warehouseid;
|
|
112
|
-
warehouses[warehouse.warehouseid] = warehouse;
|
|
113
|
-
}
|
|
114
|
-
return { nameToId, warehouses };
|
|
115
|
-
}
|
|
116
|
-
async fetchWarehouseTransactionsWithFilter(params) {
|
|
117
|
-
const queryParams = new URLSearchParams();
|
|
118
|
-
queryParams.set('num', (params.num || 100).toString());
|
|
119
|
-
if (params.transactiontype !== undefined) {
|
|
120
|
-
queryParams.set('transactiontype', params.transactiontype.toString());
|
|
121
|
-
}
|
|
122
|
-
if (params.datecreatedfrom !== undefined) {
|
|
123
|
-
queryParams.set('datecreatedfrom', params.datecreatedfrom.toString());
|
|
124
|
-
}
|
|
125
|
-
if (params.start !== undefined) {
|
|
126
|
-
queryParams.set('start', params.start.toString());
|
|
127
|
-
}
|
|
128
|
-
queryParams.set('sort', params.ascending ? 'warehousetransactionid' : '-warehousetransactionid');
|
|
129
|
-
const url = `${this.baseUrl}/sites/${this.siteId}/warehouses/${params.warehouseid}/warehousetransactions.json?${queryParams.toString()}`;
|
|
130
|
-
const response = await fetch(url, {
|
|
131
|
-
method: 'GET',
|
|
132
|
-
headers: {
|
|
133
|
-
'Authorization': `Basic ${this.opts.accessToken}`,
|
|
134
|
-
'Content-Type': 'application/json',
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
if (!response.ok) {
|
|
138
|
-
const errorText = await response.text().catch(() => 'Unknown error');
|
|
139
|
-
throw new Error(`Sitoo API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
140
|
-
}
|
|
141
|
-
return await response.json();
|
|
142
|
-
}
|
|
143
|
-
async searchTransactionsInApi(warehouseId, entryNosToFind, transactionType, datecreatedfrom) {
|
|
144
|
-
const found = new Map();
|
|
145
|
-
let lowestTransactionId = undefined;
|
|
146
|
-
if (entryNosToFind.size === 0) {
|
|
147
|
-
return { found, lowestTransactionId };
|
|
148
|
-
}
|
|
149
|
-
let hasMore = true;
|
|
150
|
-
const pageSize = 100;
|
|
151
|
-
const currentDateFrom = datecreatedfrom;
|
|
152
|
-
let currentStart = 0;
|
|
153
|
-
while (hasMore && found.size < entryNosToFind.size) {
|
|
154
|
-
const envelope = await this.fetchWarehouseTransactionsWithFilter({
|
|
155
|
-
warehouseid: warehouseId,
|
|
156
|
-
datecreatedfrom: currentDateFrom,
|
|
157
|
-
transactiontype: transactionType,
|
|
158
|
-
ascending: false,
|
|
159
|
-
num: pageSize,
|
|
160
|
-
start: currentStart,
|
|
161
|
-
});
|
|
162
|
-
const transactions = envelope.items;
|
|
163
|
-
if (transactions.length === 0) {
|
|
164
|
-
hasMore = false;
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
for (const transaction of transactions) {
|
|
168
|
-
if (lowestTransactionId === undefined || transaction.warehousetransactionid < lowestTransactionId) {
|
|
169
|
-
lowestTransactionId = transaction.warehousetransactionid;
|
|
170
|
-
}
|
|
171
|
-
if (transaction.description) {
|
|
172
|
-
for (const entryNo of entryNosToFind) {
|
|
173
|
-
if (!found.has(entryNo) && transaction.description.includes(`'${entryNo}'`)) {
|
|
174
|
-
found.set(entryNo, transaction);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
if (found.size === entryNosToFind.size) {
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
currentStart = currentStart ? currentStart + transactions.length : transactions.length;
|
|
183
|
-
if (transactions.length < pageSize) {
|
|
184
|
-
hasMore = false;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return { found, lowestTransactionId };
|
|
188
|
-
}
|
|
189
|
-
async batchAddWarehouseTransactions(transactions) {
|
|
190
|
-
if (transactions.length === 0)
|
|
191
|
-
return [];
|
|
192
|
-
if (transactions.length > BATCH_SIZE) {
|
|
193
|
-
throw new Error(`Batch size exceeds maximum of ${BATCH_SIZE}. Got ${transactions.length}`);
|
|
194
|
-
}
|
|
195
|
-
const url = `${this.baseUrl}/sites/${this.siteId}/warehousetransactions.json`;
|
|
196
|
-
const response = await fetch(url, {
|
|
197
|
-
method: 'POST',
|
|
198
|
-
headers: {
|
|
199
|
-
'Authorization': `Basic ${this.opts.accessToken}`,
|
|
200
|
-
'Content-Type': 'application/json',
|
|
201
|
-
},
|
|
202
|
-
body: JSON.stringify(transactions),
|
|
203
|
-
});
|
|
204
|
-
if (!response.ok) {
|
|
205
|
-
const errorText = await response.text().catch(() => 'Unknown error');
|
|
206
|
-
throw new Error(`Sitoo API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
207
|
-
}
|
|
208
|
-
const result = await response.json();
|
|
209
|
-
return result;
|
|
210
|
-
}
|
|
211
|
-
async syncWarehouseTransactions(items, options) {
|
|
212
|
-
if (items.length === 0) {
|
|
213
|
-
return [];
|
|
214
|
-
}
|
|
215
|
-
const locationCodeToWarehouse = (await this.getSitooWarehouses()).nameToId;
|
|
216
|
-
const foundEntryNos = new Map();
|
|
217
|
-
const results = {};
|
|
218
|
-
const entryNoToIdx = {};
|
|
219
|
-
const entriesByWarehouseAndTransactionType = new Map();
|
|
220
|
-
for (let i = 0; i < items.length; i++) {
|
|
221
|
-
const entry = items[i];
|
|
222
|
-
const warehouseId = locationCodeToWarehouse[entry.location_code];
|
|
223
|
-
const transactionType = entry.type === 'transfer' ? (entry.quantity > 0 ? SITOO_TR_TYPE_MANUAL_IN : SITOO_TR_TYPE_MANUAL_OUT) : undefined;
|
|
224
|
-
entryNoToIdx[entry.entry_no] = i;
|
|
225
|
-
if (transactionType === undefined) {
|
|
226
|
-
results[i] = {
|
|
227
|
-
error: false,
|
|
228
|
-
message: `Not supported transaction type: ${entry.type}`,
|
|
229
|
-
};
|
|
230
|
-
continue;
|
|
231
|
-
}
|
|
232
|
-
if (warehouseId === undefined) {
|
|
233
|
-
results[i] = {
|
|
234
|
-
error: false,
|
|
235
|
-
message: `Not supported warehouse in Sitoo: ${entry.location_code}`,
|
|
236
|
-
};
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
const key = `${warehouseId}-${transactionType}`;
|
|
240
|
-
if (!entriesByWarehouseAndTransactionType.has(key)) {
|
|
241
|
-
entriesByWarehouseAndTransactionType.set(key, []);
|
|
242
|
-
}
|
|
243
|
-
entriesByWarehouseAndTransactionType.get(key).push(entry);
|
|
244
|
-
}
|
|
245
|
-
for (const [_, warehouseEntries] of entriesByWarehouseAndTransactionType) {
|
|
246
|
-
if (warehouseEntries.length > 0) {
|
|
247
|
-
let datecreatedfrom = undefined;
|
|
248
|
-
for (const entry of warehouseEntries) {
|
|
249
|
-
const entryCreatedAt = Math.floor(new Date(entry.created_at).getTime() / 1000);
|
|
250
|
-
if (datecreatedfrom === undefined || entryCreatedAt < datecreatedfrom) {
|
|
251
|
-
datecreatedfrom = entryCreatedAt;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
const { found: apiFound } = await this.searchTransactionsInApi(locationCodeToWarehouse[warehouseEntries[0].location_code], new Set(warehouseEntries.map(e => e.entry_no.toString())), warehouseEntries[0].quantity > 0 ? SITOO_TR_TYPE_MANUAL_IN : SITOO_TR_TYPE_MANUAL_OUT, datecreatedfrom);
|
|
255
|
-
for (const [entryNo, transaction] of apiFound) {
|
|
256
|
-
foundEntryNos.set(entryNo, transaction.warehousetransactionid);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
for (const [entryNo, transactionId] of foundEntryNos) {
|
|
261
|
-
const idx = entryNoToIdx[entryNo];
|
|
262
|
-
results[idx] = {
|
|
263
|
-
error: false,
|
|
264
|
-
message: `Found transaction in Sitoo: ${transactionId} for the entry ${entryNo}`,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
const batches = [[]];
|
|
268
|
-
for (const [_, warehouseEntries] of entriesByWarehouseAndTransactionType) {
|
|
269
|
-
for (let i = 0; i < warehouseEntries.length; i += 1) {
|
|
270
|
-
if (!foundEntryNos.has(warehouseEntries[i].entry_no)) {
|
|
271
|
-
if ((batches[batches.length - 1].length + 1) >= BATCH_SIZE) {
|
|
272
|
-
batches.push([]);
|
|
273
|
-
}
|
|
274
|
-
batches[batches.length - 1].push(warehouseEntries[i]);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
const hasMissingEntries = batches[0].length > 0;
|
|
279
|
-
if (!options?.preview && hasMissingEntries) {
|
|
280
|
-
for (let i = 0; i < batches.length; i++) {
|
|
281
|
-
const warehouseEntities = (0, lodash_groupby_1.default)(batches[i], e => `${locationCodeToWarehouse[e.location_code]}-${e.quantity > 0 ? 'positive' : 'negative'}`);
|
|
282
|
-
const entryNosInBatches = {};
|
|
283
|
-
const transactionsToCreate = [];
|
|
284
|
-
for (const k in warehouseEntities) {
|
|
285
|
-
const entriesToCreate = warehouseEntities[k];
|
|
286
|
-
const warehouseId = locationCodeToWarehouse[entriesToCreate[0].location_code];
|
|
287
|
-
const entryType = entriesToCreate[0].quantity > 0 ? SITOO_TR_TYPE_MANUAL_IN : SITOO_TR_TYPE_MANUAL_OUT;
|
|
288
|
-
entryNosInBatches[transactionsToCreate.length] = entriesToCreate.map(e => e.entry_no);
|
|
289
|
-
transactionsToCreate.push({
|
|
290
|
-
warehouseid: warehouseId,
|
|
291
|
-
transactiontype: entryType,
|
|
292
|
-
description: entriesToCreate.map(e => `'${e.entry_no}'`).join(', '),
|
|
293
|
-
items: entriesToCreate.map(e => ({
|
|
294
|
-
sku: [e.style_id, e.colour_id, e.size_code].filter(Boolean).join('-'),
|
|
295
|
-
decimalquantity: `${e.quantity.toFixed(3)}`,
|
|
296
|
-
moneypricein: (((e.unit_cost?.value ?? 0) / 100) * e.quantity).toFixed(2),
|
|
297
|
-
})),
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
try {
|
|
301
|
-
const createdIds = await this.batchAddWarehouseTransactions(transactionsToCreate);
|
|
302
|
-
for (let j = 0; j < transactionsToCreate.length; j++) {
|
|
303
|
-
const transactionId = createdIds[j];
|
|
304
|
-
for (let k = 0; k < entryNosInBatches[j].length; k += 1) {
|
|
305
|
-
const entryNo = entryNosInBatches[j][k];
|
|
306
|
-
const idx = entryNoToIdx[entryNo];
|
|
307
|
-
results[idx] = {
|
|
308
|
-
entryNo: entryNo,
|
|
309
|
-
transactionId: transactionId,
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
catch (error) {
|
|
315
|
-
for (const entry of batches[i]) {
|
|
316
|
-
const idx = entryNoToIdx[entry.entry_no];
|
|
317
|
-
results[idx] = error;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
else {
|
|
323
|
-
for (let i = 0; i < batches.length; i++) {
|
|
324
|
-
for (let j = 0; j < batches[i].length; j += 1) {
|
|
325
|
-
const entry = batches[i][j];
|
|
326
|
-
const idx = entryNoToIdx[entry.entry_no];
|
|
327
|
-
const warehouseId = locationCodeToWarehouse[entry.location_code];
|
|
328
|
-
const transactionType = entry.quantity > 0 ? SITOO_TR_TYPE_MANUAL_IN : SITOO_TR_TYPE_MANUAL_OUT;
|
|
329
|
-
results[idx] = {
|
|
330
|
-
error: false,
|
|
331
|
-
message: `In Preview Mode. ${entry.entry_no} scheduled to be created as transction type: ${transactionType} in the warehouse: ${warehouseId}. Batch: ${i}`
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
const resultsAsArray = [];
|
|
337
|
-
for (let i = 0; i < items.length; i += 1) {
|
|
338
|
-
const result = results[i];
|
|
339
|
-
if (!result) {
|
|
340
|
-
resultsAsArray.push(new Error(`${items[i].entry_no} got missed in processing`));
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
resultsAsArray.push(result);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return resultsAsArray;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
exports.default = SitooHelper;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
declare const schema: {
|
|
2
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
3
|
-
readonly title: "Stock Movement Schema";
|
|
4
|
-
readonly type: "object";
|
|
5
|
-
readonly additionalProperties: false;
|
|
6
|
-
readonly properties: {
|
|
7
|
-
readonly style_id: {
|
|
8
|
-
readonly type: "string";
|
|
9
|
-
readonly minLength: 1;
|
|
10
|
-
};
|
|
11
|
-
readonly colour_id: {
|
|
12
|
-
readonly type: "string";
|
|
13
|
-
readonly minLength: 1;
|
|
14
|
-
};
|
|
15
|
-
readonly product_id: {
|
|
16
|
-
readonly type: "string";
|
|
17
|
-
readonly minLength: 1;
|
|
18
|
-
};
|
|
19
|
-
readonly size_code: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
readonly minLength: 1;
|
|
22
|
-
};
|
|
23
|
-
readonly sku: {
|
|
24
|
-
readonly type: "string";
|
|
25
|
-
readonly minLength: 1;
|
|
26
|
-
};
|
|
27
|
-
readonly season_id: {
|
|
28
|
-
readonly type: "string";
|
|
29
|
-
};
|
|
30
|
-
readonly drop: {
|
|
31
|
-
readonly type: "string";
|
|
32
|
-
};
|
|
33
|
-
readonly document_line_no: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
};
|
|
36
|
-
readonly document_no: {
|
|
37
|
-
readonly type: "string";
|
|
38
|
-
};
|
|
39
|
-
readonly created_at: {
|
|
40
|
-
readonly type: "string";
|
|
41
|
-
readonly format: "date-time";
|
|
42
|
-
};
|
|
43
|
-
readonly location_code: {
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
};
|
|
46
|
-
readonly quantity: {
|
|
47
|
-
readonly type: "number";
|
|
48
|
-
};
|
|
49
|
-
readonly quantity_received: {
|
|
50
|
-
readonly type: "number";
|
|
51
|
-
};
|
|
52
|
-
readonly quantity_to_receive: {
|
|
53
|
-
readonly type: "number";
|
|
54
|
-
};
|
|
55
|
-
readonly last_modified_at: {
|
|
56
|
-
readonly type: "string";
|
|
57
|
-
readonly format: "date-time";
|
|
58
|
-
};
|
|
59
|
-
readonly expected_date: {
|
|
60
|
-
readonly type: "string";
|
|
61
|
-
readonly format: "date-time";
|
|
62
|
-
};
|
|
63
|
-
readonly qa_completed_date: {
|
|
64
|
-
readonly type: "string";
|
|
65
|
-
readonly format: "date-time";
|
|
66
|
-
};
|
|
67
|
-
readonly unit_price: {
|
|
68
|
-
readonly oneOf: readonly [{
|
|
69
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
70
|
-
readonly title: "Money";
|
|
71
|
-
readonly type: "object";
|
|
72
|
-
readonly additionalProperties: false;
|
|
73
|
-
readonly properties: {
|
|
74
|
-
readonly value: {
|
|
75
|
-
readonly type: "integer";
|
|
76
|
-
readonly minimum: 0;
|
|
77
|
-
};
|
|
78
|
-
readonly decimal_places: {
|
|
79
|
-
readonly type: "integer";
|
|
80
|
-
readonly minimum: 0;
|
|
81
|
-
readonly maximum: 4;
|
|
82
|
-
};
|
|
83
|
-
readonly currency: {
|
|
84
|
-
readonly title: "Currency";
|
|
85
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
86
|
-
readonly type: "string";
|
|
87
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
88
|
-
};
|
|
89
|
-
readonly lcy_value: {
|
|
90
|
-
readonly type: "integer";
|
|
91
|
-
readonly minimum: 0;
|
|
92
|
-
};
|
|
93
|
-
readonly lcy_currency: {
|
|
94
|
-
readonly title: "LCY Currency";
|
|
95
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
96
|
-
readonly type: "string";
|
|
97
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
98
|
-
};
|
|
99
|
-
readonly lcy_decimal_places: {
|
|
100
|
-
readonly type: "integer";
|
|
101
|
-
readonly minimum: 0;
|
|
102
|
-
readonly maximum: 4;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
readonly required: readonly ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"];
|
|
106
|
-
}, {
|
|
107
|
-
readonly type: "null";
|
|
108
|
-
}];
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
readonly required: readonly ["document_no", "document_line_no", "style_id", "colour_id", "size_code", "sku", "product_id", "season_id", "drop"];
|
|
112
|
-
readonly $id: "https://shushed.example.com/stock-move.schema.json";
|
|
113
|
-
};
|
|
114
|
-
export default schema;
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
declare const schema: {
|
|
2
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
3
|
-
readonly title: "Stock Movement Schema";
|
|
4
|
-
readonly type: "object";
|
|
5
|
-
readonly additionalProperties: false;
|
|
6
|
-
readonly properties: {
|
|
7
|
-
readonly style_id: {
|
|
8
|
-
readonly type: "string";
|
|
9
|
-
readonly minLength: 1;
|
|
10
|
-
};
|
|
11
|
-
readonly colour_id: {
|
|
12
|
-
readonly type: "string";
|
|
13
|
-
readonly minLength: 1;
|
|
14
|
-
};
|
|
15
|
-
readonly size_code: {
|
|
16
|
-
readonly type: "string";
|
|
17
|
-
readonly minLength: 1;
|
|
18
|
-
};
|
|
19
|
-
readonly location_code: {
|
|
20
|
-
readonly type: "string";
|
|
21
|
-
readonly pattern: "^\\d{3}-[A-Z]+$|^[A-Z]{2,}-?[A-Z]*$|^[A-Z]{2,}\\d{3}$";
|
|
22
|
-
};
|
|
23
|
-
readonly source_system: {
|
|
24
|
-
readonly type: "string";
|
|
25
|
-
readonly enum: readonly ["bc", "centra", "sitoo"];
|
|
26
|
-
};
|
|
27
|
-
readonly quantity: {
|
|
28
|
-
readonly type: "integer";
|
|
29
|
-
readonly minimum: 0;
|
|
30
|
-
};
|
|
31
|
-
readonly entry_no: {
|
|
32
|
-
readonly type: "string";
|
|
33
|
-
};
|
|
34
|
-
readonly external_entry_no: {
|
|
35
|
-
readonly type: "string";
|
|
36
|
-
};
|
|
37
|
-
readonly document_no: {
|
|
38
|
-
readonly type: "string";
|
|
39
|
-
};
|
|
40
|
-
readonly external_document_no: {
|
|
41
|
-
readonly type: "string";
|
|
42
|
-
};
|
|
43
|
-
readonly type: {
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
readonly enum: readonly ["transfer", "negative adjustment", "positive adjustment", "purchase", "sale"];
|
|
46
|
-
};
|
|
47
|
-
readonly unit_cost: {
|
|
48
|
-
readonly oneOf: readonly [{
|
|
49
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
50
|
-
readonly title: "Money";
|
|
51
|
-
readonly type: "object";
|
|
52
|
-
readonly additionalProperties: false;
|
|
53
|
-
readonly properties: {
|
|
54
|
-
readonly value: {
|
|
55
|
-
readonly type: "integer";
|
|
56
|
-
readonly minimum: 0;
|
|
57
|
-
};
|
|
58
|
-
readonly decimal_places: {
|
|
59
|
-
readonly type: "integer";
|
|
60
|
-
readonly minimum: 0;
|
|
61
|
-
readonly maximum: 4;
|
|
62
|
-
};
|
|
63
|
-
readonly currency: {
|
|
64
|
-
readonly title: "Currency";
|
|
65
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
66
|
-
readonly type: "string";
|
|
67
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
68
|
-
};
|
|
69
|
-
readonly lcy_value: {
|
|
70
|
-
readonly type: "integer";
|
|
71
|
-
readonly minimum: 0;
|
|
72
|
-
};
|
|
73
|
-
readonly lcy_currency: {
|
|
74
|
-
readonly title: "LCY Currency";
|
|
75
|
-
readonly $schema: "http://json-schema.org/draft-07/schema#";
|
|
76
|
-
readonly type: "string";
|
|
77
|
-
readonly enum: readonly ["AFN", "ALL", "DZD", "USD", "EUR", "AOA", "XCD", "ARS", "AMD", "AWG", "AUD", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BZD", "XOF", "BMD", "BTN", "INR", "BOB", "BOV", "BAM", "BWP", "NOK", "BRL", "BND", "BGN", "BIF", "CVE", "KHR", "XAF", "CAD", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "NZD", "CRC", "CUC", "CUP", "ANG", "CZK", "DKK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XPF", "GMD", "GEL", "GHS", "GIP", "GTQ", "GBP", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "IDR", "XDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LBP", "LSL", "ZAR", "LRD", "LYD", "CHF", "MOP", "MGA", "MWK", "MYR", "MVR", "MRU", "MUR", "XUA", "MXN", "MXV", "MDL", "MNT", "MAD", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "MKD", "RON", "RUB", "RWF", "SHP", "WST", "STN", "SAR", "RSD", "SCR", "SLE", "SGD", "XSU", "SBD", "SOS", "SSP", "LKR", "SDG", "SRD", "SZL", "SEK", "CHE", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "TOP", "TTD", "TND", "TRY", "TMT", "UGX", "UAH", "AED", "USN", "UYI", "UYU", "UZS", "VUV", "VEF", "VED", "VND", "YER", "ZMW", "ZWL"];
|
|
78
|
-
};
|
|
79
|
-
readonly lcy_decimal_places: {
|
|
80
|
-
readonly type: "integer";
|
|
81
|
-
readonly minimum: 0;
|
|
82
|
-
readonly maximum: 4;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
readonly required: readonly ["value", "currency", "lcy_value", "lcy_currency", "decimal_places", "lcy_decimal_places"];
|
|
86
|
-
}, {
|
|
87
|
-
readonly type: "null";
|
|
88
|
-
}];
|
|
89
|
-
};
|
|
90
|
-
readonly document_date: {
|
|
91
|
-
readonly type: "string";
|
|
92
|
-
readonly format: "date";
|
|
93
|
-
};
|
|
94
|
-
readonly posting_date: {
|
|
95
|
-
readonly type: "string";
|
|
96
|
-
readonly format: "date";
|
|
97
|
-
};
|
|
98
|
-
readonly created_at: {
|
|
99
|
-
readonly type: "string";
|
|
100
|
-
readonly format: "date-time";
|
|
101
|
-
};
|
|
102
|
-
readonly last_modified_at: {
|
|
103
|
-
readonly type: "string";
|
|
104
|
-
readonly format: "date-time";
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
readonly required: readonly ["style_id", "source_system", "location_code", "colour_id", "size_code", "last_modified_at", "quantity", "created_at", "document_date", "type"];
|
|
108
|
-
readonly $id: "https://shushed.example.com/stock-move.schema.json";
|
|
109
|
-
};
|
|
110
|
-
export default schema;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type Currency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
2
|
-
export type LCYCurrency = ("AFN" | "ALL" | "DZD" | "USD" | "EUR" | "AOA" | "XCD" | "ARS" | "AMD" | "AWG" | "AUD" | "AZN" | "BSD" | "BHD" | "BDT" | "BBD" | "BYN" | "BZD" | "XOF" | "BMD" | "BTN" | "INR" | "BOB" | "BOV" | "BAM" | "BWP" | "NOK" | "BRL" | "BND" | "BGN" | "BIF" | "CVE" | "KHR" | "XAF" | "CAD" | "KYD" | "CLF" | "CLP" | "CNY" | "COP" | "COU" | "KMF" | "CDF" | "NZD" | "CRC" | "CUC" | "CUP" | "ANG" | "CZK" | "DKK" | "DJF" | "DOP" | "EGP" | "SVC" | "ERN" | "ETB" | "FKP" | "FJD" | "XPF" | "GMD" | "GEL" | "GHS" | "GIP" | "GTQ" | "GBP" | "GNF" | "GYD" | "HTG" | "HNL" | "HKD" | "HUF" | "ISK" | "IDR" | "XDR" | "IRR" | "IQD" | "ILS" | "JMD" | "JPY" | "JOD" | "KZT" | "KES" | "KPW" | "KRW" | "KWD" | "KGS" | "LAK" | "LBP" | "LSL" | "ZAR" | "LRD" | "LYD" | "CHF" | "MOP" | "MGA" | "MWK" | "MYR" | "MVR" | "MRU" | "MUR" | "XUA" | "MXN" | "MXV" | "MDL" | "MNT" | "MAD" | "MZN" | "MMK" | "NAD" | "NPR" | "NIO" | "NGN" | "OMR" | "PKR" | "PAB" | "PGK" | "PYG" | "PEN" | "PHP" | "PLN" | "QAR" | "MKD" | "RON" | "RUB" | "RWF" | "SHP" | "WST" | "STN" | "SAR" | "RSD" | "SCR" | "SLE" | "SGD" | "XSU" | "SBD" | "SOS" | "SSP" | "LKR" | "SDG" | "SRD" | "SZL" | "SEK" | "CHE" | "CHW" | "SYP" | "TWD" | "TJS" | "TZS" | "THB" | "TOP" | "TTD" | "TND" | "TRY" | "TMT" | "UGX" | "UAH" | "AED" | "USN" | "UYI" | "UYU" | "UZS" | "VUV" | "VEF" | "VED" | "VND" | "YER" | "ZMW" | "ZWL");
|
|
3
|
-
export interface __MainSchema {
|
|
4
|
-
style_id: string;
|
|
5
|
-
colour_id: string;
|
|
6
|
-
product_id: string;
|
|
7
|
-
size_code: string;
|
|
8
|
-
sku: string;
|
|
9
|
-
season_id: string;
|
|
10
|
-
drop: string;
|
|
11
|
-
document_line_no: string;
|
|
12
|
-
document_no: string;
|
|
13
|
-
created_at?: string;
|
|
14
|
-
location_code?: string;
|
|
15
|
-
quantity?: number;
|
|
16
|
-
quantity_received?: number;
|
|
17
|
-
quantity_to_receive?: number;
|
|
18
|
-
last_modified_at?: string;
|
|
19
|
-
expected_date?: string;
|
|
20
|
-
qa_completed_date?: string;
|
|
21
|
-
unit_price?: (Money | null);
|
|
22
|
-
}
|
|
23
|
-
export interface Money {
|
|
24
|
-
value: number;
|
|
25
|
-
decimal_places: number;
|
|
26
|
-
currency: Currency;
|
|
27
|
-
lcy_value: number;
|
|
28
|
-
lcy_currency: LCYCurrency;
|
|
29
|
-
lcy_decimal_places: number;
|
|
30
|
-
}
|
|
31
|
-
export default __MainSchema;
|