@things-factory/worksheet-base 4.3.816 → 4.3.818
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/controllers/index.js +0 -2
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/render-elccl-grn.js +1 -1
- package/dist-server/controllers/render-fm-grn.js +1 -1
- package/dist-server/controllers/render-fm-grn.js.map +1 -1
- package/dist-server/controllers/render-grn.js +2 -2
- package/dist-server/controllers/render-grn.js.map +1 -1
- package/dist-server/controllers/render-kimeda-grn.js +1 -1
- package/dist-server/controllers/render-kimeda-grn.js.map +1 -1
- package/dist-server/controllers/render-manual-do.js +1 -1
- package/dist-server/controllers/render-manual-do.js.map +1 -1
- package/dist-server/controllers/render-orientage-do.js +1 -1
- package/dist-server/controllers/render-orientage-do.js.map +1 -1
- package/dist-server/controllers/render-packing-label.js +2 -0
- package/dist-server/controllers/render-packing-label.js.map +1 -1
- package/dist-server/controllers/render-ro-do.js +11 -9
- package/dist-server/controllers/render-ro-do.js.map +1 -1
- package/dist-server/index.js +0 -2
- package/dist-server/index.js.map +1 -1
- package/dist-server/routes.js +0 -8
- package/dist-server/routes.js.map +1 -1
- package/package.json +5 -5
- package/server/controllers/index.ts +0 -2
- package/server/controllers/render-elccl-grn.ts +1 -1
- package/server/controllers/render-fm-grn.ts +1 -1
- package/server/controllers/render-grn.ts +2 -2
- package/server/controllers/render-kimeda-grn.ts +1 -1
- package/server/controllers/render-manual-do.ts +1 -1
- package/server/controllers/render-orientage-do.ts +1 -1
- package/server/controllers/render-packing-label.ts +2 -0
- package/server/controllers/render-ro-do.ts +11 -12
- package/server/index.ts +1 -3
- package/server/routes.ts +0 -10
- package/dist-server/controllers/render-orientage-grn.js +0 -158
- package/dist-server/controllers/render-orientage-grn.js.map +0 -1
- package/dist-server/controllers/render-seebuu-grn.js +0 -177
- package/dist-server/controllers/render-seebuu-grn.js.map +0 -1
- package/server/controllers/render-orientage-grn.ts +0 -178
- package/server/controllers/render-seebuu-grn.ts +0 -198
package/dist-server/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oBAAiB;AAEjB,8CAA2B;AAC3B,6CAA0B;AAC1B,4CAAyB;AACzB,mHAAgG;AAChG,+GAA4F;AAC5F,+CAA4B;AAC5B,0CAAuB;AACvB,2DAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oBAAiB;AAEjB,8CAA2B;AAC3B,6CAA0B;AAC1B,4CAAyB;AACzB,mHAAgG;AAChG,+GAA4F;AAC5F,+CAA4B;AAC5B,0CAAuB;AACvB,2DAAwC;AACxC,iEAA8C;AAC9C,8DAA2C;AAC3C,kEAA+C;AAC/C,oEAAiD;AACjD,6DAA0C;AAC1C,+EAA4D;AAC5D,qEAAkD;AAClD,sEAAmD;AAEnD,oGAAgG;AAAvF,0IAAA,0BAA0B,OAAA"}
|
package/dist-server/routes.js
CHANGED
|
@@ -7,10 +7,8 @@ const render_kimeda_grn_1 = require("./controllers/render-kimeda-grn");
|
|
|
7
7
|
const render_manifest_1 = require("./controllers/render-manifest");
|
|
8
8
|
const render_manual_do_1 = require("./controllers/render-manual-do");
|
|
9
9
|
const render_orientage_do_1 = require("./controllers/render-orientage-do");
|
|
10
|
-
const render_orientage_grn_1 = require("./controllers/render-orientage-grn");
|
|
11
10
|
const render_packing_label_1 = require("./controllers/render-packing-label");
|
|
12
11
|
const render_ro_do_1 = require("./controllers/render-ro-do");
|
|
13
|
-
const render_seebuu_grn_1 = require("./controllers/render-seebuu-grn");
|
|
14
12
|
const render_fm_grn_1 = require("./controllers/render-fm-grn");
|
|
15
13
|
const render_invoices_1 = require("./controllers/render-invoices");
|
|
16
14
|
const render_po_1 = require("./controllers/render-po");
|
|
@@ -33,12 +31,6 @@ process.on('bootstrap-module-domain-private-route', (app, routes) => {
|
|
|
33
31
|
routes.get('/view_kimeda_grn/:grnNo/:timezoneOffSet', async (context, next) => {
|
|
34
32
|
context.body = await (0, render_kimeda_grn_1.renderKimedaGRN)(context.params, context);
|
|
35
33
|
});
|
|
36
|
-
routes.get('/view_orientage_grn/:grnNo', async (context, next) => {
|
|
37
|
-
context.body = await (0, render_orientage_grn_1.renderOrientageGRN)(context.params, context);
|
|
38
|
-
});
|
|
39
|
-
routes.get('/view_seebuu_grn/:grnNo', async (context, next) => {
|
|
40
|
-
context.body = await (0, render_seebuu_grn_1.renderSeebuuGRN)(context.params, context);
|
|
41
|
-
});
|
|
42
34
|
routes.get('/view_fm_grn/:grnNo/:timezoneOffSet', async (context, next) => {
|
|
43
35
|
context.body = await (0, render_fm_grn_1.renderFmGRN)(context.params, context);
|
|
44
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,qEAA+D;AAC/D,yDAAoD;AACpD,qEAA+D;AAC/D,uEAAiE;AACjE,mEAA8D;AAC9D,qEAA+D;AAC/D,2EAAqE;AACrE,6EAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":";;AAAA,qEAA+D;AAC/D,yDAAoD;AACpD,qEAA+D;AAC/D,uEAAiE;AACjE,mEAA8D;AAC9D,qEAA+D;AAC/D,2EAAqE;AACrE,6EAAuE;AACvE,6DAAuD;AACvD,+DAAyD;AACzD,mEAA8D;AAC9D,uDAAkD;AAElD,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE;IACzE,MAAM,CAAC,GAAG,CAAC,4BAA4B,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC/D,OAAO,CAAC,IAAI,GAAG,MA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AI,GAAG,MAAM,IAAA,oBAAQ,EAAC,EAAE,GAAG,EAAE,cAAc,EAAE,EAAE,OAAO,CAAC,CAAA;QAE3D,OAAO,CAAC,IAAI,GAAG,kBAAkB,CAAA;QACjC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAA;IACrB,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;QAC3D,IAAI;YACF,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA;YACvC,OAAO,CAAC,IAAI,GAAG,MAAM,IAAA,yCAAkB,EAAC,EAAE,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;SAC3D;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;YACpB,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,IAAI,gCAAgC,CAAA;SACjE;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/worksheet-base",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.818",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"@things-factory/integration-base": "^4.3.815",
|
|
32
32
|
"@things-factory/integration-lmd": "^4.3.815",
|
|
33
33
|
"@things-factory/integration-marketplace": "^4.3.815",
|
|
34
|
-
"@things-factory/integration-powrup": "^4.3.
|
|
34
|
+
"@things-factory/integration-powrup": "^4.3.818",
|
|
35
35
|
"@things-factory/integration-sellercraft": "^4.3.815",
|
|
36
36
|
"@things-factory/integration-sftp": "^4.3.815",
|
|
37
37
|
"@things-factory/marketplace-base": "^4.3.815",
|
|
38
38
|
"@things-factory/notification": "^4.3.815",
|
|
39
|
-
"@things-factory/sales-base": "^4.3.
|
|
39
|
+
"@things-factory/sales-base": "^4.3.818",
|
|
40
40
|
"@things-factory/setting-base": "^4.3.815",
|
|
41
41
|
"@things-factory/shell": "^4.3.815",
|
|
42
42
|
"@things-factory/transport-base": "^4.3.815",
|
|
43
|
-
"@things-factory/warehouse-base": "^4.3.
|
|
43
|
+
"@things-factory/warehouse-base": "^4.3.818",
|
|
44
44
|
"@things-factory/worksheet-ui": "^4.3.815",
|
|
45
45
|
"jspdf": "2.5.1",
|
|
46
46
|
"puppeteer": "21.0.3",
|
|
47
47
|
"uuid": "^9.0.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "68f211abfcbc53a014e9ad11d536680b2b86c250"
|
|
50
50
|
}
|
|
@@ -5,9 +5,7 @@ export * from './render-packing-label'
|
|
|
5
5
|
export * from './render-elccl-grn'
|
|
6
6
|
export * from './render-job-sheet'
|
|
7
7
|
export * from './render-kimeda-grn'
|
|
8
|
-
export * from './render-orientage-grn'
|
|
9
8
|
export * from './render-orientage-do'
|
|
10
|
-
export * from './render-seebuu-grn'
|
|
11
9
|
export * from './render-fm-grn'
|
|
12
10
|
export * from './render-manifest'
|
|
13
11
|
export * from './render-po'
|
|
@@ -142,7 +142,7 @@ export async function renderElcclGRN({ grnNo }, context: any) {
|
|
|
142
142
|
await trxMgr.query(
|
|
143
143
|
`
|
|
144
144
|
create temp table tmp3 on commit drop as (
|
|
145
|
-
select main.*, concat(p2.name, ' (', p2.description, ')') as product_name, plt.name as pallet_name,
|
|
145
|
+
select main.*, CASE WHEN p2.description IS NOT NULL AND p2.description != '' THEN concat(p2.name, ' (', p2.description, ')') ELSE p2.name END as product_name, plt.name as pallet_name,
|
|
146
146
|
case when main.reusable_pallet_id notnull then concat(main.qty, ' ', main.packing_type, '(S) ', plt.name) else concat(main.pallet, ' PALLET(S)')
|
|
147
147
|
end as remarks,
|
|
148
148
|
row_number() over (
|
|
@@ -211,7 +211,7 @@ export async function renderFmGRN({ grnNo, timezoneOffSet }, context: any) {
|
|
|
211
211
|
_uomValue: uomValue, // internal for grouping later
|
|
212
212
|
product_sku: item ? `${item.product.sku}` : '',
|
|
213
213
|
product_brand_sku: item ? `${item.product.brandSku}` : '',
|
|
214
|
-
product_name: item ? `${item.product.name}(${item.product.description})` : '',
|
|
214
|
+
product_name: item ? (item.product.description ? `${item.product.name}(${item.product.description})` : item.product.name) : '',
|
|
215
215
|
product_desc: item ? item.product.description : '',
|
|
216
216
|
product_nameOnly: item ? item.product.name : '',
|
|
217
217
|
product_type: inv.packingType,
|
|
@@ -246,7 +246,7 @@ export async function renderGRN({ grnNo, timezoneOffSet }, context: any) {
|
|
|
246
246
|
return {
|
|
247
247
|
product_sku: `${item.product.sku}`,
|
|
248
248
|
product_brand_sku: `${item.product.brandSku}`,
|
|
249
|
-
product_name: `${item.product.name}(${item.product.description})
|
|
249
|
+
product_name: item.product.description ? `${item.product.name}(${item.product.description})` : item.product.name,
|
|
250
250
|
product_desc: item.product.description,
|
|
251
251
|
product_nameOnly: item.product.name,
|
|
252
252
|
product_type: item.packingType,
|
|
@@ -293,7 +293,7 @@ export async function renderGRN({ grnNo, timezoneOffSet }, context: any) {
|
|
|
293
293
|
acc.push({
|
|
294
294
|
product_sku: `${item.product.sku}`,
|
|
295
295
|
product_brand_sku: `${item.product.brandSku}`,
|
|
296
|
-
product_name: `${item.product.name}(${item.product.description})
|
|
296
|
+
product_name: item.product.description ? `${item.product.name}(${item.product.description})` : item.product.name,
|
|
297
297
|
product_desc: item.product.description,
|
|
298
298
|
product_nameOnly: item.product.name,
|
|
299
299
|
product_type: item.packingType,
|
|
@@ -143,7 +143,7 @@ export async function renderKimedaGRN({ grnNo, timezoneOffSet }, context: any) {
|
|
|
143
143
|
return {
|
|
144
144
|
list_no: idx + 1,
|
|
145
145
|
product_sku: `${item.product.sku}`,
|
|
146
|
-
product_name: `${item.product.name}(${item.product.description})
|
|
146
|
+
product_name: item.product.description ? `${item.product.name}(${item.product.description})` : item.product.name,
|
|
147
147
|
product_desc: item.product.description,
|
|
148
148
|
product_nameOnly: item.product.name,
|
|
149
149
|
product_type: item.packingType,
|
|
@@ -117,7 +117,7 @@ export async function renderManualDO({ doNo }, context: any) {
|
|
|
117
117
|
const product: Product = oi.product
|
|
118
118
|
const productDetail: ProductDetail = oi.productDetail
|
|
119
119
|
return {
|
|
120
|
-
product_name: `${product.name} (${product.description})
|
|
120
|
+
product_name: product.description ? `${product.name} (${product.description})` : product.name,
|
|
121
121
|
product_desc: `${product?.description || ''}`,
|
|
122
122
|
product_nameOnly: `${product.name}`,
|
|
123
123
|
product_sku: `${product.sku}`,
|
|
@@ -139,7 +139,7 @@ export async function renderOrientageDO({ doNo }, context: any) {
|
|
|
139
139
|
)
|
|
140
140
|
|
|
141
141
|
return {
|
|
142
|
-
product_name: `${inventory.product.name} (${inventory.product.description})
|
|
142
|
+
product_name: inventory.product.description ? `${inventory.product.name} (${inventory.product.description})` : inventory.product.name,
|
|
143
143
|
product_desc: `${inventory.product?.description || ''}`,
|
|
144
144
|
product_nameOnly: `${inventory.product.name}`,
|
|
145
145
|
product_sku: `${inventory.product.sku}`,
|
|
@@ -119,6 +119,8 @@ export async function renderPackingLabel({ data }: { data: RenderPackingLabelInp
|
|
|
119
119
|
logo_url: logo,
|
|
120
120
|
company_name: releaseGood?.bizplace?.name || '',
|
|
121
121
|
ref_no: releaseGood?.refNo || '',
|
|
122
|
+
ref_no_2: releaseGood?.refNo2 || '',
|
|
123
|
+
ref_no_3: releaseGood?.refNo3 || '',
|
|
122
124
|
packed_qty: (loadingPackage.name || '').toUpperCase(), // THIS DUE TO JASPERSOFT, USING A WEIRD NAME. SO LEAVE IT BE FIRST
|
|
123
125
|
attention_company: releaseGood?.attentionCompany || '',
|
|
124
126
|
attention_to: releaseGood?.attentionTo || '',
|
|
@@ -259,10 +259,9 @@ export async function renderRODO({ doNo }, context: any) {
|
|
|
259
259
|
wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
260
260
|
? inventory.product.sku
|
|
261
261
|
: wsd.targetInventory.product.sku
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
: `${wsd.targetInventory.product.name} (${wsd.targetInventory.product.description})`
|
|
262
|
+
const _prod = wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
263
|
+
? inventory.product : wsd.targetInventory.product
|
|
264
|
+
const productName = _prod.description ? `${_prod.name} (${_prod.description})` : _prod.name
|
|
266
265
|
const productSize = matchedProductDetail ? matchedProductDetail.packingSize : inventory.packingSize
|
|
267
266
|
|
|
268
267
|
toteProductMap.get(toteName).push({
|
|
@@ -291,10 +290,9 @@ export async function renderRODO({ doNo }, context: any) {
|
|
|
291
290
|
wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
292
291
|
? inventory.product.sku
|
|
293
292
|
: wsd.targetInventory.product.sku
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
: `${wsd.targetInventory.product.name} (${wsd.targetInventory.product.description})`
|
|
293
|
+
const _prod2 = wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
294
|
+
? inventory.product : wsd.targetInventory.product
|
|
295
|
+
const productName = _prod2.description ? `${_prod2.name} (${_prod2.description})` : _prod2.name
|
|
298
296
|
const productSize = matchedProductDetail ? matchedProductDetail.packingSize : inventory.packingSize
|
|
299
297
|
|
|
300
298
|
toteProductMap.get(toteName).push({
|
|
@@ -404,10 +402,11 @@ export async function renderRODO({ doNo }, context: any) {
|
|
|
404
402
|
productDetail => productDetail.packingType === inventory.packingType
|
|
405
403
|
)
|
|
406
404
|
return {
|
|
407
|
-
product_name:
|
|
408
|
-
wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
409
|
-
?
|
|
410
|
-
|
|
405
|
+
product_name: (() => {
|
|
406
|
+
const _p = wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
407
|
+
? inventory.product : wsd.targetInventory.product
|
|
408
|
+
return _p.description ? `${_p.name} (${_p.description})` : _p.name
|
|
409
|
+
})(),
|
|
411
410
|
product_desc:
|
|
412
411
|
wsd.targetInventory.product.id === wsd.targetInventory.inventory.product.id
|
|
413
412
|
? `${inventory.product?.description || ''}`
|
package/server/index.ts
CHANGED
|
@@ -8,15 +8,13 @@ export * from './graphql/resolvers/worksheet-detail/generate-release-good-worksh
|
|
|
8
8
|
export * from './migrations'
|
|
9
9
|
export * from './utils'
|
|
10
10
|
export * from './controllers/render-grn'
|
|
11
|
-
export * from './controllers/render-seebuu-grn'
|
|
12
11
|
export * from './controllers/render-elccl-grn'
|
|
13
12
|
export * from './controllers/render-fm-grn'
|
|
14
13
|
export * from './controllers/render-kimeda-grn'
|
|
15
|
-
export * from './controllers/render-orientage-grn'
|
|
16
14
|
export * from './controllers/render-orientage-do'
|
|
17
15
|
export * from './controllers/render-ro-do'
|
|
18
16
|
export * from './controllers/ecommerce/ecommerce-controller'
|
|
19
17
|
export * from './controllers/worksheet-controller'
|
|
20
18
|
export * from './controllers/pos/xilnex-controller'
|
|
21
19
|
|
|
22
|
-
export {createOrderPackageAndItems} from './controllers/outbound/picking-worksheet-controller'
|
|
20
|
+
export { createOrderPackageAndItems } from './controllers/outbound/picking-worksheet-controller'
|
package/server/routes.ts
CHANGED
|
@@ -5,10 +5,8 @@ import { renderKimedaGRN } from './controllers/render-kimeda-grn'
|
|
|
5
5
|
import { renderManifest } from './controllers/render-manifest'
|
|
6
6
|
import { renderManualDO } from './controllers/render-manual-do'
|
|
7
7
|
import { renderOrientageDO } from './controllers/render-orientage-do'
|
|
8
|
-
import { renderOrientageGRN } from './controllers/render-orientage-grn'
|
|
9
8
|
import { renderPackingLabel } from './controllers/render-packing-label'
|
|
10
9
|
import { renderRODO } from './controllers/render-ro-do'
|
|
11
|
-
import { renderSeebuuGRN } from './controllers/render-seebuu-grn'
|
|
12
10
|
import { renderFmGRN } from './controllers/render-fm-grn'
|
|
13
11
|
import { renderInvoices } from './controllers/render-invoices'
|
|
14
12
|
import { renderPO } from './controllers/render-po'
|
|
@@ -38,14 +36,6 @@ process.on('bootstrap-module-domain-private-route' as any, (app, routes) => {
|
|
|
38
36
|
context.body = await renderKimedaGRN(context.params, context)
|
|
39
37
|
})
|
|
40
38
|
|
|
41
|
-
routes.get('/view_orientage_grn/:grnNo', async (context, next) => {
|
|
42
|
-
context.body = await renderOrientageGRN(context.params, context)
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
routes.get('/view_seebuu_grn/:grnNo', async (context, next) => {
|
|
46
|
-
context.body = await renderSeebuuGRN(context.params, context)
|
|
47
|
-
})
|
|
48
|
-
|
|
49
39
|
routes.get('/view_fm_grn/:grnNo/:timezoneOffSet', async (context, next) => {
|
|
50
40
|
context.body = await renderFmGRN(context.params, context)
|
|
51
41
|
})
|
|
@@ -1,158 +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.renderOrientageGRN = void 0;
|
|
7
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
8
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
|
-
const typeorm_1 = require("typeorm");
|
|
10
|
-
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
11
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
12
|
-
const biz_base_1 = require("@things-factory/biz-base");
|
|
13
|
-
const env_1 = require("@things-factory/env");
|
|
14
|
-
const sales_base_1 = require("@things-factory/sales-base");
|
|
15
|
-
const shell_1 = require("@things-factory/shell");
|
|
16
|
-
const constants_1 = require("../constants");
|
|
17
|
-
const entities_1 = require("../entities");
|
|
18
|
-
const datetime_util_1 = require("../utils/datetime-util");
|
|
19
|
-
const REPORT_API_URL = env_1.config.get('reportApiUrl', 'http://localhost:8888/rest/report/show_html');
|
|
20
|
-
async function renderOrientageGRN({ grnNo }, context) {
|
|
21
|
-
// 1. find domain
|
|
22
|
-
const domain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({
|
|
23
|
-
where: { id: context.state.domain.id }
|
|
24
|
-
});
|
|
25
|
-
// 2. find grn
|
|
26
|
-
const foundGRN = await (0, typeorm_1.getRepository)(sales_base_1.GoodsReceivalNote).findOne({
|
|
27
|
-
where: { domain, name: grnNo },
|
|
28
|
-
relations: ['domain', 'bizplace', 'bizplace.domain', 'bizplace.company', 'arrivalNotice']
|
|
29
|
-
});
|
|
30
|
-
// 3. find GAN
|
|
31
|
-
const foundGAN = foundGRN.arrivalNotice;
|
|
32
|
-
const ownRefNo = foundGAN.refNo;
|
|
33
|
-
const ownRefNo2 = foundGAN.refNo2;
|
|
34
|
-
const ownRefNo3 = foundGAN.refNo3;
|
|
35
|
-
// 4. find customer bizplace
|
|
36
|
-
const partnerBiz = foundGRN.bizplace;
|
|
37
|
-
const partnerDomain = await (0, typeorm_1.getRepository)(auth_base_1.Partner).findOne({
|
|
38
|
-
where: { partnerDomain: partnerBiz.domain, domain },
|
|
39
|
-
relations: ['domain']
|
|
40
|
-
});
|
|
41
|
-
const domainOwner = partnerDomain.domain;
|
|
42
|
-
const domainBizplace = await (0, typeorm_1.getRepository)(biz_base_1.Bizplace).findOne({
|
|
43
|
-
where: { domain: domainOwner },
|
|
44
|
-
relations: ['company']
|
|
45
|
-
});
|
|
46
|
-
// 5. find domain contact point
|
|
47
|
-
const foundCP = await (0, typeorm_1.getRepository)(biz_base_1.ContactPoint).findOne({
|
|
48
|
-
where: { domain, bizplace: domainBizplace }
|
|
49
|
-
});
|
|
50
|
-
// 6. find unloading worksheet
|
|
51
|
-
const foundWS = await (0, typeorm_1.getRepository)(entities_1.Worksheet).findOne({
|
|
52
|
-
where: { domain, arrivalNotice: foundGAN, type: sales_base_1.ORDER_PRODUCT_STATUS.UNLOADING, status: sales_base_1.ORDER_STATUS.DONE },
|
|
53
|
-
relations: ['worksheetDetails']
|
|
54
|
-
});
|
|
55
|
-
const targetProducts = await (0, typeorm_1.getRepository)(sales_base_1.OrderProduct).find({
|
|
56
|
-
where: { domain, arrivalNotice: foundGAN, actualPalletQty: (0, typeorm_1.Not)((0, typeorm_1.IsNull)()), actualPackQty: (0, typeorm_1.Not)((0, typeorm_1.IsNull)()) },
|
|
57
|
-
relations: ['product', 'product.productDetails']
|
|
58
|
-
});
|
|
59
|
-
// 7. find grn template based on category
|
|
60
|
-
const foundTemplate = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
61
|
-
where: { domain, category: constants_1.TEMPLATE_TYPE.GRN_TEMPLATE }
|
|
62
|
-
});
|
|
63
|
-
// 8. find grn logo
|
|
64
|
-
const foundLogo = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
65
|
-
where: {
|
|
66
|
-
domain,
|
|
67
|
-
category: constants_1.TEMPLATE_TYPE.LOGO
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
const template = await attachment_base_1.STORAGE.readFile(foundTemplate.path, 'utf-8');
|
|
71
|
-
let logo = null;
|
|
72
|
-
if (foundLogo === null || foundLogo === void 0 ? void 0 : foundLogo.path) {
|
|
73
|
-
logo = 'data:' + foundLogo.mimetype + ';base64,' + (await attachment_base_1.STORAGE.readFile(foundLogo.path, 'base64'));
|
|
74
|
-
}
|
|
75
|
-
const data = {
|
|
76
|
-
logo_url: logo,
|
|
77
|
-
customer_biz: partnerBiz.name,
|
|
78
|
-
customer_address: partnerBiz.address,
|
|
79
|
-
company_name: domainBizplace.company.name,
|
|
80
|
-
company_phone: foundCP.phone,
|
|
81
|
-
company_fax: foundCP.fax,
|
|
82
|
-
company_email: foundCP.email,
|
|
83
|
-
company_brn: domainBizplace.company.brn,
|
|
84
|
-
company_address: domainBizplace.company.address,
|
|
85
|
-
order_no: foundGRN.name,
|
|
86
|
-
unload_date: datetime_util_1.DateTimeConverter.date(foundWS.endedAt),
|
|
87
|
-
ref_no: ownRefNo,
|
|
88
|
-
ref_no1: ownRefNo2,
|
|
89
|
-
ref_no2: ownRefNo3,
|
|
90
|
-
received_date: datetime_util_1.DateTimeConverter.date(foundWS.endedAt),
|
|
91
|
-
product_list: targetProducts.map((item, idx) => {
|
|
92
|
-
var _a, _b;
|
|
93
|
-
const productDetails = item.product.productDetails;
|
|
94
|
-
const matchedProductDetail = productDetails.find(productDetail => productDetail.packingType === item.packingType);
|
|
95
|
-
return {
|
|
96
|
-
list_no: idx + 1,
|
|
97
|
-
product_sku: item.product.sku,
|
|
98
|
-
product_name: item.product.name,
|
|
99
|
-
product_desc: item.product.description,
|
|
100
|
-
expiration_date: item.expirationDate ? datetime_util_1.DateTimeConverter.date(item.expirationDate) : null,
|
|
101
|
-
batch_id: item.batchId,
|
|
102
|
-
batch_id_ref: (item === null || item === void 0 ? void 0 : item.batchIdRef) ? item.batchIdRef : '',
|
|
103
|
-
product_packing_size: matchedProductDetail ? matchedProductDetail.packingSize : item.packingSize,
|
|
104
|
-
pack_size: matchedProductDetail
|
|
105
|
-
? matchedProductDetail.uomValue
|
|
106
|
-
? matchedProductDetail.uomValue +
|
|
107
|
-
' ' +
|
|
108
|
-
matchedProductDetail.uom +
|
|
109
|
-
(item.product.volumeSize ? ' x ' + (parseFloat(item.product.volumeSize) / 100).toFixed(2) + ' L' : '')
|
|
110
|
-
: null
|
|
111
|
-
: item.product.primaryValue
|
|
112
|
-
? item.product.primaryValue +
|
|
113
|
-
' ' +
|
|
114
|
-
item.product.primaryUnit +
|
|
115
|
-
(item.product.volumeSize ? ' x ' + (parseFloat(item.product.volumeSize) / 100).toFixed(2) + ' L' : '')
|
|
116
|
-
: null,
|
|
117
|
-
pack_qty: item.packQty ? item.packQty : 0,
|
|
118
|
-
actual_pack_qty: item.actualPackQty ? item.actualPackQty : 0,
|
|
119
|
-
container_no: foundGAN.containerNo ? foundGAN.containerNo : '',
|
|
120
|
-
aux_value_3: (matchedProductDetail === null || matchedProductDetail === void 0 ? void 0 : matchedProductDetail.auxValue3) ? matchedProductDetail.auxValue3 : '',
|
|
121
|
-
product_volume: matchedProductDetail
|
|
122
|
-
? (matchedProductDetail === null || matchedProductDetail === void 0 ? void 0 : matchedProductDetail.volume)
|
|
123
|
-
? matchedProductDetail.volume
|
|
124
|
-
: 0
|
|
125
|
-
: ((_a = item === null || item === void 0 ? void 0 : item.product) === null || _a === void 0 ? void 0 : _a.volume)
|
|
126
|
-
? item.product.volume
|
|
127
|
-
: 0,
|
|
128
|
-
total_volume: matchedProductDetail
|
|
129
|
-
? matchedProductDetail.volume
|
|
130
|
-
? Number((matchedProductDetail.volume * item.actualPackQty).toFixed(4))
|
|
131
|
-
: 0
|
|
132
|
-
: ((_b = item === null || item === void 0 ? void 0 : item.product) === null || _b === void 0 ? void 0 : _b.volume)
|
|
133
|
-
? Number((item.product.volume * item.actualPackQty).toFixed(4))
|
|
134
|
-
: 0,
|
|
135
|
-
manufacture_year: item.manufactureDate ? new Date(item.manufactureDate).getFullYear() : null,
|
|
136
|
-
manufacture_date: item.manufactureDate ? item.manufactureDate : null,
|
|
137
|
-
literage: matchedProductDetail
|
|
138
|
-
? matchedProductDetail.packingSize
|
|
139
|
-
? parseFloat(matchedProductDetail.packingSize) * parseFloat(item.product.volumeSize)
|
|
140
|
-
: 0
|
|
141
|
-
: item.packingSize
|
|
142
|
-
? parseFloat(item.packingSize) * parseFloat(item.product.volumeSize)
|
|
143
|
-
: 0,
|
|
144
|
-
remark: item.remark || ''
|
|
145
|
-
};
|
|
146
|
-
})
|
|
147
|
-
};
|
|
148
|
-
const formData = new form_data_1.default();
|
|
149
|
-
formData.append('template', template);
|
|
150
|
-
formData.append('jsonString', JSON.stringify(data));
|
|
151
|
-
const response = await (0, node_fetch_1.default)(REPORT_API_URL, {
|
|
152
|
-
method: 'POST',
|
|
153
|
-
body: formData
|
|
154
|
-
});
|
|
155
|
-
return await response.text();
|
|
156
|
-
}
|
|
157
|
-
exports.renderOrientageGRN = renderOrientageGRN;
|
|
158
|
-
//# sourceMappingURL=render-orientage-grn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-orientage-grn.js","sourceRoot":"","sources":["../../server/controllers/render-orientage-grn.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAgC;AAChC,4DAA8B;AAC9B,qCAAoD;AAEpD,qEAAqE;AACrE,yDAAmD;AACnD,uDAAiE;AACjE,6CAA4C;AAE5C,2DAMmC;AACnC,iDAA8C;AAE9C,4CAA4C;AAC5C,0CAAuC;AACvC,0DAA0D;AAE1D,MAAM,cAAc,GAAG,YAAM,CAAC,GAAG,CAAC,cAAc,EAAE,6CAA6C,CAAC,CAAA;AAEzF,KAAK,UAAU,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,OAAY;IAC9D,iBAAiB;IACjB,MAAM,MAAM,GAAW,MAAM,IAAA,uBAAa,EAAC,cAAM,CAAC,CAAC,OAAO,CAAC;QACzD,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE;KACvC,CAAC,CAAA;IAEF,cAAc;IACd,MAAM,QAAQ,GAAsB,MAAM,IAAA,uBAAa,EAAC,8BAAiB,CAAC,CAAC,OAAO,CAAC;QACjF,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE;QAC9B,SAAS,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,CAAC;KAC1F,CAAC,CAAA;IAEF,cAAc;IACd,MAAM,QAAQ,GAAkB,QAAQ,CAAC,aAAa,CAAA;IACtD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAA;IAC/B,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAA;IACjC,MAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAA;IAEjC,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ACpE,CAAC,CAAC,CAAC;gBACL,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE;aAC1B,CAAA;QACH,CAAC,CAAC;KACH,CAAA;IAED,MAAM,QAAQ,GAAG,IAAI,mBAAQ,EAAE,CAAA;IAC/B,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;IACrC,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;IAEnD,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAK,EAAC,cAAc,EAAE;QAC3C,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,QAAQ;KACf,CAAC,CAAA;IAEF,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;AAC9B,CAAC;AAzJD,gDAyJC"}
|
|
@@ -1,177 +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.renderSeebuuGRN = void 0;
|
|
7
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
8
|
-
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
|
-
const typeorm_1 = require("typeorm");
|
|
10
|
-
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
11
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
12
|
-
const biz_base_1 = require("@things-factory/biz-base");
|
|
13
|
-
const env_1 = require("@things-factory/env");
|
|
14
|
-
const sales_base_1 = require("@things-factory/sales-base");
|
|
15
|
-
const shell_1 = require("@things-factory/shell");
|
|
16
|
-
const constants_1 = require("../constants");
|
|
17
|
-
const entities_1 = require("../entities");
|
|
18
|
-
const datetime_util_1 = require("../utils/datetime-util");
|
|
19
|
-
const REPORT_API_URL = env_1.config.get('reportApiUrl', 'http://localhost:8888/rest/report/show_html');
|
|
20
|
-
async function renderSeebuuGRN({ grnNo }, context) {
|
|
21
|
-
// 1. find domain
|
|
22
|
-
const domain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({
|
|
23
|
-
where: { id: context.state.domain.id }
|
|
24
|
-
});
|
|
25
|
-
// 2. find grn
|
|
26
|
-
const foundGRN = await (0, typeorm_1.getRepository)(sales_base_1.GoodsReceivalNote).findOne({
|
|
27
|
-
where: { domain, name: grnNo },
|
|
28
|
-
relations: ['domain', 'bizplace', 'bizplace.domain', 'bizplace.company', 'arrivalNotice']
|
|
29
|
-
});
|
|
30
|
-
// 3. find GAN
|
|
31
|
-
const foundGAN = foundGRN.arrivalNotice;
|
|
32
|
-
// 4. find customer bizplace
|
|
33
|
-
const partnerBiz = foundGRN.bizplace;
|
|
34
|
-
const partnerDomain = await (0, typeorm_1.getRepository)(auth_base_1.Partner).findOne({
|
|
35
|
-
where: { domain, partnerDomain: partnerBiz.domain },
|
|
36
|
-
relations: ['domain']
|
|
37
|
-
});
|
|
38
|
-
const domainOwner = partnerDomain.domain;
|
|
39
|
-
const domainBizplace = await (0, typeorm_1.getRepository)(biz_base_1.Bizplace).findOne({
|
|
40
|
-
where: { domain: domainOwner },
|
|
41
|
-
relations: ['company']
|
|
42
|
-
});
|
|
43
|
-
// 5. find domain contact point
|
|
44
|
-
const foundCP = await (0, typeorm_1.getRepository)(biz_base_1.ContactPoint).findOne({
|
|
45
|
-
where: { domain, bizplace: domainBizplace }
|
|
46
|
-
});
|
|
47
|
-
// 6. find unloading worksheet
|
|
48
|
-
const foundWS = await (0, typeorm_1.getRepository)(entities_1.Worksheet).findOne({
|
|
49
|
-
where: { domain, arrivalNotice: foundGAN, type: constants_1.WORKSHEET_TYPE.UNLOADING, status: sales_base_1.ORDER_STATUS.DONE },
|
|
50
|
-
relations: ['worksheetDetails', 'updater']
|
|
51
|
-
});
|
|
52
|
-
// find putaway worksheet
|
|
53
|
-
const foundPutawayWS = await (0, typeorm_1.getRepository)(entities_1.Worksheet).findOne({
|
|
54
|
-
where: { domain, arrivalNotice: foundGAN, type: constants_1.WORKSHEET_TYPE.PUTAWAY, status: sales_base_1.ORDER_STATUS.DONE },
|
|
55
|
-
relations: ['worksheetDetails', 'updater']
|
|
56
|
-
});
|
|
57
|
-
let invItems;
|
|
58
|
-
await (0, typeorm_1.getManager)().transaction(async (trxMgr) => {
|
|
59
|
-
invItems = await trxMgr.query(`
|
|
60
|
-
select op.id, op."name", op.description, op."type", op.batch_id, op.adjusted_batch_id, op.adjusted_pallet_qty, op.packing_type,
|
|
61
|
-
ih.uom, op.uom_value, ih.qty, op.pallet_qty, op.actual_pallet_qty, op.total_uom_value, op.release_qty,
|
|
62
|
-
coalesce((select nett_weight from product_details prdw where prdw.product_id = op.product_id and prdw.packing_type = op.packing_type and prdw.packing_size = op.packing_size order by nett_weight desc limit 1),0) as unit_nett_weight,
|
|
63
|
-
coalesce((select gross_weight from product_details prdw where prdw.product_id = op.product_id and prdw.packing_type = op.packing_type and prdw.packing_size = op.packing_size order by nett_weight desc limit 1),0) as unit_gross_weight,
|
|
64
|
-
op.unit_price, op.unpack_uom_value, op.unpack_qty, op.discount_amt, op.tax_rate, op.misc_amt,
|
|
65
|
-
op.adjusted_packing_type, op.manufacture_date, op.adjusted_uom, op.adjusted_uom_value, op.adjusted_pack_qty, op.adjusted_total_uom_value,
|
|
66
|
-
op.batch_id_ref, op.adjusted_batch_id_ref,
|
|
67
|
-
op.adjusted_unit_price, op.packing_size, op.release_uom_value,
|
|
68
|
-
ih.expiry_date as expiration_date, p.sku as product_sku, p.name as product_name, p.description as product_description,
|
|
69
|
-
case when ih.reusable_pallet_id notnull then concat(ih.qty, ' ', ih.packing_type, '(S) ', plt.name) else concat(ih.pallet, ' PALLET(S)') end as remark
|
|
70
|
-
from order_products op
|
|
71
|
-
left join (
|
|
72
|
-
select product_id, batch_id, reusable_pallet_id, packing_type, sum(qty) as qty,
|
|
73
|
-
sum(uom_value) as uom_value, uom, count(distinct pallet_id) as pallet,
|
|
74
|
-
string_agg(distinct expiration_date::varchar,', ' order by expiration_date::varchar) as expiry_date
|
|
75
|
-
from reduced_inventory_histories rih
|
|
76
|
-
where ref_order_id::uuid = $1
|
|
77
|
-
and transaction_type = 'UNLOADING'
|
|
78
|
-
group by reusable_pallet_id, product_id, batch_id, packing_type, uom
|
|
79
|
-
) ih on op.product_id = ih.product_id and op.batch_id = ih.batch_id and op.packing_type = ih.packing_type and op.uom = ih.uom
|
|
80
|
-
left join pallets plt on plt.id = ih.reusable_pallet_id
|
|
81
|
-
inner join products p on op.product_id = p.id
|
|
82
|
-
where op.arrival_notice_id::uuid = $1
|
|
83
|
-
order by p.sku
|
|
84
|
-
`, [foundGAN.id]);
|
|
85
|
-
});
|
|
86
|
-
// 7. find grn template based on category
|
|
87
|
-
const foundTemplate = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
88
|
-
where: { domain, category: constants_1.TEMPLATE_TYPE.GRN_TEMPLATE }
|
|
89
|
-
});
|
|
90
|
-
// 8. find grn logo
|
|
91
|
-
const foundLogo = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
92
|
-
where: {
|
|
93
|
-
domain,
|
|
94
|
-
category: constants_1.TEMPLATE_TYPE.LOGO
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
// 9. find signature
|
|
98
|
-
const foundSignature = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
99
|
-
where: {
|
|
100
|
-
domain,
|
|
101
|
-
category: constants_1.TEMPLATE_TYPE.SIGNATURE
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const foundCop = await (0, typeorm_1.getRepository)(attachment_base_1.Attachment).findOne({
|
|
105
|
-
where: {
|
|
106
|
-
domain,
|
|
107
|
-
category: constants_1.TEMPLATE_TYPE.COP
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
const template = await attachment_base_1.STORAGE.readFile(foundTemplate.path, 'utf-8');
|
|
111
|
-
let logo = null;
|
|
112
|
-
if (foundLogo === null || foundLogo === void 0 ? void 0 : foundLogo.path) {
|
|
113
|
-
logo = 'data:' + foundLogo.mimetype + ';base64,' + (await attachment_base_1.STORAGE.readFile(foundLogo.path, 'base64'));
|
|
114
|
-
}
|
|
115
|
-
let signature = null;
|
|
116
|
-
if (foundSignature === null || foundSignature === void 0 ? void 0 : foundSignature.path) {
|
|
117
|
-
signature = 'data:' + foundSignature.mimetype + ';base64,' + (await attachment_base_1.STORAGE.readFile(foundSignature.path, 'base64'));
|
|
118
|
-
}
|
|
119
|
-
let cop = null;
|
|
120
|
-
if (foundCop === null || foundCop === void 0 ? void 0 : foundCop.path) {
|
|
121
|
-
cop = 'data:' + foundSignature.mimetype + ';base64,' + (await attachment_base_1.STORAGE.readFile(foundCop.path, 'base64'));
|
|
122
|
-
}
|
|
123
|
-
const data = {
|
|
124
|
-
logo_url: logo,
|
|
125
|
-
sign_url: signature,
|
|
126
|
-
cop_url: cop,
|
|
127
|
-
customer_biz: partnerBiz.name,
|
|
128
|
-
customer_address: partnerBiz.address,
|
|
129
|
-
company_domain: domainBizplace.company.name,
|
|
130
|
-
company_phone: foundCP.phone,
|
|
131
|
-
company_email: foundCP.email,
|
|
132
|
-
company_brn: domainBizplace.company.brn,
|
|
133
|
-
company_address: domainBizplace.company.address,
|
|
134
|
-
order_no: foundGRN.name,
|
|
135
|
-
gan_no: foundGAN.name,
|
|
136
|
-
unload_date: datetime_util_1.DateTimeConverter.date(foundWS.endedAt),
|
|
137
|
-
ref_no: `${foundGAN.refNo}`,
|
|
138
|
-
ref_no1: foundGAN.refNo2 ? `${foundGAN.refNo2}` : '',
|
|
139
|
-
ref_no2: foundGAN.refNo3 ? `${foundGAN.refNo3}` : '',
|
|
140
|
-
received_date: datetime_util_1.DateTimeConverter.date(foundWS.endedAt),
|
|
141
|
-
truck_no: foundGAN.truckNo || '',
|
|
142
|
-
container_no: foundGAN.containerNo || '',
|
|
143
|
-
unloaded_by: foundWS ? foundWS.updater.name : '',
|
|
144
|
-
putaway_by: foundPutawayWS ? foundPutawayWS.updater.name : '',
|
|
145
|
-
delivery_order_no: foundGAN.deliveryOrderNo ? foundGAN.deliveryOrderNo : '',
|
|
146
|
-
product_list: invItems.map((item, idx) => {
|
|
147
|
-
return {
|
|
148
|
-
list_no: idx + 1,
|
|
149
|
-
product_sku: `${item.product_sku}`,
|
|
150
|
-
product_name: `${item.product_name}(${item.product_description})`,
|
|
151
|
-
product_desc: item.product_description,
|
|
152
|
-
product_nameOnly: item.product_name,
|
|
153
|
-
product_type: item.packing_type,
|
|
154
|
-
product_batch: item.batch_id,
|
|
155
|
-
product_qty: item.qty,
|
|
156
|
-
product_uom_value: `${Math.round(item.uom_value * 100) / 100} ${item.uom}`,
|
|
157
|
-
product_unit_nett_weight: parseFloat(item.unit_nett_weight),
|
|
158
|
-
product_total_nett_weight: parseFloat(item.unit_nett_weight) * parseFloat(item.qty),
|
|
159
|
-
product_unit_gross_weight: parseFloat(item.unit_gross_weight),
|
|
160
|
-
product_total_gross_weight: parseFloat(item.unit_gross_weight) * parseFloat(item.qty),
|
|
161
|
-
pallet_qty: item.actual_pallet_qty,
|
|
162
|
-
expiry_date: item.expiration_date,
|
|
163
|
-
remark: (item.remark ? item.remark : '') + (item.issue ? ' [Issue]: ' + item.issue : '')
|
|
164
|
-
};
|
|
165
|
-
})
|
|
166
|
-
};
|
|
167
|
-
const formData = new form_data_1.default();
|
|
168
|
-
formData.append('template', template);
|
|
169
|
-
formData.append('jsonString', JSON.stringify(data));
|
|
170
|
-
const response = await (0, node_fetch_1.default)(REPORT_API_URL, {
|
|
171
|
-
method: 'POST',
|
|
172
|
-
body: formData
|
|
173
|
-
});
|
|
174
|
-
return await response.text();
|
|
175
|
-
}
|
|
176
|
-
exports.renderSeebuuGRN = renderSeebuuGRN;
|
|
177
|
-
//# sourceMappingURL=render-seebuu-grn.js.map
|
|
@@ -1 +0,0 @@
|
|
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