From 139789f085cfc12b18b8b289ded748ff864019ff Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Feb 2026 18:40:27 +0530 Subject: [PATCH] conflict-updated --- .../BookingScreen/BookingData/BookingData.js | 12 +- .../BSBillingTable4/BSBilling4Payment.jsx | 70 +- .../OtherConponents/Reprint/BSReprint.jsx | 7 +- .../PrintTemplates/A4/A4Standard.jsx | 3830 +++++++++++------ 4 files changed, 2678 insertions(+), 1241 deletions(-) diff --git a/src/Features/BookingScreen/BookingData/BookingData.js b/src/Features/BookingScreen/BookingData/BookingData.js index 97bb72b..9598fbc 100644 --- a/src/Features/BookingScreen/BookingData/BookingData.js +++ b/src/Features/BookingScreen/BookingData/BookingData.js @@ -18,6 +18,15 @@ export const getNotification = createAsyncThunk( ); } ); +export const getStockDetailsByVariantName = createAsyncThunk( + 'BookingData/getStockDetailsByVariantName', + async (data) => { + return await axiosRetailInstanceData.post( + `/productVariantListByname`, + data + ); + } +); export const getLayoutCategories = createAsyncThunk( 'BookingData/getLayoutCategories', @@ -1449,8 +1458,7 @@ export const CustomerOrderList = createAsyncThunk( return await axiosRetailInstanceData.get( `/LastBuyProductList?compId=${CompId}&branchId=${BranchId}&appId=${AppId}&mobileNo=${MobileNo}&fromDate=${FromDate}&toDate=${ToDate}` ); - } - else if ( + } else if ( AppId != null && AppId != undefined && CompId != null && diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx index e74dd18..6b6a3a1 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingTable4/BSBilling4Payment.jsx @@ -3789,40 +3789,7 @@ const BSBilling4Payment = () => { )} - {/* Customer Orders */} - {GetCustId && ( - - {' '} -
{ - if ( - CheckBookingStatus !== 'Close' && - !addnewAccess && - !(OrderCardDetail?.length > 0) - ) { - setCustomerPreviesOrders(true); - } - }} - style={{ - cursor: OrderCardDetail?.length > 0 && 'not-allowed', - color: - OrderCardDetail?.length > 0 || - (OrderCardDetail?.length > 0 && - GetCustId?.CustMobile === undefined) - ? 'gray' - : 'rgb(18, 146, 238)', - fontSize: '25px', - display: 'flex', - alignItems: 'center', - height: '2.46rem', - width: '1.5rem', - }} - > - -
-
- )} + {OtherServicesglobal && OrderCardDetail.length >= 1 && ( {' '} @@ -3859,6 +3826,41 @@ const BSBilling4Payment = () => { {/* */} )} + + {/* Customer Orders */} + {GetCustId && ( + + {' '} +
{ + if ( + CheckBookingStatus !== 'Close' && + !addnewAccess && + !(OrderCardDetail?.length > 0) + ) { + setCustomerPreviesOrders(true); + } + }} + style={{ + cursor: OrderCardDetail?.length > 0 && 'not-allowed', + color: + OrderCardDetail?.length > 0 || + (OrderCardDetail?.length > 0 && + GetCustId?.CustMobile === undefined) + ? 'gray' + : 'rgb(18, 146, 238)', + fontSize: '25px', + display: 'flex', + alignItems: 'center', + height: '2.46rem', + width: '1.5rem', + }} + > + +
+
+ )} {tabledata?.length > 0 && (
{tableOptions diff --git a/src/Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx b/src/Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx index 61056a2..db26e13 100644 --- a/src/Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx +++ b/src/Pages/BookingScreen/Components/OtherConponents/Reprint/BSReprint.jsx @@ -815,6 +815,7 @@ function BSReprint({ setOpenModel = () => { } }) { {(page - 1) * 10 + index + 1} ), }, + { title: 'Bill No', dataIndex: 'BillNo', @@ -1420,7 +1421,7 @@ function BSReprint({ setOpenModel = () => { } }) { CreatedDate={orderDetail?.CreatedDate} PaymentStatus={reprintData?.[0]?.OrderPaymentDtl} Preference={SettingDataSelector} - + printDatas={printDatas} />
))} @@ -1553,7 +1554,7 @@ function BSReprint({ setOpenModel = () => { } }) { label: option.ConfigName, }))} label={ - + } className="field-DropDown-Emp" onChangeFunction={(e) => reprintReasonDropDownChange(e)} @@ -1748,6 +1749,7 @@ function BSReprint({ setOpenModel = () => { } }) { CreatedDate={orderDetail?.CreatedDate} PaymentStatus={reprintData?.[0]?.OrderPaymentDtl} Preference={SettingDataSelector} + printDatas={printDatas} /> ))} @@ -1809,6 +1811,7 @@ function BSReprint({ setOpenModel = () => { } }) { CreatedDate={orderDetail?.CreatedDate} PaymentStatus={reprintData?.[0]?.OrderPaymentDtl} Preference={SettingDataSelector} + printDatas={printDatas} /> ))} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx index 993b6a0..140924d 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx @@ -1,10 +1,10 @@ -import React from "react"; -import { useDispatch, useSelector } from "react-redux"; +import React from 'react'; +import { useDispatch, useSelector } from 'react-redux'; import { extractLastNumber, extractLastNumberOrderId, -} from "../../../../Services/Others"; -import Logo from '../../../../Images/Logo.jpg' +} from '../../../../Services/Others'; +import Logo from '../../../../Images/Logo.jpg'; import { GlobalprintSlNo, GlobalprintItem, @@ -27,14 +27,19 @@ import { GlobalprintCashierName, GlobalprintLogo, GlobalprintTax, -} from "../../../../Features/ThemeChange/ThemeChange"; -import "../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss"; -import QRCode from "react-qr-code"; -import { GlobalUpiIDprint, PreferenceData } from "../../../../Features/BookingScreen/BookingData/BookingData"; -import signature from "../../../../Images/signatureimage.jpg" + GlobalSelectedPrintHeaderColor, +} from '../../../../Features/ThemeChange/ThemeChange'; +import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss'; +import QRCode from 'react-qr-code'; +import { + GlobalUpiIDprint, + PreferenceData, +} from '../../../../Features/BookingScreen/BookingData/BookingData'; +import signature from '../../../../Images/signatureimage.jpg'; import { isMobile } from 'react-device-detect'; -const InvoiceTemplate = ({ index, +const InvoiceTemplate = ({ + index, totalQuantityFilter, Date1, CashierName, @@ -48,23 +53,27 @@ const InvoiceTemplate = ({ index, PrintLogo, PrintGreeting, base64Image, - printDatas, isPdf, sportsAppPreference, MembershipApplied = null }) => { + printDatas, + isPdf, + sportsAppPreference, + MembershipApplied = null, +}) => { const dispatch = useDispatch(); const GlobalUpiID = useSelector(GlobalUpiIDprint); const FieldDetails = useSelector(GloabalFieldDetails); - console.log(table2Data, "FieldDetails") - const SLNO = FieldDetails?.["Sl.No"]; - const Item = FieldDetails?.["Item"]; - console.log(Item, "Item") - const MRP = FieldDetails?.["MRP"]; - const Discount = FieldDetails?.["Discount"]; - const Quantity = FieldDetails?.["Quantity"]; - const Tax = FieldDetails?.["Tax"]; - const Rate = FieldDetails?.["Rate"]; - const Amount = FieldDetails?.["Amount"]; - const HsnCode = FieldDetails?.["HsnCode"]; - const Qrcodet = FieldDetails?.["Qrcode"]; - const LogoField = FieldDetails?.["Logo"]; + console.log(table2Data, 'FieldDetails'); + const SLNO = FieldDetails?.['Sl.No']; + const Item = FieldDetails?.['Item']; + console.log(Item, 'Item'); + const MRP = FieldDetails?.['MRP']; + const Discount = FieldDetails?.['Discount']; + const Quantity = FieldDetails?.['Quantity']; + const Tax = FieldDetails?.['Tax']; + const Rate = FieldDetails?.['Rate']; + const Amount = FieldDetails?.['Amount']; + const HsnCode = FieldDetails?.['HsnCode']; + const Qrcodet = FieldDetails?.['Qrcode']; + const LogoField = FieldDetails?.['Logo']; const WeightasKg = FieldDetails?.['Weight']; const GlobalSlNo = useSelector(GlobalprintSlNo); const GlobalItem = useSelector(GlobalprintItem); @@ -81,44 +90,50 @@ const InvoiceTemplate = ({ index, 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 GlobalLogo = useSelector(GlobalprintLogo); const SettingData = useSelector(PreferenceData); - const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y' + const estimatePrintHeader = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimateprintheader', + )?.SettingValue === 'Y'; const keysLength = Object.keys(table2Data ?? {}).length; - console.log(GlobalDiscount, Discount, "Discount"); + console.log(GlobalDiscount, Discount, 'Discount'); - let BankDetails = table2Data?.BankDetails - 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"]; - console.log(BankDetails, "GlobalthemeFormatr"); - console.log(table2Data, "FormatThemekjhjk", PaymentStatus) + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + + let BankDetails = table2Data?.BankDetails; + 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']; + console.log(BankDetails, 'GlobalthemeFormatr'); + console.log(table2Data, 'FormatThemekjhjk', PaymentStatus); if (keysLength > 0) { dispatch(changeReprintDataFound(true)); } const currentDate = new Date(); - const day = currentDate.getDate().toString().padStart(2, "0"); + const day = currentDate.getDate().toString().padStart(2, '0'); const monthNames = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec", + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec', ]; const monthIndex = currentDate.getMonth(); const year = currentDate.getFullYear().toString().slice(-2); @@ -126,15 +141,15 @@ const InvoiceTemplate = ({ index, const formattedDate = `${day}-${monthNames[monthIndex]}-${year}`; const TakeawayData = table2Data?.productDetails?.filter( - (item) => item.BookingTypeName?.toLowerCase() === "takeaway" + (item) => item.BookingTypeName?.toLowerCase() === 'takeaway', ); const DineInData = table2Data?.productDetails?.filter( - (item) => item.BookingTypeName?.toLowerCase() === "dine in" + (item) => item.BookingTypeName?.toLowerCase() === 'dine in', ); let PaymentStatusSuccess = PaymentStatus?.filter( - (ps) => ps.PaymentStatus === "S" + (ps) => ps.PaymentStatus === 'S', ); - const isEditedBill = PaymentStatus?.some(payment => { + const isEditedBill = PaymentStatus?.some((payment) => { const type = payment?.AdjustmentType?.toLowerCase(); return ( (type === 'extra' || type === 'refund') && @@ -143,16 +158,16 @@ const InvoiceTemplate = ({ index, ); }); const lastTransaction = PaymentStatus?.find( - (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' - ) + (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y', + ); const TakeawayTotal = TakeawayData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, - 0 + 0, ); - const PackageDetails = table2Data?.PackageDtl + const PackageDetails = table2Data?.PackageDtl; const DineInTotal = DineInData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, - 0 + 0, ); const aggregatedPayments = PaymentStatusSuccess?.reduce( (acc, paymentdata) => { @@ -167,69 +182,77 @@ const InvoiceTemplate = ({ index, return acc; }, - {} + {}, ); const productsData = table2Data?.productDetails || []; const offers = table2Data?.OrderOfferDetails || []; let TotalOfferAmount = 0; - console.log(table2Data, "productsDatakl") + console.log(table2Data, 'productsDatakl'); // 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 : item.OfferValue || 0), 0); + const productTotal = productsData?.reduce( + (acc, item) => + acc + (item?.Type != 'C' ? item.OfferAmt : 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 invoiceData = { company: { - name: "Prematix Software Solution Pvt Ltd.", - address: "#589, 2nd floor, VP Chambers, 1st cross, 3rd block, Koramangala, Bengaluru- 560034.", - phone: "9344270900", - email: "info@prematix.com", - gstin: "29AAICP0469K1ZX" + name: 'Prematix Software Solution Pvt Ltd.', + address: + '#589, 2nd floor, VP Chambers, 1st cross, 3rd block, Koramangala, Bengaluru- 560034.', + phone: '9344270900', + email: 'info@prematix.com', + gstin: '29AAICP0469K1ZX', }, invoice: { - state: "Karnataka", - stateCode: "29", - date: "13/04/2024", - number: "BLR/01/2024-25", - reverseCharge: "", - placeOfSupply: "", - dateOfSupply: "", - vehicleNumber: "", - transportationMode: "" + state: 'Karnataka', + stateCode: '29', + date: '13/04/2024', + number: 'BLR/01/2024-25', + reverseCharge: '', + placeOfSupply: '', + dateOfSupply: '', + vehicleNumber: '', + transportationMode: '', }, billTo: { - name: "Ooty Boat House", - address: "No:2, North Lake Road,", - state: "Tamil Nadu", - stateCode: "33", - gstin: "", - poNumber: "BLR/14/2024", - poDate: "11/04/2024" + name: 'Ooty Boat House', + address: 'No:2, North Lake Road,', + state: 'Tamil Nadu', + stateCode: '33', + gstin: '', + poNumber: 'BLR/14/2024', + poDate: '11/04/2024', }, items: [ { sr: 1, - name: "Acrylic Scanner Box", - hsn: "39204900", - uom: "INR", + name: 'Acrylic Scanner Box', + hsn: '39204900', + uom: 'INR', qty: 1, rate: 6501, amount: 6501, @@ -239,15 +262,15 @@ const InvoiceTemplate = ({ index, cgstAmount: 0, sgstRate: 0, sgstAmount: 0, - igstRate: 18.00, + igstRate: 18.0, igstAmount: 1170, - totalAmount: 7671 + totalAmount: 7671, }, { sr: 2, name: '32" Wide Angle view display FHD', - hsn: "84716030", - uom: "INR", + hsn: '84716030', + uom: 'INR', qty: 1, rate: 48317, amount: 48317, @@ -257,15 +280,15 @@ const InvoiceTemplate = ({ index, cgstAmount: 0, sgstRate: 0, sgstAmount: 0, - igstRate: 18.00, + igstRate: 18.0, igstAmount: 8697, - totalAmount: 57014 + totalAmount: 57014, }, { sr: 3, - name: "Service charges", - hsn: "999630", - uom: "INR", + name: 'Service charges', + hsn: '999630', + uom: 'INR', qty: 1, rate: 25000, amount: 25000, @@ -275,11 +298,10 @@ const InvoiceTemplate = ({ index, cgstAmount: 0, sgstRate: 0, sgstAmount: 0, - igstRate: 18.00, + igstRate: 18.0, igstAmount: 4500, - totalAmount: 29500 + totalAmount: 29500, }, - ], totals: { beforeTax: 83660, @@ -288,21 +310,22 @@ const InvoiceTemplate = ({ index, cgst: 0, totalGst: 15059, afterTax: 98719, - amountInWords: "Ninety Eight Thousand Seven Hundred and Nineteen Rupees Only" + amountInWords: + 'Ninety Eight Thousand Seven Hundred and Nineteen Rupees Only', }, bankDetails: { - bankName: "State Bank of India", - accountNo: "34850253701", - ifscCode: "SBIN0006242", - branchName: "Mookandapalli" - } + bankName: 'State Bank of India', + accountNo: '34850253701', + ifscCode: 'SBIN0006242', + branchName: 'Mookandapalli', + }, }; - const chunkSize = isMobile ? 11 : PageSize == "A5" ? 8 : 9; + const chunkSize = isMobile ? 11 : PageSize == 'A5' ? 8 : 9; let dataSource = []; if (GlobaldummyData || TakeawayData?.length > 0) { - dataSource = GlobaldummyData ? "" : TakeawayData; + dataSource = GlobaldummyData ? '' : TakeawayData; } else if (DineInData?.length > 0) { dataSource = DineInData; } @@ -311,50 +334,100 @@ const InvoiceTemplate = ({ index, 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 > (isMobile ? 11 : PageSize == "A5" ? 4 : 6); + const lastChunkRows = + paginatedChunks.length > 0 + ? paginatedChunks[paginatedChunks.length - 1].length + : 0; + const shouldFooterBeOnNewPage = + lastChunkRows > (isMobile ? 11 : PageSize == 'A5' ? 4 : 6); - console.log(table2Data, "table2Datah") + console.log(table2Data, 'table2Datah'); const companyName = table2Data?.CompName; - const companyAddress = table2Data?.AddressDetails?.[0]?.Address1 + (table2Data?.AddressDetails?.[0]?.Address2 || '') || "#589, 2nd floor, VP Chambers, 1st cross, 3rd block, Koramangala, Bengaluru- 560034."; - const companyPhone = table2Data?.BrMobile + "," + table2Data?.BrMobile2 !== null ? table2Data?.BrMobile2 : ""; - const companyEmail = table2Data?.CompanyEmail || "info@prematix.com"; + const companyAddress = + table2Data?.AddressDetails?.[0]?.Address1 + + (table2Data?.AddressDetails?.[0]?.Address2 || '') || + '#589, 2nd floor, VP Chambers, 1st cross, 3rd block, Koramangala, Bengaluru- 560034.'; + const companyPhone = + table2Data?.BrMobile + ',' + table2Data?.BrMobile2 !== null + ? table2Data?.BrMobile2 + : ''; + const companyEmail = table2Data?.CompanyEmail || 'info@prematix.com'; const companyGSTIN = table2Data?.CompGSTIN; // Billing Address (replace static values) - const billToName = table2Data?.CustomerName || "Ooty Boat House"; - const billToAddress = table2Data?.CustomerAddress || "No:2, North Lake Road,"; - const billToState = table2Data?.CustomerState || "Tamil Nadu"; - const billToStateCode = table2Data?.CustomerStateCode || "33"; - const billToGSTIN = table2Data?.CustomerGSTIN || ""; + const billToName = table2Data?.CustomerName || 'Ooty Boat House'; + const billToAddress = table2Data?.CustomerAddress || 'No:2, North Lake Road,'; + const billToState = table2Data?.CustomerState || 'Tamil Nadu'; + const billToStateCode = table2Data?.CustomerStateCode || '33'; + const billToGSTIN = table2Data?.CustomerGSTIN || ''; const InvoiceAmountWords = ({ amount }) => { const numberToWords = (num) => { const a = [ - "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", - "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", - "Eighteen", "Nineteen" + '', + 'One', + 'Two', + 'Three', + 'Four', + 'Five', + 'Six', + 'Seven', + 'Eight', + 'Nine', + 'Ten', + 'Eleven', + 'Twelve', + 'Thirteen', + 'Fourteen', + 'Fifteen', + 'Sixteen', + 'Seventeen', + 'Eighteen', + 'Nineteen', + ]; + const b = [ + '', + '', + 'Twenty', + 'Thirty', + 'Forty', + 'Fifty', + 'Sixty', + 'Seventy', + 'Eighty', + 'Ninety', ]; - const b = ["", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"]; - if (num === 0) return "Zero"; + if (num === 0) return 'Zero'; if (num < 20) return a[num]; - if (num < 100) return b[Math.floor(num / 10)] + (num % 10 ? " " + a[num % 10] : ""); + if (num < 100) + return b[Math.floor(num / 10)] + (num % 10 ? ' ' + a[num % 10] : ''); if (num < 1000) - return a[Math.floor(num / 100)] + " Hundred" + (num % 100 ? " and " + numberToWords(num % 100) : ""); + return ( + a[Math.floor(num / 100)] + + ' Hundred' + + (num % 100 ? ' and ' + numberToWords(num % 100) : '') + ); if (num < 100000) - return numberToWords(Math.floor(num / 1000)) + " Thousand" + (num % 1000 ? " " + numberToWords(num % 1000) : ""); + return ( + numberToWords(Math.floor(num / 1000)) + + ' Thousand' + + (num % 1000 ? ' ' + numberToWords(num % 1000) : '') + ); - return "Number too large"; + return 'Number too large'; }; return (

