@@ -4933,76 +5304,76 @@ const PrintStyle1 = ({
)}
{GlobaldummyData
? GlobalCredit && (
-
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- )
- : !estimatePrintHeader && table2Data?.OrderType === 'E'
- ? ''
- : Qrcodet &&
- paymentTypeUPI && (
+ {/*

*/}
-
Scan to Pay
-
+
Scan to Pay
+
₹
{GlobaldummyData
? '1,066'
: Number(table2Data?.NetAmount).toFixed(2)}
- )}
+ )
+ : !estimatePrintHeader && table2Data?.OrderType === 'E'
+ ? ''
+ : Qrcodet &&
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )}
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
-
-
-
- )
- : !estimatePrintHeader && table2Data?.OrderType === 'E'
- ? ''
- : Notestext && (
-
{Notestext}
+
+ Notes : 10 days Return policy
+
- )}
+ )
+ : !estimatePrintHeader && table2Data?.OrderType === 'E'
+ ? ''
+ : Notestext && (
+
+ )}
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable or
- refundable.
-
- -
- Please check the product before leaving the counter.
-
-
-
- )
- : !estimatePrintHeader && table2Data?.OrderType === 'E'
- ? ''
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
- {TermsAndConditions?.map((item) => (
-
- {item?.TermsandConditions}
-
- ))}
- {/*
Please check the product before leaving the counter. */}
+
+ Once goods are sold, they are not exchangeable or
+ refundable.
+
+
+ Please check the product before leaving the counter.
+
- )}
+ )
+ : !estimatePrintHeader && table2Data?.OrderType === 'E'
+ ? ''
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
- : !estimatePrintHeader && table2Data?.OrderType === 'E'
- ? ''
- : Signature == true && (
@@ -5269,12 +5608,44 @@ const PrintStyle1 = ({
Signature
- )}
+ )
+ : !estimatePrintHeader && table2Data?.OrderType === 'E'
+ ? ''
+ : Signature == true && (
+
+
+ Signature
+
+

+
+ )}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
index 35d6b46..49023b6 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx
@@ -44,7 +44,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import Logo from '../../../../Images/Logo.jpg';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
@@ -72,6 +72,7 @@ const PrintStyle10 = ({
SalesModePref,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
index 5fce59c..9f00f66 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx
@@ -46,7 +46,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -75,6 +75,7 @@ const PrintStyle11 = ({
sportsAppPreference,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
index fa719c7..590cecf 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx
@@ -47,7 +47,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -74,6 +74,7 @@ const Printstyle12 = ({
SalesModePref,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
index db4a9be..b29005d 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx
@@ -41,7 +41,8 @@ import {
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import {
GlobalUpiIDprint,
PreferenceData,
@@ -78,6 +79,7 @@ const Printstyle2 = ({
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
const MRP = FieldDetails?.['MRP'];
+ const QRCode = QRCodeModule.default || QRCodeModule;
const Discount = FieldDetails?.['Discount'];
const Tax = FieldDetails?.['Tax'];
const Quantity = FieldDetails?.['Quantity'];
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
index 972b916..c69b5bf 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
@@ -1,7 +1,10 @@
-import React from "react";
-import { useDispatch, useSelector } from "react-redux";
-import QRcode from "../../../../Images/qrcode.png";
-import { extractLastNumber, extractLastNumberOrderId } from "../../../../Services/Others";
+import React from 'react';
+import { useDispatch, useSelector } from 'react-redux';
+import QRcode from '../../../../Images/qrcode.png';
+import {
+ extractLastNumber,
+ extractLastNumberOrderId,
+} from '../../../../Services/Others';
import {
GlobalprintSlNo,
GlobalprintItem,
@@ -37,36 +40,56 @@ import {
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
-import Logo from '../../../../Images/Logo.jpg'
-import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss'
-import QRCode from 'react-qr-code';
-import { GlobalUpiIDprint, PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData';
-import signature from "../../../../Images/signatureimage.jpg"
-import { ApplicationPreferences } from "../../../../Features/BrachLogin/BranchLogin";
-import { isMobile } from "react-device-detect";
-import { settingDataSelector } from "../../../../Features/PreferenceMaster/PreferenceMaster";
-
-const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuantity, OrderDetailGST, OrderDetailIGST, OrderDetailVAT,
- table2Data, PaymentStatus, PrintGreeting, printDatas, PrintLogo, base64Image, isPdf, sportsAppPreference, SalesModePref,
- MembershipApplied = null }) => {
+import Logo from '../../../../Images/Logo.jpg';
+import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss';
+import QRCodeModule from 'react-qr-code';
+import {
+ GlobalUpiIDprint,
+ PreferenceData,
+} from '../../../../Features/BookingScreen/BookingData/BookingData';
+import signature from '../../../../Images/signatureimage.jpg';
+import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
+import { isMobile } from 'react-device-detect';
+import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster';
+const PrintStyle3 = ({
+ index,
+ totalQuantityFilter,
+ Date1,
+ CashierName,
+ totalQuantity,
+ OrderDetailGST,
+ OrderDetailIGST,
+ OrderDetailVAT,
+ table2Data,
+ PaymentStatus,
+ PrintGreeting,
+ printDatas,
+ PrintLogo,
+ base64Image,
+ isPdf,
+ sportsAppPreference,
+ SalesModePref,
+ MembershipApplied = null,
+}) => {
const dispatch = useDispatch();
- const GlobalUpiID = useSelector(GlobalUpiIDprint)
+ const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
- const SLNO = FieldDetails?.["Sl.No"];
- const Item = FieldDetails?.["Item"];
- const MRP = FieldDetails?.["MRP"];
- const Discount = FieldDetails?.["Discount"];
- const Quantity = FieldDetails?.["Quantity"];
- const Rate = FieldDetails?.["Rate"];
+ const QRCode = QRCodeModule.default || QRCodeModule;
+ const SLNO = FieldDetails?.['Sl.No'];
+ const Item = FieldDetails?.['Item'];
+ const MRP = FieldDetails?.['MRP'];
+ const Discount = FieldDetails?.['Discount'];
+ const Quantity = FieldDetails?.['Quantity'];
+ const Rate = FieldDetails?.['Rate'];
const Tax = FieldDetails?.['Tax'];
- const Amount = FieldDetails?.["Amount"];
- const HsnCode = FieldDetails?.["HsnCode"];
- const Qrcodet = FieldDetails?.["Qrcode"];
- const CashierNameField = FieldDetails?.["CashierName"];
- const LogoField = FieldDetails?.["Logo"];
- const CreditDetails = FieldDetails?.["Credit details"];
+ const Amount = FieldDetails?.['Amount'];
+ const HsnCode = FieldDetails?.['HsnCode'];
+ const Qrcodet = FieldDetails?.['Qrcode'];
+ const CashierNameField = FieldDetails?.['CashierName'];
+ const LogoField = FieldDetails?.['Logo'];
+ const CreditDetails = FieldDetails?.['Credit details'];
const WeightasKg = FieldDetails?.['Weight'];
const GlobalSlNo = useSelector(GlobalprintSlNo);
const GlobalItem = useSelector(GlobalprintItem);
@@ -83,23 +106,33 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
const GlobalIsnotes = useSelector(Globalnotes);
- const GlobalthemeFormatr = useSelector(GlobalthemeFormat)
- const GlobalBilltext = useSelector(GlobalBillName)
+ const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
+ const GlobalBilltext = useSelector(GlobalBillName);
const appPreferences = useSelector(ApplicationPreferences);
const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedHeaderFontColor = useSelector(
+ GlobalSelectedPrintHeaderFontColor
+ );
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableHeaderFontColor = useSelector(
+ GlobalSelectedTableHeaderFontColor
+ );
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedTableBodyFontColor = useSelector(
+ GlobalSelectedTableBodyFontColor
+ );
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedTableFooterFontColor = useSelector(
+ GlobalSelectedFooterFontColor
+ );
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const SelectedNetAmountFontColor = useSelector(
+ GlobalSelectedNetAmountFontColor
+ );
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
@@ -110,42 +143,63 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
- const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y';
- const estimateTitle =
+ const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
- setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
+ setting?.SettingIdName?.toLowerCase() === 'estimateprintheader'
)?.SettingValue === 'Y';
- const bookingTypePreference = appPreferences?.find((preference) => preference?.PreferredCatName === 'Booking Type')?.PreferenceCatDetails
- const dinePreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "dine in" && type?.PreferredStatus === 'Y')
- const takeAwayPreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "take away" && type?.PreferredStatus === 'Y')
- const paymentTypeUPI = PaymentStatus?.find((ps) => ps.PaymentTypeName === "UPI")
- console.log(printDatas, "GlobalthemeFormatr");
+ const estimateTitle =
+ SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
+ )?.SettingValue === 'Y';
+ const bookingTypePreference = appPreferences?.find(
+ (preference) => preference?.PreferredCatName === 'Booking Type'
+ )?.PreferenceCatDetails;
+ const dinePreference = bookingTypePreference?.find(
+ (type) =>
+ type?.PreferredSubCatName?.toLowerCase() === 'dine in' &&
+ type?.PreferredStatus === 'Y'
+ );
+ const takeAwayPreference = bookingTypePreference?.find(
+ (type) =>
+ type?.PreferredSubCatName?.toLowerCase() === 'take away' &&
+ type?.PreferredStatus === 'Y'
+ );
+ const paymentTypeUPI = PaymentStatus?.find(
+ (ps) => ps.PaymentTypeName === 'UPI'
+ );
+ console.log(printDatas, 'GlobalthemeFormatr');
- let TermsAndConditions = printDatas?.TermsandConditions
- let SignatureImg = printDatas?.Signature
- let Notestext = printDatas?.Notes
- let BillName = printDatas?.PrintHdrName
- let FormatTheme = printDatas?.PrintType == "S" ? true : false
- let PageSize = printDatas?.PageSize
- const Signature = FieldDetails?.["signature"];
- const TermsnAdCondition = FieldDetails?.["terms&conditions"];
+ let TermsAndConditions = printDatas?.TermsandConditions;
+ let SignatureImg = printDatas?.Signature;
+ let Notestext = printDatas?.Notes;
+ let BillName = printDatas?.PrintHdrName;
+ let FormatTheme = printDatas?.PrintType == 'S' ? true : false;
+ let PageSize = printDatas?.PageSize;
+ const Signature = FieldDetails?.['signature'];
+ const TermsnAdCondition = FieldDetails?.['terms&conditions'];
- const PackageDetails = table2Data?.PackageDtl
+ const PackageDetails = table2Data?.PackageDtl;
let printColors = printDatas?.PrintColors;
- const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
- const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
- const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
- const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
- const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
+ const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
+ const tableHeaderColor = printColors?.find(
+ (obj) => obj.tableHeaderColor
+ )?.tableHeaderColor;
+ const tableBodyColor = printColors?.find(
+ (obj) => obj.tableBodyColor
+ )?.tableBodyColor;
+ const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
+ const netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
- let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S")
+ let PaymentStatusSuccess = PaymentStatus?.filter(
+ (ps) => ps.PaymentStatus === 'S'
+ );
const keysLength = Object.keys(table2Data ?? {}).length;
if (keysLength > 0) {
dispatch(changeReprintDataFound(true));
}
- const isEditedBill = PaymentStatus?.some(payment => {
+ const isEditedBill = PaymentStatus?.some((payment) => {
const type = payment?.AdjustmentType?.toLowerCase();
return (
(type === 'extra' || type === 'refund') &&
@@ -155,75 +209,167 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
});
const lastTransaction = PaymentStatus?.find(
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
- )
+ );
const currentDate = new Date();
const day = currentDate.getDate().toString().padStart(2, '0');
- const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
+ const monthNames = [
+ 'Jan',
+ 'Feb',
+ 'Mar',
+ 'Apr',
+ 'May',
+ 'Jun',
+ 'Jul',
+ 'Aug',
+ 'Sep',
+ 'Oct',
+ 'Nov',
+ 'Dec',
+ ];
const monthIndex = currentDate.getMonth();
const year = currentDate.getFullYear().toString().slice(-2);
const formattedDate = `${day}-${monthNames[monthIndex]}-${year}`;
- const TakeawayData = table2Data?.productDetails?.filter(item => item.BookingTypeName?.toLowerCase() === "takeaway")
- const DineInData = table2Data?.productDetails?.filter(item => item.BookingTypeName?.toLowerCase() === "dine in")
+ const TakeawayData = table2Data?.productDetails?.filter(
+ (item) => item.BookingTypeName?.toLowerCase() === 'takeaway'
+ );
+ const DineInData = table2Data?.productDetails?.filter(
+ (item) => item.BookingTypeName?.toLowerCase() === 'dine in'
+ );
- console.log(TakeawayData, "TakeawayData", table2Data)
+ console.log(TakeawayData, 'TakeawayData', table2Data);
const TakeawayTotal = TakeawayData?.reduce(
(accumulator, currentValue) => accumulator + currentValue.TotalAmt,
- 0,
+ 0
);
const DineInTotal = DineInData?.reduce(
(accumulator, currentValue) => accumulator + currentValue.TotalAmt,
- 0,
+ 0
);
- const aggregatedPayments = PaymentStatusSuccess?.reduce((acc, paymentdata) => {
- const paymentType = paymentdata?.PaymentTypeName;
- const amount = Number(paymentdata?.Amount);
+ const aggregatedPayments = PaymentStatusSuccess?.reduce(
+ (acc, paymentdata) => {
+ const paymentType = paymentdata?.PaymentTypeName;
+ const amount = Number(paymentdata?.Amount);
- if (acc[paymentType]) {
- acc[paymentType] += amount;
- } else {
- acc[paymentType] = amount;
- }
+ if (acc[paymentType]) {
+ acc[paymentType] += amount;
+ } else {
+ acc[paymentType] = amount;
+ }
- return acc;
- }, {});
+ return acc;
+ },
+ {}
+ );
const productsData = table2Data?.productDetails || [];
const offers = table2Data?.OrderOfferDetails || [];
let TotalOfferAmount = 0;
// Calculate SalesWiseOffers total amount
- offers.forEach(offer => {
+ offers.forEach((offer) => {
if (offer.TableName === 'SalesWiseOffers') {
TotalOfferAmount += offer.OfferAmount;
}
});
- const hasMappedOffer = offers.some(offer =>
- ["ItemWiseOffers", "BundleOffers", "QuantityWiseOffers"].includes(offer.TableName)
+ const hasMappedOffer = offers.some((offer) =>
+ ['ItemWiseOffers', 'BundleOffers', 'QuantityWiseOffers'].includes(
+ offer.TableName
+ )
);
if (hasMappedOffer) {
-
- const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type !== 'C' ? (item?.OfferAmt || 0) : (item?.OfferValue || 0)), 0);
+ const productTotal = productsData?.reduce(
+ (acc, item) =>
+ acc +
+ (item?.Type !== 'C' ? item?.OfferAmt || 0 : item?.OfferValue || 0),
+ 0
+ );
TotalOfferAmount += productTotal;
} else {
- const Combothere = productsData?.filter(item => item?.Type == "C")
- const CombothereTotal = Combothere?.reduce((acc, item) => acc + (item.OfferValue || 0), 0);
+ const Combothere = productsData?.filter((item) => item?.Type == 'C');
+ const CombothereTotal = Combothere?.reduce(
+ (acc, item) => acc + (item.OfferValue || 0),
+ 0
+ );
TotalOfferAmount += CombothereTotal;
}
const products = [
- { ProdName: 'ITEM 1', Rate: 88.00, SalesQty: 2, MRP: 100, TotalAmt: 176, discount: 0, HSN: '01', ProdTaxPercentage: 5 },
- { ProdName: 'ITEM 2', Rate: 300.00, SalesQty: 1, MRP: 350, TotalAmt: 300, discount: 0, HSN: '02', ProdTaxPercentage: 5 },
- { ProdName: 'ITEM 3', Rate: 200.00, SalesQty: 1, MRP: 250, TotalAmt: 200, discount: 0, HSN: '03', ProdTaxPercentage: 0 },
- { ProdName: 'ITEM 4', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '04', ProdTaxPercentage: 18 },
- { ProdName: 'ITEM 5', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '05', ProdTaxPercentage: 40 },
- { ProdName: 'ITEM 6', Rate: 130.00, SalesQty: 1, MRP: 150, TotalAmt: 130, discount: 0, HSN: '06', ProdTaxPercentage: 3 },
- { ProdName: 'ITEM 7', Rate: 230.00, SalesQty: 1, MRP: 250, TotalAmt: 230, discount: 0, HSN: '08', ProdTaxPercentage: 0 },
+ {
+ ProdName: 'ITEM 1',
+ Rate: 88.0,
+ SalesQty: 2,
+ MRP: 100,
+ TotalAmt: 176,
+ discount: 0,
+ HSN: '01',
+ ProdTaxPercentage: 5,
+ },
+ {
+ ProdName: 'ITEM 2',
+ Rate: 300.0,
+ SalesQty: 1,
+ MRP: 350,
+ TotalAmt: 300,
+ discount: 0,
+ HSN: '02',
+ ProdTaxPercentage: 5,
+ },
+ {
+ ProdName: 'ITEM 3',
+ Rate: 200.0,
+ SalesQty: 1,
+ MRP: 250,
+ TotalAmt: 200,
+ discount: 0,
+ HSN: '03',
+ ProdTaxPercentage: 0,
+ },
+ {
+ ProdName: 'ITEM 4',
+ Rate: 30.0,
+ SalesQty: 1,
+ MRP: 50,
+ TotalAmt: 30,
+ discount: 0,
+ HSN: '04',
+ ProdTaxPercentage: 18,
+ },
+ {
+ ProdName: 'ITEM 5',
+ Rate: 30.0,
+ SalesQty: 1,
+ MRP: 50,
+ TotalAmt: 30,
+ discount: 0,
+ HSN: '05',
+ ProdTaxPercentage: 40,
+ },
+ {
+ ProdName: 'ITEM 6',
+ Rate: 130.0,
+ SalesQty: 1,
+ MRP: 150,
+ TotalAmt: 130,
+ discount: 0,
+ HSN: '06',
+ ProdTaxPercentage: 3,
+ },
+ {
+ ProdName: 'ITEM 7',
+ Rate: 230.0,
+ SalesQty: 1,
+ MRP: 250,
+ TotalAmt: 230,
+ discount: 0,
+ HSN: '08',
+ ProdTaxPercentage: 0,
+ },
];
- const chunkSize = PageSize == "A5" ? 11 : 16;
+ const chunkSize = PageSize == 'A5' ? 11 : 16;
let dataSource = [];
@@ -238,17 +384,18 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
for (let i = 0; i < dataSource.length; i += chunkSize) {
paginatedChunks.push(dataSource.slice(i, i + chunkSize));
}
- const lastChunkRows = paginatedChunks.length > 0 ? paginatedChunks[paginatedChunks.length - 1].length : 0;
- const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == "A5" ? 5 : 10);
+ const lastChunkRows =
+ paginatedChunks.length > 0
+ ? paginatedChunks[paginatedChunks.length - 1].length
+ : 0;
+ const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
- color: GlobaldummyData
- ? SelectedHeaderFontColor
- : headerColor?.font,
- }
+ color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
+ };
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
@@ -257,813 +404,2613 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
- }
+ };
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
- color: GlobaldummyData
- ? SelectedTableBodyFontColor
- : tableBodyColor?.font,
- }
- const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
+ color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
+ };
+ const rowtypeStyle = GlobaldummyData
+ ? SelectedRowType
+ : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
- color: GlobaldummyData
- ? SelectedTableFooterFontColor
- : footerColor?.font,
- }
+ color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
+ };
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
- color: GlobaldummyData
- ? SelectedNetAmountFontColor
- : netAmtColor?.font,
- }
+ color: GlobaldummyData ? SelectedNetAmountFontColor : netAmtColor?.font,
+ };
return (
<>
- {FormatTheme ?
-
+ {FormatTheme ? (
+
{paginatedChunks.map((dataChunk, chunkIndex) => (
-
0 ? ' print-page-break' : ''}`} style={{ display: "flex", flexDirection: "column", justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme ? "space-between" : "", height: isMobile ? "295mm" : FormatTheme ? PageSize == "A5" ? '170mm' : "257mm" : "", }} key={chunkIndex}>
-
+
0 ? ' print-page-break' : ''}`
+ }
+ style={{
+ display: 'flex',
+ flexDirection: 'column',
+ justifyContent:
+ chunkIndex === paginatedChunks.length - 1 &&
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
+ ? 'space-between'
+ : '',
+ height: isMobile
+ ? '295mm'
+ : FormatTheme
+ ? PageSize == 'A5'
+ ? '170mm'
+ : '257mm'
+ : '',
+ }}
+ key={chunkIndex}
+ >
{/*
*/}
-
- {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
-
- {GlobaldummyData && GlobalLogo ?

: null}
- {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ?

: null}
-
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+
+ {GlobaldummyData && GlobalLogo ? (
+

+ ) : null}
+ {base64Image &&
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+

+ ) : null}
+
+ {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
+
+
+
+ {' '}
+ {GlobaldummyData
+ ? 'BranchAddress, Town- 635XXX City - State'
+ : (table2Data?.AddressDetails?.[0]?.Address1 || '') +
+ (table2Data?.AddressDetails?.[0]?.City
+ ? (table2Data?.AddressDetails?.[0]?.Address1 &&
+ table2Data?.AddressDetails?.[0]?.City
+ ? '-'
+ : '') + table2Data?.AddressDetails?.[0]?.City
+ : '') +
+ (table2Data?.AddressDetails?.[0]?.Zip
+ ? (table2Data?.AddressDetails?.[0]?.City &&
+ table2Data?.AddressDetails?.[0]?.Zip
+ ? '-'
+ : '') + table2Data?.AddressDetails?.[0]?.Zip
+ : '')}
+ {table2Data?.BrGSTIN && (
+
+ GST NO :
+ {GlobaldummyData
+ ? '334bhbsagbysfgbfgbu'
+ : table2Data?.BrGSTIN}
+ ,
+
+ )}
+
+ {' '}
+ Mobile : +91{' '}
+ {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
+
+ {table2Data?.OrderType === 'E' && estimateTitle && (
+
+ Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
+ )}
+ {table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? 'Cash Bill'
+ : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName +
+ ' Bill'
+ : ' Bill')}
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
+ )}
+
-
{GlobaldummyData ?
- 'BranchAddress, Town- 635XXX City - State' :
- (table2Data?.AddressDetails?.[0]?.Address1 || '') + (table2Data?.AddressDetails?.[0]?.City ? (table2Data?.AddressDetails?.[0]?.Address1 && table2Data?.AddressDetails?.[0]?.City ? '-' : '') + table2Data?.AddressDetails?.[0]?.City : '') + (table2Data?.AddressDetails?.[0]?.Zip ? (table2Data?.AddressDetails?.[0]?.City && table2Data?.AddressDetails?.[0]?.Zip ? '-' : '') + table2Data?.AddressDetails?.[0]?.Zip : '')}
+ )}
- {table2Data?.BrGSTIN &&
GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
-
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" && estimateTitle &&
Estimate Bill
+ {!estimatePrintHeader &&
+ table2Data?.OrderType === 'E' &&
+ estimateTitle && (
+
+ Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
- {table2Data?.OrderType === "E" ? "" :
- {GlobaldummyData ? 'Cash Bill' : BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}
- {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
-
-
-
)}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) &&
Estimate Bill
- {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
+
+ )}
-
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
- {SalesModePref?.SettingValue == 'Y' &&
+
{' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
-
{GlobaldummyData ? formattedDate : Date1}
+ BILL NO :
+ {GlobaldummyData
+ ? '51'
+ : table2Data?.OrderId &&
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}{' '}
+
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
+
+ {' '}
+ {GlobaldummyData ? formattedDate : Date1}
+
-
-
+
- {(TakeawayData?.length > 0 || GlobaldummyData) &&
-
- {takeAwayPreference &&
TakeAway
}
-
- {GlobaldummyData ? GlobalSlNo &&
S.No
: SLNO &&
S.No
}
- {GlobaldummyData ? GlobalItem &&
ITEM
: Item &&
ITEM
}
- {GlobaldummyData ? GlobalHsnCode &&
HSN
: HsnCode &&
HSN
}
- {GlobaldummyData ? GlobalMRP &&
MRP
: MRP &&
MRP
}
- {GlobaldummyData ? GlobalQuantity &&
QTY
: Quantity &&
{WeightasKg ? 'QTY/KG' : 'QTY'}
}
- {GlobaldummyData ? GlobalRate &&
RATE
: Rate &&
RATE
}
- {GlobaldummyData ? GlobalDiscount &&
DIS
: Discount &&
DIS
}
- {GlobaldummyData ? GlobalTax && (
TAX %
) : (Tax == true && table2Data?.OrderType !== 'E') && (
TAX %
)}
- {GlobaldummyData ? GlobalAmount &&
AMT
: Amount &&
AMT
}
-
-
-
- {dataChunk?.map((item, index) => (
-
- {GlobaldummyData ? GlobalSlNo &&
{index + 1}
: SLNO &&
{chunkIndex * chunkSize + index + 1}
}
- {GlobaldummyData ? GlobalItem &&
{item?.ProdName}
: Item &&
-
-
{item?.ProdName}
-
- {(PackageDetails?.filter((pkg) => pkg.ProdId === item.ProdId).length > 0 ?
- {PackageDetails?.filter((pkg) => pkg.ProdId === item.ProdId)?.map((item, index) => (
-
- {item.ParcelCount} PCS {item.ParcelQty} PACK ({item.ParcelType})
-
- ))}
-
- : UomPrint?.SettingValue === 'Y' &&
- ({item?.Size ? item?.Size : "1"}{" "}
- {item?.SinglePc == "Y"
- ? "PCS"
- : item?.Type != "C"
- ? item?.UomName
- : "COMBO"}
- )
-
)}
- {item?.BrandName !== null ? item?.BrandName : ""}
-
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) =>
- items.SerialNumber &&
- items.SerialNumber !== ''
- ).map((a, i) => (
-
{a.SerialNumber}
- ))
- : ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
- ).map((id, i) => {
- const imei1 = id.IMEI1 || '';
- const imei2 = id.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
-
- );
- })
- : ''}
- {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
- (
-
{item.ProductIdentifierDtls?.[0]?.Description}
- )}
-
-
-
}
- {GlobaldummyData ? GlobalHsnCode &&
{item?.HSN}
: HsnCode &&
{item?.HSN}
}
- {GlobaldummyData ? GlobalMRP &&
{item?.MRP}
: MRP &&
{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
}
- {GlobaldummyData ? GlobalQuantity &&
{item?.SalesQty}
: Quantity &&
{item?.SalesQty}
}
- {GlobaldummyData ? GlobalRate &&
{item?.Rate}
: Rate &&
{item?.Rate}
}
- {GlobaldummyData ? GlobalDiscount &&
{item?.discount}
: Discount &&
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
- }
- {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)}
- {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
- {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
-
}
-
- ))}
-
-
- }
- {(DineInData?.length > 0 && dinePreference) &&
-
-
Dine In
-
- {GlobaldummyData ? GlobalSlNo &&
S.No
: SLNO &&
S.No
}
- {GlobaldummyData ? GlobalItem &&
ITEM
: Item &&
ITEM
}
- {GlobaldummyData ? GlobalHsnCode &&
HSN
: HsnCode &&
HSN
}
- {GlobaldummyData ? GlobalMRP &&
MRP
: MRP &&
MRP
}
- {GlobaldummyData ? GlobalQuantity &&
QTY
: Quantity &&
{WeightasKg ? 'QTY/KG' : 'QTY'}
}
- {GlobaldummyData ? GlobalRate &&
RATE
: Rate &&
RATE
}
- {GlobaldummyData ? GlobalDiscount &&
DIS
: Discount &&
DIS
}
- {GlobaldummyData ? GlobalTax && (
TAX %
) : (Tax == true && table2Data?.OrderType !== 'E') && (
TAX %
)}
- {GlobaldummyData ? GlobalAmount &&
AMT
: Amount &&
AMT
}
-
-
-
- {dataChunk?.map((item, index) => (
-
- {GlobaldummyData ? GlobalSlNo &&
{index + 1}
: SLNO &&
{chunkIndex * chunkSize + index + 1}
}
- {GlobaldummyData ? GlobalItem &&
{item?.ProdName}
: Item &&
-
-
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
}
-
}
- {GlobaldummyData ? GlobalHsnCode &&
{item?.HSN}
: HsnCode &&
{item?.HSN}
}
- {GlobaldummyData ? GlobalMRP &&
{item?.MRP}
: MRP &&
{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
}
- {GlobaldummyData ? GlobalQuantity &&
{item?.SalesQty}
: Quantity &&
{item?.SalesQty}
}
- {GlobaldummyData ? GlobalRate &&
{item?.Rate}
: Rate &&
{item?.Rate}
}
- {GlobaldummyData ? GlobalDiscount &&
{item?.discount}
: Discount &&
{item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
}
- {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)}
- {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
}
-
- ))}
-
-
- }
-
-
-
- {(DineInData?.length > 0 && TakeawayData?.length > 0) &&
-
- {takeAwayPreference &&
Takeaway: {Number(TakeawayTotal).toFixed(2)}
}
- {dinePreference &&
Dine In: {Number(DineInTotal).toFixed(2)}
}
-
-
- }
-
-
-
- {((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme &&
-
- <>
-
-
-
Items :
-
Qty :
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
Off:
}
-
Amount :
-
-
-
{GlobaldummyData ? '7' : totalQuantityFilter?.length}
-
{GlobaldummyData ? '9' : totalQuantity}
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
{GlobaldummyData ? '100' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
}
-
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
-
-
- {(table2Data?.OrderType === "E") ? '' : (
- {((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && (table2Data?.NetAmount !== 0) &&
- <>
-
-
- --------- GST Breakup Details -----------
- {(OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) &&
-
-
-
- |
-
- Taxable Amount
- |
-
- CGST
- |
-
- SGST
- |
-
-
- Total Amount
- |
-
- {OrderDetailGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.CGST).toFixed(2)}
- |
-
- {Number(item.SGST).toFixed(2)}
- |
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- }
-
- {(OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) &&
- <>
-
-
-
-
- |
-
- Taxable Amount
- |
-
- IGST
- |
-
-
-
- Total Amount
- |
-
- {OrderDetailIGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
- {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) &&
- <>
-
-
-
-
- |
-
- Taxable Amount
- |
-
- VAT
- |
-
-
-
- Total Amount
- |
-
- {OrderDetailVAT?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
-
-
- >
- }
-
-
)}
- {/*
*/}
-
- {/*
*/}
-
-
-
-
{GlobaldummyData ? 'Cash' : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}Payment : {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
-
-
- {isEditedBill && lastTransaction && (
-
-
-
- Bill Gross Amount
- {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
-
+ {(TakeawayData?.length > 0 || GlobaldummyData) && (
+
+ {takeAwayPreference && (
- {'Adjustment Amount'}
-
- {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
-
-
-
- Net Bill Amount
- {(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+ TakeAway
+ )}
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ S.No
+
+ )
+ : SLNO && (
+
+ S.No
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ ITEM
+
+ )
+ : Item && (
+
+ ITEM
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ HSN
+
+ )
+ : HsnCode && (
+
+ HSN
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ MRP
+
+ )
+ : MRP && (
+
+ MRP
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ QTY
+
+ )
+ : Quantity && (
+
+ {' '}
+ {WeightasKg ? 'QTY/KG' : 'QTY'}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ RATE
+
+ )
+ : Rate && (
+
+ RATE
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ DIS{' '}
+
+ )
+ : Discount && (
+
+ DIS{' '}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ TAX %
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ AMT
+
+ )
+ : Amount && (
+
+ AMT
+
+ )}
+
+
+
+ {dataChunk?.map((item, index) => (
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ {index + 1}
+
+ )
+ : SLNO && (
+
+ {chunkIndex * chunkSize + index + 1}
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ {item?.ProdName}
+
+ )
+ : Item && (
+
+
{item?.ProdName}
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((item, index) => (
+
+ {item.ParcelCount} PCS{' '}
+ {item.ParcelQty} PACK (
+ {item.ParcelType})
+
+ ))}
+
+ ) : (
+ UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )
+ )}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+
+
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber &&
+ items.SerialNumber !== ''
+ ).map((a, i) => (
+
+ {a.SerialNumber}
+
+ ))
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (id) =>
+ id.IMEI1 !== '' ||
+ id.IMEI2 !== ''
+ ).map((id, i) => {
+ const imei1 = id.IMEI1 || '';
+ const imei2 = id.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length >
+ 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )}
+
+
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ {item?.HSN}
+
+ )
+ : HsnCode && (
+
+ {item?.HSN}
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ {item?.MRP}
+
+ )
+ : MRP && (
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ {item?.SalesQty}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ {item?.Rate}
+
+ )
+ : Rate && (
+
+ {item?.Rate}
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ {item?.discount}
+
+ )
+ : Discount && (
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ {item?.TotalAmt}
+
+ )
+ : Amount && (
+
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+
+ )}
+
+ ))}
)}
-
-
-
-
Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
- <>
- {/*
Split Payment:
*/}
- {Object.keys(aggregatedPayments).map((paymentType) => (
-
- {paymentType}: {aggregatedPayments[paymentType].toFixed(2)}
-
- ))}
- >
- )}
-
- {GlobaldummyData && GlobalCashierName &&
-
Cashier : Cashier Name
-
- }
- {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && CashierNameField &&
-
Cashier : {CashierName}
-
- }
- {GlobaldummyData &&
-
Customer : Customer Name
-
- }
- {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData &&
-
Customer : {table2Data?.CustSuppName}
-
- }
-
- {(table2Data?.BookingTypeName === "Dine In" && dinePreference) && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) &&
-
Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
}
- {(sportsAppPreference && MembershipApplied) &&
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
}
-
-
-
-
-
- {GlobaldummyData ? (
- GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
- ) : (
- CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
-
- if (PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit") {
- if (c.OldCreditBal !== 0) {
- items.push({
- label: c.OldCreditBal > 0 ? "Advance Amount" : "Opening Balance",
- value: Math.abs(c.OldCreditBal).toFixed(2),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label: c.CurrentCreditBal > 0 ? "Current Advance Amount" : "Current Balance Amount",
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
0 && dinePreference && (
+
+
+ Dine In
+
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
- {i.label}
- :
- {i.value}
-
- ));
- })()}
+ S.No
+
+ )
+ : SLNO && (
+
+ S.No
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ ITEM
+
+ )
+ : Item && (
+
+ ITEM
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ HSN
+
+ )
+ : HsnCode && (
+
+ HSN
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ MRP
+
+ )
+ : MRP && (
+
+ MRP
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ QTY
+
+ )
+ : Quantity && (
+
+ {' '}
+ {WeightasKg ? 'QTY/KG' : 'QTY'}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ RATE
+
+ )
+ : Rate && (
+
+ RATE
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ DIS{' '}
+
+ )
+ : Discount && (
+
+ DIS{' '}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ TAX %
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ AMT
+
+ )
+ : Amount && (
+
+ AMT
+
+ )}
+
-
- )
- )}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
- {
- {GlobaldummyData ? GlobalQrcodet &&
-
-

+
+ {dataChunk?.map((item, index) => (
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ {index + 1}
+
+ )
+ : SLNO && (
+
+ {chunkIndex * chunkSize + index + 1}
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ {item?.ProdName}
+
+ )
+ : Item && (
+
+
{item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ {item?.HSN}
+
+ )
+ : HsnCode && (
+
+ {item?.HSN}
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ {item?.MRP}
+
+ )
+ : MRP && (
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ {item?.SalesQty}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ {item?.Rate}
+
+ )
+ : Rate && (
+
+ {item?.Rate}
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ {item?.discount}
+
+ )
+ : Discount && (
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ {item?.TotalAmt}
+
+ )
+ : Amount && (
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+
+ )}
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
:
- (Qrcodet && paymentTypeUPI) &&
-
-
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
}
-
}
-
)}
+ ))}
+
+
+ )}
+
+
+
+ {DineInData?.length > 0 && TakeawayData?.length > 0 && (
+
+ {takeAwayPreference && (
+
+ Takeaway: {Number(TakeawayTotal).toFixed(2)}
+
+ )}
+ {dinePreference && (
+
Dine In: {Number(DineInTotal).toFixed(2)}
+ )}
+
-
+ )}
+
- {/*
*/}
+ {chunkIndex === paginatedChunks.length - 1 &&
+ !shouldFooterBeOnNewPage &&
+ FormatTheme && (
+ <>
+
+
+
Items :
+
Qty :
+ {(table2Data?.OverallDisc > 0 ||
+ TotalOfferAmount > 0) && (
+
Off:
+ )}
+
Amount :
+
+
+
+ {GlobaldummyData
+ ? '7'
+ : totalQuantityFilter?.length}{' '}
+
+
+ {GlobaldummyData ? '9' : totalQuantity}{' '}
+
+ {(table2Data?.OverallDisc > 0 ||
+ TotalOfferAmount > 0) && (
+
+ {GlobaldummyData
+ ? '100'
+ : Number(
+ TotalOfferAmount + table2Data?.OverallDisc
+ ).toFixed(2)}{' '}
+
+ )}
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}{' '}
+
+
+
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
- {GlobaldummyData ? GlobalIsnotes &&
- (
-
Notes : 10 days Return policy
+ {table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {((OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
+ table2Data?.NetAmount !== 0 && (
+ <>
+
+
+ --------- GST Breakup Details -----------
+
+ {OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0 && (
+
+
+ |
+
+ Taxable Amount
+ |
+
+ CGST
+ |
+
+ SGST
+ |
+
+ Total Amount
+ |
+
+ {OrderDetailGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.CGST).toFixed(2)}
+ |
+
+ {Number(item.SGST).toFixed(2)}
+ |
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ )}
-
-
) :
- Notestext && (
-
{Notestext}
+ {OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ IGST
+ |
-
- )
- }}
+
+ Total Amount
+ |
+
+ {OrderDetailIGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
- {GlobaldummyData ? GlobaltermsAndConditions &&
- (
-
- Terms & Conditions
-
-
- - Once goods are sold, they are not exchangeable or refundable.
- - Please check the product before leaving the counter.
-
-
)
- :
- (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map(item => (- {item?.TermsandConditions}
))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
)
- }
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+ {OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ VAT
+ |
- {GlobaldummyData ? GlobalSignature && (
-
Signature
-

-
) : Signature == true && (
-
Signature
-

-
)}
+
+ Total Amount
+ |
+
+ {OrderDetailVAT?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
- )}
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+
+ >
+ )}
+
+ )}
+ {/*
*/}
-
+ {/*
*/}
+
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
+
- {PrintGreeting?.SettingValue === "Y" &&
- <>
- {/*
*/}
+ {isEditedBill && lastTransaction && (
+
+
+
+
+ Bill Gross Amount
+
+
+ {(lastTransaction?.BeforeAdjustment || 0).toFixed(
+ 2
+ )}
+
+
+
+ {'Adjustment Amount'}
+
+ {lastTransaction?.AdjustmentType === 'REFUND'
+ ? '-'
+ : '+'}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
+
+
+
+
+ Net Bill Amount
+
+
+ {(lastTransaction?.AfterAdjustment || 0).toFixed(
+ 2
+ )}
+
+
+
+
+ )}
+
+
+
+ Your Order No :
+ {GlobaldummyData
+ ? '01'
+ : table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
+
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
+ <>
+ {/*
Split Payment:
*/}
+ {Object.keys(aggregatedPayments).map(
+ (paymentType) => (
+
+ {paymentType}:{' '}
+ {aggregatedPayments[paymentType].toFixed(2)}
+
+ )
+ )}
+ >
+ )}
-
Thank You Visit Again
- >
- }
+ {GlobaldummyData && GlobalCashierName && (
+
+ Cashier : Cashier Name
+
+ )}
+ {CashierName &&
+ CashierName !== undefined &&
+ CashierName !== null &&
+ !GlobaldummyData &&
+ CashierNameField && (
+
+ Cashier : {CashierName}
+
+ )}
+ {GlobaldummyData && (
+
+ {' '}
+ Customer : Customer Name
+
+ )}
+ {table2Data?.CustSuppName &&
+ table2Data?.CustSuppName !== undefined &&
+ table2Data?.CustSuppName !== null &&
+ !GlobaldummyData && (
+
+ Customer : {table2Data?.CustSuppName}
+
+ )}
- >
- }
+ {table2Data?.BookingTypeName === 'Dine In' &&
+ dinePreference &&
+ table2Data?.SalesTableLinkDetails?.[0]
+ ?.WaiterName && (
+
+ Captain :{' '}
+ {
+ table2Data?.SalesTableLinkDetails?.[0]
+ ?.WaiterName
+ }
+
+ )}
+ {sportsAppPreference && MembershipApplied && (
+
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
+ )}
+
+
+ {GlobaldummyData
+ ? GlobalCredit && (
+
+
Advance Amount:
+ Opening Balance:
+
+ )
+ : CreditDetails &&
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
+
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(
+ 2
+ ),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+
+ :
+
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {
+
+ {GlobaldummyData
+ ? GlobalQrcodet && (
+
+
+

+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(
+ table2Data?.NetAmount
+ ).toFixed(2)}
+
+
+ )
+ : Qrcodet &&
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(
+ table2Data?.NetAmount
+ ).toFixed(2)}
+
+
+ )}
+
+ }
+
+ )}
+
+
+
+ {/*
*/}
+
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalIsnotes && (
+
+
+ Notes : 10 days Return policy
+
+
+
+
+ )
+ : Notestext && (
+
+ )}
+
+ )}
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobaltermsAndConditions && (
+
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
+
+ {GlobaldummyData
+ ? GlobalSignature && (
+
+
+ Signature
+
+

+
+ )
+ : Signature == true && (
+
+
+ Signature
+
+

+
+ )}
+
+ )}
+
+
+ {PrintGreeting?.SettingValue === 'Y' && (
+ <>
+ {/*
*/}
+
+
+ Thank You Visit Again
+
+ >
+ )}
+ >
+ )}
))}
- {shouldFooterBeOnNewPage && FormatTheme &&
+ {shouldFooterBeOnNewPage && FormatTheme && (
-
<>
-
+
-
Items :
-
Qty :
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
Off:
}
+
Items :
+
Qty :
+ {(table2Data?.OverallDisc > 0 ||
+ TotalOfferAmount > 0) && (
+
Off:
+ )}
Amount :
-
{GlobaldummyData ? '7' : totalQuantityFilter?.length}
-
{GlobaldummyData ? '9' : totalQuantity}
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
{GlobaldummyData ? '100' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
}
-
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
+
+ {GlobaldummyData
+ ? '7'
+ : totalQuantityFilter?.length}{' '}
+
+
+ {GlobaldummyData ? '9' : totalQuantity}{' '}
+
+ {(table2Data?.OverallDisc > 0 ||
+ TotalOfferAmount > 0) && (
+
+ {GlobaldummyData
+ ? '100'
+ : Number(
+ TotalOfferAmount + table2Data?.OverallDisc
+ ).toFixed(2)}{' '}
+
+ )}
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}{' '}
+
- {(table2Data?.OrderType === "E") ? '' : (
- {((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && (table2Data?.NetAmount !== 0) &&
- <>
-
-
- --------- GST Breakup Details -----------
- {(OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) &&
-
+ {table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {((OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
+ table2Data?.NetAmount !== 0 && (
+ <>
+
+
+ --------- GST Breakup Details -----------
+
+ {OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0 && (
+
+
+ |
+
+ Taxable Amount
+ |
+
+ CGST
+ |
+
+ SGST
+ |
+
+ Total Amount
+ |
+
+ {OrderDetailGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.CGST).toFixed(2)}
+ |
+
+ {Number(item.SGST).toFixed(2)}
+ |
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ )}
-
- |
-
- Taxable Amount
- |
-
- CGST
- |
-
- SGST
- |
-
+ {OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ IGST
+ |
- Total Amount
-
-
- {OrderDetailGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.CGST).toFixed(2)}
- |
-
- {Number(item.SGST).toFixed(2)}
- |
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- }
+ |
+ Total Amount
+ |
+
+ {OrderDetailIGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
- {(OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) &&
- <>
-
-
+ |
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+ {OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ VAT
+ |
+
+ Total Amount
+ |
+
+ {OrderDetailVAT?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(
+ item.WithOutTaxAmount
+ ).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
-
- |
-
- Taxable Amount
- |
-
- IGST
- |
-
-
-
- Total Amount
- |
-
- {OrderDetailIGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
- {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) &&
- <>
-
-
-
-
- |
-
- Taxable Amount
- |
-
- VAT
- |
-
- Total Amount
- |
-
- {OrderDetailVAT?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
-
-
- >
- }
-
-
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+
+ >
+ )}
+
)}
{/*
*/}
-
-
-
{GlobaldummyData ? 'Cash' : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}Payment : {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
+
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
{isEditedBill && lastTransaction && (
-
+
-
-
Bill Gross Amount
-
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
+
+ Bill Gross Amount
+
+
+ {(lastTransaction?.BeforeAdjustment || 0).toFixed(
+ 2
+ )}
+
{'Adjustment Amount'}
- {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ {lastTransaction?.AdjustmentType === 'REFUND'
+ ? '-'
+ : '+'}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
-
-
Net Bill Amount
-
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
+
+ Net Bill Amount
+
+
+ {(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
)}
-
-
-
-
Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
+
+
+
+ Your Order No :
+ {GlobaldummyData
+ ? '01'
+ : table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
+
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
{/*
Split Payment:
*/}
- {Object.keys(aggregatedPayments).map((paymentType) => (
-
- {paymentType}: {aggregatedPayments[paymentType].toFixed(2)}
-
- ))}
- >
- )}
- {GlobaldummyData && GlobalCashierName &&
-
Cashier : Cashier Name
-
- }
- {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && CashierNameField &&
-
Cashier : {CashierName}
-
- }
- {GlobaldummyData &&
-
Customer : Customer Name
-
- }
- {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData &&
-
Customer : {table2Data?.CustSuppName}
-
- }
-
- {(table2Data?.BookingTypeName === "Dine In" && dinePreference) && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) &&
-
Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
}
- {(sportsAppPreference && MembershipApplied) &&
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
}
-
-
-
- {GlobaldummyData ? (
- GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
- ) : (
- CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
-
- if (PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit") {
- if (c.OldCreditBal !== 0) {
- items.push({
- label: c.OldCreditBal > 0 ? "Advance Amount" : "Opening Balance",
- value: Math.abs(c.OldCreditBal).toFixed(2),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label: c.CurrentCreditBal > 0 ? "Current Advance Amount" : "Current Balance Amount",
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
(
+
- {i.label}
- :
- {i.value}
-
- ));
- })()}
-
+ {paymentType}:{' '}
+ {aggregatedPayments[paymentType].toFixed(2)}
+
+ )
+ )}
+ >
+ )}
+ {GlobaldummyData && GlobalCashierName && (
+
+ Cashier : Cashier Name
- )
+ )}
+ {CashierName &&
+ CashierName !== undefined &&
+ CashierName !== null &&
+ !GlobaldummyData &&
+ CashierNameField && (
+
+ Cashier : {CashierName}
+
+ )}
+ {GlobaldummyData && (
+
+ {' '}
+ Customer : Customer Name
+
+ )}
+ {table2Data?.CustSuppName &&
+ table2Data?.CustSuppName !== undefined &&
+ table2Data?.CustSuppName !== null &&
+ !GlobaldummyData && (
+
+ Customer : {table2Data?.CustSuppName}
+
+ )}
+
+ {table2Data?.BookingTypeName === 'Dine In' &&
+ dinePreference &&
+ table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && (
+
+ Captain :{' '}
+ {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
+
+ )}
+ {sportsAppPreference && MembershipApplied && (
+
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
+ )}
+
+
+ {GlobaldummyData
+ ? GlobalCredit && (
+
+
Advance Amount:
+ Opening Balance:
+
+ )
+ : CreditDetails &&
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
+
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalQrcodet && (
+
+
+

+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )
+ : Qrcodet &&
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )}
+
)}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
- {GlobaldummyData ? GlobalQrcodet &&
-
-

-
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
:
- (Qrcodet && paymentTypeUPI) &&
-
-
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
}
-
)}
{/*
*/}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
- {GlobaldummyData ? GlobalIsnotes &&
- (
-
Notes : 10 days Return policy
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalIsnotes && (
+
+
+ Notes : 10 days Return policy
+
-
-
) :
- Notestext && (
+ )
+ : Notestext && (
+
)
- }
}
+
+
+ )}
+
+ )}
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobaltermsAndConditions && (
+
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
- {GlobaldummyData ? GlobaltermsAndConditions &&
- (
-
- Terms & Conditions
-
-
- - Once goods are sold, they are not exchangeable or refundable.
- - Please check the product before leaving the counter.
-
-
)
- :
- (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map(item => (- {item?.TermsandConditions}
))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
)
- }
-
- {GlobaldummyData ? GlobalSignature && (
-
Signature
-

-
) : Signature == true && (
-
Signature
-

-
)}
-
-
)}
+ {GlobaldummyData
+ ? GlobalSignature && (
+
+
+ Signature
+
+

+
+ )
+ : Signature == true && (
+
+
+ Signature
+
+

+
+ )}
+
+ )}
-
- {PrintGreeting?.SettingValue === "Y" &&
+ {PrintGreeting?.SettingValue === 'Y' && (
<>
{/*
*/}
-
Thank You Visit Again
+
+ Thank You Visit Again
+
>
- }
-
+ )}
>
- }
+ )}
+ ) : (
+
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+
+ {GlobaldummyData && GlobalLogo ? (
+

+ ) : null}
+ {base64Image &&
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+

+ ) : null}
+
+ {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
+
+
- :
-
-
- {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
-
- {GlobaldummyData && GlobalLogo ?

: null}
- {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ?

: null}
-
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
+
+ {' '}
+ {GlobaldummyData
+ ? 'BranchAddress, Town- 635XXX City - State'
+ : (table2Data?.AddressDetails?.[0]?.Address1 || '') +
+ (table2Data?.AddressDetails?.[0]?.City
+ ? (table2Data?.AddressDetails?.[0]?.Address1 &&
+ table2Data?.AddressDetails?.[0]?.City
+ ? '-'
+ : '') + table2Data?.AddressDetails?.[0]?.City
+ : '') +
+ (table2Data?.AddressDetails?.[0]?.Zip
+ ? (table2Data?.AddressDetails?.[0]?.City &&
+ table2Data?.AddressDetails?.[0]?.Zip
+ ? '-'
+ : '') + table2Data?.AddressDetails?.[0]?.Zip
+ : '')}
+ {table2Data?.BrGSTIN && (
+
+ GST NO :
+ {GlobaldummyData
+ ? '334bhbsagbysfgbfgbu'
+ : table2Data?.BrGSTIN}
+ ,
+
+ )}
+
+ {' '}
+ Mobile : +91{' '}
+ {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
+
+ {table2Data?.OrderType === 'E' && estimateTitle && (
+
+ Estimate Bill
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
+ )}
+ {table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalBilltext
+ ? GlobalBilltext
+ : 'Cash' + ' Bill'
+ : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : 'Bill')}
+ {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
+
+ )}
+
+ )}
-
{GlobaldummyData ?
- 'BranchAddress, Town- 635XXX City - State' :
- (table2Data?.AddressDetails?.[0]?.Address1 || '') + (table2Data?.AddressDetails?.[0]?.City ? (table2Data?.AddressDetails?.[0]?.Address1 && table2Data?.AddressDetails?.[0]?.City ? '-' : '') + table2Data?.AddressDetails?.[0]?.City : '') + (table2Data?.AddressDetails?.[0]?.Zip ? (table2Data?.AddressDetails?.[0]?.City && table2Data?.AddressDetails?.[0]?.Zip ? '-' : '') + table2Data?.AddressDetails?.[0]?.Zip : '')}
-
- {table2Data?.BrGSTIN &&
GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
-
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" && estimateTitle &&
Estimate Bill
+ {!estimatePrintHeader &&
+ table2Data?.OrderType === 'E' &&
+ estimateTitle && (
+
+ Estimate Bill
{/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
- {table2Data?.OrderType === "E" ? "" :
- {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : 'Bill')}
- {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
-
-
)}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) &&
Estimate Bill
- {/* {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
}
+
+ )}
-
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
-
{GlobaldummyData ? formattedDate : Date1}
+
+ {' '}
+ BILL NO :
+ {GlobaldummyData
+ ? '51'
+ : table2Data?.OrderId &&
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}{' '}
+
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
+
+ {' '}
+ {GlobaldummyData ? formattedDate : Date1}
+
- {(TakeawayData?.length > 0 || GlobaldummyData) &&
+ {(TakeawayData?.length > 0 || GlobaldummyData) && (
- {takeAwayPreference &&
TakeAway
}
-
- {GlobaldummyData ? GlobalSlNo &&
S.No
: SLNO &&
S.No
}
- {GlobaldummyData ? GlobalItem &&
ITEM
: Item &&
ITEM
}
- {GlobaldummyData ? GlobalHsnCode &&
HSN
: HsnCode &&
HSN
}
- {GlobaldummyData ? GlobalMRP &&
MRP
: MRP &&
MRP
}
- {GlobaldummyData ? GlobalQuantity &&
QTY
: Quantity &&
{WeightasKg ? 'QTY/KG' : 'QTY'}
}
- {GlobaldummyData ? GlobalRate &&
RATE
: Rate &&
RATE
}
- {GlobaldummyData ? GlobalDiscount &&
DIS
: Discount &&
DIS
}
- {GlobaldummyData ? GlobalTax && (
TAX %
) : (Tax == true && table2Data?.OrderType !== 'E') && (
TAX %
)}
- {GlobaldummyData ? GlobalAmount &&
AMT
: Amount &&
AMT
}
+ {takeAwayPreference && (
+
+ TakeAway
+
+ )}
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ S.No
+
+ )
+ : SLNO && (
+
+ S.No
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ ITEM
+
+ )
+ : Item && (
+
+ ITEM
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ HSN
+
+ )
+ : HsnCode && (
+
+ HSN
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ MRP
+
+ )
+ : MRP && (
+
+ MRP
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ QTY
+
+ )
+ : Quantity && (
+
+ {' '}
+ {WeightasKg ? 'QTY/KG' : 'QTY'}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ RATE
+
+ )
+ : Rate && (
+
+ RATE
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ DIS{' '}
+
+ )
+ : Discount && (
+
+ DIS{' '}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ TAX %
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ AMT
+
+ )
+ : Amount && (
+
+ AMT
+
+ )}
- {(GlobaldummyData ? products : TakeawayData)?.map((item, index) => (
-
- {GlobaldummyData ? GlobalSlNo &&
{index + 1}
: SLNO &&
{index + 1}
}
- {GlobaldummyData ? GlobalItem &&
{item?.ProdName}
: Item &&
-
-
{item?.ProdName}
-
- {(PackageDetails?.filter((pkg) => pkg.ProdId === item.ProdId).length > 0 ?
- {PackageDetails?.filter((pkg) => pkg.ProdId === item.ProdId)?.map((item, index) => (
-
- {item.ParcelCount} PCS {item.ParcelQty} PACK ({item.ParcelType})
-
- ))}
-
- : UomPrint?.SettingValue === 'Y' &&
- ({item?.Size ? item?.Size : "1"}{" "}
- {item?.SinglePc == "Y"
- ? "PCS"
- : item?.Type != "C"
- ? item?.UomName
- : "COMBO"}
- )
-
)}
- {item?.BrandName !== null ? item?.BrandName : ""}
-
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) =>
- items.SerialNumber &&
- items.SerialNumber !== ''
- ).map((a, i) => (
-
{a.SerialNumber}
- ))
- : ''}
- {item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (id) => id.IMEI1 !== '' || id.IMEI2 !== ''
- ).map((id, i) => {
- const imei1 = id.IMEI1 || '';
- const imei2 = id.IMEI2 || '';
- return (
-
- {[imei1, imei2]
- .filter(Boolean)
- .join(',')}
+ {(GlobaldummyData ? products : TakeawayData)?.map(
+ (item, index) => (
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ {index + 1}
+
+ )
+ : SLNO && (
+
+ {index + 1}
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ {item?.ProdName}
+
+ )
+ : Item && (
+
+
{item?.ProdName}
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((item, index) => (
+
+ {item.ParcelCount} PCS{' '}
+ {item.ParcelQty} PACK (
+ {item.ParcelType})
+
+ ))}
- );
- })
- : ''}
- {(item?.ProductIdentifierDtls?.length > 0 && item.ProductIdentifierDtls?.[0]?.Description)&&
- (
-
{item.ProductIdentifierDtls?.[0]?.Description}
+ ) : (
+ UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )
)}
-
-
-
}
- {GlobaldummyData ? GlobalHsnCode &&
{item?.HSN}
: HsnCode &&
{item?.HSN}
}
- {GlobaldummyData ? GlobalMRP &&
{item?.MRP}
: MRP &&
{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
}
- {GlobaldummyData ? GlobalQuantity &&
{item?.SalesQty}
: Quantity &&
{item?.SalesQty}
}
- {GlobaldummyData ? GlobalRate &&
{item?.Rate}
: Rate &&
{item?.Rate}
}
- {GlobaldummyData ? GlobalDiscount &&
{item?.discount}
: Discount &&
{item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
}
- {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)}
- {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
}
-
- ))}
+ {' '}
+ {item?.BrandName !== null
+ ? item?.BrandName
+ : ''}
+
+
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) =>
+ items.SerialNumber &&
+ items.SerialNumber !== ''
+ ).map((a, i) => (
+
{a.SerialNumber}
+ ))
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (id) =>
+ id.IMEI1 !== '' || id.IMEI2 !== ''
+ ).map((id, i) => {
+ const imei1 = id.IMEI1 || '';
+ const imei2 = id.IMEI2 || '';
+ return (
+
+ {[imei1, imei2]
+ .filter(Boolean)
+ .join(',')}
+
+ );
+ })
+ : ''}
+ {item?.ProductIdentifierDtls?.length > 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )}
+
+
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ {item?.HSN}
+
+ )
+ : HsnCode && (
+
+ {item?.HSN}
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ {item?.MRP}
+
+ )
+ : MRP && (
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ {item?.SalesQty}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ {item?.Rate}
+
+ )
+ : Rate && (
+
+ {item?.Rate}
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ {item?.discount}
+
+ )
+ : Discount && (
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ {item?.TotalAmt}
+
+ )
+ : Amount && (
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
+
+ )
+ )}
- }
- {(DineInData?.length > 0 && dinePreference) &&
+ )}
+ {DineInData?.length > 0 && dinePreference && (
-
Dine In
-
- {GlobaldummyData ? GlobalSlNo &&
S.No
: SLNO &&
S.No
}
- {GlobaldummyData ? GlobalItem &&
ITEM
: Item &&
ITEM
}
- {GlobaldummyData ? GlobalHsnCode &&
HSN
: HsnCode &&
HSN
}
- {GlobaldummyData ? GlobalMRP &&
MRP
: MRP &&
MRP
}
- {GlobaldummyData ? GlobalQuantity &&
QTY
: Quantity &&
{WeightasKg ? 'QTY/KG' : 'QTY'}
}
- {GlobaldummyData ? GlobalRate &&
RATE
: Rate &&
RATE
}
- {GlobaldummyData ? GlobalDiscount &&
DIS
: Discount &&
DIS
}
- {GlobaldummyData ? GlobalTax && (
TAX %
) : (Tax == true && table2Data?.OrderType !== 'E') && (
TAX %
)}
- {GlobaldummyData ? GlobalAmount &&
AMT
: Amount &&
AMT
}
+
+ Dine In
+
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ S.No
+
+ )
+ : SLNO && (
+
+ S.No
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ ITEM
+
+ )
+ : Item && (
+
+ ITEM
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ HSN
+
+ )
+ : HsnCode && (
+
+ HSN
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ MRP
+
+ )
+ : MRP && (
+
+ MRP
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ QTY
+
+ )
+ : Quantity && (
+
+ {WeightasKg ? 'QTY/KG' : 'QTY'}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ RATE
+
+ )
+ : Rate && (
+
+ RATE
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ DIS{' '}
+
+ )
+ : Discount && (
+
+ DIS{' '}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ TAX %
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ AMT
+
+ )
+ : Amount && (
+
+ AMT
+
+ )}
- {(GlobaldummyData ? products : DineInData)?.map((item, index) => (
-
- {GlobaldummyData ? GlobalSlNo &&
{index + 1}
: SLNO &&
{index + 1}
}
- {GlobaldummyData ? GlobalItem &&
{item?.ProdName}
: Item &&
-
-
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
}
-
}
- {GlobaldummyData ? GlobalHsnCode &&
{item?.HSN}
: HsnCode &&
{item?.HSN}
}
- {GlobaldummyData ? GlobalMRP &&
{item?.MRP}
: MRP &&
{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
}
- {GlobaldummyData ? GlobalQuantity &&
{item?.SalesQty}
: Quantity &&
{item?.SalesQty}
}
- {GlobaldummyData ? GlobalRate &&
{item?.Rate}
: Rate &&
{item?.Rate}
}
- {GlobaldummyData ? GlobalDiscount &&
{item?.discount}
: Discount &&
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
-
}
- {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)}
- {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
}
-
- ))}
+ {(GlobaldummyData ? products : DineInData)?.map(
+ (item, index) => (
+
+ {GlobaldummyData
+ ? GlobalSlNo && (
+
+ {index + 1}
+
+ )
+ : SLNO && (
+
+ {index + 1}
+
+ )}
+ {GlobaldummyData
+ ? GlobalItem && (
+
+ {item?.ProdName}
+
+ )
+ : Item && (
+
+
{item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+
+ )}
+ {GlobaldummyData
+ ? GlobalHsnCode && (
+
+ {item?.HSN}
+
+ )
+ : HsnCode && (
+
+ {item?.HSN}
+
+ )}
+ {GlobaldummyData
+ ? GlobalMRP && (
+
+ {item?.MRP}
+
+ )
+ : MRP && (
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
+ {GlobaldummyData
+ ? GlobalQuantity && (
+
+ {item?.SalesQty}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+
+ )}
+ {GlobaldummyData
+ ? GlobalRate && (
+
+ {item?.Rate}
+
+ )
+ : Rate && (
+
+ {item?.Rate}
+
+ )}
+ {GlobaldummyData
+ ? GlobalDiscount && (
+
+ {item?.discount}
+
+ )
+ : Discount && (
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalTax && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
+ {GlobaldummyData
+ ? GlobalAmount && (
+
+ {item?.TotalAmt}
+
+ )
+ : Amount && (
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
+
+ )
+ )}
- }
+ )}
- {(DineInData?.length > 0 && TakeawayData?.length > 0) &&
+ {DineInData?.length > 0 && TakeawayData?.length > 0 && (
- {takeAwayPreference &&
Takeaway: {Number(TakeawayTotal).toFixed(2)}
}
- {dinePreference &&
Dine In: {Number(DineInTotal).toFixed(2)}
}
+ {takeAwayPreference && (
+
Takeaway: {Number(TakeawayTotal).toFixed(2)}
+ )}
+ {dinePreference && (
+
Dine In: {Number(DineInTotal).toFixed(2)}
+ )}
- }
+ )}
{/*
*/}
-
+
-
Items :
-
Qty :
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
Off:
}
+
Items :
+
Qty :
+ {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && (
+
Off:
+ )}
Amount :
-
{GlobaldummyData ? '7' : totalQuantityFilter?.length}
-
{GlobaldummyData ? '9' : totalQuantity}
- {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) &&
{GlobaldummyData ? '100' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
}
-
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
+
+ {GlobaldummyData ? '7' : totalQuantityFilter?.length}{' '}
+
+
+ {GlobaldummyData ? '9' : totalQuantity}{' '}
+
+ {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && (
+
+ {GlobaldummyData
+ ? '100'
+ : Number(
+ TotalOfferAmount + table2Data?.OverallDisc
+ ).toFixed(2)}{' '}
+
+ )}
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}{' '}
+
- {(table2Data?.OrderType === "E") ? '' : (
- {((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) ||
- (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && (table2Data?.NetAmount !== 0) &&
- <>
-
-
- --------- GST Breakup Details -----------
- {(OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) &&
-
+ {table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {((OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0) ||
+ (OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0)) &&
+ table2Data?.NetAmount !== 0 && (
+ <>
+
+
+ --------- GST Breakup Details -----------
+
+ {OrderDetailGST?.length > 0 &&
+ OrderDetailGST?.[0]?.TaxAmt > 0 && (
+
+
+ |
+
+ Taxable Amount
+ |
+
+ CGST
+ |
+
+ SGST
+ |
+
+ Total Amount
+ |
+
+ {OrderDetailGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(item.WithOutTaxAmount).toFixed(2)}
+ |
+
+ {Number(item.CGST).toFixed(2)}
+ |
+
+ {Number(item.SGST).toFixed(2)}
+ |
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ )}
-
- |
-
- Taxable Amount
- |
-
- CGST
- |
-
- SGST
- |
-
+ {OrderDetailIGST?.length > 0 &&
+ OrderDetailIGST?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ IGST
+ |
- Total Amount
-
-
- {OrderDetailGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.CGST).toFixed(2)}
- |
-
- {Number(item.SGST).toFixed(2)}
- |
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- }
+ |
+ Total Amount
+ |
+
+ {OrderDetailIGST?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(item.WithOutTaxAmount).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
- {(OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) &&
- <>
-
-
+ |
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+ {OrderDetailVAT?.length > 0 &&
+ OrderDetailVAT?.[0]?.TaxAmt > 0 && (
+ <>
+
+
+
+ |
+
+ Taxable Amount
+ |
+
+ VAT
+ |
-
- |
-
- Taxable Amount
- |
-
- IGST
- |
+
+ Total Amount
+ |
+
+ {OrderDetailVAT?.map((item) => (
+
+ |
+ {item?.TaxPercentage || 0}%
+ |
+
+ {Number(item.WithOutTaxAmount).toFixed(2)}
+ |
+
+ {Number(item.TaxAmt).toFixed(2)}
+ |
-
-
- Total Amount
- |
-
- {OrderDetailIGST?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
- {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) &&
- <>
-
-
-
-
- |
-
- Taxable Amount
- |
-
- VAT
- |
-
-
-
- Total Amount
- |
-
- {OrderDetailVAT?.map((item) =>
-
- | {item?.TaxPercentage || 0}% |
-
- {Number(item.WithOutTaxAmount).toFixed(2)}
- |
-
- {Number(item.TaxAmt).toFixed(2)}
- |
-
- {Number(item.TotalAmt).toFixed(2)} |
-
- )
- }
-
- >
- }
-
-
- >
- }
-
-
+
+ {Number(item.TotalAmt).toFixed(2)}
+ |
+
+ ))}
+
+ >
+ )}
+
+ >
+ )}
+
)}
{/*
*/}
-
-
-
{GlobaldummyData ? 'Cash' : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}Payment : {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
+
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
{isEditedBill && lastTransaction && (
-
+
-
-
Bill Gross Amount
-
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
+
+ Bill Gross Amount
+
+
+ {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
{'Adjustment Amount'}
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
-
-
Net Bill Amount
-
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
+
+ Net Bill Amount
+
+
+ {(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
)}
- {GlobaldummyData ? (
- GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
- ) : (
- CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
+ {GlobaldummyData
+ ? GlobalCredit && (
+
+
Advance Amount:
+ Opening Balance:
+
+ )
+ : CreditDetails &&
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
- if (PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit") {
- if (c.OldCreditBal !== 0) {
+ if (c.CurrentCreditBal !== 0) {
items.push({
- label: c.OldCreditBal > 0 ? "Advance Amount" : "Opening Balance",
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
});
}
- }
-
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label: c.CurrentCreditBal > 0 ? "Current Advance Amount" : "Current Balance Amount",
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
- {i.label}
- :
- {i.value}
-
- ));
- })()}
+ return items.map((i, idx) => (
+
+ {i.label}
+ :
+ {i.value}
+
+ ));
+ })()}
+
+ )}
+
+
+
+ Your Order No :
+ {GlobaldummyData
+ ? '01'
+ : table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
- )
- )}
-
-
-
-
Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
{/*
Split Payment:
*/}
{Object.keys(aggregatedPayments).map((paymentType) => (
-
- {paymentType}: {aggregatedPayments[paymentType].toFixed(2)}
+
+ {paymentType}:{' '}
+ {aggregatedPayments[paymentType].toFixed(2)}
))}
>
)}
- {GlobaldummyData && GlobalCashierName &&
-
Cashier : Cashier Name
+ {GlobaldummyData && GlobalCashierName && (
+
+ Cashier : Cashier Name
- }
- {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && CashierNameField &&
-
Cashier : {CashierName}
+ )}
+ {CashierName &&
+ CashierName !== undefined &&
+ CashierName !== null &&
+ !GlobaldummyData &&
+ CashierNameField && (
+
+ Cashier : {CashierName}
+
+ )}
+ {GlobaldummyData && (
+
+ {' '}
+ Customer : Customer Name
- }
- {GlobaldummyData &&
-
Customer : Customer Name
+ )}
+ {table2Data?.CustSuppName &&
+ table2Data?.CustSuppName !== undefined &&
+ table2Data?.CustSuppName !== null &&
+ !GlobaldummyData && (
+
+ Customer : {table2Data?.CustSuppName}
+
+ )}
- }
- {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData &&
-
Customer : {table2Data?.CustSuppName}
+ {table2Data?.BookingTypeName === 'Dine In' && dinePreference && (
+
+ Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
- }
-
- {(table2Data?.BookingTypeName === "Dine In" && dinePreference) &&
-
Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
}
- {(sportsAppPreference && MembershipApplied) &&
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
}
-
+ )}
+ {sportsAppPreference && MembershipApplied && (
+
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
+ )}
- {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
- {GlobaldummyData ? GlobalQrcodet &&
-
-

-
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
:
- (Qrcodet && paymentTypeUPI) &&
-
-
-
Scan to Pay
-
₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
-
}
-
)}
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalQrcodet && (
+
+
+

+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )
+ : Qrcodet &&
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
+
+ )}
+
+ )}
{/*
*/}
-
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
- {GlobaldummyData ? GlobalIsnotes &&
- (
-
Notes : 10 days Return policy
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobalIsnotes && (
+
+
+ Notes : 10 days Return policy
+
-
-
) :
- Notestext && (
+ )
+ : Notestext && (
+
)
- }
}
+
+
+ )}
+
+ )}
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
+ ''
+ ) : (
+
+ {GlobaldummyData
+ ? GlobaltermsAndConditions && (
+
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable or
+ refundable.
+
+ -
+ Please check the product before leaving the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
- {GlobaldummyData ? GlobaltermsAndConditions &&
- (
-
- Terms & Conditions
-
-
- - Once goods are sold, they are not exchangeable or refundable.
- - Please check the product before leaving the counter.
-
-
)
- :
- (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map(item => (- {item?.TermsandConditions}
))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
)
- }
-
- {GlobaldummyData ? GlobalSignature && (
-
Signature
-

-
) : Signature == true && (
-
Signature
-

-
)}
-
-
)}
+ {GlobaldummyData
+ ? GlobalSignature && (
+
+
+ Signature
+
+

+
+ )
+ : Signature == true && (
+
+
+ Signature
+
+

+
+ )}
+
+ )}
-
- {PrintGreeting?.SettingValue === "Y" &&
+ {PrintGreeting?.SettingValue === 'Y' && (
<>
{/*
*/}
-
Thank You Visit Again
+
+ Thank You Visit Again
+
>
- }
+ )}
{/*
print
*/}
-
}
+
+ )}
>
);
-}
+};
-export default PrintStyle3;
\ No newline at end of file
+export default PrintStyle3;
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
index 6836d7a..73d2bef 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
@@ -45,7 +45,8 @@ import {
GlobalUpiIDprint,
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -72,8 +73,9 @@ const Printstyle4 = ({
SalesModePref,
MembershipApplied = null,
}) => {
- console.log(printDatas, 'printDatas')
+ console.log(printDatas, 'printDatas');
const dispatch = useDispatch();
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
const SLNO = FieldDetails?.['Sl.No'];
@@ -92,10 +94,16 @@ const Printstyle4 = ({
const orderNo = FieldDetails?.['Order No'];
const paymentTypelabel = FieldDetails?.['Payment Type Label'];
const WeightasKg = FieldDetails?.['Weight'];
- const BillLabel = FieldDetails?.['BillNoLabel']
- const Total_Label = FieldDetails?.['Total Label']
- const BillNoLabel = (printDatas?.PrintDocLabel && BillLabel) ? printDatas?.PrintDocLabel : "Bill No";
- const TotalLabel = (printDatas?.PrintTotalLabel && Total_Label) ? printDatas?.PrintTotalLabel : "SUB TOTAL";
+ const BillLabel = FieldDetails?.['BillNoLabel'];
+ const Total_Label = FieldDetails?.['Total Label'];
+ const BillNoLabel =
+ printDatas?.PrintDocLabel && BillLabel
+ ? printDatas?.PrintDocLabel
+ : 'Bill No';
+ const TotalLabel =
+ printDatas?.PrintTotalLabel && Total_Label
+ ? printDatas?.PrintTotalLabel
+ : 'SUB TOTAL';
const GlobalSlNo = useSelector(GlobalprintSlNo);
const GlobalItem = useSelector(GlobalprintItem);
const GlobalMRP = useSelector(GlobalprintMRP);
@@ -465,8 +473,8 @@ const Printstyle4 = ({
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
- !shouldFooterBeOnNewPage &&
- FormatTheme
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
? 'space-between'
: '',
height: isMobile
@@ -516,7 +524,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -598,10 +606,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
{/*
{GlobaldummyData ? formattedDate : Date1}
*/}
@@ -627,9 +635,9 @@ const Printstyle4 = ({
{GlobaldummyData
? 'Cash Bill'
: BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -664,172 +672,172 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && (
- Item |
- )}
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- {WeightasKg ? 'Qty/Kg' : 'Qty'}
- |
- )}
+
+ {WeightasKg ? 'Qty/Kg' : 'Qty'}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -866,12 +874,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
- : index % 2 === 1 && rowtypeStyle === 'odd'
- ? {
...tableBodyStyle,
}
+ : index % 2 === 1 && rowtypeStyle === 'odd'
+ ? {
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -879,84 +887,84 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{/* ITEM COLUMN */}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {/* Product Name */}
- {item?.ProdName}
+ |
+ {/* Product Name */}
+ {item?.ProdName}
- {/* Package OR Size */}
- {packageList.length > 0 ? (
-
- {packageList.map((pkg, i) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y'
- ? (item?.Size || '1') +
- (item?.SinglePc === 'Y'
- ? ' PCS'
- : item?.Type !== 'C'
- ? ` ${item?.UomName}`
- : ' COMBO')
- : ''}
- {item?.BrandName || ''}
-
- )}
+ {/* Package OR Size */}
+ {packageList.length > 0 ? (
+
+ {packageList.map((pkg, i) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y'
+ ? (item?.Size || '1') +
+ (item?.SinglePc === 'Y'
+ ? ' PCS'
+ : item?.Type !== 'C'
+ ? ` ${item?.UomName}`
+ : ' COMBO')
+ : ''}
+ {item?.BrandName || ''}
+
+ )}
- {/* Serials */}
- {serials.map((s, i) => (
- {s}
- ))}
+ {/* Serials */}
+ {serials.map((s, i) => (
+ {s}
+ ))}
- {/* IMEIs */}
- {imeis.map((iVal, i) => (
- {iVal}
- ))}
+ {/* IMEIs */}
+ {imeis.map((iVal, i) => (
+ {iVal}
+ ))}
- {/* Description from first identifier */}
- {descriptions[0] && (
- {descriptions[0]}
- )}
- |
- )}
+ {/* Description from first identifier */}
+ {descriptions[0] && (
+ {descriptions[0]}
+ )}
+
+ )}
{/* Quantity */}
{(GlobaldummyData
? GlobalQuantity
: Quantity) && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{/* HSN */}
{(GlobaldummyData
? GlobalHsnCode
: HsnCode) && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{/* MRP */}
{(GlobaldummyData ? GlobalMRP : MRP) && (
@@ -971,14 +979,16 @@ const Printstyle4 = ({
{(GlobaldummyData
? GlobalDiscount
: Discount) && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0
- : item?.OfferValue ||
- (item?.DiscountAmt / item?.SalesQty) ||
+ |
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
0}
- |
- )}
+
+ )}
{/* Rate */}
{(GlobaldummyData ? GlobalRate : Rate) && (
@@ -992,9 +1002,9 @@ const Printstyle4 = ({
{item?.Type !== 'C'
? (item?.TotalAmt || 0) -
- (item?.OfferAmt || 0)
+ (item?.OfferAmt || 0)
: (item?.TotalAmt || 0) -
- (item?.OfferValue || 0)}
+ (item?.OfferValue || 0)}
|
)}
@@ -1023,170 +1033,170 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && (
- Item |
- )}
+ Item |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -1197,136 +1207,138 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
- : index % 2 === 1 && rowtypeStyle === 'odd'
- ? {
...tableBodyStyle,
}
+ : index % 2 === 1 && rowtypeStyle === 'odd'
+ ? {
+ ...tableBodyStyle,
+ }
: {}
}
>
{GlobaldummyData
? GlobalSlNo && {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+
+ {item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
- |
- )
+
+ {item?.SalesQty}
+ |
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt ||
- (item?.DiscountAmt / item?.SalesQty) ||
- 0
- : item?.OfferValue ||
- (item?.DiscountAmt / item?.SalesQty) ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt /
+ item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt /
+ item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt -
- (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt -
+ (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
})}
@@ -1380,11 +1392,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -1411,7 +1423,6 @@ const Printstyle4 = ({
: Number(table2Data?.NetAmount).toFixed(2)}
-
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -1572,17 +1583,17 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' +
- ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' +
+ ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -1773,34 +1784,36 @@ const Printstyle4 = ({
)}
- {paymentTypelabel &&
+ {paymentTypelabel && (
- {GlobaldummyData
- ? 'Cash'
- : PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName
- : ''}{' '}
- Payment :
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
- /-{' '}
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}{' '}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
-
}
+ )}
{isEditedBill && lastTransaction && (
@@ -1879,83 +1892,83 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(
- 2
- ),
- });
- }
-
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
@@ -1963,69 +1976,71 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
+
+

+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
-
- )}
+ )}
)}
{/*
Scan to Pay
*/}
- {orderNo &&
- YOUR ORDER NO:
- {table2Data?.SalesId &&
- extractLastNumber(table2Data?.SalesId)}
-
}
+ {orderNo && (
+
+ YOUR ORDER NO:
+ {table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
+
+ )}
{PaymentStatusSuccess?.length > 1 &&
!isEditedBill && (
@@ -2125,28 +2140,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -2166,137 +2181,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving
- the counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
@@ -2371,11 +2386,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -2401,7 +2416,6 @@ const Printstyle4 = ({
: Number(table2Data?.NetAmount).toFixed(2)}
-
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2563,16 +2577,16 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -2763,34 +2777,36 @@ const Printstyle4 = ({
)}
- {paymentTypelabel &&
+ {paymentTypelabel && (
- {GlobaldummyData
- ? 'Cash'
- : PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName
- : ''}{' '}
- Payment :
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
- /-{' '}
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}{' '}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
-
}
+ )}
{isEditedBill && lastTransaction && (
@@ -2867,81 +2883,81 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{/*
*/}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2950,64 +2966,66 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
- Scan to Pay{' '}
+
+

+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
- Scan to Pay{' '}
+ paymentTypeUPI && (
+
+
+
+ Scan to Pay{' '}
+
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )}
+ )}
)}
{/*
Scan to Pay
*/}
- {orderNo &&
- YOUR ORDER NO:
- {table2Data?.SalesId &&
- extractLastNumber(table2Data?.SalesId)}
-
}
+ {orderNo && (
+
+ YOUR ORDER NO:
+ {table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
+
+ )}
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
@@ -3103,28 +3121,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -3144,137 +3162,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
@@ -3321,7 +3339,7 @@ const Printstyle4 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -3411,10 +3429,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
@@ -3441,9 +3459,9 @@ const Printstyle4 = ({
? GlobalBilltext
: 'Cash' + ' Bill'
: BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -3472,112 +3490,112 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
- #
- |
- )
+
+ #
+ |
+ )
: SLNO && (
-
- #
- |
- )}
+
+ #
+ |
+ )}
{GlobaldummyData
? GlobalItem && (
- Item |
- )
+ Item |
+ )
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -3659,12 +3677,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
- : index % 2 === 1 && rowtypeStyle === 'odd'
- ? {
...tableBodyStyle,
}
+ : index % 2 === 1 && rowtypeStyle === 'odd'
+ ? {
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -3674,238 +3692,240 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
+ |
+ {item?.ProdName}
- {/* Serial Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
-
- {/* IMEI Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.length > 0 &&
- item.ProductIdentifierDtls?.[0]
- ?.Description && (
-
- {
- item.ProductIdentifierDtls?.[0]
- ?.Description
- }
+ {/* Serial Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
- )}
- |
- )}
+ ))}
+
+ {/* IMEI Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.length > 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
-
- {/* Package Details */}
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- ).length > 0 ? (
-
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- )?.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- {/* Serial */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
-
- {/* IMEI */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
-
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.length >
- 0 &&
- item.ProductIdentifierDtls?.[0]
- ?.Description && (
-
- {
- item
- .ProductIdentifierDtls?.[0]
- ?.Description
- }
+
+ {/* Package Details */}
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+ ))}
+
+ {/* Serial */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
+
+ {/* IMEI */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
+
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.length >
+ 0 &&
+ item.ProductIdentifierDtls?.[0]
+ ?.Description && (
+
+ {
+ item
+ .ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )}
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y' && (
+ <>
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}{' '}
+ >
)}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y' && (
- <>
- ({item?.Size || '1'}){' '}
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}{' '}
- >
- )}
- {item?.BrandName || ''}
-
- )}
-
- |
- )
+ {item?.BrandName || ''}
+
+ )}
+
+
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- {GlobaldummyData
- ? GlobalTax && (
- |
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )
- : Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ {GlobaldummyData
+ ? GlobalTax && (
+ |
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {/* */}
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0
- : item?.OfferValue ||
- (item?.DiscountAmt / item?.SalesQty) ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -3939,48 +3959,48 @@ const Printstyle4 = ({
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -4036,12 +4056,12 @@ const Printstyle4 = ({
style={
index % 2 !== 1 && rowtypeStyle === 'even'
? {
- ...tableBodyStyle,
- }
- : index % 2 === 1 && rowtypeStyle === 'odd'
- ? {
...tableBodyStyle,
}
+ : index % 2 === 1 && rowtypeStyle === 'odd'
+ ? {
+ ...tableBodyStyle,
+ }
: {}
}
>
@@ -4051,68 +4071,53 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {(
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) => items.SerialNumber
- )
- .map(
- (a, index) => ` ${a.SerialNumber}`
- )
- .join('')
- : '') +
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (item1) =>
- item1.IMEI1 || item1.IMEI2
- )
- .map((item2) => {
- const imei1 = item2.IMEI1 || '';
- const imei2 = item2.IMEI2 || '';
- return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
- })
- .join('')
- : '') +
- (item?.ProductIdentifierDtls?.length >
- 0 &&
- item.ProductIdentifierDtls?.[0]
- ?.Description) && (
-
- {
+
+ {item?.ProdName}
+ {(
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) => items.SerialNumber
+ )
+ .map(
+ (a, index) => ` ${a.SerialNumber}`
+ )
+ .join('')
+ : '') +
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (item1) =>
+ item1.IMEI1 || item1.IMEI2
+ )
+ .map((item2) => {
+ const imei1 = item2.IMEI1 || '';
+ const imei2 = item2.IMEI2 || '';
+ return ` ${[imei1, imei2].filter(Boolean).join(',')}`;
+ })
+ .join('')
+ : '') +
+ (item?.ProductIdentifierDtls?.length >
+ 0 &&
item.ProductIdentifierDtls?.[0]
- ?.Description
- }
-
- )
- )?.trim()}
- |
- )}
+ ?.Description) && (
+
+ {
+ item.ProductIdentifierDtls?.[0]
+ ?.Description
+ }
+
+ )
+ )?.trim()}
+ |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- |
- )
- : Quantity && (
-
- {item?.SalesQty}
- {UomPrint?.SettingValue === 'Y' && (
+ |
+ {item?.SalesQty}
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -4122,86 +4127,103 @@ const Printstyle4 = ({
: 'COMBO'}
)
- )}
- |
- )}
+
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0
- : item?.OfferValue ||
- (item?.DiscountAmt / item?.SalesQty) ||
- 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
- |
- )
+
+ {item?.Rate}
+ |
+ )
: Rate && (
-
- {item?.Rate}
- |
- )}
+
+ {item?.Rate}
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
- |
- )
+
+ {item?.TotalAmt}
+ |
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt -
- (item?.OfferValue || 0)}
- |
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt -
+ (item?.OfferValue || 0)}
+ |
+ )}
);
}
@@ -4270,8 +4292,6 @@ const Printstyle4 = ({
: Number(table2Data?.NetAmount).toFixed(2)}
-
-
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4423,14 +4443,14 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor((num % 100) / 10)
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor((num % 100) / 10)
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -4617,34 +4637,36 @@ const Printstyle4 = ({
)}
- {paymentTypelabel &&
+ {paymentTypelabel && (
- {GlobaldummyData
- ? 'Cash'
- : PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName
- : ''}{' '}
- Payment :
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
- /-{' '}
+
+ {GlobaldummyData
+ ? 'Cash'
+ : PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName
+ : ''}{' '}
+ Payment :
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+ /-{' '}
+
-
}
+ )}
{isEditedBill && lastTransaction && (
@@ -4713,79 +4735,79 @@ const Printstyle4 = ({
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
+ items.push({
+ label:
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
+ });
+ }
+ }
+
+ if (c.CurrentCreditBal !== 0) {
items.push({
label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
});
}
- }
- if (c.CurrentCreditBal !== 0) {
- items.push({
- label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
- });
- }
-
- return items.map((i, idx) => (
-
- {i.label}
- :
- {i.value}
-
- ));
- })()}
-
- )}
+ return items.map((i, idx) => (
+
+ {i.label}
+ :
+ {i.value}
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
@@ -4793,59 +4815,62 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
-

-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+
+

+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )}
+ )}
)}
{/*
Scan to Pay
*/}
- {orderNo &&
- YOUR ORDER NO:
- {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
-
}
+ {orderNo && (
+
+ YOUR ORDER NO:
+ {table2Data?.SalesId &&
+ extractLastNumber(table2Data?.SalesId)}
+
+ )}
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
@@ -4932,21 +4957,21 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
+ )}
)}
@@ -4966,136 +4991,136 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable or
- refundable.
-
- -
- Please check the product before leaving the counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable or
+ refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+

