@things-factory/integration-accounting 4.3.544 → 4.3.562
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/xilnex/apis/sales-order/create-sales-order.js +32 -21
- package/dist-server/controllers/xilnex/apis/sales-order/create-sales-order.js.map +1 -1
- package/dist-server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.js +1 -1
- package/dist-server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.js.map +1 -1
- package/dist-server/controllers/xilnex/apis/shipment/create-shipment.js +5 -2
- package/dist-server/controllers/xilnex/apis/shipment/create-shipment.js.map +1 -1
- package/dist-server/controllers/xilnex/xilnex.js +11 -6
- package/dist-server/controllers/xilnex/xilnex.js.map +1 -1
- package/package.json +3 -3
- package/server/controllers/xilnex/apis/sales-order/create-sales-order.ts +33 -20
- package/server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.ts +1 -1
- package/server/controllers/xilnex/apis/shipment/create-shipment.ts +5 -2
- package/server/controllers/xilnex/xilnex.ts +17 -6
|
@@ -4,26 +4,45 @@ exports.createSalesOrder = void 0;
|
|
|
4
4
|
function createSalesOrder() {
|
|
5
5
|
return {
|
|
6
6
|
method: 'post',
|
|
7
|
-
path: '/salesorder',
|
|
7
|
+
path: '/salesorder?disableRounding=true',
|
|
8
8
|
denormalize(req, { accounting }) {
|
|
9
9
|
var _a;
|
|
10
10
|
const { releaseGood, orderProducts } = req;
|
|
11
11
|
let accountInfo = (accounting === null || accounting === void 0 ? void 0 : accounting.accountInfo) ? JSON.parse(accounting.accountInfo) : {};
|
|
12
|
-
|
|
12
|
+
let { outlet, clients } = accountInfo;
|
|
13
|
+
let xilnexSetting = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.xilnexSetting) ? JSON.parse(releaseGood.xilnexSetting) : null;
|
|
14
|
+
const matchedClient = clients.filter(client => client.clientPlatform == releaseGood.platformCode && client.clientCountry == releaseGood.platformCountry);
|
|
15
|
+
let salesOrderType = (xilnexSetting === null || xilnexSetting === void 0 ? void 0 : xilnexSetting.salesType) || ((_a = matchedClient[0]) === null || _a === void 0 ? void 0 : _a.salesType) || 'InvoiceSales';
|
|
16
|
+
let outletName = (xilnexSetting === null || xilnexSetting === void 0 ? void 0 : xilnexSetting.outletName) || outlet || 'MAIN BRANCH';
|
|
17
|
+
let clientId = (xilnexSetting === null || xilnexSetting === void 0 ? void 0 : xilnexSetting.clientId) || matchedClient[0].clientId || '';
|
|
18
|
+
let clientPayment = (xilnexSetting === null || xilnexSetting === void 0 ? void 0 : xilnexSetting.clientPayment) || matchedClient[0].clientPayment || '';
|
|
19
|
+
let paidAmt = 0;
|
|
20
|
+
let salesOrderItems = orderProducts.map(op => {
|
|
21
|
+
var _a;
|
|
22
|
+
let sellingPrice = Math.round(((op === null || op === void 0 ? void 0 : op.sellingPrice) || 0) * 100) / 100;
|
|
23
|
+
let unitPrice = sellingPrice / (op === null || op === void 0 ? void 0 : op.releaseQty);
|
|
24
|
+
let enterPrice = Math.round(unitPrice * 100) / 100;
|
|
25
|
+
paidAmt += enterPrice * op.releaseQty;
|
|
26
|
+
return {
|
|
27
|
+
itemCode: (_a = op === null || op === void 0 ? void 0 : op.product) === null || _a === void 0 ? void 0 : _a.sku,
|
|
28
|
+
enterPrice: enterPrice,
|
|
29
|
+
quantity: op === null || op === void 0 ? void 0 : op.releaseQty
|
|
30
|
+
// discountPercentage
|
|
31
|
+
};
|
|
32
|
+
});
|
|
13
33
|
let discountAmt = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.discountAmount)
|
|
14
34
|
? parseFloat(releaseGood.discountAmount.toString().replace('-', ''))
|
|
15
35
|
: 0;
|
|
16
36
|
let promotionAmt = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.promotionAmount) || 0;
|
|
17
37
|
let taxAmt = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.taxAmount) || 0;
|
|
18
38
|
let shippingFee = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.shippingFee) || 0;
|
|
19
|
-
let paidAmt = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.paidAmount) || 0;
|
|
20
39
|
let totalAmount = paidAmt + shippingFee + taxAmt + promotionAmt + discountAmt;
|
|
21
40
|
let discountPercentage = (discountAmt / totalAmount) * 100;
|
|
22
41
|
let taxPercentage = (taxAmt / totalAmount) * 100;
|
|
23
42
|
taxPercentage = Math.round(taxPercentage * 100) / 100;
|
|
24
43
|
let salesOrder = {
|
|
25
44
|
dateTime: new Date(),
|
|
26
|
-
clientId:
|
|
45
|
+
clientId: clientId,
|
|
27
46
|
billingAddress: {
|
|
28
47
|
street: releaseGood.billingAddress,
|
|
29
48
|
city: null,
|
|
@@ -41,32 +60,24 @@ function createSalesOrder() {
|
|
|
41
60
|
customField1: (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.refNo) || '-',
|
|
42
61
|
integrationCustomField1: (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.refNo) || '-',
|
|
43
62
|
status: 'CONFIRMED',
|
|
44
|
-
outlet:
|
|
45
|
-
confirmOutlet:
|
|
63
|
+
outlet: outletName,
|
|
64
|
+
confirmOutlet: outletName,
|
|
46
65
|
remark: releaseGood.remark,
|
|
47
|
-
type:
|
|
66
|
+
type: salesOrderType,
|
|
48
67
|
taxPercentage,
|
|
49
68
|
collections: [
|
|
50
69
|
{
|
|
51
|
-
amount: (
|
|
52
|
-
cardType:
|
|
53
|
-
reference:
|
|
54
|
-
remark:
|
|
70
|
+
amount: Math.round((paidAmt || 0) * 100) / 100,
|
|
71
|
+
cardType: clientPayment,
|
|
72
|
+
reference: clientPayment,
|
|
73
|
+
remark: clientPayment,
|
|
55
74
|
method: 'other'
|
|
56
75
|
}
|
|
57
76
|
],
|
|
58
|
-
salesOrderItems:
|
|
59
|
-
var _a;
|
|
60
|
-
return {
|
|
61
|
-
itemCode: (_a = op === null || op === void 0 ? void 0 : op.product) === null || _a === void 0 ? void 0 : _a.sku,
|
|
62
|
-
enterPrice: (op === null || op === void 0 ? void 0 : op.sellingPrice) / (op === null || op === void 0 ? void 0 : op.releaseQty),
|
|
63
|
-
quantity: op === null || op === void 0 ? void 0 : op.releaseQty
|
|
64
|
-
// discountPercentage
|
|
65
|
-
};
|
|
66
|
-
})
|
|
77
|
+
salesOrderItems: salesOrderItems
|
|
67
78
|
};
|
|
68
79
|
return {
|
|
69
|
-
payload: { salesOrder }
|
|
80
|
+
payload: { salesOrder, releaseGoodId: releaseGood.id }
|
|
70
81
|
};
|
|
71
82
|
},
|
|
72
83
|
normalize(res) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-sales-order.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/sales-order/create-sales-order.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB;IAC9B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"create-sales-order.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/sales-order/create-sales-order.ts"],"names":[],"mappings":";;;AAAA,SAAgB,gBAAgB;IAC9B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,kCAAkC;QACxC,WAAW,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE;;YAC7B,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;YAC1C,IAAI,WAAW,GAAQ,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YACxF,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,WAAW,CAAA;YAErC,IAAI,aAAa,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,EAAC,CAAC,CAAC,IAAI,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accounting_api_1 = require("../../../accounting-api");
|
|
|
5
5
|
function postSalesOrderToSalesInvoice() {
|
|
6
6
|
return {
|
|
7
7
|
method: 'post',
|
|
8
|
-
path: '/salesorder/{orderId}/invoice/{outlet}',
|
|
8
|
+
path: '/salesorder/{orderId}/invoice/{outlet}?disableRounding=true',
|
|
9
9
|
denormalize(req, { accounting }) {
|
|
10
10
|
let accountInfo = (accounting === null || accounting === void 0 ? void 0 : accounting.accountInfo) ? JSON.parse(accounting.accountInfo) : {};
|
|
11
11
|
return {
|
package/dist-server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-sales-order-to-sales-invoice.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.ts"],"names":[],"mappings":";;;AAAA,4DAAuD;AAEvD,SAAgB,4BAA4B;IAC1C,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"post-sales-order-to-sales-invoice.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/sales-order/post-sales-order-to-sales-invoice.ts"],"names":[],"mappings":";;;AAAA,4DAAuD;AAEvD,SAAgB,4BAA4B;IAC1C,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,6DAA6D;QACnE,WAAW,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE;YAC7B,IAAI,WAAW,GAAQ,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YACxF,OAAO;gBACL,QAAQ,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,KAAI,aAAa,EAAE;aACjF,CAAA;QACH,CAAC;QACD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE;YACjC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;YAEnB,MAAM,IAAI,GAAG,MAAM,8BAAa,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;YAC/E,IAAI,CAAC,IAAI,qBAAQ,IAAI,CAAC,IAAI,CAAE,CAAA;YAE5B,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAA;AACH,CAAC;AAnBD,oEAmBC"}
|
|
@@ -8,6 +8,9 @@ function createShipment() {
|
|
|
8
8
|
denormalize(req, { accounting }) {
|
|
9
9
|
const { releaseGood, orderProducts } = req;
|
|
10
10
|
let accountInfo = (accounting === null || accounting === void 0 ? void 0 : accounting.accountInfo) ? JSON.parse(accounting.accountInfo) : {};
|
|
11
|
+
let { outlet } = accountInfo;
|
|
12
|
+
let xilnexSetting = (releaseGood === null || releaseGood === void 0 ? void 0 : releaseGood.xilnexSetting) ? JSON.parse(releaseGood.xilnexSetting) : null;
|
|
13
|
+
let outletName = (xilnexSetting === null || xilnexSetting === void 0 ? void 0 : xilnexSetting.outletName) || outlet || 'MAIN BRANCH';
|
|
11
14
|
let shipmentItems = orderProducts.map(op => {
|
|
12
15
|
return {
|
|
13
16
|
documentItemId: op.refItemId,
|
|
@@ -15,8 +18,8 @@ function createShipment() {
|
|
|
15
18
|
};
|
|
16
19
|
});
|
|
17
20
|
let shipment = {
|
|
18
|
-
shippingOutlet:
|
|
19
|
-
documentId: Number(releaseGood.
|
|
21
|
+
shippingOutlet: outletName,
|
|
22
|
+
documentId: Number(releaseGood.refNo3),
|
|
20
23
|
shippingDateTime: new Date().toISOString()
|
|
21
24
|
};
|
|
22
25
|
return { payload: { shipment: Object.assign(Object.assign({}, shipment), { shipmentItems }) } };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-shipment.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/shipment/create-shipment.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc;IAC5B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,WAAW;QACjB,WAAW,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE;YAC7B,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;YAC1C,IAAI,WAAW,GAAQ,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"create-shipment.js","sourceRoot":"","sources":["../../../../../server/controllers/xilnex/apis/shipment/create-shipment.ts"],"names":[],"mappings":";;;AAAA,SAAgB,cAAc;IAC5B,OAAO;QACL,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,WAAW;QACjB,WAAW,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE;YAC7B,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,GAAG,CAAA;YAC1C,IAAI,WAAW,GAAQ,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;YACxF,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,CAAA;YAC5B,IAAI,aAAa,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;YAC7F,IAAI,UAAU,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,UAAU,KAAI,MAAM,IAAI,aAAa,CAAA;YAErE,IAAI,aAAa,GAAQ,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBAC9C,OAAO;oBACL,cAAc,EAAE,EAAE,CAAC,SAAS;oBAC5B,gBAAgB,EAAE,EAAE,CAAC,UAAU;iBAChC,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,IAAI,QAAQ,GAAQ;gBAClB,cAAc,EAAE,UAAU;gBAC1B,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;gBACtC,gBAAgB,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aAC3C,CAAA;YAED,OAAO,EAAE,OAAO,EAAE,EAAE,QAAQ,kCAAO,QAAQ,KAAE,aAAa,GAAE,EAAE,EAAE,CAAA;QAClE,CAAC;QACD,SAAS,CAAC,GAAG;YACX,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC;AA9BD,wCA8BC"}
|
|
@@ -43,6 +43,16 @@ class Xilnex {
|
|
|
43
43
|
}
|
|
44
44
|
async post(path, data = {}) {
|
|
45
45
|
const { accessToken, appId, domain } = this.config;
|
|
46
|
+
let headers = {
|
|
47
|
+
'Content-Type': 'application/json',
|
|
48
|
+
token: accessToken,
|
|
49
|
+
appid: appId,
|
|
50
|
+
auth: '5'
|
|
51
|
+
};
|
|
52
|
+
if (path == '/salesorder?disableRounding=true') {
|
|
53
|
+
headers = Object.assign(Object.assign({}, headers), { Idempotency_Key: data.releaseGoodId });
|
|
54
|
+
delete data.releaseGoodId;
|
|
55
|
+
}
|
|
46
56
|
debug('data', data);
|
|
47
57
|
const jsondata = JSON.stringify(data);
|
|
48
58
|
const endpoint = `${ENDPOINT}${path}`;
|
|
@@ -50,12 +60,7 @@ class Xilnex {
|
|
|
50
60
|
let requestInfo = {
|
|
51
61
|
requestBody: {
|
|
52
62
|
method: 'post',
|
|
53
|
-
headers:
|
|
54
|
-
'Content-Type': 'application/json',
|
|
55
|
-
token: accessToken,
|
|
56
|
-
appid: appId,
|
|
57
|
-
auth: '5'
|
|
58
|
-
},
|
|
63
|
+
headers: headers,
|
|
59
64
|
body: jsondata
|
|
60
65
|
},
|
|
61
66
|
requestEndpoint: endpoint
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xilnex.js","sourceRoot":"","sources":["../../../server/controllers/xilnex/xilnex.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA2B;AAC3B,4DAA8B;AAI9B,MAAM,QAAQ,GAAG,iCAAiC,CAAA;AAClD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,8CAA8C,CAAC,CAAA;AAS9E,MAAa,MAAM;IAGjB,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,qBACN,MAAM,CACV,CAAA;IACH,CAAC;IAED,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS;QACtC,IAAI,IAAI,GAAG,gBAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAA;QAEvG,OAAO,IAAI,KAAK,SAAS,CAAA;IAC3B,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,IAAY,EAAE,IAAS;QAC/B,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAA;QAE1C,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;aAC5B,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACxD,IAAI,CAAC,GAAG,CAAC,CAAA;QAEZ,MAAM,QAAQ,GAAG,GAAG,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,E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1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/integration-accounting",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.562",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@things-factory/context-ui": "^4.3.535",
|
|
32
32
|
"@things-factory/grist-ui": "^4.3.535",
|
|
33
33
|
"@things-factory/i18n-base": "^4.3.535",
|
|
34
|
-
"@things-factory/integration-ui": "^4.3.
|
|
34
|
+
"@things-factory/integration-ui": "^4.3.562",
|
|
35
35
|
"@things-factory/more-ui": "^4.3.535",
|
|
36
36
|
"@things-factory/product-base": "^4.3.535",
|
|
37
37
|
"@things-factory/resource-ui": "^4.3.535",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"nock": "^13.0.2",
|
|
51
51
|
"should": "^13.2.3"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "23e29a852185cced85f48b9bfff6cdabe479199d"
|
|
54
54
|
}
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
export function createSalesOrder() {
|
|
2
2
|
return {
|
|
3
3
|
method: 'post',
|
|
4
|
-
path: '/salesorder',
|
|
4
|
+
path: '/salesorder?disableRounding=true',
|
|
5
5
|
denormalize(req, { accounting }) {
|
|
6
6
|
const { releaseGood, orderProducts } = req
|
|
7
7
|
let accountInfo: any = accounting?.accountInfo ? JSON.parse(accounting.accountInfo) : {}
|
|
8
|
-
|
|
8
|
+
let { outlet, clients } = accountInfo
|
|
9
|
+
|
|
10
|
+
let xilnexSetting = releaseGood?.xilnexSetting ? JSON.parse(releaseGood.xilnexSetting) : null
|
|
11
|
+
const matchedClient: any = clients.filter(
|
|
9
12
|
client =>
|
|
10
13
|
client.clientPlatform == releaseGood.platformCode && client.clientCountry == releaseGood.platformCountry
|
|
11
14
|
)
|
|
12
15
|
|
|
16
|
+
let salesOrderType = xilnexSetting?.salesType || matchedClient[0]?.salesType || 'InvoiceSales'
|
|
17
|
+
let outletName = xilnexSetting?.outletName || outlet || 'MAIN BRANCH'
|
|
18
|
+
let clientId = xilnexSetting?.clientId || matchedClient[0].clientId || ''
|
|
19
|
+
let clientPayment = xilnexSetting?.clientPayment || matchedClient[0].clientPayment || ''
|
|
20
|
+
let paidAmt = 0
|
|
21
|
+
let salesOrderItems = orderProducts.map(op => {
|
|
22
|
+
let sellingPrice = Math.round((op?.sellingPrice || 0) * 100) / 100
|
|
23
|
+
let unitPrice = sellingPrice / op?.releaseQty
|
|
24
|
+
let enterPrice = Math.round(unitPrice * 100) / 100
|
|
25
|
+
paidAmt += enterPrice * op.releaseQty
|
|
26
|
+
return {
|
|
27
|
+
itemCode: op?.product?.sku,
|
|
28
|
+
enterPrice: enterPrice,
|
|
29
|
+
quantity: op?.releaseQty
|
|
30
|
+
// discountPercentage
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
|
|
13
34
|
let discountAmt = releaseGood?.discountAmount
|
|
14
35
|
? parseFloat(releaseGood.discountAmount.toString().replace('-', ''))
|
|
15
36
|
: 0
|
|
16
37
|
let promotionAmt = releaseGood?.promotionAmount || 0
|
|
17
38
|
let taxAmt = releaseGood?.taxAmount || 0
|
|
18
39
|
let shippingFee = releaseGood?.shippingFee || 0
|
|
19
|
-
let paidAmt = releaseGood?.paidAmount || 0
|
|
20
40
|
let totalAmount = paidAmt + shippingFee + taxAmt + promotionAmt + discountAmt
|
|
21
41
|
let discountPercentage = (discountAmt / totalAmount) * 100
|
|
22
42
|
let taxPercentage = (taxAmt / totalAmount) * 100
|
|
@@ -24,7 +44,7 @@ export function createSalesOrder() {
|
|
|
24
44
|
|
|
25
45
|
let salesOrder: any = {
|
|
26
46
|
dateTime: new Date(),
|
|
27
|
-
clientId:
|
|
47
|
+
clientId: clientId,
|
|
28
48
|
billingAddress: {
|
|
29
49
|
street: releaseGood.billingAddress,
|
|
30
50
|
city: null,
|
|
@@ -42,32 +62,25 @@ export function createSalesOrder() {
|
|
|
42
62
|
customField1: releaseGood?.refNo || '-',
|
|
43
63
|
integrationCustomField1: releaseGood?.refNo || '-',
|
|
44
64
|
status: 'CONFIRMED',
|
|
45
|
-
outlet:
|
|
46
|
-
confirmOutlet:
|
|
65
|
+
outlet: outletName,
|
|
66
|
+
confirmOutlet: outletName,
|
|
47
67
|
remark: releaseGood.remark,
|
|
48
|
-
type:
|
|
68
|
+
type: salesOrderType,
|
|
49
69
|
taxPercentage,
|
|
50
70
|
collections: [
|
|
51
71
|
{
|
|
52
|
-
amount:
|
|
53
|
-
cardType:
|
|
54
|
-
reference:
|
|
55
|
-
remark:
|
|
72
|
+
amount: Math.round((paidAmt || 0) * 100) / 100,
|
|
73
|
+
cardType: clientPayment,
|
|
74
|
+
reference: clientPayment,
|
|
75
|
+
remark: clientPayment,
|
|
56
76
|
method: 'other'
|
|
57
77
|
}
|
|
58
78
|
],
|
|
59
|
-
salesOrderItems:
|
|
60
|
-
return {
|
|
61
|
-
itemCode: op?.product?.sku,
|
|
62
|
-
enterPrice: op?.sellingPrice / op?.releaseQty,
|
|
63
|
-
quantity: op?.releaseQty
|
|
64
|
-
// discountPercentage
|
|
65
|
-
}
|
|
66
|
-
})
|
|
79
|
+
salesOrderItems: salesOrderItems
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
return {
|
|
70
|
-
payload: { salesOrder }
|
|
83
|
+
payload: { salesOrder, releaseGoodId: releaseGood.id }
|
|
71
84
|
}
|
|
72
85
|
},
|
|
73
86
|
normalize(res) {
|
|
@@ -3,7 +3,7 @@ import { AccountingAPI } from '../../../accounting-api'
|
|
|
3
3
|
export function postSalesOrderToSalesInvoice() {
|
|
4
4
|
return {
|
|
5
5
|
method: 'post',
|
|
6
|
-
path: '/salesorder/{orderId}/invoice/{outlet}',
|
|
6
|
+
path: '/salesorder/{orderId}/invoice/{outlet}?disableRounding=true',
|
|
7
7
|
denormalize(req, { accounting }) {
|
|
8
8
|
let accountInfo: any = accounting?.accountInfo ? JSON.parse(accounting.accountInfo) : {}
|
|
9
9
|
return {
|
|
@@ -5,6 +5,9 @@ export function createShipment() {
|
|
|
5
5
|
denormalize(req, { accounting }) {
|
|
6
6
|
const { releaseGood, orderProducts } = req
|
|
7
7
|
let accountInfo: any = accounting?.accountInfo ? JSON.parse(accounting.accountInfo) : {}
|
|
8
|
+
let { outlet } = accountInfo
|
|
9
|
+
let xilnexSetting = releaseGood?.xilnexSetting ? JSON.parse(releaseGood.xilnexSetting) : null
|
|
10
|
+
let outletName = xilnexSetting?.outletName || outlet || 'MAIN BRANCH'
|
|
8
11
|
|
|
9
12
|
let shipmentItems: any = orderProducts.map(op => {
|
|
10
13
|
return {
|
|
@@ -14,8 +17,8 @@ export function createShipment() {
|
|
|
14
17
|
})
|
|
15
18
|
|
|
16
19
|
let shipment: any = {
|
|
17
|
-
shippingOutlet:
|
|
18
|
-
documentId: Number(releaseGood.
|
|
20
|
+
shippingOutlet: outletName,
|
|
21
|
+
documentId: Number(releaseGood.refNo3),
|
|
19
22
|
shippingDateTime: new Date().toISOString()
|
|
20
23
|
}
|
|
21
24
|
|
|
@@ -60,6 +60,22 @@ export class Xilnex {
|
|
|
60
60
|
async post(path: string, data: any = {}) {
|
|
61
61
|
const { accessToken, appId, domain } = this.config
|
|
62
62
|
|
|
63
|
+
let headers: any = {
|
|
64
|
+
'Content-Type': 'application/json',
|
|
65
|
+
token: accessToken,
|
|
66
|
+
appid: appId,
|
|
67
|
+
auth: '5'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (path == '/salesorder?disableRounding=true') {
|
|
71
|
+
headers = {
|
|
72
|
+
...headers,
|
|
73
|
+
Idempotency_Key: data.releaseGoodId
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
delete data.releaseGoodId
|
|
77
|
+
}
|
|
78
|
+
|
|
63
79
|
debug('data', data)
|
|
64
80
|
const jsondata = JSON.stringify(data)
|
|
65
81
|
|
|
@@ -69,12 +85,7 @@ export class Xilnex {
|
|
|
69
85
|
let requestInfo: any = {
|
|
70
86
|
requestBody: {
|
|
71
87
|
method: 'post',
|
|
72
|
-
headers:
|
|
73
|
-
'Content-Type': 'application/json',
|
|
74
|
-
token: accessToken,
|
|
75
|
-
appid: appId,
|
|
76
|
-
auth: '5'
|
|
77
|
-
},
|
|
88
|
+
headers: headers,
|
|
78
89
|
body: jsondata
|
|
79
90
|
},
|
|
80
91
|
requestEndpoint: endpoint
|