Total Invoice Amount in Words:

-

+

{numberToWords(amount)}

@@ -363,54 +436,52 @@ const InvoiceTemplate = ({ index, const products = [ { - ProdName: "ITEM 1", + ProdName: 'ITEM 1', Rate: 88.0, SalesQty: 2, MRP: 100, TotalAmt: 176, discount: 0, - HSN: "01", + HSN: '01', }, { - ProdName: "ITEM 2", + ProdName: 'ITEM 2', Rate: 300.0, SalesQty: 1, MRP: 350, TotalAmt: 300, discount: 0, - HSN: "02", + HSN: '02', }, { - ProdName: "ITEM 3", + ProdName: 'ITEM 3', Rate: 200.0, SalesQty: 1, MRP: 250, TotalAmt: 200, discount: 0, - HSN: "03", + HSN: '03', }, { - ProdName: "ITEM 4", + ProdName: 'ITEM 4', Rate: 30.0, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, - HSN: "04", + HSN: '04', }, { - ProdName: "ITEM 5", + ProdName: 'ITEM 5', Rate: 30.0, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, - HSN: "05", + HSN: '05', }, - ]; - return ( <> <> - {FormatTheme ? - -
+ {FormatTheme ? ( +
{paginatedChunks.map((dataChunk, chunkIndex) => ( -
0 ? ' print-page-break' : ''}`} +
0 ? ' print-page-break' : ''}` + } style={{ - display: "flex", flexDirection: "column", - justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme ? "space-between" : "", - height: FormatTheme ? isMobile ? "293mm" : PageSize == "A5" ? '170mm' : "275mm" : "", marginBottom: "0" - }} key={chunkIndex}> - + display: 'flex', + flexDirection: 'column', + justifyContent: + chunkIndex === paginatedChunks.length - 1 && + !shouldFooterBeOnNewPage && + FormatTheme + ? 'space-between' + : '', + height: FormatTheme + ? isMobile + ? '293mm' + : PageSize == 'A5' + ? '170mm' + : '275mm' + : '', + marginBottom: '0', + }} + key={chunkIndex} + > {/*
*/} {/* Header */} {/*
*/} -
- {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
-
-
- {(GlobalLogo && GlobaldummyData) &&
Brand Logo
} - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? Brand Logo : null} -

{GlobaldummyData ? "Company Name" : companyName}

-
-

{companyAddress}

- {(companyPhone || GlobaldummyData) &&
Phone: {GlobaldummyData ? "999999XXXX" : companyPhone}
} -
Email: {companyEmail}
- {companyGSTIN || GlobaldummyData &&
GSTIN: {GlobaldummyData ? "XXTTHJJF7679" : companyGSTIN}
} -
-
- {" "} - BillNo: - {GlobaldummyData - ? "121" - : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus +
+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
+
+
+ {GlobalLogo && GlobaldummyData && ( +
+ {' '} + Brand Logo +
+ )} + {base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + Brand Logo + ) : null} +

+ {GlobaldummyData ? 'Company Name' : companyName} +

+
+

{companyAddress}

+ {(companyPhone || GlobaldummyData) && ( +
+ Phone:{' '} + {GlobaldummyData ? '999999XXXX' : companyPhone} +
)} +
Email: {companyEmail}
+ {companyGSTIN || + (GlobaldummyData && ( +
+ GSTIN:{' '} + {GlobaldummyData + ? 'XXTTHJJF7679' + : companyGSTIN} +
+ ))} +
+
+ {' '} + BillNo: + {GlobaldummyData + ? '121' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus, + )} +
- -
)} + )} {/* Invoice Title */}
- {table2Data?.OrderType === "E" && ( + {table2Data?.OrderType === 'E' && (
- Estimate{" "} + Estimate{' '}
)} - {table2Data?.OrderType === "E" ? ( - "" + {table2Data?.OrderType === 'E' ? ( + '' ) : (
- {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} - + {GlobaldummyData + ? GlobalBilltext + ? GlobalBilltext + : 'Cash' + ' Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + + ' Bill' + : ''}
)}
- - {GlobaldummyData ? + {GlobaldummyData ? (
-

Details of Receiver | Billed to

+

+ Details of Receiver | Billed to +

-
Name : +
+ Name : {GlobaldummyData ? ( - - {"XXXYYY"} - - ) : table2Data?.CustomerDetails?.[0]?.CustSuppName} -
- - -
Address: - XYZ City -
- -
State: XYZ State
- -
-
- -
- : - table2Data?.CustomerDetails?.length > 0 && -
-
-

Details of Receiver | Billed to

-
-
Name : - {GlobaldummyData ? ( - - {"XXXYYY"} - - ) : table2Data?.CustomerDetails?.[0]?.CustSuppName} -
- - -
Address: {table2Data?.CustomerDetails?.length > 0 && - !GlobaldummyData && ( - - {table2Data?.CustomerDetails?.[0]?.Address1} {table2Data?.CustomerDetails?.[0]?.Address2} + + {'XXXYYY'} + ) : ( + table2Data?.CustomerDetails?.[0]?.CustSuppName )}
-
State: {table2Data?.CustomerDetails?.[0]?.State}
- {table2Data?.CustomerDetails?.[0]?.CustGSTNo &&
GST: {table2Data?.CustomerDetails?.[0]?.CustGSTNo}
} +
+ Address: + XYZ City +
+ +
+ State: XYZ State +
-
- } + ) : ( + table2Data?.CustomerDetails?.length > 0 && ( +
+
+

+ Details of Receiver | Billed to +

+
+
+ Name : + {GlobaldummyData ? ( + + {'XXXYYY'} + + ) : ( + table2Data?.CustomerDetails?.[0]?.CustSuppName + )} +
+
+ Address:{' '} + {table2Data?.CustomerDetails?.length > 0 && + !GlobaldummyData && ( + + { + table2Data?.CustomerDetails?.[0] + ?.Address1 + }{' '} + { + table2Data?.CustomerDetails?.[0] + ?.Address2 + } + + )} +
+
+ State:{' '} + {table2Data?.CustomerDetails?.[0]?.State} +
+ {table2Data?.CustomerDetails?.[0]?.CustGSTNo && ( +
+ GST:{' '} + {table2Data?.CustomerDetails?.[0]?.CustGSTNo} +
+ )} +
+
+
+ ) + )}
- {/* Items Table */} -
+
- +
{GlobaldummyData - ? GlobalSlNo && : - SLNO == true && } + ? GlobalSlNo && ( + + ) + : SLNO == true && ( + + )} {GlobaldummyData - ? GlobalItem && : - Item == true && } - + ? GlobalItem && ( + + ) + : Item == true && ( + + )} {GlobaldummyData - ? GlobalHsnCode && : - HsnCode == true && } + ? GlobalHsnCode && ( + + ) + : HsnCode == true && ( + + )} {GlobaldummyData - ? GlobalQuantity && - : Quantity == true && } + ? GlobalQuantity && ( + + ) + : Quantity == true && ( + + )} {/* */} {GlobaldummyData - ? GlobalMRP && - : MRP == true && } + ? GlobalMRP && ( + + ) + : MRP == true && ( + + )} {GlobaldummyData - ? GlobalRate && - : Rate == true && } + ? GlobalRate && ( + + ) + : Rate == true && ( + + )} {GlobaldummyData - ? GlobalDiscount && - : Discount == true && } + ? GlobalDiscount && ( + + ) + : Discount == true && ( + + )} {GlobaldummyData - ? GlobalTax && - : (Tax && table2Data?.OrderType !== 'E') && } + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData - ? GlobalAmount && - : Amount == true && } - + ? GlobalAmount && ( + + ) + : Amount == true && ( + + )} - - {((GlobaldummyData ? products : dataChunk) || []).map((item, idx) => ( - - {GlobaldummyData - ? GlobalSlNo && ( - - ) - : SLNO == true && ( - - )} - {GlobaldummyData - ? GlobalItem && - : Item == true && ( - + {GlobaldummyData + ? GlobalSlNo && ( + + ) + : SLNO == true && ( + + )} + {GlobaldummyData + ? GlobalItem && ( + + ) + : Item == true && ( + - - )} - {GlobaldummyData - ? GlobalHsnCode && ( - - ) - : HsnCode == true && ( - - )} - {GlobaldummyData - ? GlobalQuantity && ( - - ) - : Quantity == true && ( - - )} - {GlobaldummyData - ? GlobalMRP && ( - - ) - : MRP == true && ( - - )} - {GlobaldummyData - ? GlobalRate && ( - - ) - : Rate == true && ( - - )} - {GlobaldummyData - ? GlobalDiscount && - : Discount == true && ( - - )} - {GlobaldummyData - ? GlobalTax && - : (Tax && table2Data?.OrderType !== 'E') && ( - - )} - {GlobaldummyData - ? GlobalAmount && ( - - ) - : Amount == true && ( - - )} - - ))} - - - + + )} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null + ), + )?.map((a) => { + return ( +
{a.SerialNumber}
+ ); + }) + : ''}{' '} + {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(',')} +
+ ); + }) + : ''} + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode == true && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity == true && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP == true && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate == true && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount == true && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount == true && ( + + )} + + ), + )}
S.NoS.NoS.No + S.No + ItemItemItem + Item + HSN HSN HSN + HSN{' '} + Qty {WeightasKg ? 'Qty/Kg' : 'Qty'}Qty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + UOM UOMMRPMRPMRP + MRP + RateRateRate + Rate + DisDisDis + Dis + Tax %Tax %Tax % + Tax % + AmountAmountAmount + Amount +
- {chunkIndex * chunkSize + idx + 1} - - {chunkIndex * chunkSize + idx + 1} - {item?.ProdName} -
{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?.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 == null + {((GlobaldummyData ? products : dataChunk) || []).map( + (item, idx) => ( +
+ {chunkIndex * chunkSize + idx + 1} + + {chunkIndex * chunkSize + idx + 1} + + {item?.ProdName} + +
{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?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} ) - )?.map((a) => { - return
{a.SerialNumber}
; - }) - : ""}{" "} - {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(",")} -
- ); - }) - : ""} -
- {item?.HSN} - - {item?.HSN} - - {item?.SalesQty} - - {item?.SalesQty} - - {item?.MRP} - - {item?.SinglePc === "Y" - ? item?.Rate - : item?.MRP} - - {item?.Rate} - - {" "} - {item?.Rate} - {item.discount} - {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} - {item?.ProdTaxPercentage} - {item?.ProdTaxPercentage || 0} - - {item?.TotalAmt} - - {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} -
+ {item?.HSN} + + {item?.HSN} + + {item?.SalesQty} + + {item?.SalesQty} + + {item?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {' '} + {item?.Rate} + + {item.discount} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + {item?.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
@@ -1143,483 +1533,1113 @@ const InvoiceTemplate = ({ index,
)} - {((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme && - <> - {(sportsAppPreference && MembershipApplied) &&
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
} + {chunkIndex === paginatedChunks.length - 1 && + !shouldFooterBeOnNewPage && + FormatTheme && ( + <> + {sportsAppPreference && MembershipApplied && ( +
{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
+ )} -
- -
-
- Items : -
-
{GlobaldummyData ? "7" : totalQuantityFilter?.length}
-
- -
-
- Qty : -
-
{GlobaldummyData ? "9" : totalQuantity}
-
- -
-
- Off : -
-
{(Number(TotalOfferAmount || 0) + Number(table2Data?.OverallDisc || 0)).toFixed(2)}
-
-
-
- Amount :₹ -
-
{GlobaldummyData - ? "1066" - : (table2Data?.NetAmount)}
-
- - - - - - -
- {/* Summary */} -
- {GlobaldummyData ?
- -
:
- -
} - {table2Data?.OrderType !== 'E' &&
- - -
-
- Total Taxable Amount : +
+
+
+ Items : +
+
+ {GlobaldummyData + ? '7' + : totalQuantityFilter?.length}
-
{GlobaldummyData ? 736 : table2Data?.BillAmount}
-
- {OrderDetailGST?.map((item, index) => ( -
-
-
- Taxable Amount : -
-
{Number(item.WithOutTaxAmount).toFixed(2)}
-
+
+
+ Qty : +
+
+ {GlobaldummyData ? '9' : totalQuantity} +
+
-
-
- CGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.CGST).toFixed(2)}
+
+
+ Off : +
+
+ {( + Number(TotalOfferAmount || 0) + + Number(table2Data?.OverallDisc || 0) + ).toFixed(2)} +
+
+
+
+ Amount :₹ +
+
+ {GlobaldummyData + ? '1066' + : table2Data?.NetAmount} +
+
+
+ {/* Summary */} +
+ {GlobaldummyData ? ( +
+ +
+ ) : ( +
+ +
+ )} + {table2Data?.OrderType !== 'E' && ( +
+
+
+ Total Taxable Amount :
- -
-
- SGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.SGST).toFixed(2)}
-
- -
-
- Total (incl GST) : -
-
{Number(item.TotalAmt).toFixed(2)}
+
+ {GlobaldummyData + ? 736 + : table2Data?.BillAmount}
- ))} -
- {/*
+
+ {OrderDetailGST?.map((item, index) => ( +
+
+
+ Taxable Amount : +
+
+ {Number( + item.WithOutTaxAmount, + ).toFixed(2)} +
+
+ +
+
+ CGST ({item.TaxPercentage / 2}%) : +
+
+ {Number(item.CGST).toFixed(2)} +
+
+ +
+
+ SGST ({item.TaxPercentage / 2}%) : +
+
+ {Number(item.SGST).toFixed(2)} +
+
+ +
+
+ Total (incl GST) : +
+
+ {Number(item.TotalAmt).toFixed(2)} +
+
+
+ ))} +
+ + {/*
GST Payable on Reverse Charge
*/} -
+
-
-
- Total Amount Payable : -
-
{Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)}
-
- {isEditedBill && lastTransaction && ( -
-
-
- Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} -
+
- {'Adjustment Amount'} - - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {(lastTransaction?.Amount || 0).toFixed(2)} - + Total Amount Payable :
-
- Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
+ {Number( + GlobaldummyData + ? 736 + : table2Data?.NetAmount, + )?.toFixed(2)}
-
- )} + {isEditedBill && lastTransaction && ( +
+
+
+ + Bill Gross Amount + + + {( + lastTransaction?.BeforeAdjustment || + 0 + ).toFixed(2)} + +
+
+ {'Adjustment Amount'} + + {lastTransaction?.AdjustmentType === + 'REFUND' + ? '-' + : '+'} + {( + lastTransaction?.Amount || 0 + ).toFixed(2)} + +
+
+ + Net Bill Amount + + + {( + lastTransaction?.AfterAdjustment || + 0 + ).toFixed(2)} + +
+
+
+ )} - {/*
+ {/*
Total Amount Payable {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)}
*/} - {/*
+ {/*
{Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)}
*/} -
} -
- - {/* Footer */} -
-
- {(BankDetails?.length > 0) && (<> -

Bank Details:

-
-
Bank Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankName}
-
Account No.: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.AccountNo}
-
IFSC Code: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.IFSCCode}
-
Branch Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankBranch}
-
- )} + )} +
-
- {GlobaldummyData ? GlobaltermsAndConditions && - (
-

- Terms & Conditions + {/* Footer */} +

+
+ {BankDetails?.length > 0 && ( + <> +

+ Bank Details: +

+
+
+ Bank Name:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankName} +
+
+ Account No.:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.AccountNo} +
+
+ IFSC Code:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.IFSCCode} +
+
+ Branch Name:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankBranch} +
+
+
+ + )} + +
+ {GlobaldummyData + ? GlobaltermsAndConditions && ( +
+

+ Terms & Conditions +

+
    +
  1. + Once goods are sold, they are not + exchangeable or refundable. +
  2. +
  3. + Please check the product before + leaving the counter. +
  4. +
+
+ ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
+

+ Terms & Conditions +

+
    + {TermsAndConditions?.map((item) => ( +
  1. + {item?.TermsandConditions} +
  2. + ))} + {/*
  3. Please check the product before leaving the counter.
  4. */} +
+
+ )} +
+
+
+
+

