@shushed/helpers 0.0.202-bug-erp-770-20251202011717 → 0.0.202-bug-erp-770-20251202013809
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -111427,7 +111427,9 @@ function transformMasterOrder(payload) {
|
|
|
111427
111427
|
const isVoucher = pm === "GIFT-CARD" || sortedEntries.some((e) => e.gift_certificate_id) || sortedEntries.some((e) => /(GVOUCHER|VOUCHER|GIFT|EGIFT)/.test(String(e.payment_method_code || "").toUpperCase())) || sortedEntries.some((e) => String(e.service_type || "").toUpperCase().includes("VOUCHER"));
|
|
111428
111428
|
const cardPaymentEntry = sortedEntries.find((e) => e.source === "card_payment");
|
|
111429
111429
|
if (isVoucher) {
|
|
111430
|
-
let paymentEntry = g.entries.find(
|
|
111430
|
+
let paymentEntry = g.entries.find(
|
|
111431
|
+
(e) => e.source === "payment" && (String(e.type || "").toUpperCase() === "PAYMENT" || String(e.type || "").toUpperCase() === "CAPTURE")
|
|
111432
|
+
);
|
|
111431
111433
|
let paymentType = paymentEntry ? String(paymentEntry.type || "").toUpperCase() : "";
|
|
111432
111434
|
if (!paymentEntry && g.entries.length > 0) {
|
|
111433
111435
|
const firstEntry = g.entries[0];
|