+
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
index 888cb09..d853bab 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
@@ -45,7 +45,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -75,6 +75,7 @@ const PrintStyle5 = ({
}) => {
console.log(table2Data, 'table2Data');
const dispatch = useDispatch();
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
const SLNO = FieldDetails?.['Sl.No'];
@@ -112,16 +113,26 @@ const PrintStyle5 = ({
const SettingData = useSelector(PreferenceData);
const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedHeaderFontColor = useSelector(
+ GlobalSelectedPrintHeaderFontColor
+ );
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableHeaderFontColor = useSelector(
+ GlobalSelectedTableHeaderFontColor
+ );
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedTableBodyFontColor = useSelector(
+ GlobalSelectedTableBodyFontColor
+ );
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedTableFooterFontColor = useSelector(
+ GlobalSelectedFooterFontColor
+ );
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const SelectedNetAmountFontColor = useSelector(
+ GlobalSelectedNetAmountFontColor
+ );
const GlobalCredit = useSelector(GlobalprintCredit);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
@@ -139,8 +150,7 @@ const PrintStyle5 = ({
)?.SettingValue === 'Y';
const estimateTitle =
SettingData?.[0]?.SettingDtlDetails?.find(
- (setting) =>
- setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
)?.SettingValue === 'Y';
const bookingTypePreference = appPreferences?.find(
(preference) => preference?.PreferredCatName === 'Booking Type'
@@ -161,11 +171,15 @@ const PrintStyle5 = ({
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
let printColors = printDatas?.PrintColors;
- const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
- const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
- const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
- const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
- const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
+ const headerColor = printColors?.find((obj) => obj.headerColor)?.headerColor;
+ const tableHeaderColor = printColors?.find(
+ (obj) => obj.tableHeaderColor
+ )?.tableHeaderColor;
+ const tableBodyColor = printColors?.find(
+ (obj) => obj.tableBodyColor
+ )?.tableBodyColor;
+ const footerColor = printColors?.find((obj) => obj.footerColor)?.footerColor;
+ const netAmtColor = printColors?.find((obj) => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
@@ -179,7 +193,7 @@ const PrintStyle5 = ({
let PaymentStatusSuccess = PaymentStatus?.filter(
(ps) => ps.PaymentStatus === 'S'
);
- const isEditedBill = PaymentStatus?.some(payment => {
+ const isEditedBill = PaymentStatus?.some((payment) => {
const type = payment?.AdjustmentType?.toLowerCase();
return (
(type === 'extra' || type === 'refund') &&
@@ -189,7 +203,7 @@ const PrintStyle5 = ({
});
const lastTransaction = PaymentStatus?.find(
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
- )
+ );
const keysLength = Object.keys(table2Data ?? {}).length;
if (keysLength > 0) {
dispatch(changeReprintDataFound(true));
@@ -354,10 +368,8 @@ const PrintStyle5 = ({
? SelectedHeaderColor
: headerColor?.background,
- color: GlobaldummyData
- ? SelectedHeaderFontColor
- : headerColor?.font,
- }
+ color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
+ };
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
@@ -366,34 +378,30 @@ const PrintStyle5 = ({
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
- }
+ };
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
- color: GlobaldummyData
- ? SelectedTableBodyFontColor
- : tableBodyColor?.font,
- }
- const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
+ color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font,
+ };
+ const rowtypeStyle = GlobaldummyData
+ ? SelectedRowType
+ : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
- color: GlobaldummyData
- ? SelectedTableFooterFontColor
- : footerColor?.font,
- }
+ color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font,
+ };
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
- color: GlobaldummyData
- ? SelectedNetAmountFontColor
- : netAmtColor?.font,
- }
+ color: GlobaldummyData ? SelectedNetAmountFontColor : netAmtColor?.font,
+ };
return (
<>
{FormatTheme ? (
@@ -419,8 +427,8 @@ const PrintStyle5 = ({
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
- !shouldFooterBeOnNewPage &&
- FormatTheme
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
? 'space-between'
: '',
height: isMobile
@@ -467,7 +475,7 @@ const PrintStyle5 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -523,10 +531,11 @@ const PrintStyle5 = ({
{GlobaldummyData
? 'Cash'
- : BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName +
+ ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -535,15 +544,20 @@ const PrintStyle5 = ({
)}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
-
- Estimate{' '}
- {/* {SalesModePref?.SettingValue == 'Y' &&
+ {!estimatePrintHeader &&
+ table2Data?.OrderType === 'E' &&
+ estimateTitle && (
+
+ Estimate{' '}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
- )}
+
+ )}
{' '}
-
{GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' &&
+
{' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
-
+ {GlobaldummyData ? formattedDate : Date1}
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
{' '}
{' '}
@@ -568,10 +587,10 @@ const PrintStyle5 = ({
{GlobaldummyData
? '553'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}{' '}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}{' '}
{' '}
@@ -605,20 +624,20 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
- ...tableHeaderStyle
+ ...tableHeaderStyle,
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- S.No
-
- )
+
+ S.No
+
+ )
: SLNO && (
-
- S.No
-
- )}
+
+ S.No
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -639,78 +658,80 @@ const PrintStyle5 = ({
: Item && 'ITEM /DES /'}{' '}
{GlobaldummyData
? GlobalQuantity && 'QTY'
- : Quantity && WeightasKg ? 'QTY/Kg' : 'QTY'}{' '}
+ : Quantity && WeightasKg
+ ? 'QTY/Kg'
+ : 'QTY'}{' '}
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
-
- )
+
+ HSN
+
+ )
: HsnCode && (
-
- HSN
-
- )}
+
+ HSN
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
-
- )
+
+ MRP
+
+ )
: MRP && (
-
- MRP
-
- )}
+
+ MRP
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- RATE
-
- )
+
+ RATE
+
+ )
: Rate && (
-
- RATE
-
- )}
+
+ RATE
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- DIS{' '}
-
- )
+
+ DIS{' '}
+
+ )
: Discount && (
-
- DIS{' '}
-
- )}
+
+ DIS{' '}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- TAX %{' '}
-
- )
+
+ TAX %{' '}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- TAX %{' '}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %{' '}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {' '}
- Amt{' '}
-
- )
+
+ {' '}
+ Amt{' '}
+
+ )
: Amount && (
-
- {' '}
- AMT{' '}
-
- )}
+
+ {' '}
+ AMT{' '}
+
+ )}
@@ -726,28 +747,28 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
- ...(index % 2 === 0 && rowtypeStyle === "even"
+ ...(index % 2 === 0 && rowtypeStyle === 'even'
? tableBodyStyle
- : index % 2 === 1 && rowtypeStyle === "odd"
+ : index % 2 === 1 && rowtypeStyle === 'odd'
? tableBodyStyle
- : {})
+ : {}),
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- {index + 1}
-
- )
+
+ {index + 1}
+
+ )
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
-
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -761,7 +782,7 @@ const PrintStyle5 = ({
) : (
<>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
+ {UomPrint?.SettingValue === 'Y' && (
{item?.Size +
item?.UomName +
@@ -769,7 +790,8 @@ const PrintStyle5 = ({
(GlobaldummyData
? GlobalQuantity && item?.SalesQty
: item?.SalesQty)}
-
}
+
+ )}
>
)}
@@ -786,11 +808,12 @@ const PrintStyle5 = ({
) : (
<>
{(() => {
- const identifiers = item?.ProductIdentifierDtls ?? [];
+ const identifiers =
+ item?.ProductIdentifierDtls ?? [];
- const packageList = (PackageDetails ?? []).filter(
- pkg => pkg.ProdId === item.ProdId
- );
+ const packageList = (
+ PackageDetails ?? []
+ ).filter((pkg) => pkg.ProdId === item.ProdId);
return (
<>
@@ -800,18 +823,21 @@ const PrintStyle5 = ({
{packageList.length > 0 ? (
// ================= PACKAGE EXISTS =================
-
{/* 📦 Package Details */}
{packageList.map((pkg, index) => (
- {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
))}
{/* 🔢 Identifiers (Serial / IMEI) */}
{identifiers.map((d, i) => {
const serial = d.SerialNumber;
- const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
+ const imei = [d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ');
if (!serial && !imei) return null;
@@ -825,7 +851,9 @@ const PrintStyle5 = ({
{/* 📝 Description from first identifier */}
{identifiers?.[0]?.Description && (
-
{identifiers?.[0]?.Description}
+
+ {identifiers?.[0]?.Description}
+
)}
{/* 🔢 Quantity */}
@@ -834,22 +862,20 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty
: item?.SalesQty}
-
) : (
// ================= NO PACKAGE =================
-
{/* 📏 Size + UOM */}
{UomPrint?.SettingValue === 'Y' && (
<>
- {(item?.Size || "1")}{" "}
- {item?.SinglePc === "Y"
- ? "PCS"
- : item?.Type !== "C"
+ {item?.Size || '1'}{' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
? item?.UomName
- : "COMBO"}
+ : 'COMBO'}
>
)}
@@ -862,7 +888,9 @@ const PrintStyle5 = ({
{/* 🔢 Identifiers (Serial / IMEI) */}
{identifiers.map((d, i) => {
const serial = d.SerialNumber;
- const imei = [d.IMEI1, d.IMEI2].filter(Boolean).join(", ");
+ const imei = [d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ');
if (!serial && !imei) return null;
@@ -876,7 +904,9 @@ const PrintStyle5 = ({
{/* 📝 Description from first identifier */}
{identifiers?.[0]?.Description && (
-
{identifiers?.[0]?.Description}
+
+ {identifiers?.[0]?.Description}
+
)}
{/* 🔢 Quantity */}
@@ -886,7 +916,6 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty
: item?.SalesQty}
-
)}
>
@@ -898,102 +927,106 @@ const PrintStyle5 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
-
- )
+
+ {item?.HSN}
+
+ )
: HsnCode && (
-
- {item?.HSN}
-
- )}
+
+ {item?.HSN}
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
-
- )
+
+ {item?.MRP}
+
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
-
- )
+
+ {item?.Rate}
+
+ )
: Rate && (
-
- {item?.Rate}
-
- )}
+
+ {item?.Rate}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item?.discount}
-
- )
+
+ {item?.discount}
+
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
-
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage}
-
- )
+
+ {item?.ProdTaxPercentage}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
-
- )
+
+ {item?.TotalAmt}
+
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
-
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
))}
>
@@ -1019,20 +1052,20 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
- ...tableHeaderStyle
+ ...tableHeaderStyle,
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- S.No
-
- )
+
+ S.No
+
+ )
: SLNO && (
-
- S.No
-
- )}
+
+ S.No
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -1053,78 +1086,80 @@ const PrintStyle5 = ({
: Item && 'ITEM /DES /'}{' '}
{GlobaldummyData
? GlobalQuantity && 'QTY'
- : Quantity && WeightasKg ? 'Qty/Kg' : 'Qty'}{' '}
+ : Quantity && WeightasKg
+ ? 'Qty/Kg'
+ : 'Qty'}{' '}
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
-
- )
+
+ HSN
+
+ )
: HsnCode && (
-
- HSN
-
- )}
+
+ HSN
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
-
- )
+
+ MRP
+
+ )
: MRP && (
-
- MRP
-
- )}
+
+ MRP
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- RATE
-
- )
+
+ RATE
+
+ )
: Rate && (
-
- RATE
-
- )}
+
+ RATE
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- DIS{' '}
-
- )
+
+ DIS{' '}
+
+ )
: Discount && (
-
- DIS{' '}
-
- )}
+
+ DIS{' '}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- TAX %{' '}
-
- )
+
+ TAX %{' '}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- TAX %{' '}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %{' '}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {' '}
- Amt{' '}
-
- )
+
+ {' '}
+ Amt{' '}
+
+ )
: Amount && (
-
- {' '}
- AMT{' '}
-
- )}
+
+ {' '}
+ AMT{' '}
+
+ )}
@@ -1140,28 +1175,28 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
- ...(index % 2 === 0 && rowtypeStyle === "even"
+ ...(index % 2 === 0 && rowtypeStyle === 'even'
? tableBodyStyle
- : index % 2 === 1 && rowtypeStyle === "odd"
+ : index % 2 === 1 && rowtypeStyle === 'odd'
? tableBodyStyle
- : {})
+ : {}),
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- {index + 1}
-
- )
+
+ {index + 1}
+
+ )
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
-
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -1175,7 +1210,7 @@ const PrintStyle5 = ({
) : (
<>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
+ {UomPrint?.SettingValue === 'Y' && (
{item?.Size +
item?.UomName +
@@ -1184,7 +1219,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty
: item?.SalesQty)}
- }
+ )}
>
)}
@@ -1201,7 +1236,7 @@ const PrintStyle5 = ({
) : (
<>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
+ {UomPrint?.SettingValue === 'Y' && (
{(item?.Size ? item?.Size : '1') +
(item?.SinglePc == 'Y'
@@ -1214,109 +1249,113 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty
: item?.SalesQty)}
- }
+ )}
>
)}
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
-
- )
+
+ {item?.HSN}
+
+ )
: HsnCode && (
-
- {item?.HSN}
-
- )}
+
+ {item?.HSN}
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
-
- )
+
+ {item?.MRP}
+
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
-
- )
+
+ {item?.Rate}
+
+ )
: Rate && (
-
- {item?.Rate}
-
- )}
+
+ {item?.Rate}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item?.discount}
-
- )
+
+ {item?.discount}
+
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
-
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage}
-
- )
+
+ {item?.ProdTaxPercentage}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
-
- )
+
+ {item?.TotalAmt}
+
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
-
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
))}
>
@@ -1512,24 +1551,28 @@ const PrintStyle5 = ({
{/* {ExtraChargeTotal>0 && Extra Charges :
{ExtraChargeTotal}
} */}
{(table2Data?.OverallDisc > 0 ||
TotalOfferAmount > 0) && (
-
- {' '}
-
Off :
{' '}
-
- {GlobaldummyData
- ? '100'
- : Number(
+
+ {' '}
+
Off :
{' '}
+
+ {GlobaldummyData
+ ? '100'
+ : Number(
TotalOfferAmount + table2Data?.OverallDisc
).toFixed(2)}
-
{' '}
-
- )}
+
{' '}
+
+ )}
{' '}
Amount
:
{' '}
@@ -1601,20 +1644,40 @@ const PrintStyle5 = ({
{isEditedBill && lastTransaction && (
-
+
-
-
Bill Gross Amount
-
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
+
+ Bill Gross Amount
+
+
+ {(
+ lastTransaction?.BeforeAdjustment || 0
+ ).toFixed(2)}
+
{'Adjustment Amount'}
- {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ {lastTransaction?.AdjustmentType === 'REFUND'
+ ? '-'
+ : '+'}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
-
-
Net Bill Amount
-
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
+
+ Net Bill Amount
+
+
+ {(
+ lastTransaction?.AfterAdjustment || 0
+ ).toFixed(2)}
+
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {/* OLD CREDIT BAL */}
- {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit' && (
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {/* OLD CREDIT BAL */}
+ {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit' && (
<>
{table2Data.CustomerDetails[0]
.OldCreditBal > 0 ? (
@@ -1682,7 +1763,7 @@ const PrintStyle5 = ({
}
) : table2Data.CustomerDetails[0]
- .OldCreditBal < 0 ? (
+ .OldCreditBal < 0 ? (
{' '}
Opening Balance:{' '}
@@ -1695,30 +1776,30 @@ const PrintStyle5 = ({
>
)}
- {/* CURRENT CREDIT BAL */}
- {table2Data.CustomerDetails[0]
- .CurrentCreditBal > 0 ? (
-
- {' '}
- Current Advance Amount:{' '}
- {
- table2Data.CustomerDetails[0]
- .CurrentCreditBal
- }
-
- ) : table2Data.CustomerDetails[0]
- .CurrentCreditBal < 0 ? (
-
- {' '}
- Current Balance Amount:{' '}
- {Math.abs(
- table2Data.CustomerDetails[0]
- .CurrentCreditBal
- )}
-
- ) : null}
-
- )}
+ {/* CURRENT CREDIT BAL */}
+ {table2Data.CustomerDetails[0]
+ .CurrentCreditBal > 0 ? (
+
+ {' '}
+ Current Advance Amount:{' '}
+ {
+ table2Data.CustomerDetails[0]
+ .CurrentCreditBal
+ }
+
+ ) : table2Data.CustomerDetails[0]
+ .CurrentCreditBal < 0 ? (
+
+ {' '}
+ Current Balance Amount:{' '}
+ {Math.abs(
+ table2Data.CustomerDetails[0]
+ .CurrentCreditBal
+ )}
+
+ ) : null}
+
+ )}
{/*
TOTAL SAVING : 10.00
*/}
@@ -1729,54 +1810,54 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
- {' '}
-

{' '}
+
+ {' '}
+

{' '}
+
+
Scan to Pay
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
Scan to Pay
-
- {' '}
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(
- 2
- )}
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(
+ 2
+ )}
+
-
- )}
+ )}
)}
@@ -1786,7 +1867,7 @@ const PrintStyle5 = ({
extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
{/*
Split Payment:
*/}
{Object.keys(aggregatedPayments).map(
@@ -1862,7 +1943,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -1871,23 +1952,23 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -1907,138 +1988,138 @@ const PrintStyle5 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving
- the counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+
+
+ )}
)}
@@ -2267,8 +2348,8 @@ const PrintStyle5 = ({
{GlobaldummyData
? '100'
: Number(
- TotalOfferAmount + table2Data?.OverallDisc
- ).toFixed(2)}
+ TotalOfferAmount + table2Data?.OverallDisc
+ ).toFixed(2)}
{' '}
)}
@@ -2277,7 +2358,11 @@ const PrintStyle5 = ({
{' '}
Amount
:
{' '}
@@ -2343,20 +2428,38 @@ const PrintStyle5 = ({
{isEditedBill && lastTransaction && (
-
+
-
-
Bill Gross Amount
-
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
+
+ Bill Gross Amount
+
+
+ {(
+ lastTransaction?.BeforeAdjustment || 0
+ ).toFixed(2)}
+
{'Adjustment Amount'}
- {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ {lastTransaction?.AdjustmentType === 'REFUND'
+ ? '-'
+ : '+'}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
-
-
Net Bill Amount
-
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
+
+ Net Bill Amount
+
+
+ {(
+ lastTransaction?.AfterAdjustment || 0
+ ).toFixed(2)}
+
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {/* OLD CREDIT BAL */}
- {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit' && (
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {/* OLD CREDIT BAL */}
+ {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit' && (
<>
{table2Data.CustomerDetails[0].OldCreditBal >
- 0 ? (
+ 0 ? (
Advance Amount:
{
@@ -2424,7 +2543,7 @@ const PrintStyle5 = ({
}
) : table2Data.CustomerDetails[0]
- .OldCreditBal < 0 ? (
+ .OldCreditBal < 0 ? (
{' '}
Opening Balance:{' '}
@@ -2437,30 +2556,30 @@ const PrintStyle5 = ({
>
)}
- {/* CURRENT CREDIT BAL */}
- {table2Data.CustomerDetails[0].CurrentCreditBal >
+ {/* CURRENT CREDIT BAL */}
+ {table2Data.CustomerDetails[0].CurrentCreditBal >
0 ? (
-
- {' '}
- Current Advance Amount:{' '}
- {
- table2Data.CustomerDetails[0]
- .CurrentCreditBal
- }
-
- ) : table2Data.CustomerDetails[0]
- .CurrentCreditBal < 0 ? (
-
- {' '}
- Current Balance Amount:{' '}
- {Math.abs(
- table2Data.CustomerDetails[0]
- .CurrentCreditBal
- )}
-
- ) : null}
-
- )}
+
+ {' '}
+ Current Advance Amount:{' '}
+ {
+ table2Data.CustomerDetails[0]
+ .CurrentCreditBal
+ }
+
+ ) : table2Data.CustomerDetails[0]
+ .CurrentCreditBal < 0 ? (
+
+ {' '}
+ Current Balance Amount:{' '}
+ {Math.abs(
+ table2Data.CustomerDetails[0]
+ .CurrentCreditBal
+ )}
+
+ ) : null}
+
+ )}
{/*
TOTAL SAVING : 10.00
*/}
@@ -2471,47 +2590,47 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
- {' '}
-

{' '}
+
+ {' '}
+

{' '}
+
+
Scan to Pay
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
Scan to Pay
-
- {' '}
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )}
+ )}
)}
@@ -2521,7 +2640,7 @@ const PrintStyle5 = ({
extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
{/*
Split Payment:
*/}
{Object.keys(aggregatedPayments).map((paymentType) => (
@@ -2591,7 +2710,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2600,23 +2719,23 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -2636,138 +2755,138 @@ const PrintStyle5 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+
+
+ )}
)}
@@ -2814,7 +2933,7 @@ const PrintStyle5 = ({
/>
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -2869,10 +2988,10 @@ const PrintStyle5 = ({
? GlobalBilltext
? GlobalBilltext
: 'Cash' + ' Bill'
- : BillName ||
- (PaymentStatusSuccess?.length === 1
- ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
- : ' Bill')}{' '}
+ : BillName ||
+ (PaymentStatusSuccess?.length === 1
+ ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill'
+ : ' Bill')}{' '}
{/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
@@ -2881,13 +3000,15 @@ const PrintStyle5 = ({
)}
- {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
-
- Estimate{' '}
- {/* {SalesModePref?.SettingValue == 'Y' &&
+ {!estimatePrintHeader &&
+ table2Data?.OrderType === 'E' &&
+ estimateTitle && (
+
+ Estimate{' '}
+ {/* {SalesModePref?.SettingValue == 'Y' &&
`(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
-
- )}
+
+ )}
{' '}
-
{GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '}
- Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
-
-
}
+
+ {' '}
+ {GlobaldummyData ? formattedDate : Date1}
+ {SalesModePref?.SettingValue == 'Y' && (
+
+ {' '}
+ Name :{' '}
+ {table2Data?.SalesMode == 'R'
+ ? Retailshortname?.Comments
+ : Wholesaleshortname?.Comments}{' '}
+
+ )}
{' '}
{' '}
@@ -2912,10 +3039,10 @@ const PrintStyle5 = ({
{GlobaldummyData
? '553'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}{' '}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}{' '}
{' '}
@@ -2943,20 +3070,20 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
- ...tableHeaderStyle
+ ...tableHeaderStyle,
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- S.No
-
- )
+
+ S.No
+
+ )
: SLNO && (
-
- S.No
-
- )}
+
+ S.No
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -2975,78 +3102,80 @@ const PrintStyle5 = ({
: Item && 'ITEM /DES /'}{' '}
{GlobaldummyData
? GlobalQuantity && 'QTY'
- : Quantity && WeightasKg ? 'Qty/Kg' : 'Qty'}{' '}
+ : Quantity && WeightasKg
+ ? 'Qty/Kg'
+ : 'Qty'}{' '}
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
-
- )
+
+ HSN
+
+ )
: HsnCode && (
-
- HSN
-
- )}
+
+ HSN
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
-
- )
+
+ MRP
+
+ )
: MRP && (
-
- MRP
-
- )}
+
+ MRP
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- RATE
-
- )
+
+ RATE
+
+ )
: Rate && (
-
- RATE
-
- )}
+
+ RATE
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- DIS{' '}
-
- )
+
+ DIS{' '}
+
+ )
: Discount && (
-
- DIS{' '}
-
- )}
+
+ DIS{' '}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- TAX %{' '}
-
- )
+
+ TAX %{' '}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- TAX %{' '}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %{' '}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {' '}
- Amt{' '}
-
- )
+
+ {' '}
+ Amt{' '}
+
+ )
: Amount && (
-
- {' '}
- AMT{' '}
-
- )}
+
+ {' '}
+ AMT{' '}
+
+ )}
@@ -3063,24 +3192,24 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
- ...(index % 2 === 0 && rowtypeStyle === "even"
+ ...(index % 2 === 0 && rowtypeStyle === 'even'
? tableBodyStyle
- : index % 2 === 1 && rowtypeStyle === "odd"
+ : index % 2 === 1 && rowtypeStyle === 'odd'
? tableBodyStyle
- : {})
+ : {}),
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- {index + 1}
-
- )
+
+ {index + 1}
+
+ )
: SLNO && (
-
- {index + 1}
-
- )}
+
+ {index + 1}
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -3123,47 +3252,52 @@ const PrintStyle5 = ({
{item?.ProdName}
{(() => {
- const packages =
- (PackageDetails ?? []).filter(pkg => pkg.ProdId === item.ProdId);
+ const packages = (PackageDetails ?? []).filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ );
- const identifiers = item?.ProductIdentifierDtls ?? [];
+ const identifiers =
+ item?.ProductIdentifierDtls ?? [];
return packages.length > 0 ? (
// ================= PACKAGE EXISTS =================
{/* 📦 Package Details */}
{packages.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
+
+ {pkg.ParcelCount} PCS {pkg.ParcelQty}{' '}
+ PACK ({pkg.ParcelType})
))}
{/* 🏷 Brand */}
- {item?.BrandName && {item.BrandName}
}
+ {item?.BrandName && (
+ {item.BrandName}
+ )}
{/* 🔢 Serial / IMEI */}
{identifiers.map((d, i) => {
const values = [
d.SerialNumber,
d.IMEI1,
- d.IMEI2
+ d.IMEI2,
].filter(Boolean);
if (values.length === 0) return null;
return (
-
- {values.join(", ")}
-
+ {values.join(', ')}
);
})}
{/* 📝 Description from first identifier */}
{identifiers?.[0]?.Description && (
- {identifiers?.[0]?.Description}
- )}
+ {identifiers?.[0]?.Description}
+ )}
-
{/* 🔢 Quantity */}
-
@@ -3177,45 +3311,42 @@ const PrintStyle5 = ({
{/* 📏 Size + UOM */}
-
{UomPrint?.SettingValue === 'Y' && (
<>
- {item?.Size || "1"}{" "}
- {item?.SinglePc === "Y"
- ? "PCS"
- : item?.Type !== "C"
+ {item?.Size || '1'}{' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
? item?.UomName
- : "COMBO"}
+ : 'COMBO'}
>
)}
-
{/* 🏷 Brand */}
- {item?.BrandName &&
{item.BrandName}
}
+ {item?.BrandName && (
+
{item.BrandName}
+ )}
{/* 🔢 Serial / IMEI */}
{identifiers.map((d, i) => {
const values = [
d.SerialNumber,
d.IMEI1,
- d.IMEI2
+ d.IMEI2,
].filter(Boolean);
if (values.length === 0) return null;
return (
-
- {values.join(", ")}
-
+
{values.join(', ')}
);
})}
{/* 📝 Description from first identifier */}
- {identifiers?.[0]?.Description && (
-
{identifiers?.[0]?.Description}
- )}
-
+ {identifiers?.[0]?.Description && (
+
{identifiers?.[0]?.Description}
+ )}
{/* 🔢 Quantity */}
@@ -3233,76 +3364,80 @@ const PrintStyle5 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
-
- )
+
+ {item?.HSN}
+
+ )
: HsnCode && (
-
- {item?.HSN}
-
- )}
+
+ {item?.HSN}
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
-
- )
+
+ {item?.MRP}
+
+ )
: MRP && (
-
- {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
-
- )}
+
+ {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
-
- )
+
+ {item?.Rate}
+
+ )
: Rate && (
-
- {item?.Rate}
-
- )}
+
+ {item?.Rate}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item?.discount}
-
- )
+
+ {item?.discount}
+
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
-
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage}
-
- )
+
+ {item?.ProdTaxPercentage}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
-
- )
+
+ {item?.TotalAmt}
+
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
-
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
)
)}
@@ -3329,20 +3464,20 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
- ...tableHeaderStyle
+ ...tableHeaderStyle,
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- S.No
-
- )
+
+ S.No
+
+ )
: SLNO && (
-
- S.No
-
- )}
+
+ S.No
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -3361,78 +3496,80 @@ const PrintStyle5 = ({
: Item && 'ITEM /DES /'}{' '}
{GlobaldummyData
? GlobalQuantity && 'QTY'
- : Quantity && WeightasKg ? 'Qty/Kg' : 'Qty'}{' '}
+ : Quantity && WeightasKg
+ ? 'Qty/Kg'
+ : 'Qty'}{' '}
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
-
- )
+
+ HSN
+
+ )
: HsnCode && (
-
- HSN
-
- )}
+
+ HSN
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
-
- )
+
+ MRP
+
+ )
: MRP && (
-
- MRP
-
- )}
+
+ MRP
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- RATE
-
- )
+
+ RATE
+
+ )
: Rate && (
-
- RATE
-
- )}
+
+ RATE
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- DIS{' '}
-
- )
+
+ DIS{' '}
+
+ )
: Discount && (
-
- DIS{' '}
-
- )}
+
+ DIS{' '}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- TAX %{' '}
-
- )
+
+ TAX %{' '}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- TAX %{' '}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ TAX %{' '}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {' '}
- Amt{' '}
-
- )
+
+ {' '}
+ Amt{' '}
+
+ )
: Amount && (
-
- {' '}
- AMT{' '}
-
- )}
+
+ {' '}
+ AMT{' '}
+
+ )}
@@ -3449,24 +3586,24 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
- ...(index % 2 === 0 && rowtypeStyle === "even"
+ ...(index % 2 === 0 && rowtypeStyle === 'even'
? tableBodyStyle
- : index % 2 === 1 && rowtypeStyle === "odd"
+ : index % 2 === 1 && rowtypeStyle === 'odd'
? tableBodyStyle
- : {})
+ : {}),
}}
>
{GlobaldummyData
? GlobalSlNo && (
-
- {index + 1}
-
- )
+
+ {index + 1}
+
+ )
: SLNO && (
-
- {index + 1}
-
- )}
+
+ {index + 1}
+
+ )}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
@@ -3480,7 +3617,7 @@ const PrintStyle5 = ({
) : (
<>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
+ {UomPrint?.SettingValue === 'Y' && (
{item?.Size +
item?.UomName +
@@ -3489,7 +3626,7 @@ const PrintStyle5 = ({
? GlobalQuantity && item?.SalesQty
: item?.SalesQty)}
- }
+ )}
>
)}
@@ -3507,16 +3644,18 @@ const PrintStyle5 = ({
<>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' ? ((item?.Size ? item?.Size : '1') +
- (item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO')) : "" +
- '-' +
- (GlobaldummyData
- ? GlobalQuantity && item?.SalesQty
- : item?.SalesQty)}
+ {UomPrint?.SettingValue === 'Y'
+ ? (item?.Size ? item?.Size : '1') +
+ (item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO')
+ : '' +
+ '-' +
+ (GlobaldummyData
+ ? GlobalQuantity && item?.SalesQty
+ : item?.SalesQty)}
>
)}
@@ -3524,76 +3663,80 @@ const PrintStyle5 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
-
- )
+
+ {item?.HSN}
+
+ )
: HsnCode && (
-
- {item?.HSN}
-
- )}
+
+ {item?.HSN}
+
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
-
- )
+
+ {item?.MRP}
+
+ )
: MRP && (
-
- {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
-
- )}
+
+ {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
+
+ )}
{GlobaldummyData
? GlobalRate && (
-
- {item?.Rate}
-
- )
+
+ {item?.Rate}
+
+ )
: Rate && (
-
- {item?.Rate}
-
- )}
+
+ {item?.Rate}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item?.discount}
-
- )
+
+ {item?.discount}
+
+ )
: Discount && (
-
- {item?.Type !== 'C'
- ? (item?.OfferAmt || (item?.DiscountAmt / item?.SalesQty) || 0)
- : (item?.OfferValue || (item?.DiscountAmt / item?.SalesQty) || 0)}
-
- )}
+
+ {item?.Type !== 'C'
+ ? item?.OfferAmt ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0
+ : item?.OfferValue ||
+ item?.DiscountAmt / item?.SalesQty ||
+ 0}
+
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage}
-
- )
+
+ {item?.ProdTaxPercentage}
+
+ )
: Tax &&
- table2Data?.OrderType !== 'E' && (
-
- {item?.ProdTaxPercentage || 0}
-
- )}
+ table2Data?.OrderType !== 'E' && (
+
+ {item?.ProdTaxPercentage || 0}
+
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- {item?.TotalAmt}
-
- )
+
+ {item?.TotalAmt}
+
+ )
: Amount && (
-
- {' '}
- {item?.Type !== 'C'
- ? item?.TotalAmt - (item?.OfferAmt || 0)
- : item?.TotalAmt - (item?.OfferValue || 0)}
-
- )}
+
+ {' '}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || 0)}
+
+ )}
)
)}
@@ -3767,8 +3910,8 @@ const PrintStyle5 = ({
{GlobaldummyData
? '100'
: Number(
- TotalOfferAmount + table2Data?.OverallDisc
- ).toFixed(2)}
+ TotalOfferAmount + table2Data?.OverallDisc
+ ).toFixed(2)}
{' '}
)}
@@ -3777,7 +3920,11 @@ const PrintStyle5 = ({
{' '}
Amount
:
{' '}
@@ -3846,20 +3993,36 @@ const PrintStyle5 = ({
{isEditedBill && lastTransaction && (
-
+
-
-
Bill Gross Amount
-
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
+
+ Bill Gross Amount
+
+
+ {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
+
{'Adjustment Amount'}
- {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
- {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
+ {lastTransaction?.AdjustmentType === 'REFUND'
+ ? '-'
+ : '+'}
+ {Math.abs(
+ (lastTransaction?.BeforeAdjustment ?? 0) -
+ (lastTransaction?.AfterAdjustment ?? 0)
+ ).toFixed(2)}
-
-
Net Bill Amount
-
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
+
+ Net Bill Amount
+
+
+ {(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
+
)}
{GlobaldummyData
? GlobalCredit && (
-
-
Advance Amount:
- Opening Balance:
-
- )
+
+
Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {/* OLD CREDIT BAL */}
- {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit' && (
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {/* OLD CREDIT BAL */}
+ {PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit' && (
<>
{table2Data.CustomerDetails[0].OldCreditBal > 0 ? (
@@ -3935,25 +4112,25 @@ const PrintStyle5 = ({
>
)}
- {/* CURRENT CREDIT BAL */}
- {table2Data.CustomerDetails[0].CurrentCreditBal > 0 ? (
-
- {' '}
- Current Advance Amount:{' '}
- {table2Data.CustomerDetails[0].CurrentCreditBal}
-
- ) : table2Data.CustomerDetails[0].CurrentCreditBal <
- 0 ? (
-
- {' '}
- Current Balance Amount:{' '}
- {Math.abs(
- table2Data.CustomerDetails[0].CurrentCreditBal
- )}
-
- ) : null}
-
- )}
+ {/* CURRENT CREDIT BAL */}
+ {table2Data.CustomerDetails[0].CurrentCreditBal > 0 ? (
+
+ {' '}
+ Current Advance Amount:{' '}
+ {table2Data.CustomerDetails[0].CurrentCreditBal}
+
+ ) : table2Data.CustomerDetails[0].CurrentCreditBal <
+ 0 ? (
+
+ {' '}
+ Current Balance Amount:{' '}
+ {Math.abs(
+ table2Data.CustomerDetails[0].CurrentCreditBal
+ )}
+
+ ) : null}
+
+ )}
{/*
TOTAL SAVING : 10.00
*/}
@@ -3964,47 +4141,47 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalQrcodet && (
-
- {' '}
-

{' '}
+
+ {' '}
+

{' '}
+
+
Scan to Pay
+
+ {' '}
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
Scan to Pay
-
- {' '}
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
-
-
- )
+ )
: Qrcodet &&
- paymentTypeUPI && (
-
-
-
Scan to Pay
-
- ₹
- {GlobaldummyData
- ? '1,066'
- : Number(table2Data?.NetAmount).toFixed(2)}
+ paymentTypeUPI && (
+
+
+
Scan to Pay
+
+ ₹
+ {GlobaldummyData
+ ? '1,066'
+ : Number(table2Data?.NetAmount).toFixed(2)}
+
-
- )}
+ )}
)}
@@ -4013,7 +4190,7 @@ const PrintStyle5 = ({
{table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
- {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
+ {PaymentStatusSuccess?.length > 1 && !isEditedBill && (
<>
{/*
Split Payment:
*/}
{Object.keys(aggregatedPayments).map((paymentType) => (
@@ -4086,7 +4263,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle,
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4095,21 +4272,21 @@ const PrintStyle5 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
+ )}
)}
@@ -4129,137 +4306,137 @@ const PrintStyle5 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable
- or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
- : TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
-
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
+
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable
+ or refundable.
- ))}
-
-
- )}
+
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
+ : TermsnAdCondition == true &&
+ TermsAndConditions?.length > 0 && (
+
+
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
-
- Signature
-
-

-
- )
+
+ Signature
+
+

+
+ )
: Signature == true && (
-
-
- Signature
-
-

-
- )}
+
+ Signature
+
+
+
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
index 433e93c..480355a 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
@@ -46,7 +46,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -73,7 +73,7 @@ const Printstyle6 = ({
sportsAppPreference,
MembershipApplied = null,
}) => {
- console.log(table2Data, 'table2Data22222222222222');
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
index e2c9f0e..16ce9bc 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
@@ -43,7 +43,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -70,6 +70,7 @@ const PrintStyle7 = ({
SalesModePref,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
index 867c4e4..8f8b9c3 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
@@ -46,7 +46,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -76,6 +76,7 @@ const Printstyle8 = ({
SalesModePref,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
index 5305b5c..ac84911 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
@@ -46,7 +46,7 @@ import {
PreferenceData,
} from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -73,6 +73,7 @@ const PrintStyle9 = ({
SalesModePref,
MembershipApplied = null,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCA4Standard.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCA4Standard.jsx
index 3176e9a..271799a 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCA4Standard.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCA4Standard.jsx
@@ -34,7 +34,7 @@ import {
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
// import "../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/DCPrintStyle1.scss";
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import signature from '../../../../Images/signatureimage.jpg';
const DCInvoiceTemplate = ({
@@ -50,6 +50,7 @@ const DCInvoiceTemplate = ({
printDatas,
DCPrintTemplateDtl,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const formatDate = (dateString = '') => {
const date = new Date(dateString);
const day = date.getDate().toString().padStart(2, '0');
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintA4Style11.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintA4Style11.jsx
index 8f99621..713eff8 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintA4Style11.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintA4Style11.jsx
@@ -33,7 +33,7 @@ import {
GlobalthemeFormat,
} from '../../../../Features/ThemeChange/ThemeChange';
import signature from '../../../../Images/signatureimage.jpg';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import { isMobile } from 'react-device-detect';
const DCPrintA4Style11 = ({
@@ -57,6 +57,7 @@ const DCPrintA4Style11 = ({
acc[item.ConfigName] = true;
return acc;
}, {});
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalIsnotes = useSelector(Globalnotes);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
console.log(FieldDetails, 'FieldDetails');
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintStyleA5.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintStyleA5.jsx
index 8686133..fd300d1 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintStyleA5.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCA4/DCPrintStyleA5.jsx
@@ -40,7 +40,7 @@ import {
GlobalthemeFormat,
} from '../../../../Features/ThemeChange/ThemeChange';
import signature from '../../../../Images/signatureimage.jpg';
-import QRCode from 'react-qr-code';
+
const DCPrintStyleA5 = ({
BranchName,
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle1.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle1.jsx
index e7dca4e..87adc21 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle1.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle1.jsx
@@ -36,7 +36,6 @@ import {
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss';
-import QRCode from 'react-qr-code';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
@@ -54,11 +53,13 @@ const DCPrintStyle1 = ({
printDatas,
DCPrintTemplateDtl,
}) => {
+
const dispatch = useDispatch();
let FieldDetails = DCPrintTemplateDtl?.FieldDetails?.reduce((acc, item) => {
acc[item.ConfigName] = true;
return acc;
}, {});
+
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
console.log(Item, 'Item');
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle10.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle10.jsx
index 9a5ddfb..f63ba64 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle10.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle10.jsx
@@ -35,7 +35,7 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
-import QRCode from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle11.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle11.jsx
index 10ded40..a54ac11 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle11.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle11.jsx
@@ -37,7 +37,7 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
-import QRCode from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle12.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle12.jsx
index 0ec42e5..ffd3548 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle12.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle12.jsx
@@ -38,7 +38,6 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss';
-import QRCode from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle3.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle3.jsx
index bba185b..dae6e2d 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle3.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle3.jsx
@@ -34,7 +34,6 @@ import {
GlobalRowType,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss';
-import QRCode from 'react-qr-code';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
@@ -78,6 +77,7 @@ const DCPrintStyle3 = ({
acc[item.ConfigName] = true;
return acc;
}, {});
+
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
// const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle4.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle4.jsx
index c585bde..945fe70 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle4.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle4.jsx
@@ -34,7 +34,6 @@ import {
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
-import QRCode from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle5.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle5.jsx
index d808a8f..afae79e 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle5.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle5.jsx
@@ -36,7 +36,7 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.scss';
-import QRCode from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle6.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle6.jsx
index 1428629..1838b4a 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle6.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle6.jsx
@@ -36,7 +36,6 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
-import QRCode from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle7.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle7.jsx
index 8442e79..d59da53 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle7.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle7.jsx
@@ -33,7 +33,7 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.scss';
-import QRCode from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle8.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle8.jsx
index b2efa52..4753fe1 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle8.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle8.jsx
@@ -34,11 +34,8 @@ import {
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
-import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
import signature from '../../../../Images/signatureimage.jpg';
-import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
const DCPrintstyle8 = ({
diff --git a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle9.jsx b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle9.jsx
index e78ab8c..5b94ff1 100644
--- a/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle9.jsx
+++ b/src/Pages/DeliveryChallan/DCPrintTemplates/DCThermalPrinter/DCPrintStyle9.jsx
@@ -36,7 +36,7 @@ import {
} from '../../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../../Features/BookingScreen/BookingData/BookingData';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.scss';
-import QRCode from 'react-qr-code';
+
import signature from '../../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA4.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA4.jsx
index 9920871..706c68c 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA4.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA4.jsx
@@ -9,8 +9,7 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
-
+import QRCodeModule from 'react-qr-code';
const PurchaseOrdPrintA4 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas }) => {
@@ -24,6 +23,7 @@ const PurchaseOrdPrintA4 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image
acc[item.ConfigName] = true;
return acc;
}, {});
+ const QRCode = QRCodeModule.default || QRCodeModule;
const SLNO = FieldDetails?.["Sl.No"];
const Item = FieldDetails?.["Item"];
const MRP = FieldDetails?.["MRP"];
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA5.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA5.jsx
index e154257..ae87ab3 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA5.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdPrintA5.jsx
@@ -9,7 +9,6 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
const PurchaseOrdPrintA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas }) => {
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle11.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle11.jsx
index 1d38222..2cea5ad 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle11.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle11.jsx
@@ -25,7 +25,8 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import "../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss";
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import signature from "../../../Images/signatureimage.jpg"
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
@@ -35,6 +36,7 @@ const PurchaseOrdStyle11 = ({ index, ExtraChargeTotal, Date1, base64Image, total
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint)
+ const QRCode = QRCodeModule.default || QRCodeModule;
// const FieldDetails = useSelector(GloabalFieldDetails);
const FieldDetails = printDatas?.FieldDetails?.reduce((acc, item) => {
acc[item.ConfigName] = true;
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle8.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle8.jsx
index 2711bc1..b74a308 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle8.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle8.jsx
@@ -24,7 +24,6 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
import signature from "../../../Images/signatureimage.jpg"
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle9.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle9.jsx
index 1d93fb8..d088cfb 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle9.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle old srinath/PurchaseOrdStyle9.jsx
@@ -24,7 +24,8 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import signature from "../../../Images/signatureimage.jpg"
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
@@ -32,6 +33,7 @@ const PurchaseOrdStyle9 = ({ index, ExtraChargeTotal, Date1, totalQuantityFilter
OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PrintGreeting, printDatas }) => {
const dispatch = useDispatch();
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalUpiID = useSelector(GlobalUpiIDprint)
// const FieldDetails = useSelector(GloabalFieldDetails);
const FieldDetails = printDatas?.FieldDetails?.reduce((acc, item) => {
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA4.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA4.jsx
index efbf0dc..5a0e265 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA4.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA4.jsx
@@ -9,7 +9,8 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import { isMobile } from 'react-device-detect';
@@ -19,6 +20,7 @@ const PurchaseOrdPrintA4 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
// const FieldDetails = useSelector(GloabalFieldDetails);
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalIsnotes = useSelector(Globalnotes);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
const FieldDetails = printDatas?.FieldDetails?.reduce((acc, item) => {
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA5.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA5.jsx
index 6e8c435..60d7d72 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA5.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdPrintA5.jsx
@@ -9,7 +9,7 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+
import { isMobile } from 'react-device-detect';
const PurchaseOrdPrintA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle10.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle10.jsx
index f7acbc4..b42b119 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle10.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle10.jsx
@@ -35,7 +35,7 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -55,6 +55,7 @@ const PurchaseOrdStyle10 = ({
PrintGreeting,
printDatas,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
// const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle11.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle11.jsx
index d84f124..e741397 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle11.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle11.jsx
@@ -37,7 +37,7 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -67,7 +67,7 @@ const PurchaseOrdStyle11 = ({
acc[item.ConfigName] = true;
return acc;
}, {});
-
+const QRCode = QRCodeModule.default || QRCodeModule;
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
const MRP = FieldDetails?.['MRP'];
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle6.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle6.jsx
index 95002c6..3460928 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle6.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle6.jsx
@@ -36,7 +36,7 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { isMobile } from 'react-device-detect';
@@ -61,7 +61,7 @@ const PurchaseOrdStyle6 = ({
acc[item.ConfigName] = true;
return acc;
}, {});
-
+const QRCode = QRCodeModule.default || QRCodeModule;
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
const MRP = FieldDetails?.['MRP'];
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle8.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle8.jsx
index 84ec5c8..8d989f8 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle8.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle8.jsx
@@ -36,7 +36,6 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
diff --git a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle9.jsx b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle9.jsx
index cf8e907..178bcec 100644
--- a/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle9.jsx
+++ b/src/Pages/PurchaseOrder/PurchsasePrintStyle/PurchaseOrdStyle9.jsx
@@ -36,7 +36,7 @@ import {
} from '../../../Features/ThemeChange/ThemeChange';
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.scss';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import signature from '../../../Images/signatureimage.jpg';
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
import { isMobile } from 'react-device-detect';
@@ -55,6 +55,7 @@ const PurchaseOrdStyle9 = ({
PrintGreeting,
printDatas,
}) => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
const GlobalUpiID = useSelector(GlobalUpiIDprint);
// const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyle12.jsx b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyle12.jsx
index 6017fd2..d16b6ad 100644
--- a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyle12.jsx
+++ b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyle12.jsx
@@ -17,7 +17,6 @@ import {
} from '../../../Features/ThemeChange/ThemeChange'
import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData';
import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss'
-import QRCode from 'react-qr-code';
import signature from "../../../Images/signatureimage.jpg"
import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin';
diff --git a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA4.jsx b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA4.jsx
index 3fa62d5..01d451d 100644
--- a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA4.jsx
+++ b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA4.jsx
@@ -9,12 +9,13 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
const PurPrintStyleA4 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas }) => {
const GlobalthemeFormatr = useSelector(GlobalthemeFormat)
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const FieldDetails = useSelector(GloabalFieldDetails);
diff --git a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA5.jsx b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA5.jsx
index f3b4519..81d466e 100644
--- a/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA5.jsx
+++ b/src/Pages/PurchaseQuotation/PurchasePrintTemplate old srinath/PurPrintStyleA5.jsx
@@ -12,7 +12,7 @@ import '../../../Styles/BookingScreen/PrintTemplates/A4/PrintA4Style11.scss'
import { useSelector } from 'react-redux';
import { GloabalFieldDetails, GlobalBillName, Globalnotes, GlobalprintAmount, GlobalprintDiscount, GlobalprintHsnCode, GlobalprintItem, GlobalprintMRP, GlobalprintQrcodet, GlobalprintQuantity, GlobalprintRate, GlobalprintSignature, GlobalprintSlNo, GlobalprinttermsAndConditions, GlobalPritdummyData, GlobalSignatureImage, GlobalthemeFormat } from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
const PurPrintStyleA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas }) => {
@@ -22,6 +22,7 @@ const PurPrintStyleA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, t
const FieldDetails = useSelector(GloabalFieldDetails);
const GlobalIsnotes = useSelector(Globalnotes);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
+ const QRCode = QRCodeModule.default || QRCodeModule;
console.log(FieldDetails, "FieldDetails")
const SLNO = FieldDetails?.["Sl.No"];
const Item = FieldDetails?.["Item"];
diff --git a/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA4.jsx b/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA4.jsx
index febd14f..2bf0426 100644
--- a/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA4.jsx
+++ b/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA4.jsx
@@ -24,7 +24,8 @@ import {
GlobalSelectedPrintHeaderColor,
} from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
+
import { isMobile } from 'react-device-detect';
@@ -33,6 +34,7 @@ const PurPrintStyleA4 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, t
const GlobalthemeFormatr = useSelector(GlobalthemeFormat)
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
+ const QRCode = QRCodeModule.default || QRCodeModule;
// const FieldDetails = useSelector(GloabalFieldDetails);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
diff --git a/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA5.jsx b/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA5.jsx
index 97e6aea..3766ae3 100644
--- a/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA5.jsx
+++ b/src/Pages/PurchaseQuotation/PurchasePrintTemplate/PurPrintStyleA5.jsx
@@ -26,7 +26,7 @@ import {
GlobalPritdummyData,
} from '../../../Features/ThemeChange/ThemeChange';
import signature from "../../../Images/signatureimage.jpg"
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import { isMobile } from 'react-device-detect';
const PurPrintStyleA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, totalQuantityFilter = 6, BranchCity, BranchZip, CashierName, totalQuantity,
@@ -39,6 +39,7 @@ const PurPrintStyleA5 = ({ index, ExtraChargeTotal, UpiId, Date1, base64Image, t
acc[item.ConfigName] = true;
return acc;
}, {});
+ const QRCode = QRCodeModule.default || QRCodeModule;
const GlobalIsnotes = useSelector(Globalnotes);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
const GlobaldummyData = useSelector(GlobalPritdummyData);
diff --git a/src/Pages/Reports/MenuQRCode/MenuQRCode.jsx b/src/Pages/Reports/MenuQRCode/MenuQRCode.jsx
index 060f019..1805311 100644
--- a/src/Pages/Reports/MenuQRCode/MenuQRCode.jsx
+++ b/src/Pages/Reports/MenuQRCode/MenuQRCode.jsx
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
import { useDispatch } from 'react-redux';
import { Messages } from '../../../Components/Notifications/Messages';
import FormHeader from '../../PageComponents/FormHeader';
-import QRCode from 'react-qr-code';
import PublicQrCodeShare from '../PublicQrCodeShare/PublicQrCodeShare';
import { encryptObject, getSession } from '../../../Services/Others';
import { PublicQrCodepost } from '../../../Features/ConfigMasterPage/ConfigMasterPage';
diff --git a/src/Pages/Reports/PublicQrCode.jsx b/src/Pages/Reports/PublicQrCode.jsx
index 44fe89d..abd0891 100644
--- a/src/Pages/Reports/PublicQrCode.jsx
+++ b/src/Pages/Reports/PublicQrCode.jsx
@@ -13,7 +13,7 @@ import { PlusOutlined, DownloadOutlined, EyeOutlined } from '@ant-design/icons';
import { MdClear } from 'react-icons/md';
import { getDineinTableData } from '../../Features/Dinein/Dinein';
import { encryptObject, getSession } from '../../Services/Others';
-import QRCode from 'react-qr-code';
+import QRCodeModule from 'react-qr-code';
import jsPDF from 'jspdf';
import html2canvas from 'html2canvas';
import { Modal } from 'antd';
@@ -37,6 +37,7 @@ const items = [
];
const PublicQrCode = () => {
+ const QRCode = QRCodeModule.default || QRCodeModule;
const dispatch = useDispatch();
console.log('PublicQrCode component rendered', `${subDirectory}`);
const appPreferences = useSelector(ApplicationPreferences);