+ Certified that the particulars given above are + true and correct. +

+
+
+ {GlobaldummyData ? ( +

Company Name

+ ) : !estimatePrintHeader && + table2Data?.OrderType === 'E' ? ( + '' + ) : ( +

+ {' '} + "For" {companyName}

-
    -
  1. Once goods are sold, they are not exchangeable or refundable.
  2. -
  3. Please check the product before leaving the counter.
  4. -
-
) - : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-

- Terms & Conditions -

-
    - {TermsAndConditions?.map(item => (
  1. {item?.TermsandConditions}
  2. ))} - {/*
  3. Please check the product before leaving the counter.
  4. */} -
-
) - } + )} +

+ Authorised Signatory +

+ + {GlobaldummyData + ? GlobalSignature && ( +
+ +
+ ) + : Signature == true && ( +
+ {!estimatePrintHeader && + table2Data?.OrderType === 'E' ? ( + '' + ) : ( + + )} +
+ )} +

(Common Seal)

+
-
-
-

Certified that the particulars given above are true and correct.

-
-
- {GlobaldummyData ?

Company Name

- : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :

"For" {companyName}

} -

Authorised Signatory

+ {/*
*/} - {GlobaldummyData ? GlobalSignature && (
- -
) : Signature == true && ( -
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : } + {/* Copy Labels */} +
+ {GlobaldummyData + ? GlobalIsnotes && ( +
+

+ Notes : 10 days Return policy +

+ +
+
+ ) + : Notestext && ( +
+

+ {Notestext} +

+ + {/*
*/}
)} -

(Common Seal)

-
- {/*
*/} - - - - - {/* Copy Labels */} -
- {GlobaldummyData ? GlobalIsnotes && - (
-

Notes : 10 days Return policy

- -
-
) : - Notestext && (
-

{Notestext}

- - {/*
*/} -
) - } -
-
- - } + + )}
//
))}
{/*
*/} - {shouldFooterBeOnNewPage && FormatTheme && + {shouldFooterBeOnNewPage && FormatTheme && (
-
<> - {(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} ***`}
+ )}
-
-
- Items : +
+
+ Items : +
+
+ {GlobaldummyData ? '7' : totalQuantityFilter?.length}
-
{GlobaldummyData ? "7" : totalQuantityFilter?.length}
-
-
- Qty : +
+
+ Qty : +
+
+ {GlobaldummyData ? '9' : totalQuantity}
-
{GlobaldummyData ? "9" : totalQuantity}
-
-
- Off : +
+
+ Off : +
+
+ {( + Number(TotalOfferAmount || 0) + + Number(table2Data?.OverallDisc || 0) + ).toFixed(2)}
-
{(Number(TotalOfferAmount || 0) + Number(table2Data?.OverallDisc || 0)).toFixed(2)}
-
-
- Amount :₹ +
+
+ Amount :₹ +
+
+ {GlobaldummyData ? '1066' : table2Data?.NetAmount}
-
{GlobaldummyData - ? "1066" - : (table2Data?.NetAmount)}
{/*
*/} {/* Summary */}
- {GlobaldummyData ?
- -
:
- -
} - {table2Data?.OrderType !== 'E' &&
- - -
-
- Total Taxable Amount : -
-
{GlobaldummyData ? 736 : table2Data?.BillAmount}
+ {GlobaldummyData ? ( +
+
- -
- {OrderDetailGST?.map((item, index) => ( -
-
-
- Taxable Amount : -
-
{Number(item.WithOutTaxAmount).toFixed(2)}
-
- -
-
- CGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.CGST).toFixed(2)}
-
- -
-
- SGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.SGST).toFixed(2)}
-
- -
-
- Total Amount Tax : -
-
{Number(item.TotalAmt).toFixed(2)}
-
+ ) : ( +
+ +
+ )} + {table2Data?.OrderType !== 'E' && ( +
+
+
+ Total Taxable Amount :
- ))} -
- {/*
+
+ {GlobaldummyData ? 736 : table2Data?.BillAmount} +
+
+ +
+ {OrderDetailGST?.map((item, index) => ( +
+
+
+ Taxable Amount : +
+
+ {Number(item.WithOutTaxAmount).toFixed(2)} +
+
+ +
+
+ CGST ({item.TaxPercentage / 2}%) : +
+
{Number(item.CGST).toFixed(2)}
+
+ +
+
+ SGST ({item.TaxPercentage / 2}%) : +
+
{Number(item.SGST).toFixed(2)}
+
+ +
+
+ Total Amount Tax : +
+
{Number(item.TotalAmt).toFixed(2)}
+
+
+ ))} +
+ {/*
GST Payable on Reverse Charge
*/} -
-
- Total Amount Payable - {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)} -
-
- {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)} -
- {isEditedBill && lastTransaction && ( -
+
+
+ Total Amount Payable + + {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount, + )?.toFixed(2)} + +
+
+ {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount, + )?.toFixed(2)} +
+ {isEditedBill && lastTransaction && (
-
- Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} -
- {'Adjustment Amount'} - - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {(lastTransaction?.Amount || 0).toFixed(2)} - -
-
- Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
+ + Bill Gross Amount + + + {( + lastTransaction?.BeforeAdjustment || 0 + ).toFixed(2)} + +
+
+ {'Adjustment Amount'} + + {lastTransaction?.AdjustmentType === + 'REFUND' + ? '-' + : '+'} + {(lastTransaction?.Amount || 0).toFixed(2)} + +
+
+ + Net Bill Amount + + + {( + lastTransaction?.AfterAdjustment || 0 + ).toFixed(2)} + +
-
- )} -
} + )} +
+ )}
{/* Footer */}
- {BankDetails?.length > 0 && (<> -

Bank Details:

-
-
Bank Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankName}
-
Account No.: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.AccountNo}
-
IFSC Code: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.IFSCCode}
-
Branch Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankBranch}
-
-
- )} + {BankDetails?.length > 0 && ( + <> +

+ Bank Details: +

+
+
+ Bank Name:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankName} +
+
+ Account No.:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.AccountNo} +
+
+ IFSC Code:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.IFSCCode} +
+
+ Branch Name:{' '} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankBranch} +
+
+
+ + )}
- {GlobaldummyData ? GlobaltermsAndConditions && - (
-

- Terms & Conditions -

-
    -
  1. Once goods are sold, they are not exchangeable or refundable.
  2. -
  3. Please check the product before leaving the counter.
  4. -
-
) - : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-

- Terms & Conditions -

-
    - {TermsAndConditions?.map(item => (
  1. {item?.TermsandConditions}
  2. ))} - {/*
  3. Please check the product before leaving the counter.
  4. */} -
-
) - } + {GlobaldummyData + ? GlobaltermsAndConditions && ( +
+

+ Terms & Conditions +

+
    +
  1. + Once goods are sold, they are not + exchangeable or refundable. +
  2. +
  3. + Please check the product before leaving + the counter. +
  4. +
+
+ ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
+

+ Terms & Conditions +

+
    + {TermsAndConditions?.map((item) => ( +
  1. + {item?.TermsandConditions} +
  2. + ))} + {/*
  3. Please check the product before leaving the counter.
  4. */} +
+
+ )}
-
+
-

Certified that the particulars given above are true and correct.

+

+ Certified that the particulars given above are true + and correct. +

- {GlobaldummyData ?

Company Name

- :

"For" {companyName}

} + {GlobaldummyData ? ( +

Company Name

+ ) : ( +

+ {' '} + "For" {companyName} +

+ )}

Authorised Signatory

- {GlobaldummyData ? GlobalSignature && (
- -
) : Signature == true && (
- -
)} + {GlobaldummyData + ? GlobalSignature && ( +
+ +
+ ) + : Signature == true && ( +
+ +
+ )}

(Common Seal)

@@ -1628,177 +2648,296 @@ const InvoiceTemplate = ({ index, {/* Copy Labels */}
- {GlobaldummyData ? GlobalIsnotes && - (
-

Notes : 10 days Return policy

+ {GlobaldummyData + ? GlobalIsnotes && ( +
+

+ Notes : 10 days Return policy +

-
-
) : - Notestext && (
-

{Notestext}

+
+
+ ) + : Notestext && ( +
+

+ {Notestext} +

- {/*
*/} -
) - } + {/*
*/} +
+ )}
- } - + )}
- : + ) : (
{/* Header */} - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
- -
-
- {(GlobalLogo && GlobaldummyData) &&
Brand Logo
} - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? Brand Logo : null} -

{GlobaldummyData ? "Company Name" : companyName}

+ {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
+
+
+ {GlobalLogo && GlobaldummyData && ( +
+ {' '} + Brand Logo +
+ )} + {base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + Brand Logo + ) : null} +

+ {GlobaldummyData ? 'Company Name' : companyName} +

+
+

{companyAddress}

+ {(companyPhone || GlobaldummyData) && ( +
+ Phone: {GlobaldummyData ? '999999XXXX' : companyPhone} +
+ )} +
Email: {companyEmail}
+ {companyGSTIN || + (GlobaldummyData && ( +
+ GSTIN:{' '} + {GlobaldummyData ? 'XXTTHJJF7679' : companyGSTIN} +
+ ))}
-

{companyAddress}

- {(companyPhone || GlobaldummyData) &&
Phone: {GlobaldummyData ? "999999XXXX" : companyPhone}
} -
Email: {companyEmail}
- {companyGSTIN || GlobaldummyData &&
GSTIN: {GlobaldummyData ? "XXTTHJJF7679" : companyGSTIN}
}
- - -
} + )} {/* Invoice Title */}
- {table2Data?.OrderType === "E" && ( + {table2Data?.OrderType === 'E' && (
- Estimate{" "} + Estimate{' '}
)} - {table2Data?.OrderType === "E" ? ( - "" + {table2Data?.OrderType === 'E' ? ( + '' ) : (
- {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} - + {GlobaldummyData + ? GlobalBilltext + ? GlobalBilltext + : 'Cash' + ' Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' + : ''}
)}
- - {GlobaldummyData ? + {GlobaldummyData ? (
-

Details of Receiver | Billed to

+

+ Details of Receiver | Billed to +

-
Name : +
+ Name : {GlobaldummyData ? ( - - {"XXXYYY"} - - ) : table2Data?.CustomerDetails?.[0]?.CustSuppName} -
- - -
Address: - XYZ City -
- -
State: XYZ State
- -
-
- -
- : - table2Data?.CustomerDetails?.length > 0 &&
-
-

Details of Receiver | Billed to

-
-
Name : - {GlobaldummyData ? ( - - {"XXXYYY"} - - ) : table2Data?.CustomerDetails?.[0]?.CustSuppName} -
- - -
Address: {table2Data?.CustomerDetails?.length > 0 && - !GlobaldummyData && ( - - {table2Data?.CustomerDetails?.[0]?.Address1} {table2Data?.CustomerDetails?.[0]?.Address2} - + {'XXXYYY'} + ) : ( + table2Data?.CustomerDetails?.[0]?.CustSuppName )}
-
State: {table2Data?.CustomerDetails?.[0]?.State}
+
+ Address: + XYZ City +
+
+ State: XYZ State +
-
- } + ) : ( + table2Data?.CustomerDetails?.length > 0 && ( +
+
+

+ Details of Receiver | Billed to +

+
+
+ Name : + {GlobaldummyData ? ( + {'XXXYYY'} + ) : ( + table2Data?.CustomerDetails?.[0]?.CustSuppName + )} +
+
+ Address:{' '} + {table2Data?.CustomerDetails?.length > 0 && + !GlobaldummyData && ( + + {table2Data?.CustomerDetails?.[0]?.Address1}{' '} + {table2Data?.CustomerDetails?.[0]?.Address2} + + )} +
+ +
+ State:{' '} + {table2Data?.CustomerDetails?.[0]?.State} +
+
+
+
+ ) + )} {/* Items Table */}
- +
{GlobaldummyData - ? GlobalSlNo && : - SLNO == true && } + ? GlobalSlNo && ( + + ) + : SLNO == true && ( + + )} {GlobaldummyData - ? GlobalItem && : - Item == true && } - + ? GlobalItem && ( + + ) + : Item == true && ( + + )} {GlobaldummyData - ? GlobalHsnCode && : - HsnCode == true && } + ? GlobalHsnCode && ( + + ) + : HsnCode == true && ( + + )} {GlobaldummyData - ? GlobalQuantity && - : Quantity == true && } + ? GlobalQuantity && ( + + ) + : Quantity == true && ( + + )} {/* */} {GlobaldummyData - ? GlobalMRP && - : MRP == true && } + ? GlobalMRP && ( + + ) + : MRP == true && ( + + )} {GlobaldummyData - ? GlobalRate && - : Rate == true && } + ? GlobalRate && ( + + ) + : Rate == true && ( + + )} {GlobaldummyData - ? GlobalDiscount && - : Discount == true && } + ? GlobalDiscount && ( + + ) + : Discount == true && ( + + )} {GlobaldummyData - ? GlobalTax && - : (Tax && table2Data?.OrderType !== 'E') && } + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData - ? GlobalAmount && - : Amount == true && } + ? GlobalAmount && ( + + ) + : Amount == true && ( + + )} {/* @@ -1820,368 +2959,647 @@ const InvoiceTemplate = ({ index, */} - {((GlobaldummyData ? products : productsData) || []).map((item, idx) => ( - - {GlobaldummyData - ? GlobalSlNo && ( - - ) - : SLNO == true && ( - - )} - {GlobaldummyData - ? GlobalItem && - : Item == true && ( - - - )} - {GlobaldummyData - ? GlobalHsnCode && ( - - ) - : HsnCode == true && ( - - )} - {GlobaldummyData - ? GlobalQuantity && ( - - ) - : Quantity == true && ( - - )} - {GlobaldummyData - ? GlobalMRP && ( - - ) - : MRP == true && ( - - )} - {GlobaldummyData - ? GlobalRate && ( - - ) - : Rate == true && ( - - )} - {GlobaldummyData - ? GlobalDiscount && - : Discount == true && ( - - )} - {(GlobaldummyData - ? GlobalTax && - : (Tax && table2Data?.OrderType !== 'E') && - )} - {GlobaldummyData - ? GlobalAmount && ( - - ) - : Amount == true && ( - - )} - - ))} - - - + {((GlobaldummyData ? products : productsData) || []).map( + (item, idx) => ( + + {GlobaldummyData + ? GlobalSlNo && ( + + ) + : SLNO == true && ( + + )} + {GlobaldummyData + ? GlobalItem && ( + + ) + : Item == true && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode == true && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity == true && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP == true && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate == true && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount == true && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount == true && ( + + )} + + ), + )}
S.NoS.NoS.NoS.NoItemItemItemItemHSN HSN HSN HSN Qty {WeightasKg ? 'Qty/Kg' : 'Qty'}Qty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + UOM UOMMRPMRPMRPMRPRateRateRateRateDisDisDisDisTax %Tax %Tax % + Tax % + AmountAmountAmountAmountTaxable IGST
- {idx + 1} - - {idx + 1} - {item?.ProdName} -
{item?.ProdName}
-
- ({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 == null - ) - )?.map((a) => { - return
{a.SerialNumber}
; - }) - : ""}{" "} - {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(",")} -
- ); - }) - : ""} -
- {item?.HSN} - - {item?.HSN} - - {item?.SalesQty} - - {item?.SalesQty} - - {item?.MRP} - - {item?.SinglePc === "Y" - ? item?.Rate - : item?.MRP} - - {item?.Rate} - - {" "} - {item?.Rate} - {item.discount} - {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} - {item?.ProdTaxPercentage}{item?.ProdTaxPercentage || 0} - {item?.TotalAmt} - - {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} -
+ {idx + 1} + + {idx + 1} + + {item?.ProdName} + +
{item?.ProdName}
+
+ ({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 == null + ), + )?.map((a) => { + return
{a.SerialNumber}
; + }) + : ''}{' '} + {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(',')} +
+ ); + }) + : ''} +
+ {item?.HSN} + + {item?.HSN} + + {item?.SalesQty} + + {item?.SalesQty} + + {item?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {' '} + {item?.Rate} + + {item.discount} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + {item?.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
- {" "} - Items:{GlobaldummyData ? "7" : totalQuantityFilter?.length} + {' '} + Items:{GlobaldummyData ? '7' : totalQuantityFilter?.length}
- {" "} - Qty:{GlobaldummyData ? "9" : totalQuantity} + {' '} + Qty:{GlobaldummyData ? '9' : totalQuantity}
{/* {ExtraChargeTotal > 0 &&

Extra Charges:{ExtraChargeTotal}

} */} - {(TotalOfferAmount > 0 || table2Data?.OverallDisc > 0) && ( -

- Off :{(Number(TotalOfferAmount || 0) + Number(table2Data?.OverallDisc || 0)).toFixed(2)} +

+ Off : + {( + Number(TotalOfferAmount || 0) + + Number(table2Data?.OverallDisc || 0) + ).toFixed(2)}

)}
Amount :₹ {GlobaldummyData - ? "1066" + ? '1066' : Number(table2Data?.NetAmount).toFixed(2)}
{/* Summary */}
- {GlobaldummyData ?
- -
:
- -
} - {table2Data?.OrderType !== 'E' &&
- - -
-
- Total Taxable Amount : -
-
{GlobaldummyData ? 736 : table2Data?.BillAmount}
+ {GlobaldummyData ? ( +
+
- -
- {OrderDetailGST?.map((item, index) => ( -
-
-
- Taxable Amount : -
-
{Number(item.WithOutTaxAmount).toFixed(2)}
-
- -
-
- CGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.CGST).toFixed(2)}
-
- -
-
- SGST ({item.TaxPercentage / 2}%) : -
-
{Number(item.SGST).toFixed(2)}
-
- -
-
- Total (incl GST) : -
-
{Number(item.TotalAmt).toFixed(2)}
-
+ ) : ( +
+ +
+ )} + {table2Data?.OrderType !== 'E' && ( +
+
+
+ Total Taxable Amount :
- ))} -
- {/*
+
+ {GlobaldummyData ? 736 : table2Data?.BillAmount} +
+
+ +
+ {OrderDetailGST?.map((item, index) => ( +
+
+
+ Taxable Amount : +
+
+ {Number(item.WithOutTaxAmount).toFixed(2)} +
+
+ +
+
+ CGST ({item.TaxPercentage / 2}%) : +
+
{Number(item.CGST).toFixed(2)}
+
+ +
+
+ SGST ({item.TaxPercentage / 2}%) : +
+
{Number(item.SGST).toFixed(2)}
+
+ +
+
+ Total (incl GST) : +
+
{Number(item.TotalAmt).toFixed(2)}
+
+
+ ))} +
+ {/*
GST Payable on Reverse Charge
*/} -
-
- Total Amount Payable - {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)} -
-
- {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.toFixed(2)} -
- {isEditedBill && lastTransaction && ( -
+
+
+ Total Amount Payable + + {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount, + )?.toFixed(2)} + +
+
+ {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount, + )?.toFixed(2)} +
+ {isEditedBill && lastTransaction && (
-
- Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} -
- {'Adjustment Amount'} - - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {(lastTransaction?.Amount || 0).toFixed(2)} - -
-
- Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
+ + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed( + 2, + )} + +
+
+ {'Adjustment Amount'} + + {lastTransaction?.AdjustmentType === 'REFUND' + ? '-' + : '+'} + {(lastTransaction?.Amount || 0).toFixed(2)} + +
+
+ + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed( + 2, + )} + +
-
- )} -
} + )} +
+ )}
{/* Footer */}
- {(BankDetails?.length > 0 || GlobaldummyData) && (<> -

Bank Details:

-
-
Bank Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankName}
-
Account No.: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.AccountNo}
-
IFSC Code: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.IFSCCode}
-
Branch Name: {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : BankDetails?.[0]?.BankBranch}
-
-
- )} + {(BankDetails?.length > 0 || GlobaldummyData) && ( + <> +

Bank Details:

+
+
+ Bank Name:{' '} + {!estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankName} +
+
+ Account No.:{' '} + {!estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.AccountNo} +
+
+ IFSC Code:{' '} + {!estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.IFSCCode} +
+
+ Branch Name:{' '} + {!estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : BankDetails?.[0]?.BankBranch} +
+
+
+ + )}
- {GlobaldummyData ? GlobaltermsAndConditions && - (
-

- Terms & Conditions -

-
    -
  1. Once goods are sold, they are not exchangeable or refundable.
  2. -
  3. Please check the product before leaving the counter.
  4. -
-
) - : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
-

- Terms & Conditions -

-
    - {TermsAndConditions?.map(item => (
  1. {item?.TermsandConditions}
  2. ))} - {/*
  3. Please check the product before leaving the counter.
  4. */} -
-
) - } + {GlobaldummyData + ? GlobaltermsAndConditions && ( +
+

+ Terms & Conditions +

+
    +
  1. + Once goods are sold, they are not exchangeable + or refundable. +
  2. +
  3. + Please check the product before leaving the + counter. +
  4. +
+
+ ) + : TermsnAdCondition == true && + TermsAndConditions?.length > 0 && ( +
+

+ Terms & Conditions +

+
    + {TermsAndConditions?.map((item) => ( +
  1. + {item?.TermsandConditions} +
  2. + ))} + {/*
  3. Please check the product before leaving the counter.
  4. */} +
+
+ )}
-
+
-

Certified that the particulars given above are true and correct.

+

+ Certified that the particulars given above are true and + correct. +

- {GlobaldummyData ?

Company Name

- :

"For" {companyName}

} + {GlobaldummyData ? ( +

Company Name

+ ) : ( +

"For" {companyName}

+ )}

Authorised Signatory

- {GlobaldummyData ? GlobalSignature && (
- -
) : Signature == true && (
- -
)} + {GlobaldummyData + ? GlobalSignature && ( +
+ +
+ ) + : Signature == true && ( +
+ +
+ )}

(Common Seal)

@@ -2190,25 +3608,31 @@ const InvoiceTemplate = ({ index, {/* Copy Labels */}
- {GlobaldummyData ? GlobalIsnotes && - (
-

Notes : 10 days Return policy

+ {GlobaldummyData + ? GlobalIsnotes && ( +
+

+ Notes : 10 days Return policy +

-
-
) : - Notestext && (
-

{Notestext}

+
+
+ ) + : Notestext && ( +
+

+ {Notestext} +

- {/*
*/} -
) - } + {/*
*/} +
+ )}
- - } + )} ); }; -export default InvoiceTemplate; \ No newline at end of file +export default InvoiceTemplate;