import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { extractLastNumber, extractLastNumberOrderId, } from '../../../Services/Others'; import { GlobalprintSlNo, GlobalprintItem, GlobalprintMRP, GlobalprintDiscount, GlobalprintQuantity, GlobalprintRate, GlobalprintAmount, GlobalprintHsnCode, GlobalprintQrcodet, GlobalPritdummyData, GloabalFieldDetails, changeReprintDataFound, GlobalprintSignature, GlobalprinttermsAndConditions, GlobalSignatureImage, Globalnotes, GlobalthemeFormat, GlobalBillName, GlobalSelectedPrintHeaderColor, GlobalSelectedPrintHeaderFontColor, GlobalSelectedTableHeaderColor, GlobalSelectedTableHeaderFontColor, GlobalSelectedTableBodyColor, GlobalSelectedTableBodyFontColor, GlobalRowType, GlobalSelectedFooterColor, GlobalSelectedFooterFontColor, } from '../../../Features/ThemeChange/ThemeChange'; import { GlobalUpiIDprint } from '../../../Features/BookingScreen/BookingData/BookingData'; import '../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.scss'; import QRCodeModule from 'react-qr-code'; import signature from '../../../Images/signatureimage.jpg'; import { ApplicationPreferences } from '../../../Features/BrachLogin/BranchLogin'; import { isMobile } from 'react-device-detect'; const PurchaseOrdStyle10 = ({ index, ExtraChargeTotal, Date1, totalQuantityFilter, CashierName, totalQuantity, OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas, }) => { const QRCode = QRCodeModule.default || QRCodeModule; const dispatch = useDispatch(); const GlobalUpiID = useSelector(GlobalUpiIDprint); // const FieldDetails = useSelector(GloabalFieldDetails); const FieldDetails = printDatas?.FieldDetails?.reduce((acc, item) => { acc[item.ConfigName] = true; return acc; }, {}); 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 Amount = FieldDetails?.['Amount']; const HsnCode = FieldDetails?.['HsnCode']; const Qrcodet = FieldDetails?.['Qrcode']; const GlobalSlNo = useSelector(GlobalprintSlNo); const GlobalItem = useSelector(GlobalprintItem); const GlobalMRP = useSelector(GlobalprintMRP); const GlobalDiscount = useSelector(GlobalprintDiscount); const GlobalQuantity = useSelector(GlobalprintQuantity); const GlobalRate = useSelector(GlobalprintRate); const GlobalAmount = useSelector(GlobalprintAmount); const GlobalHsnCode = useSelector(GlobalprintHsnCode); const GlobalQrcodet = useSelector(GlobalprintQrcodet); const GlobaldummyData = useSelector(GlobalPritdummyData); const GlobalSignature = useSelector(GlobalprintSignature); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); const GlobalSignatureImages = useSelector(GlobalSignatureImage); const GlobalIsnotes = useSelector(Globalnotes); const GlobalthemeFormatr = useSelector(GlobalthemeFormat); const GlobalBilltext = useSelector(GlobalBillName); 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 chunkSize = isMobile ? 10 : PageSize == 'A5' ? 10 : 16; let dataSource = table2Data?.productDetails || []; const Signature = FieldDetails?.['signature']; const TermsnAdCondition = FieldDetails?.['terms&conditions']; // Paginate the data const productsData = table2Data?.productDetails || []; console.log(productsData, 'productsData'); const paginatedChunks = []; 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 ? 10 : PageSize == 'A5' ? 5 : 13); const keysLength = Object.keys(table2Data ?? {}).length; if (keysLength > 0) { dispatch(changeReprintDataFound(true)); } 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 monthIndex = currentDate.getMonth(); const year = currentDate.getFullYear().toString().slice(-2); const formattedDate = `${day}-${monthNames[monthIndex]}-${year}`; console.log(printDatas, 'FormatTheme', FormatTheme); const purchaseData = table2Data?.productDetails || []; const calculatedTotalQuantity = purchaseData?.reduce((total, item) => { return total + (Number(item?.SalesQty) || 0); }, 0); // const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const SelectedHeaderFontColor = useSelector( GlobalSelectedPrintHeaderFontColor ); const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor); const SelectedTableHeaderFontColor = useSelector( GlobalSelectedTableHeaderFontColor ); const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor); const SelectedTableBodyFontColor = useSelector( GlobalSelectedTableBodyFontColor ); const SelectedRowType = useSelector(GlobalRowType); const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor); const SelectedTableFooterFontColor = useSelector( GlobalSelectedFooterFontColor ); // 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 headerStyle = { backgroundColor: GlobaldummyData ? SelectedHeaderColor : headerColor?.background, color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font, }; const tableHeaderStyle = { backgroundColor: GlobaldummyData ? SelectedTableHeaderColor : tableHeaderColor?.background, color: GlobaldummyData ? SelectedTableHeaderFontColor : tableHeaderColor?.font, }; const tableBodyStyle = { backgroundColor: GlobaldummyData ? SelectedTableBodyColor : tableBodyColor?.background, color: GlobaldummyData ? SelectedTableBodyFontColor : tableBodyColor?.font, }; const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType; const footerColorStyle = { backgroundColor: GlobaldummyData ? SelectedTableFooterColor : footerColor?.background, color: GlobaldummyData ? SelectedTableFooterFontColor : footerColor?.font, }; return ( <> {FormatTheme ? (
{paginatedChunks.map((dataChunk, chunkIndex) => ( //
0 ? ' print-page-break' : ''}`} style={{ display: "flex", flexDirection: "column", justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme ? "space-between" : "", height: 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: FormatTheme ? PageSize == 'A5' ? '170mm' : isMobile ? '257mm' : '257mm' : '', }} key={chunkIndex} > {/*
*/}
{GlobaldummyData ? 'ABC 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 : '')}

Mobile:+91{' '} {GlobaldummyData ? '8428XXXXXX' : table2Data?.BrMobile}

{table2Data?.OrderType === 'E' && (
Estimate
)} {table2Data?.OrderType === 'E' ? ( '' ) : (
{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : 'Cash' + ' Bill' : BillName ? BillName : PaymentStatus?.length === 1 ? PaymentStatus?.[0]?.PaymentTypeName + ' Bill' : ''}
)}
{' '} {GlobaldummyData ? formattedDate : Date1}{' '}

{SLNO && ( )} {Item && } {HsnCode && ( )} {MRP && ( )} {Rate && ( )} {Quantity && ( )} {Discount && ( )} {Amount && ( )} {dataChunk.map((row, rowIndex) => ( {SLNO && ( )} {/* Item Name fallback order */} {Item && ( )} {/* HSN fallback order */} {HsnCode && ( )} {/* MRP fallback order */} {MRP && ( )} {/* Rate fallback order */} {Rate && ( )} {/* Quantity fallback order */} {Quantity && ( )} {/* Discount fallback order */} {Discount && ( )} {/* Amount fallback order */} {Amount && ( )} ))}
S.No Item HSN MRP Rate Qty Disc Amount
{rowIndex + 1 + chunkIndex * chunkSize} {row.ProdName || row.ItemName || row.ProductName || row.Item || row.Name || ''} {row.HSN || row.HSNCode || row.HsnCode || row.Hsn || ''} {row.MRP !== undefined ? Number(row.MRP).toFixed(2) : row.Mrp !== undefined ? Number(row.Mrp).toFixed(2) : ''} {row.Rate !== undefined ? Number(row.Rate).toFixed(2) : row.SaleRate !== undefined ? Number(row.SaleRate).toFixed(2) : ''} {row.SalesQty !== undefined ? Number(row.SalesQty).toFixed(2) : row.Qty !== undefined ? Number(row.Qty).toFixed(2) : ''} {row.discount !== undefined ? Number(row.discount).toFixed(2) : row.Disc !== undefined ? Number(row.Disc).toFixed(2) : ''} {row.TotalAmt !== undefined ? Number(row.TotalAmt).toFixed(2) : row.Amount !== undefined ? Number(row.Amount).toFixed(2) : ''}
{chunkIndex === paginatedChunks.length - 1 && !shouldFooterBeOnNewPage && FormatTheme && ( <>

{/*
Amount :
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
*/}
{((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) || (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) || (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && ( <>

--------- GST Breakup Details -----------

{OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( {OrderDetailGST?.map((item) => ( ))}
Taxable Amount CGST ( {OrderDetailGST?.[0]?.TaxPercentage / 2}%) SGST ( {OrderDetailGST?.[0]?.TaxPercentage / 2}%) Total Amount
{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 && ( <>
{OrderDetailIGST?.map((item) => ( ))}
Taxable Amount IGST ( {OrderDetailIGST?.[0]?.TaxPercentage}%) Total Amount
{Number( item.WithOutTaxAmount ).toFixed(2)} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)} {OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0 && ( <>
{OrderDetailVAT?.map((item) => ( ))}
Taxable Amount VAT ( {OrderDetailVAT?.[0]?.TaxPercentage}%) Total Amount
{Number( item.WithOutTaxAmount ).toFixed(2)} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)}

)}
{/*
{PaymentStatus?.length === 1 ? PaymentStatus?.[0]?.PaymentTypeName : "Split"}   Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
*/}
{' '} Purchase Order No:{' '} {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId( table2Data?.OrderId, table2Data?.FYStatus )}{' '}
{GlobaldummyData &&
Cashier : Cashier Name
} {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && (
Cashier : {CashierName}
)} {GlobaldummyData && (
Customer : Customer Name
)} {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData && (
Supplier Name : {table2Data?.CustSuppName}
)} {table2Data?.BookingTypeName == 'Dine In' && (
Waiter :{' '} {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
)} {/*
CARD NO : ********67
CARD HOLDER : CARD HOLDER NAME
TOTAL SAVING : 100
*/}
{GlobaldummyData ? GlobalQrcodet && (
QR Code
{' '} Scan To Pay{' '}
{' '} ₹{' '} {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
) : Qrcodet && table2Data?.PaymentTypeName == 'UPI' && (
Scan to Pay{' '}
₹ {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
)}
{/*
Purchase Order No: {GlobaldummyData ? '5' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
*/} {/*
Terms & Condition
Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy
*/}
{Notestext && (

{Notestext}


)}
{TermsnAdCondition == true && (

Terms & Conditions

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

Signature

)}
{PrintGreeting?.SettingValue === 'Y' && (
Thank You
)} )}
))} {shouldFooterBeOnNewPage && FormatTheme && (
<>

{/*
Qty :
{GlobaldummyData ? '8' : calculatedTotalQuantity}
Items :
{GlobaldummyData ? '8' : totalQuantityFilter?.length}
*/} {/*
Amount :
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
*/}
{((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) || (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) || (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && ( <>

--------- GST Breakup Details -----------

{OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( {OrderDetailGST?.map((item) => ( ))}
Taxable Amount CGST ( {OrderDetailGST?.[0]?.TaxPercentage / 2}%) SGST ( {OrderDetailGST?.[0]?.TaxPercentage / 2}%) Total Amount
{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 && ( <>
{OrderDetailIGST?.map((item) => ( ))}
Taxable Amount IGST ( {OrderDetailIGST?.[0]?.TaxPercentage}%) Total Amount
{Number(item.WithOutTaxAmount).toFixed( 2 )} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)} {OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0 && ( <>
{OrderDetailVAT?.map((item) => ( ))}
Taxable Amount VAT ({OrderDetailVAT?.[0]?.TaxPercentage} %) Total Amount
{Number(item.WithOutTaxAmount).toFixed( 2 )} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)}

)}
{/*
{PaymentStatus?.length === 1 ? PaymentStatus?.[0]?.PaymentTypeName : "Split"}   Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
*/}
{' '} Purchase Order No :{' '} {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId( table2Data?.OrderId, table2Data?.FYStatus )}{' '}
{GlobaldummyData &&
Cashier : Cashier Name
} {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData &&
Cashier : {CashierName}
} {GlobaldummyData &&
Customer : Customer Name
} {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData && (
Supplier Name : {table2Data?.CustSuppName}
)} {table2Data?.BookingTypeName == 'Dine In' && (
Waiter :{' '} {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
)} {/*
CARD NO : ********67
CARD HOLDER : CARD HOLDER NAME
TOTAL SAVING : 100
*/}
{GlobaldummyData ? GlobalQrcodet && (
QR Code
{' '} Scan To Pay{' '}
{' '} ₹{' '} {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
) : Qrcodet && table2Data?.PaymentTypeName == 'UPI' && (
Scan to Pay{' '}
₹ {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
)}
{/*
Purchase Order No {GlobaldummyData ? '5' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
*/} {/*
Terms & Condition
Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy
*/}
{Notestext && (

{Notestext}


)}
{TermsnAdCondition == true && (

Terms & Conditions

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

Signature

)}
{PrintGreeting?.SettingValue === 'Y' && (
Thank You{' '}
)}
)}
) : (
{GlobaldummyData ? 'ABC 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 : '')}

Mobile:+91{' '} {GlobaldummyData ? '8428XXXXXX' : table2Data?.BrMobile}

{table2Data?.OrderType === 'E' && (
Estimate
)} {table2Data?.OrderType === 'E' ? ( '' ) : (
{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : 'Cash' + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ''}
)}
{' '} {GlobaldummyData ? formattedDate : Date1}{' '}

{ <> {
Take Away
} {GlobaldummyData ? GlobalSlNo && : SLNO && } {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalQuantity && ( ) : Quantity && ( )} {GlobaldummyData ? GlobalHsnCode && ( ) : HsnCode && ( )} {GlobaldummyData ? GlobalMRP && ( ) : MRP && ( )} {GlobaldummyData ? GlobalDiscount && ( ) : Discount && ( )} {GlobaldummyData ? GlobalRate && ( ) : Rate && ( )} {GlobaldummyData ? GlobalAmount && ( ) : Amount && ( )} {productsData?.map((item, index) => { return ( {GlobaldummyData ? GlobalSlNo && ( ) : SLNO && ( )} {GlobaldummyData ? GlobalItem && ( ) : Item && ( )} {GlobaldummyData ? GlobalQuantity && ( ) : Quantity && ( )} {GlobaldummyData ? GlobalHsnCode && ( ) : HsnCode && ( )} {GlobaldummyData ? GlobalMRP && ( ) : MRP && ( )} {GlobaldummyData ? GlobalDiscount && ( ) : Discount && ( )} {GlobaldummyData ? GlobalRate && ( ) : Rate && ( )} {GlobaldummyData ? GlobalAmount && ( ) : Amount && ( )} ); })}
S.NS.NItemItem Qty Qty HSN HSN MRP MRP Dis{' '} Dis{' '} Rate Rate Amt Amt
{index + 1} {index + 1} {item?.ProdName}({item?.Size + item?.UomName})
{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?.SalesQty} {item?.SalesQty} {item?.HSN} {item?.HSN} {item?.MRP} {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP} {item.discount} {item?.Type != 'C' ? item?.OfferAmt || 0 : item?.OfferValue || 0} {item?.Rate} {item?.Rate} {item?.TotalAmt} {item?.Type != 'C' ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}
}

{/*
Qty :
{GlobaldummyData ? '8' : calculatedTotalQuantity}
Items :
{GlobaldummyData ? '8' : totalQuantityFilter?.length}
*/} {/*
Amount :
{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
*/}
{/*

{table2Data?.PaymentTypeName}  Payment :  {Number(table2Data?.NetAmount).toFixed(2)}/-

*/}
{((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) || (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) || (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && ( <>

--------- GST Breakup Details -----------

{OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( {OrderDetailGST?.map((item) => ( ))}
Taxable Amount CGST ({OrderDetailGST?.[0]?.TaxPercentage / 2}%) SGST ({OrderDetailGST?.[0]?.TaxPercentage / 2}%) Total Amount
{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 && ( <>
{OrderDetailIGST?.map((item) => ( ))}
Taxable Amount IGST ({OrderDetailIGST?.[0]?.TaxPercentage}%) Total Amount
{Number(item.WithOutTaxAmount).toFixed(2)} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)} {OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0 && ( <>
{OrderDetailVAT?.map((item) => ( ))}
Taxable Amount VAT ({OrderDetailVAT?.[0]?.TaxPercentage}%) Total Amount
{Number(item.WithOutTaxAmount).toFixed(2)} {Number(item.TaxAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
)}

)}
{GlobaldummyData &&
Cashier : Cashier Name
} {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData &&
Cashier : {CashierName}
} {GlobaldummyData &&
Customer : Customer Name
} {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData && (
Customer : {table2Data?.CustSuppName}
)} {table2Data?.BookingTypeName == 'Dine In' && (
Waiter : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
)}
{GlobaldummyData ? GlobalQrcodet && (
QR Code
{' '} Scan To Pay{' '}
{' '} ₹{' '} {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
) : Qrcodet && table2Data?.PaymentTypeName == 'UPI' && (
Scan to Pay{' '}
₹ {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
)}
YOUR ORDER NO:{' '} {GlobaldummyData ? '5' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
{GlobaldummyData ? GlobalIsnotes && (

Notes : 10 days Return policy


) : Notestext && (

{Notestext}


)}
{TermsnAdCondition == true && (

Terms & Conditions

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

Signature

)}
{PrintGreeting?.SettingValue === 'Y' && (
Thank You{' '}
)}
)} ); }; export default PurchaseOrdStyle10;