recaho-print-react 0.0.125 → 0.0.126
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.
|
@@ -66,10 +66,10 @@ function ri() {
|
|
|
66
66
|
ce.unshift("Warning: " + N), Function.prototype.apply.call(console[y], console, ce);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
var F = !1, M = !1,
|
|
69
|
+
var F = !1, M = !1, z = !1, K = !1, te = !1, Q;
|
|
70
70
|
Q = Symbol.for("react.module.reference");
|
|
71
71
|
function re(y) {
|
|
72
|
-
return !!(typeof y == "string" || typeof y == "function" || y === r || y === a || te || y === i || y === l || y === c || K || y === p || F || M ||
|
|
72
|
+
return !!(typeof y == "string" || typeof y == "function" || y === r || y === a || te || y === i || y === l || y === c || K || y === p || F || M || z || typeof y == "object" && y !== null && (y.$$typeof === m || y.$$typeof === d || y.$$typeof === h || y.$$typeof === f || y.$$typeof === o || // This needs to include all possible module reference object
|
|
73
73
|
// types supported by any Flight configuration anywhere since
|
|
74
74
|
// we don't know which Flight build this will end up being used
|
|
75
75
|
// with.
|
|
@@ -82,7 +82,7 @@ function ri() {
|
|
|
82
82
|
var le = N.displayName || N.name || "";
|
|
83
83
|
return le !== "" ? P + "(" + le + ")" : P;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function W(y) {
|
|
86
86
|
return y.displayName || "Context";
|
|
87
87
|
}
|
|
88
88
|
function q(y) {
|
|
@@ -110,10 +110,10 @@ function ri() {
|
|
|
110
110
|
switch (y.$$typeof) {
|
|
111
111
|
case f:
|
|
112
112
|
var N = y;
|
|
113
|
-
return
|
|
113
|
+
return W(N) + ".Consumer";
|
|
114
114
|
case h:
|
|
115
115
|
var P = y;
|
|
116
|
-
return
|
|
116
|
+
return W(P._context) + ".Provider";
|
|
117
117
|
case o:
|
|
118
118
|
return we(y, y.render, "ForwardRef");
|
|
119
119
|
case d:
|
|
@@ -3334,8 +3334,8 @@ function md() {
|
|
|
3334
3334
|
}, t._ = n = {
|
|
3335
3335
|
// formats numbers separators, decimals places, signs, abbreviations
|
|
3336
3336
|
numberToFormat: function(l, c, d) {
|
|
3337
|
-
var m = a[t.options.currentLocale], p = !1, x = !1, v = 0, _ = "", w = 1e12, T = 1e9, O = 1e6, F = 1e3, M = "",
|
|
3338
|
-
if (l = l || 0, te = Math.abs(l), t._.includes(c, "(") ? (p = !0, c = c.replace(/[\(|\)]/g, "")) : (t._.includes(c, "+") || t._.includes(c, "-")) && (we = t._.includes(c, "+") ? c.indexOf("+") : l < 0 ? c.indexOf("-") : -1, c = c.replace(/[\+|\-]/g, "")), t._.includes(c, "a") && (K = c.match(/a(k|m|b|t)?/), K = K ? K[1] : !1, t._.includes(c, " a") && (_ = " "), c = c.replace(new RegExp(_ + "a[kmbt]?"), ""), te >= w && !K || K === "t" ? (_ += m.abbreviations.trillion, l = l / w) : te < w && te >= T && !K || K === "b" ? (_ += m.abbreviations.billion, l = l / T) : te < T && te >= O && !K || K === "m" ? (_ += m.abbreviations.million, l = l / O) : (te < O && te >= F && !K || K === "k") && (_ += m.abbreviations.thousand, l = l / F)), t._.includes(c, "[.]") && (x = !0, c = c.replace("[.]", ".")), Q = l.toString().split(".")[0], re = c.split(".")[1],
|
|
3337
|
+
var m = a[t.options.currentLocale], p = !1, x = !1, v = 0, _ = "", w = 1e12, T = 1e9, O = 1e6, F = 1e3, M = "", z = !1, K, te, Q, re, we, W, q;
|
|
3338
|
+
if (l = l || 0, te = Math.abs(l), t._.includes(c, "(") ? (p = !0, c = c.replace(/[\(|\)]/g, "")) : (t._.includes(c, "+") || t._.includes(c, "-")) && (we = t._.includes(c, "+") ? c.indexOf("+") : l < 0 ? c.indexOf("-") : -1, c = c.replace(/[\+|\-]/g, "")), t._.includes(c, "a") && (K = c.match(/a(k|m|b|t)?/), K = K ? K[1] : !1, t._.includes(c, " a") && (_ = " "), c = c.replace(new RegExp(_ + "a[kmbt]?"), ""), te >= w && !K || K === "t" ? (_ += m.abbreviations.trillion, l = l / w) : te < w && te >= T && !K || K === "b" ? (_ += m.abbreviations.billion, l = l / T) : te < T && te >= O && !K || K === "m" ? (_ += m.abbreviations.million, l = l / O) : (te < O && te >= F && !K || K === "k") && (_ += m.abbreviations.thousand, l = l / F)), t._.includes(c, "[.]") && (x = !0, c = c.replace("[.]", ".")), Q = l.toString().split(".")[0], re = c.split(".")[1], W = c.indexOf(","), v = (c.split(".")[0].split(",")[0].match(/0/g) || []).length, re ? (t._.includes(re, "[") ? (re = re.replace("]", ""), re = re.split("["), M = t._.toFixed(l, re[0].length + re[1].length, d, re[1].length)) : M = t._.toFixed(l, re.length, d), Q = M.split(".")[0], t._.includes(M, ".") ? M = m.delimiters.decimal + M.split(".")[1] : M = "", x && Number(M.slice(1)) === 0 && (M = "")) : Q = t._.toFixed(l, 0, d), _ && !K && Number(Q) >= 1e3 && _ !== m.abbreviations.trillion)
|
|
3339
3339
|
switch (Q = String(Number(Q) / 1e3), _) {
|
|
3340
3340
|
case m.abbreviations.thousand:
|
|
3341
3341
|
_ = m.abbreviations.million;
|
|
@@ -3347,10 +3347,10 @@ function md() {
|
|
|
3347
3347
|
_ = m.abbreviations.trillion;
|
|
3348
3348
|
break;
|
|
3349
3349
|
}
|
|
3350
|
-
if (t._.includes(Q, "-") && (Q = Q.slice(1),
|
|
3350
|
+
if (t._.includes(Q, "-") && (Q = Q.slice(1), z = !0), Q.length < v)
|
|
3351
3351
|
for (var B = v - Q.length; B > 0; B--)
|
|
3352
3352
|
Q = "0" + Q;
|
|
3353
|
-
return
|
|
3353
|
+
return W > -1 && (Q = Q.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + m.delimiters.thousands)), c.indexOf(".") === 0 && (Q = ""), q = Q + M + (_ || ""), p ? q = (p && z ? "(" : "") + q + (p && z ? ")" : "") : we >= 0 ? q = we === 0 ? (z ? "-" : "+") + q : q + (z ? "-" : "+") : z && (q = "-" + q), q;
|
|
3354
3354
|
},
|
|
3355
3355
|
// unformats numbers separators, decimals places, signs, abbreviations
|
|
3356
3356
|
stringToNumber: function(l) {
|
|
@@ -3784,7 +3784,7 @@ function Nd(e) {
|
|
|
3784
3784
|
}
|
|
3785
3785
|
}
|
|
3786
3786
|
function a(m) {
|
|
3787
|
-
var p = m.toString(), x, v, _, w, T, O, F, M,
|
|
3787
|
+
var p = m.toString(), x, v, _, w, T, O, F, M, z, K, te, Q, re = "and";
|
|
3788
3788
|
if (p = p.replace(/[, ]/g, ""), parseInt(p) === 0)
|
|
3789
3789
|
return "zero";
|
|
3790
3790
|
for (x = [
|
|
@@ -3837,7 +3837,7 @@ function Nd(e) {
|
|
|
3837
3837
|
if (F = O.length, F > _.length)
|
|
3838
3838
|
return "";
|
|
3839
3839
|
for (Q = [], K = 0; K < F; K++)
|
|
3840
|
-
M = parseInt(O[K]), M && (
|
|
3840
|
+
M = parseInt(O[K]), M && (z = O[K].split("").reverse().map(parseFloat), z[1] === 1 && (z[0] += 10), (te = _[K]) && Q.push(te), (te = x[z[0]]) && Q.push(te), (te = v[z[1]]) && Q.push(te), (z[0] || z[1]) && (z[2] || K + 1 > F) && Q.push(re), (te = x[z[2]]) && Q.push(te + " Hundred"));
|
|
3841
3841
|
return Q.reverse().join(" ");
|
|
3842
3842
|
}
|
|
3843
3843
|
const [h, f] = e.toString().split("."), o = a(parseInt(h, 10)), l = i(parseInt(f, 10)), c = l ? `${l} Paise` : "";
|
|
@@ -4085,8 +4085,8 @@ const Ws = (e, t, n) => {
|
|
|
4085
4085
|
}
|
|
4086
4086
|
e.orderList.filter((w) => {
|
|
4087
4087
|
a = w.services.sort((T) => T.status === "CANCELLED" ? -1 : 0), a.forEach((T, O) => {
|
|
4088
|
-
var we,
|
|
4089
|
-
let F = T.station ? T.station.split("::") : "", M = F && F.length > 1 ? F[1] : F[0],
|
|
4088
|
+
var we, W, q;
|
|
4089
|
+
let F = T.station ? T.station.split("::") : "", M = F && F.length > 1 ? F[1] : F[0], z = e.tableNo ? e.tableNo.split("::") : null, K = z && z.length > 0 ? z[0] : e.orderFrom, te = e.tableName ? e.tableName : e.tableNo ? K : e.orderFrom, Q;
|
|
4090
4090
|
(we = r == null ? void 0 : r[w.createdBy]) != null && we.name && (Q = r[w.createdBy].name);
|
|
4091
4091
|
let re = !1;
|
|
4092
4092
|
(f || M && T.status == l) && (re = !0), re && Dn(M) && (i[M] || (i[M] = {}, i[M].station = M, i[M].services = [], i[M].tableName = te, i[M].customerName = e.name == t.companyName ? null : e.name, i[M].time = R().format("DD-MM-YYYY hh:mm a"), i[M].type = e.orderFrom, i[M].subOrderFrom = e.subOrderFrom, i[M].orderId = e.externalOrderId || e.offlineOrderId ? e.orderId : w.subOrderId, i[M].orderId = /* @__PURE__ */ new Set([i[M].orderId]), i[M].instruction = e.instruction, i[M].orderSource = e.orderSource, i[M].deliveryTimestamp = e.deliveryTimestamp ? R.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A") : null, i[M].aggregatorOrderId = e.externalOrderId, i[M].otp = e.otp, i[M].totalQty = 0, i[M].tokenId = e.tokenId, i[M].kotId = T.kotId ? /* @__PURE__ */ new Set([T.kotId]) : null, i[M].waiterName = e.waiterName, i[M].duplicate = f, i[M].createdBy = Q, i[M].zomatoInstant = c, h && (i[M].customFields = h), o && (i[M].onlyCancelledItems = o), e.preparationTime && (i[M].prepareBy = R().add(e.preparationTime, "minutes").format("DD-MM-YYYY hh:mm A"))), i[M] ? (i[M].services.push({
|
|
@@ -4098,7 +4098,7 @@ const Ws = (e, t, n) => {
|
|
|
4098
4098
|
index: O,
|
|
4099
4099
|
status: T.status,
|
|
4100
4100
|
addons: T.addons
|
|
4101
|
-
}), i[M].totalQty += _e(T.qty), (
|
|
4101
|
+
}), i[M].totalQty += _e(T.qty), (W = i[M].kotId) == null || W.add(T.kotId), e.externalOrderId || e.offlineOrderId || (q = i[M].orderId) == null || q.add(w.subOrderId)) : (i[M] = [], i[M].services.push({
|
|
4102
4102
|
serviceName: T.serviceName,
|
|
4103
4103
|
qty: T.qty,
|
|
4104
4104
|
instruction: T.instruction ? T.instruction : "",
|
|
@@ -4125,8 +4125,8 @@ const Ws = (e, t, n) => {
|
|
|
4125
4125
|
paperSize: t.printerSize || m
|
|
4126
4126
|
});
|
|
4127
4127
|
for (let O = 0; O < T.services.length; O++) {
|
|
4128
|
-
let F = T.services[O], M = e.orderList.find((K) => K.subOrderId == F.subOrderId),
|
|
4129
|
-
M && (
|
|
4128
|
+
let F = T.services[O], M = e.orderList.find((K) => K.subOrderId == F.subOrderId), z = d[F.subOrderId];
|
|
4129
|
+
M && (z ? z.services.push(M.services[F.index]) : (d[F.subOrderId] = {}, d[F.subOrderId].subOrderId = M.subOrderId, d[F.subOrderId].services = [M.services[F.index]]));
|
|
4130
4130
|
}
|
|
4131
4131
|
} catch (O) {
|
|
4132
4132
|
console.log(O);
|
|
@@ -4176,14 +4176,14 @@ const Ws = (e, t, n) => {
|
|
|
4176
4176
|
orderSource: e.orderSource,
|
|
4177
4177
|
otp: e.otp,
|
|
4178
4178
|
zomatoInstant: d
|
|
4179
|
-
}, O = {}, F = !1, M,
|
|
4179
|
+
}, O = {}, F = !1, M, z = 0;
|
|
4180
4180
|
for (e.preparationTime && (T.prepareBy = R().add(e.preparationTime, "minutes").format("DD-MM-YYYY hh:mm A")), c && (T.customFields = c), v = 0; v < e.orderList.length; v++)
|
|
4181
4181
|
for (p = e.orderList[v], _ = 0; _ < p.services.length; _++)
|
|
4182
4182
|
x = p.services[_], x = {
|
|
4183
4183
|
...x,
|
|
4184
4184
|
instruction: x.isUrgent && x.instruction ? `(URGENT -${x.instruction})` : x.instruction ? `(${x.instruction})` : x.isUrgent ? "(URGENT)" : null
|
|
4185
|
-
}, F = !1, x.status === r && ((a = l.stations) != null && a.length ? (M = dd(l.stations), M[x.station] && (F = !0)) : F = !0), F && x.kotId && x.station && (w = x.station.split("::")[1],
|
|
4186
|
-
Object.keys(O).length && (T.services = O, T.totalQty = Je(
|
|
4185
|
+
}, F = !1, x.status === r && ((a = l.stations) != null && a.length ? (M = dd(l.stations), M[x.station] && (F = !0)) : F = !0), F && x.kotId && x.station && (w = x.station.split("::")[1], z += x.qty, O[`${w}/${x.kotId}`] ? O[`${w}/${x.kotId}`].push(x) : O[`${w}/${x.kotId}`] = [x]);
|
|
4186
|
+
Object.keys(O).length && (T.services = O, T.totalQty = Je(z), o.push({
|
|
4187
4187
|
printer: f,
|
|
4188
4188
|
paperSize: h,
|
|
4189
4189
|
obj: T
|
|
@@ -4262,16 +4262,16 @@ const Ws = (e, t, n) => {
|
|
|
4262
4262
|
let { serviceTypeConfig: n, salesCollection: r, todayCollection: i, dailyExpanse: a, collectionDate: h, rangeDate: f } = t, o = {}, l;
|
|
4263
4263
|
const c = !!bt(n, "dine-in", "slugName").slugName;
|
|
4264
4264
|
if (i != null && i.AGGREGATOR_PAYMENT) {
|
|
4265
|
-
const { AGGREGATOR_PAYMENT: M, ...
|
|
4266
|
-
i = { ...
|
|
4265
|
+
const { AGGREGATOR_PAYMENT: M, ...z } = i;
|
|
4266
|
+
i = { ...z, swiggy: r.swiggy_collection ?? 0, zomato: r.zomato_collection ?? 0 };
|
|
4267
4267
|
}
|
|
4268
4268
|
let d = c && (n == null ? void 0 : n.length) && n.some((M) => M.slugName === "online-menu") && e.isAggregatorEnabled == !0, m = d ? r.aggregator_collection : void 0, p = d ? r.zomato_collection : void 0, x = d ? r.swiggy_collection : void 0, v = c ? Sd(r.avgTableTime) : void 0;
|
|
4269
4269
|
l = {};
|
|
4270
4270
|
let _ = 0;
|
|
4271
4271
|
if (r != null && r.menuWiseSales) {
|
|
4272
4272
|
const M = r.menuWiseSales;
|
|
4273
|
-
for (const
|
|
4274
|
-
|
|
4273
|
+
for (const z in M)
|
|
4274
|
+
z.endsWith("collection") ? l[ps(z)] = Je(M[z]) : l[ps(z)] = M[z];
|
|
4275
4275
|
}
|
|
4276
4276
|
if (r.swiggy_aggregator && (l.Swiggy = r.swiggy_aggregator, l.Swiggy_collection = r.swiggy_collection), r.zomato_aggregator && (l.Zomato = r.zomato_aggregator, l.Zomato_collection = r.zomato_collection), r.itemTypeList && ((O = Object.keys(r.itemTypeList)) != null && O.length))
|
|
4277
4277
|
for (let M in r.itemTypeList)
|
|
@@ -4356,8 +4356,8 @@ const Ws = (e, t, n) => {
|
|
|
4356
4356
|
custName: e.name ?? null,
|
|
4357
4357
|
custAddress: e.custAddress ?? null,
|
|
4358
4358
|
custContact: e.mobile ?? null
|
|
4359
|
-
}, Q = yn(t.curr), re = { ...e, companyInfo: M, orderInfo: K, customerInfo: te, gst: F, curr: Q }, we = null,
|
|
4360
|
-
a.companyLogo && (we = await qt(`https://${a.companyLogo.bucket}.s3.amazonaws.com/${a.companyLogo.key}`)), a.qrcode && (
|
|
4359
|
+
}, Q = yn(t.curr), re = { ...e, companyInfo: M, orderInfo: K, customerInfo: te, gst: F, curr: Q }, we = null, W = null;
|
|
4360
|
+
a.companyLogo && (we = await qt(`https://${a.companyLogo.bucket}.s3.amazonaws.com/${a.companyLogo.key}`)), a.qrcode && (W = await qt(`https://${a.qrcode.bucket}.s3.amazonaws.com/${a.qrcode.key}`)), e.orderList.filter((q) => {
|
|
4361
4361
|
q.services.forEach(async (B, me) => {
|
|
4362
4362
|
var Ke, Qe;
|
|
4363
4363
|
let A = "kitchen", Ye = e.tableName ? e.tableName : e.orderFrom;
|
|
@@ -4384,7 +4384,7 @@ const Ws = (e, t, n) => {
|
|
|
4384
4384
|
}, f[A].domain = a.siteURL, f[A].paymentMethods = a.paymentMode ? re.paymentMethods : null, f[A].companyInfo.companyName = a.companyName, f[A].companyInfo.companyEmail = a.email, f[A].companyInfo.companyAddress = a.address, f[A].companyInfo.companyContact = a.mobile, f[A].tokenId = a.token ? re.tokenId : null, a.isPayQR && a.upiId && a.upiId !== "" && (re.upiId = a.upiId), f[A].gstNo = a.gst ? re.gst : null, f[A].footerMessage = a.footerMessage, f[A].orderFrom = (Qe = e.subOrderFrom) == null ? void 0 : Qe.toUpperCase(), f[A].fssai = t.fssai, f[A].vatNo = t.vatNo, f[A].printOperatorInfo = a.printOperatorInfo === null || a.printOperatorInfo === !0, f[A].disabledPoweredBy = t.disabledPoweredBy === !0, f[A].printTime = R().format("DD-MM-YYYY hh:mm A"), f[A].printedBy = h.userRole == "admin" ? "Admin" : h.name, e.deliveryTimestamp && (f[A].deliveryTimestamp = R.unix(e.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")), f[A].itemInstructionOnBill = a.itemInstructionOnBill, f[A] = {
|
|
4385
4385
|
...f[A],
|
|
4386
4386
|
companyLogo: we,
|
|
4387
|
-
companyQrCode:
|
|
4387
|
+
companyQrCode: W
|
|
4388
4388
|
});
|
|
4389
4389
|
});
|
|
4390
4390
|
});
|
|
@@ -4488,7 +4488,7 @@ const Ws = (e, t, n) => {
|
|
|
4488
4488
|
if (_.userRole == "admin" ? T = "ADMIN" : T = _ == null ? void 0 : _.name, !(w != null && w.length)) return;
|
|
4489
4489
|
let O = t.printerSize, F = cr(null, { type: "BILL", siteSetting: t }, { occupiedServer: n.occupiedServer });
|
|
4490
4490
|
O = F ? (h = F[0]) != null && h.paperSize ? (f = F[0]) == null ? void 0 : f.paperSize : O || "2INCH" : O;
|
|
4491
|
-
let M = t.footerAddress.addressLineOne ? t.footerAddress.addressLineOne : "",
|
|
4491
|
+
let M = t.footerAddress.addressLineOne ? t.footerAddress.addressLineOne : "", z = t.footerAddress.addressLineTwo ? t.footerAddress.addressLineTwo : "", K = t.footerAddress.city ? t.footerAddress.city : "", te = t.footerAddress.zip ? t.footerAddress.zip : "", Q = (M != "" ? M + "," : "") + (z != "" ? z + "," : "") + (K != "" ? K + "," : "") + (te != "" ? te + "," : ""), re = t.gstNo, we = {
|
|
4492
4492
|
companyName: t.companyName,
|
|
4493
4493
|
companyAddress: Q,
|
|
4494
4494
|
companyContact: t.contactNumber,
|
|
@@ -4598,11 +4598,11 @@ const Ws = (e, t, n) => {
|
|
|
4598
4598
|
} catch (m) {
|
|
4599
4599
|
console.log("err", m), i(m);
|
|
4600
4600
|
}
|
|
4601
|
-
}), Rd = (e, t, n = {}) => new Promise(async (r, i) => {
|
|
4601
|
+
}), Rd = (e, t, n = {}) => (console.log("orderObj :::", e, t, n), new Promise(async (r, i) => {
|
|
4602
4602
|
var h, f, o, l, c;
|
|
4603
4603
|
try {
|
|
4604
4604
|
const { invoiceFormat: d, custName: m, custMobile: p, custAddress: x, orderData: v } = n;
|
|
4605
|
-
let _ = t.footerAddress.addressLineOne ? t.footerAddress.addressLineOne : "", w = t.footerAddress.addressLineTwo ? t.footerAddress.addressLineTwo : "", T = t.footerAddress.city ? t.footerAddress.city : "", O = t.footerAddress.zip ? t.footerAddress.zip : "", F = (_ != "" ? _ + "," : "") + (w != "" ? w + "," : "") + (T != "" ? T + "," : "") + (O != "" ? O + "," : ""), M = t.gstNo,
|
|
4605
|
+
let _ = t.footerAddress.addressLineOne ? t.footerAddress.addressLineOne : "", w = t.footerAddress.addressLineTwo ? t.footerAddress.addressLineTwo : "", T = t.footerAddress.city ? t.footerAddress.city : "", O = t.footerAddress.zip ? t.footerAddress.zip : "", F = (_ != "" ? _ + "," : "") + (w != "" ? w + "," : "") + (T != "" ? T + "," : "") + (O != "" ? O + "," : ""), M = t.gstNo, z = {
|
|
4606
4606
|
companyName: t.companyName,
|
|
4607
4607
|
companyAddress: F,
|
|
4608
4608
|
companyContact: t.contactNumber,
|
|
@@ -4618,14 +4618,14 @@ const Ws = (e, t, n) => {
|
|
|
4618
4618
|
custAddress: d && d.custAddress && x || null,
|
|
4619
4619
|
custContact: d && d.custMobile ? p : null,
|
|
4620
4620
|
custEmail: "ajaybaglane7@gmail.com"
|
|
4621
|
-
}, re = yn(t.curr), we = "",
|
|
4621
|
+
}, re = yn(t.curr), we = "", W = { ...e, companyInfo: z, orderInfo: te, customerInfo: Q, gst: M, curr: re };
|
|
4622
4622
|
if (d) {
|
|
4623
|
-
if (
|
|
4623
|
+
if (W.domain = d.siteURL, W.paymentMethods = d.paymentMode ? W.paymentMethods : null, W.companyInfo.companyName = d.companyName, W.companyInfo.companyEmail = d.email, W.companyInfo.companyAddress = d.address, W.companyInfo.companyContact = d.mobile, W.customerInfo.custName = d.custName ? m : null, W.tokenId = d.token ? W.tokenId : null, d.isPayQR && d.upiId && d.upiId !== "" && (W.upiId = d.upiId), W.gstNo = d.gst ? W.gst : null, W.footerMessage = d.footerMessage, W.orderFrom = (h = v.subOrderFrom) == null ? void 0 : h.toUpperCase(), W.fssai = t.fssai, W.vatNo = t.vatNo, W.taxLabel = Ca(t), W.printOperatorInfo = d.printOperatorInfo === null || d.printOperatorInfo === !0, W.disabledPoweredBy = t.disabledPoweredBy === !0, W.printTime = R().format("DD-MM-YYYY hh:mm A"), v.deliveryTimestamp && (W.deliveryTimestamp = R.unix(v.deliveryTimestamp).format("DD-MM-YYYY hh:mm A")), W.itemInstructionOnBill = d.itemInstructionOnBill, W.printHSNCodeOnBill = d.printHSNCodeOnBill, W.noOfInvoice = d.noOfInvoice, W.area = v.area, W.captainName = v.captainName, !(d.itemInstructionOnBill || d.printHSNCodeOnBill) && ((f = W.itemList) != null && f.length)) {
|
|
4624
4624
|
let B;
|
|
4625
|
-
for (let me = 0; me <
|
|
4626
|
-
B =
|
|
4625
|
+
for (let me = 0; me < W.itemList.length; me++)
|
|
4626
|
+
B = W.itemList[me], B.instruction && delete B.instruction, B.hsnCode && delete B.hsnCode;
|
|
4627
4627
|
}
|
|
4628
|
-
t.enabledOutstandingOnPay && ((o = e.custoutStandingData) != null && o.balanceAmt) && (
|
|
4628
|
+
t.enabledOutstandingOnPay && ((o = e.custoutStandingData) != null && o.balanceAmt) && (W.custoutStandingData = {
|
|
4629
4629
|
balanceAmt: e.custoutStandingData.balanceAmt
|
|
4630
4630
|
});
|
|
4631
4631
|
let q = [];
|
|
@@ -4636,21 +4636,21 @@ const Ws = (e, t, n) => {
|
|
|
4636
4636
|
customName: B.customName,
|
|
4637
4637
|
customValue: B.customValue
|
|
4638
4638
|
});
|
|
4639
|
-
|
|
4639
|
+
W.customFields = q;
|
|
4640
4640
|
}
|
|
4641
4641
|
if (t && t.isOld && t.isOld == !0) {
|
|
4642
4642
|
let B = null, me = null;
|
|
4643
4643
|
d.companyLogo && (B = await qt(`https://${d.companyLogo.bucket}.s3.amazonaws.com/${d.companyLogo.key}`)), d.qrcode && (me = await qt(`https://${d.qrcode.bucket}.s3.amazonaws.com/${d.qrcode.key}`));
|
|
4644
4644
|
var a = "Unknown OS";
|
|
4645
4645
|
navigator.userAgent.indexOf("Win") != -1 && (a = "Windows OS"), navigator.userAgent.indexOf("Mac") != -1 && (a = "Macintosh"), navigator.userAgent.indexOf("Linux") != -1 && (a = "Linux OS"), navigator.userAgent.indexOf("Android") != -1 && (a = "Android OS"), navigator.userAgent.indexOf("like Mac") != -1 && (a = "iOS");
|
|
4646
|
-
let A = { obj:
|
|
4647
|
-
r(A);
|
|
4646
|
+
let A = { obj: W, companyLogo: B, companyQrCode: me, paperSize: t.printerSize, Name: a };
|
|
4647
|
+
console.log("obj :::", W), r(A);
|
|
4648
4648
|
}
|
|
4649
4649
|
}
|
|
4650
4650
|
} catch (d) {
|
|
4651
4651
|
console.log("err", d);
|
|
4652
4652
|
}
|
|
4653
|
-
}), kd = (e, t) => new Promise(async (n, r) => {
|
|
4653
|
+
})), kd = (e, t) => new Promise(async (n, r) => {
|
|
4654
4654
|
var O;
|
|
4655
4655
|
let i;
|
|
4656
4656
|
(O = t.siteLogo) != null && O.key;
|
|
@@ -5350,8 +5350,8 @@ var Et;
|
|
|
5350
5350
|
for (let O = 0, F = 0; O < d; O++) {
|
|
5351
5351
|
let M = o.slice(F, F + v - m + (O < x ? 0 : 1));
|
|
5352
5352
|
F += M.length;
|
|
5353
|
-
const
|
|
5354
|
-
O < x && M.push(0), _.push(M.concat(
|
|
5353
|
+
const z = t.reedSolomonComputeRemainder(M, w);
|
|
5354
|
+
O < x && M.push(0), _.push(M.concat(z));
|
|
5355
5355
|
}
|
|
5356
5356
|
let T = [];
|
|
5357
5357
|
for (let O = 0; O < _[0].length; O++)
|
|
@@ -5712,13 +5712,13 @@ function Ah(e) {
|
|
|
5712
5712
|
if (!O)
|
|
5713
5713
|
return;
|
|
5714
5714
|
let F = Wt.QrCode.encodeText(n, Ba[i]).getModules();
|
|
5715
|
-
const M = f ? mr : 0,
|
|
5715
|
+
const M = f ? mr : 0, z = F.length + M * 2, K = Za(F, r, f, l), te = p.current, Q = K != null && te !== null && te.complete && te.naturalHeight !== 0 && te.naturalWidth !== 0;
|
|
5716
5716
|
Q && K.excavation != null && (F = Qa(F, K.excavation));
|
|
5717
5717
|
const re = window.devicePixelRatio || 1;
|
|
5718
5718
|
T.height = T.width = r * re;
|
|
5719
|
-
const we = r /
|
|
5720
|
-
O.scale(we, we), O.fillStyle = a, O.fillRect(0, 0,
|
|
5721
|
-
|
|
5719
|
+
const we = r / z * re;
|
|
5720
|
+
O.scale(we, we), O.fillStyle = a, O.fillRect(0, 0, z, z), O.fillStyle = h, Mh ? O.fill(new Path2D(Ka(F, M))) : F.forEach(function(W, q) {
|
|
5721
|
+
W.forEach(function(B, me) {
|
|
5722
5722
|
B && O.fillRect(me + M, q + M, 1, 1);
|
|
5723
5723
|
});
|
|
5724
5724
|
}), Q && O.drawImage(te, K.x + M, K.y + M, K.w, K.h);
|
|
@@ -5964,7 +5964,7 @@ const tt = (e) => {
|
|
|
5964
5964
|
j.invoiceVatTotal.toFixed(2)
|
|
5965
5965
|
);
|
|
5966
5966
|
return /* @__PURE__ */ s.jsx(kr, { value: I, renderAs: "canvas", size: 250 });
|
|
5967
|
-
},
|
|
5967
|
+
}, z = (g) => {
|
|
5968
5968
|
const u = [];
|
|
5969
5969
|
return (g.totalBalanceAmt || g.refundAmt || g.writeOffAmt || g.rewardAmt || g.cashCard) && (u.push(/* @__PURE__ */ s.jsx("hr", {})), g.rewardAmt && u.push(
|
|
5970
5970
|
/* @__PURE__ */ s.jsxs("h5", { className: "left-align-entity level3-bold flex-two-items", children: [
|
|
@@ -6029,7 +6029,7 @@ const tt = (e) => {
|
|
|
6029
6029
|
);
|
|
6030
6030
|
}
|
|
6031
6031
|
return u;
|
|
6032
|
-
},
|
|
6032
|
+
}, W = (g, u) => {
|
|
6033
6033
|
let C = !1;
|
|
6034
6034
|
g.totalValue && (C = Object.keys(g.totalValue).length > 1);
|
|
6035
6035
|
let j = new Object();
|
|
@@ -7352,7 +7352,7 @@ const tt = (e) => {
|
|
|
7352
7352
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
7353
7353
|
u.customFields.map((b) => /* @__PURE__ */ s.jsx("h4", { className: "left-align-entity", children: b.customName + ": " + b.customValue }))
|
|
7354
7354
|
] }) : "",
|
|
7355
|
-
u.newFormat ? B(u, I) :
|
|
7355
|
+
u.newFormat ? B(u, I) : W(u, I),
|
|
7356
7356
|
/* @__PURE__ */ s.jsx("br", {}),
|
|
7357
7357
|
/* @__PURE__ */ s.jsxs("div", { className: `bottom-section ${L[l].dynamicClassname}`, children: [
|
|
7358
7358
|
/* @__PURE__ */ s.jsxs("div", { className: "bottom-section-div inline-display", children: [
|
|
@@ -7608,7 +7608,7 @@ const tt = (e) => {
|
|
|
7608
7608
|
] }),
|
|
7609
7609
|
O(u)
|
|
7610
7610
|
] }),
|
|
7611
|
-
|
|
7611
|
+
z(u.averageCollection),
|
|
7612
7612
|
u.otherFields.outstandingAmt ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
7613
7613
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
7614
7614
|
/* @__PURE__ */ s.jsxs("div", { children: [
|