@shushed/helpers 0.0.202-bug-erp-770-20251202004216 → 0.0.202-bug-erp-770-20251202011556
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/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111339,14 +111339,15 @@ function transformMasterOrder(payload) {
|
|
|
111339
111339
|
} else if (!isRefund) {
|
|
111340
111340
|
const paymentType = String(p.type || "").toUpperCase();
|
|
111341
111341
|
const amount = Number(p.amount || 0);
|
|
111342
|
-
|
|
111343
|
-
|
|
111342
|
+
const paymentMethod = String(p.payment_method_code || "").toUpperCase().trim();
|
|
111343
|
+
if (paymentType === "CAPTURE" || paymentType === "AUTHORISATION") {
|
|
111344
|
+
keyBase = `CHARGE-${amount}-${paymentMethod}`;
|
|
111344
111345
|
} else if (p.gift_certificate_id) {
|
|
111345
111346
|
keyBase = `GIFT:${p.gift_certificate_id}`;
|
|
111346
111347
|
} else {
|
|
111347
111348
|
const orderNo = p.order_no || erp_order_id;
|
|
111348
|
-
const
|
|
111349
|
-
keyBase = `${orderNo}-${amount}-${
|
|
111349
|
+
const paymentMethod2 = String(p.payment_method_code || "").toUpperCase().trim();
|
|
111350
|
+
keyBase = `${orderNo}-${amount}-${paymentMethod2}`;
|
|
111350
111351
|
}
|
|
111351
111352
|
} else {
|
|
111352
111353
|
if (p.payment_refund_number) {
|