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