diff --git a/src/Features/ThemeChange/ThemeChange.js b/src/Features/ThemeChange/ThemeChange.js index 7cd788e..68306ec 100644 --- a/src/Features/ThemeChange/ThemeChange.js +++ b/src/Features/ThemeChange/ThemeChange.js @@ -470,6 +470,7 @@ const initialState = { notes: false, SignatureImage: '', BillName: '', + SelectedHeaderColor: '#000000', allColors: [], allColorsCat: [], LayoutOverallColorsList: [], @@ -2146,6 +2147,9 @@ const ThemeSlice = createSlice({ changeBillName: (state, action) => { state.BillName = action?.payload; }, + changeSelectedHeaderColor: (state, action) => { + state.SelectedHeaderColor = action?.payload; + }, changeCurrentColor: (state, action) => { const { color } = action?.payload; state.CurrentColor = color; @@ -2690,6 +2694,7 @@ export const { changeOthersTheme, changeActiveTheme, changeScanTemplate, + changeSelectedHeaderColor, } = ThemeSlice.actions; export const GlobalPricingAppPricingName = (state) => @@ -2720,6 +2725,8 @@ export const GlobalthemeFormat = (state) => state.theme?.themeFormat; export const Globalnotes = (state) => state.theme?.notes; export const GlobalSignatureImage = (state) => state.theme?.SignatureImage; export const GlobalBillName = (state) => state.theme?.BillName; +export const GlobalSelectedPrintHeaderColor = (state) => + state.theme?.SelectedHeaderColor; export const changeCurrentColorValue = (state) => state.theme?.CurrentColor; export const changeCurrentTextValue = (state) => state.theme?.CurrentText; diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx index a30d951..74f5029 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx @@ -87,11 +87,13 @@ const BSBillingEditQuantity = (props) => { ); const ReorderProductData = useSelector(GlobalReorderProductDetails); const templateData = useSelector(getTemplateData); - const OfferCheckedInSetup = templateData?.BookingNavbar?.[1].some( - (item) => item?.OptionName == 'Offer' - ) || (templateData?.BookingCombo1?.[1]?.some( - (item) => item?.OptionName == 'Offer' - )); + const OfferCheckedInSetup = + templateData?.BookingNavbar?.[1].some( + (item) => item?.OptionName == 'Offer' + ) || + templateData?.BookingCombo1?.[1]?.some( + (item) => item?.OptionName == 'Offer' + ); const [ClearQuantity, setClearQuantity] = useState(false); const CartOrderDetails = useSelector(GlobalOrderCardDetails); const SettingDataSelector = useSelector(PreferenceData); @@ -704,7 +706,7 @@ const BSBillingEditQuantity = (props) => { return ( cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.OfferMessage?.[0]?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && cartItem?.OfferMode === editedProduct?.OfferMode && cartItem?.BookingTypeName !== editedProduct?.BookingTypeName ); @@ -838,7 +840,7 @@ const BSBillingEditQuantity = (props) => { cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.OrderRate === editedProduct?.OrderRate && cartItem?.BookingTypeName !== - editedProduct?.BookingTypeName && + editedProduct?.BookingTypeName && !cartItem?.OfferMode && cartItem?.Offer === 0 ); @@ -852,7 +854,7 @@ const BSBillingEditQuantity = (props) => { cartItem?.InwardDtlId === editedProduct?.InwardDtlId && cartItem?.OrderRate === editedProduct?.OrderRate && cartItem?.BookingTypeName !== - editedProduct?.BookingTypeName && + editedProduct?.BookingTypeName && cartItem?.OfferMode === editedProduct?.OfferMode && cartItem?.Offer > 0 ); @@ -985,7 +987,7 @@ const BSBillingEditQuantity = (props) => { ) ) && product?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && product?.OfferMode === editedProduct?.OfferMode ) { const freeQty = @@ -1018,7 +1020,7 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && offerProduct?.OfferMode === editedProduct?.OfferMode; if (hasMatchingFreeProduct && isMatchingOffer) { @@ -1101,7 +1103,7 @@ const BSBillingEditQuantity = (props) => { ) ) && product?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && product?.OfferMode === editedProduct?.OfferMode ) { return { @@ -1131,7 +1133,7 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && offerProduct?.OfferMode === editedProduct?.OfferMode; if (hasMatchingFreeProduct && isMatchingOffer) { @@ -1318,7 +1320,7 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && offerProduct?.OfferMode === editedProduct?.OfferMode; if (hasMatchingFreeProduct && isMatchingOffer) { @@ -1420,7 +1422,7 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - editedProduct?.OfferMessage?.[0]?.OfferId && + editedProduct?.OfferMessage?.[0]?.OfferId && offerProduct?.OfferMode === editedProduct?.OfferMode; if (hasMatchingFreeProduct && isMatchingOffer) { @@ -1574,7 +1576,7 @@ const BSBillingEditQuantity = (props) => { ) && cartItem?.Offer && isFreeProductApplicable?.OfferId === - cartItem?.OfferMessage?.[0]?.OfferId + cartItem?.OfferMessage?.[0]?.OfferId ); } ); @@ -1863,11 +1865,11 @@ const BSBillingEditQuantity = (props) => { product?.ProdId === editedProduct?.ProdId && product?.InwardDtlId === editedProduct?.InwardDtlId && product?.OfferId === - (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && + (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && product?.OfferMode === - (sameBookingTypeProduct?.OfferMode || - otherBookingTypeProduct?.OfferMode) + (sameBookingTypeProduct?.OfferMode || + otherBookingTypeProduct?.OfferMode) ) { return { ...product, @@ -1901,11 +1903,11 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && + (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeProduct?.OfferMessage?.[0]?.OfferId) && offerProduct?.OfferMode === - (sameBookingTypeProduct?.OfferMode || - otherBookingTypeProduct?.OfferMode); + (sameBookingTypeProduct?.OfferMode || + otherBookingTypeProduct?.OfferMode); if (hasMatchingFreeProduct && isMatchingOffer) { // Get loyalty points from the matching free product @@ -2046,7 +2048,7 @@ const BSBillingEditQuantity = (props) => { cartItem?.Offer > 0 && isFreeProductApplicable?.OfferMode === cartItem?.OfferMode && isFreeProductApplicable?.OfferId === - cartItem?.OfferMessage?.[0]?.OfferId + cartItem?.OfferMessage?.[0]?.OfferId ); } ); @@ -2149,11 +2151,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.InwardDtlId === - otherBookingTypeProduct.InwardDtlId && + otherBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - otherBookingTypeProduct.BookingTypeName && + otherBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - otherBookingTypeProduct.OrderRate && + otherBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2224,12 +2226,12 @@ const BSBillingEditQuantity = (props) => { product?.ProdId === editedProduct?.ProdId && product?.InwardDtlId === editedProduct?.InwardDtlId && product?.OfferId === - (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeFreeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeFreeProduct?.OfferMessage?.[0] + ?.OfferId) && product?.OfferMode === - (sameBookingTypeFreeProduct?.OfferMode || - otherBookingTypeFreeProduct?.OfferMode) + (sameBookingTypeFreeProduct?.OfferMode || + otherBookingTypeFreeProduct?.OfferMode) ) { return { ...product, @@ -2263,13 +2265,13 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - (sameBookingTypeFreeProduct?.OfferMessage?.[0] - ?.OfferId || - otherBookingTypeFreeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeFreeProduct?.OfferMessage?.[0] + ?.OfferId || + otherBookingTypeFreeProduct?.OfferMessage?.[0] + ?.OfferId) && offerProduct?.OfferMode === - (sameBookingTypeFreeProduct?.OfferMode || - otherBookingTypeFreeProduct?.OfferMode); + (sameBookingTypeFreeProduct?.OfferMode || + otherBookingTypeFreeProduct?.OfferMode); if (hasMatchingFreeProduct && isMatchingOffer) { // Get loyalty points from the matching free product @@ -2351,11 +2353,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.InwardDtlId === - sameBookingTypeProduct.InwardDtlId && + sameBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - sameBookingTypeProduct.BookingTypeName && + sameBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - sameBookingTypeProduct.OrderRate && + sameBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2408,11 +2410,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.InwardDtlId === - sameBookingTypeProduct.InwardDtlId && + sameBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - sameBookingTypeProduct.BookingTypeName && + sameBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - sameBookingTypeProduct.OrderRate && + sameBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2501,11 +2503,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem?.InwardDtlId === - otherBookingTypeProduct.InwardDtlId && + otherBookingTypeProduct.InwardDtlId && cartItem?.BookingTypeName === - otherBookingTypeProduct.BookingTypeName && + otherBookingTypeProduct.BookingTypeName && cartItem?.OrderRate === - otherBookingTypeProduct.OrderRate && + otherBookingTypeProduct.OrderRate && cartItem?.OfferMode && cartItem?.Offer > 0 ) { @@ -2534,11 +2536,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.InwardDtlId === - otherBookingTypeProduct.InwardDtlId && + otherBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - otherBookingTypeProduct.BookingTypeName && + otherBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - otherBookingTypeProduct.OrderRate && + otherBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2568,11 +2570,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.InwardDtlId === - otherBookingTypeProduct.InwardDtlId && + otherBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - otherBookingTypeProduct.BookingTypeName && + otherBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - otherBookingTypeProduct.OrderRate && + otherBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2671,12 +2673,12 @@ const BSBillingEditQuantity = (props) => { product?.ProdId === editedProduct?.ProdId && product?.InwardDtlId === editedProduct?.InwardDtlId && product?.OfferId === - (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeFreeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeFreeProduct?.OfferMessage?.[0] + ?.OfferId) && product?.OfferMode === - (sameBookingTypeFreeProduct?.OfferMode || - otherBookingTypeFreeProduct?.OfferMode) + (sameBookingTypeFreeProduct?.OfferMode || + otherBookingTypeFreeProduct?.OfferMode) ) { return { ...product, @@ -2710,12 +2712,12 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeProduct?.OfferMessage?.[0] + ?.OfferId) && offerProduct?.OfferMode === - (sameBookingTypeProduct?.OfferMode || - otherBookingTypeProduct?.OfferMode); + (sameBookingTypeProduct?.OfferMode || + otherBookingTypeProduct?.OfferMode); if (hasMatchingFreeProduct && isMatchingOffer) { // Get loyalty points from the matching free product @@ -2794,11 +2796,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === sameBookingTypeProduct.ProdId && cartItem.InwardDtlId === - sameBookingTypeProduct.InwardDtlId && + sameBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - sameBookingTypeProduct.BookingTypeName && + sameBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - sameBookingTypeProduct.OrderRate && + sameBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2857,11 +2859,11 @@ const BSBillingEditQuantity = (props) => { if ( cartItem.ProdId === otherBookingTypeProduct.ProdId && cartItem.InwardDtlId === - otherBookingTypeProduct.InwardDtlId && + otherBookingTypeProduct.InwardDtlId && cartItem.BookingTypeName === - otherBookingTypeProduct.BookingTypeName && + otherBookingTypeProduct.BookingTypeName && cartItem.OrderRate === - otherBookingTypeProduct.OrderRate && + otherBookingTypeProduct.OrderRate && cartItem.OfferMode && cartItem.Offer > 0 ) { @@ -2933,12 +2935,12 @@ const BSBillingEditQuantity = (props) => { product?.ProdId === editedProduct?.ProdId && product?.InwardDtlId === editedProduct?.InwardDtlId && product?.OfferId === - (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeFreeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeFreeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeFreeProduct?.OfferMessage?.[0] + ?.OfferId) && product?.OfferMode === - (sameBookingTypeFreeProduct?.OfferMode || - otherBookingTypeFreeProduct?.OfferMode) + (sameBookingTypeFreeProduct?.OfferMode || + otherBookingTypeFreeProduct?.OfferMode) ) { return { ...product, @@ -2972,12 +2974,12 @@ const BSBillingEditQuantity = (props) => { // Also check main offer conditions const isMatchingOffer = offerProduct?.OfferId === - (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || - otherBookingTypeProduct?.OfferMessage?.[0] - ?.OfferId) && + (sameBookingTypeProduct?.OfferMessage?.[0]?.OfferId || + otherBookingTypeProduct?.OfferMessage?.[0] + ?.OfferId) && offerProduct?.OfferMode === - (sameBookingTypeProduct?.OfferMode || - otherBookingTypeProduct?.OfferMode); + (sameBookingTypeProduct?.OfferMode || + otherBookingTypeProduct?.OfferMode); if (hasMatchingFreeProduct && isMatchingOffer) { // Get loyalty points from the matching free product @@ -3131,17 +3133,17 @@ const BSBillingEditQuantity = (props) => { changeOrderCardDetails( CartOrderDetails?.map((i) => i?.InwardDtlId == updatedProduct?.InwardDtlId && - i?.BookingTypeName == updatedProduct?.BookingTypeName && - i?.localId === updatedProduct?.localId + i?.BookingTypeName == updatedProduct?.BookingTypeName && + i?.localId === updatedProduct?.localId ? { - ...updatedProduct, - Offer: 0, - OfferType: - updatedProduct?.Type === 'C' - ? updatedProduct?.OfferType - : null, - OfferMessage: null, - } + ...updatedProduct, + Offer: 0, + OfferType: + updatedProduct?.Type === 'C' + ? updatedProduct?.OfferType + : null, + OfferMessage: null, + } : i ) ) @@ -3158,9 +3160,10 @@ const BSBillingEditQuantity = (props) => { const UpdatedCartItemWithOffer = { ...updatedProduct, - Offer: (bestOffer?.OfferMode === 'I' || bestOffer?.OfferMode === 'Q') ? - bestOffer?.OfferAmount || updatedProduct.Offer : - updatedProduct.Offer || bestOffer?.OfferAmount, + Offer: + bestOffer?.OfferMode === 'I' || bestOffer?.OfferMode === 'Q' + ? bestOffer?.OfferAmount || updatedProduct.Offer + : updatedProduct.Offer || bestOffer?.OfferAmount, OfferType: updatedProduct?.OfferType || bestOffer?.OfferType, OfferMessage: updatedProduct?.OfferMessage || bestOffer?.OfferMessage, }; @@ -3175,10 +3178,11 @@ const BSBillingEditQuantity = (props) => { !c.SalesId && ((c?.OfferModeType && c?.OfferMode === 'B' ? true - : c?.OfferMode !== 'B') - && c?.OfferMode !== 'P' - && c?.OfferMode !== 'C' && c?.OfferMode !== 'O' - && c?.OfferMode !== 'L' + : c?.OfferMode !== 'B') && + c?.OfferMode !== 'P' && + c?.OfferMode !== 'C' && + c?.OfferMode !== 'O' && + c?.OfferMode !== 'L' ? true : c?.Offer === 0); @@ -3708,9 +3712,10 @@ const BSBillingEditQuantity = (props) => { /> - - + 'Change' + //
+ // + //
} open={EditOpen} width={600} @@ -3817,38 +3822,38 @@ const BSBillingEditQuantity = (props) => { ✖ -
-
AddQuantity(1)}> +
+
AddQuantity(1)}> 1
-
AddQuantity(2)}> +
AddQuantity(2)}> 2
-
AddQuantity(3)}> +
AddQuantity(3)}> 3
-
AddQuantity(4)}> +
AddQuantity(4)}> 4
-
AddQuantity(5)}> +
AddQuantity(5)}> 5
-
AddQuantity(6)}> +
AddQuantity(6)}> 6
-
AddQuantity(7)}> +
AddQuantity(7)}> 7
-
AddQuantity(8)}> +
AddQuantity(8)}> 8
-
AddQuantity(9)}> +
AddQuantity(9)}> 9
-
AddQuantity(0)}> +
AddQuantity(0)}> 0
@@ -3903,7 +3908,7 @@ const BSBillingEditQuantity = (props) => { ? `${parts[0]}.${parts.slice(1).join('')}` : cleanedValue; }} - // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} + // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} /> )} @@ -3966,7 +3971,7 @@ const BSBillingEditQuantity = (props) => { ? `${parts[0]}.${parts.slice(1).join('')}` : cleanedValue; }} - // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} + // isOnChange={formType == "edit" || formRef.current?.getFieldsValue()?.CustName ? true : false} /> {/* {
{((RadioBtnSelection == 'Price' && disableSubmitButton) || RadioBtnSelection == 'Quantity') && ( - } - > - )} + } + > + )}
diff --git a/src/Pages/BookingScreen/Components/PrintMainPage/SelectionComponent.jsx b/src/Pages/BookingScreen/Components/PrintMainPage/SelectionComponent.jsx index c1d674c..7bb7913 100644 --- a/src/Pages/BookingScreen/Components/PrintMainPage/SelectionComponent.jsx +++ b/src/Pages/BookingScreen/Components/PrintMainPage/SelectionComponent.jsx @@ -68,6 +68,7 @@ import { changeSelectedLogo, changeSelectedCredit, changeSelectedTax, + changeSelectedHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import '../../../../Styles/BookingScreen/Components/SelectionComponent/SelectionComponent.scss'; import { useAuth } from '../../../../AuthContext.jsx'; @@ -732,6 +733,13 @@ const SelectionComponent = forwardRef((props, ref) => { ) ? dispatch(changeNotes(true)) : dispatch(changeNotes(false)); + + checkedValues?.includes( + sizeCheckList.find((item) => item.ConfigName === 'Header Colour') + ?.ConfigId + ) + ? setisheadercolour(true) + : setisheadercolour(false); }; const handleOptions = async () => { @@ -1278,12 +1286,7 @@ const SelectionComponent = forwardRef((props, ref) => { > {sizeCheckList - ?.filter( - (item) => - item.ConfigName && - (SelectedStyleName == 'TaxInvoice' || - item.ConfigName != 'Header Colour') - ) + ?.filter((item) => item.ConfigName) ?.map((value, key) => ( {
)} - {isheadercolour && SelectedStyleName == 'TaxInvoice' && ( + {isheadercolour && ( + // {isheadercolour && SelectedStyleName == 'TaxInvoice' && (
Header Color { + setSelectedColour(color); + dispatch(changeSelectedHeaderColor(color)); + }} placeholder="Select color" />
diff --git a/src/Pages/BookingScreen/Components/UtillComponents/ShortcutKeyHelper.jsx b/src/Pages/BookingScreen/Components/UtillComponents/ShortcutKeyHelper.jsx index 60f9491..b314106 100644 --- a/src/Pages/BookingScreen/Components/UtillComponents/ShortcutKeyHelper.jsx +++ b/src/Pages/BookingScreen/Components/UtillComponents/ShortcutKeyHelper.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; -import { Modal, List, Typography, Tooltip } from 'antd'; +import { List, Typography, Tooltip } from 'antd'; import { FaKeyboard } from 'react-icons/fa'; +import { DefaultModal } from '../../../../Components/Modal/DefaultModal'; const { Title, Text } = Typography; @@ -40,15 +41,15 @@ const ShortcutKeyHelper = ({}) => {
- - Keyboard Shortcuts + Keyboard Shortcuts
} open={isModalOpen} - onCancel={() => setIsModalOpen(false)} + handleCancel={() => setIsModalOpen(false)} footer={null} width={500} > @@ -65,7 +66,7 @@ const ShortcutKeyHelper = ({}) => { )} /> - + ); }; diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx index b293a10..c4daf07 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,19 +141,19 @@ 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 TakeawayTotal = TakeawayData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, 0 ); - const PackageDetails = table2Data?.PackageDtl + const PackageDetails = table2Data?.PackageDtl; const DineInTotal = DineInData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, 0 @@ -162,63 +177,71 @@ const InvoiceTemplate = ({ index, 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, @@ -228,15 +251,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, @@ -246,15 +269,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, @@ -264,11 +287,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, @@ -277,21 +299,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; } @@ -300,50 +323,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)}

@@ -352,54 +425,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}

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

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

+
+

{companyAddress}

+
+ Phone:{' '} + {GlobaldummyData ? '999999XXXX' : companyPhone} +
+
Email: {companyEmail}
+ {companyGSTIN || + (GlobaldummyData && ( +
+ GSTIN:{' '} + {GlobaldummyData + ? 'XXTTHJJF7679' + : companyGSTIN} +
+ ))} +
+
+ {' '} + BillNo: + {GlobaldummyData + ? '121' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
-

{companyAddress}

-
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 && } - - {GlobaldummyData - ? GlobalRate && - : Rate == true && } - - {GlobaldummyData - ? GlobalDiscount && - : Discount == true && } - - {GlobaldummyData - ? GlobalTax && - : (Tax && table2Data?.OrderType !== 'E') && } - - {GlobaldummyData - ? GlobalAmount && - : Amount == true && } - - - - - - {((GlobaldummyData ? products : dataChunk) || []).map((item, idx) => ( - - {GlobaldummyData - ? GlobalSlNo && ( - + ? GlobalMRP && ( + ) - : SLNO == true && ( - - )} - {GlobaldummyData - ? GlobalItem && - : Item == true && ( - + ) + : Rate == true && ( + + )} + + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount == true && ( + + )} + + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount == true && ( + + )} + + + + {((GlobaldummyData ? products : dataChunk) || []).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 && ( - - )} - - ))} - - - + ) : ( +
+ ({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(',')} +
+ ); + }) + : ''} + + )} + {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 UOMMRPMRPRateRateDisDisTax %Tax %AmountAmount
- {chunkIndex * chunkSize + idx + 1} - MRP - {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}) - - ))} -
+ MRP + + )} - :
- ({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 ( + {GlobaldummyData + ? GlobalRate && ( +
Rate + Rate + Dis + Dis + Tax % + Tax % + Amount + Amount +
+ {chunkIndex * chunkSize + idx + 1} + + {chunkIndex * chunkSize + idx + 1} + + {item?.ProdName} + +
{item?.ProdName}
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? (
- {[imei1, imei2] - .filter(Boolean) - .join(",")} + {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount} PCS{' '} + {item.ParcelQty} PACK ( + {item.ParcelType}) + + ))}
- ); - }) - : ""} -
- {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} +
@@ -1132,403 +1520,947 @@ 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)}
-
+
+
+ Total Amount Payable : +
+
+ {Number( + GlobaldummyData + ? 736 + : table2Data?.NetAmount + )?.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 -

-
    -
  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}

} -

Authorised Signatory

- {GlobaldummyData ? GlobalSignature && (
- -
) : Signature == true && ( -
- {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : } -
+ {/* 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} +
+
+
+ )} -

(Common Seal)

+ +
+ {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} +

+ )} +

+ Authorised Signatory +

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

(Common Seal)

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

+ Notes : 10 days Return policy +

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

+ {Notestext} +

+ + {/*
*/} +
+ )} +
- {/*
*/} - - - - - {/* 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)} +
+
+ Total Amount Payable + + {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount + )?.toFixed(2)} + +
+
+ {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}
-
-
- )} + {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)

@@ -1537,177 +2469,294 @@ 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}

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

{companyAddress}

-
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 && ( + + )} {/* @@ -1729,328 +2778,575 @@ const InvoiceTemplate = ({ index, */} - {((GlobaldummyData ? products : productsData) || []).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.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 + {((GlobaldummyData ? products : productsData) || []).map( + (item, idx) => ( +
+ {idx + 1} + + {idx + 1} + + {item?.ProdName} + +
{item?.ProdName}
+
+ ({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} +
- {" "} - 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)} +
+
+ Total Amount Payable + + {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount + )?.toFixed(2)} + +
+
+ {Number( + GlobaldummyData ? 736 : table2Data?.NetAmount + )?.toFixed(2)} +
-
- {Number(GlobaldummyData ? 736 : table2Data?.NetAmount)?.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)

@@ -2059,25 +3355,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; diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx index 73fe486..b011940 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx @@ -324,7 +324,7 @@ const PrintA4Style11 = ({
)} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Mobile: +91{' '} {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile} @@ -485,175 +485,176 @@ const PrintA4Style11 = ({ > {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO == true && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Item : Item == true && Item} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode == true && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity == true && ( - - { WeightasKg ?'Qty/Kg' :'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP == true && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate == true && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount == true && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) - : (Tax && table2Data?.OrderType !== 'E') && ( - - Tax % - - )} + + Tax % + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount == true && ( - - Amt - - )} + + Amt + + )} @@ -662,180 +663,181 @@ const PrintA4Style11 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO == true && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.name} : Item == true && ( - -
{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 + +
{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?.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 && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : HsnCode == true && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.quantity} - - ) + + {item?.quantity} + + ) : Quantity == true && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.mrp} - - ) + + {item?.mrp} + + ) : MRP == true && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate == true && ( - - {' '} - {item?.MRP} - - )} + + {' '} + {item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - {item.discount} - ) + {item.discount} + ) : Discount == true && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - {item.ProdTaxPercentage} - ) - : (Tax && table2Data?.OrderType !== 'E') && ( - - {item?.ProdTaxPercentage || 0} - - )} + {item.ProdTaxPercentage} + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.price} - - ) + + {item?.price} + + ) : Amount == true && ( - - {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} + + )} ))} @@ -874,7 +876,7 @@ const PrintA4Style11 = ({
ITEMS
Qty
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
OFFER
) : ( '' @@ -900,11 +902,11 @@ const PrintA4Style11 = ({ : totalQuantity}
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
{Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
) : ( @@ -927,40 +929,40 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).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 ? ( @@ -973,8 +975,8 @@ const PrintA4Style11 = ({ }

) : table2Data - .CustomerDetails[0] - .OldCreditBal < 0 ? ( + .CustomerDetails[0] + .OldCreditBal < 0 ? (

{' '} Opening Balance:{' '} @@ -988,51 +990,88 @@ const PrintA4Style11 = ({ )} - {/* 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} +
+ )}
- {(table2Data?.OrderType !== "E") && OrderDetailGST?.length > 0 && + {table2Data?.OrderType !== 'E' && + OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( <> -

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

+

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

- - + - - - @@ -1040,28 +1079,52 @@ const PrintA4Style11 = ({ {OrderDetailGST?.map((item) => ( - - - + + ))} @@ -1101,58 +1164,58 @@ const PrintA4Style11 = ({ {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)} -
-
- )} + )}
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
{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. -
-
- ) +

+ 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 && ( -
-

0 && ( +

- Terms & Conditions -

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

+ Terms & Conditions +

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

- Signature -

- -
- ) +

+ Signature +

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

- Signature -

- -
- )} +

+ Signature +

+ + + )} )} @@ -1445,177 +1508,178 @@ const PrintA4Style11 = ({ > {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') && ( - - )} + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount == true && ( - - )} + + )} @@ -1624,158 +1688,159 @@ const PrintA4Style11 = ({ {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') && ( - - )} + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount == true && ( - - )} + + )} ))} @@ -1814,7 +1879,7 @@ const PrintA4Style11 = ({
ITEMS
Qty
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
OFFER
) : ( '' @@ -1840,11 +1905,11 @@ const PrintA4Style11 = ({ : totalQuantity} {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
{Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
) : ( @@ -1867,40 +1932,40 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).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 ? ( @@ -1913,8 +1978,8 @@ const PrintA4Style11 = ({ }

) : table2Data - .CustomerDetails[0] - .OldCreditBal < 0 ? ( + .CustomerDetails[0] + .OldCreditBal < 0 ? (

{' '} Opening Balance:{' '} @@ -1928,51 +1993,88 @@ const PrintA4Style11 = ({ )} - {/* 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} +
+ )}
- {(table2Data?.OrderType !== "E") && OrderDetailGST?.length > 0 && + {table2Data?.OrderType !== 'E' && + OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( <> -

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

+

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

GST Rate + + GST Rate + Taxable Amount + CGST + SGST + Total
+ {item?.TaxPercentage}%{' '} - {' '} - {Number(item.WithOutTaxAmount).toFixed(2)}{' '} - - {' '} - {Number(item.CGST).toFixed(2)} - {' '} - {Number(item.SGST).toFixed(2)} + {Number( + item.WithOutTaxAmount + ).toFixed(2)}{' '} {' '} - {Number(item.TotalAmt).toFixed(2)} + {Number(item.CGST).toFixed( + 2 + )} + + {' '} + {Number(item.SGST).toFixed( + 2 + )} + + {' '} + {Number( + item.TotalAmt + ).toFixed(2)}
- S.No - + S.No + - S.No - + S.No + ItemItem - HSN - + HSN + - HSN - + HSN + - Qty - + Qty + - { WeightasKg ?'Qty/Kg' :'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - MRP - + MRP + - MRP - + MRP + - Rate - + Rate + - Rate - + Rate + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Tax % - - Tax % - + Tax % + + Tax % + - Amt - + Amt + - Amt - + Amt +
- {index + 1} - + {index + 1} + - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 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?.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?.HSN} - + {item?.HSN} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item?.Rate} - + {item?.Rate} + - {' '} - {item?.Rate} - + {' '} + {item?.Rate} + {item.discount}{item.discount} - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + {item.ProdTaxPercentage} - {item?.ProdTaxPercentage || 0} - {item.ProdTaxPercentage} + {item?.ProdTaxPercentage || 0} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {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} +
- - + - - - @@ -1980,28 +2082,52 @@ const PrintA4Style11 = ({ {OrderDetailGST?.map((item) => ( - - - + + ))} @@ -2039,58 +2165,58 @@ const PrintA4Style11 = ({ {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)} -
-
- )} + )}
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
{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. -
-
- ) +

+ 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 && ( -
-

0 && ( +

- Terms & Conditions -

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

+ Terms & Conditions +

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

- Signature -

- -
- ) +

+ Signature +

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

- Signature -

- -
- )} +

+ Signature +

+ + + )} )} @@ -2426,34 +2552,34 @@ const PrintA4Style11 = ({ {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: {table2Data.CustomerDetails[0].OldCreditBal} @@ -2471,47 +2597,68 @@ const PrintA4Style11 = ({ )} - {/* 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} +
+ )}
- {(table2Data?.OrderType !== "E") && OrderDetailGST?.length > 0 && + {table2Data?.OrderType !== 'E' && + OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( <> -

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

+

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

GST Rate + + GST Rate + Taxable Amount + CGST + SGST + Total
+ {item?.TaxPercentage}%{' '} - {' '} - {Number(item.WithOutTaxAmount).toFixed(2)}{' '} - - {' '} - {Number(item.CGST).toFixed(2)} - {' '} - {Number(item.SGST).toFixed(2)} + {Number( + item.WithOutTaxAmount + ).toFixed(2)}{' '} {' '} - {Number(item.TotalAmt).toFixed(2)} + {Number(item.CGST).toFixed( + 2 + )} + + {' '} + {Number(item.SGST).toFixed( + 2 + )} + + {' '} + {Number( + item.TotalAmt + ).toFixed(2)}
- - + - - - @@ -2524,21 +2671,19 @@ const PrintA4Style11 = ({ - - @@ -2578,54 +2723,54 @@ const PrintA4Style11 = ({ {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)} -
-
- )} + )}
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
{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} +

    + Terms & Conditions +

    +
      +
    1. + Once goods are sold, they are not exchangeable + or refundable.
    2. - ))} - {/*
    3. Please check the product before leaving the counter.
    4. */} -
    -
- )} +
  • + Please check the product before leaving the + counter. +
  • + +
    + ) + : 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 ? GlobalSignature && ( -
    -

    - Signature -

    - -
    - ) +

    + Signature +

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

    - Signature -

    - -
    - )} +

    + Signature +

    + + + )} )} @@ -2933,31 +3078,31 @@ const PrintA4Style11 = ({ {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 ? (

    @@ -2977,36 +3122,47 @@ const PrintA4Style11 = ({ )} - {/* 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} +
    + )}
    - {(table2Data?.OrderType !== "E") && OrderDetailGST?.length > 0 && + {table2Data?.OrderType !== 'E' && + OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0 && ( <> -

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

    +

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

    GST Rate + + GST Rate + Taxable Amount + CGST + SGST + Total
    {' '} - {Number(item.WithOutTaxAmount).toFixed(2)}{' '} + {Number(item.WithOutTaxAmount).toFixed( + 2 + )}{' '} {' '} {Number(item.CGST).toFixed(2)} + {' '} {Number(item.SGST).toFixed(2)} + {' '} {Number(item.TotalAmt).toFixed(2)}
    - + @@ -3035,15 +3191,11 @@ const PrintA4Style11 = ({ {' '} {Number(item.CGST).toFixed(2)} - - @@ -3083,50 +3235,50 @@ const PrintA4Style11 = ({ {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)} +
    -
    - )} + )}
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    {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} +

      + Terms & Conditions +

      +
        +
      1. + Once goods are sold, they are not exchangeable or + refundable.
      2. - ))} - {/*
      3. Please check the product before leaving the counter.
      4. */} -
      -
    - )} +
  • + Please check the product before leaving the counter. +
  • + +
    + ) + : 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 ? GlobalSignature && ( -
    -

    - Signature -

    - -
    - ) +

    + Signature +

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

    - Signature -

    - -
    - )} +

    + Signature +

    + + + )} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx index 2ddd7f9..f4c6f83 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx @@ -1,11 +1,14 @@ -import React from "react"; -import { useSelector } from "react-redux"; -import { GlobalPritdummyData } from "../../../../Features/ThemeChange/ThemeChange"; -import { isMobile } from "react-device-detect"; -import { extractLastNumberOrderId } from "../../../../Services/Others"; -import moment from "moment"; -import { settingDataSelector } from "../../../../Features/PreferenceMaster/PreferenceMaster"; -import { PreferenceData } from "../../../../Features/BookingScreen/BookingData/BookingData"; +import React from 'react'; +import { useSelector } from 'react-redux'; +import { + GlobalPritdummyData, + GlobalSelectedPrintHeaderColor, +} from '../../../../Features/ThemeChange/ThemeChange'; +import { isMobile } from 'react-device-detect'; +import { extractLastNumberOrderId } from '../../../../Services/Others'; +import moment from 'moment'; +import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster'; +import { PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; const TaxInvoice = ({ index, @@ -25,138 +28,140 @@ const TaxInvoice = ({ const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => - setting?.SettingIdName?.toLowerCase() === "estimateprintheader", - )?.SettingValue === "Y"; + setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' + )?.SettingValue === 'Y'; let BillName = printDatas?.PrintHdrName; - let companyColour = printDatas?.PrintHdrColor ?? "#00000"; + let companyColour = printDatas?.PrintHdrColor ?? '#00000'; + + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); // Function to convert number to words 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", + '', + '', + '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] : ""); + 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) : "") + ' Hundred' + + (num % 100 ? ' and ' + numberToWords(num % 100) : '') ); if (num < 100000) return ( numberToWords(Math.floor(num / 1000)) + - " Thousand" + - (num % 1000 ? " " + numberToWords(num % 1000) : "") + ' Thousand' + + (num % 1000 ? ' ' + numberToWords(num % 1000) : '') ); if (num < 10000000) return ( numberToWords(Math.floor(num / 100000)) + - " Lakh" + - (num % 100000 ? " " + numberToWords(num % 100000) : "") + ' Lakh' + + (num % 100000 ? ' ' + numberToWords(num % 100000) : '') ); if (num < 1000000000) return ( numberToWords(Math.floor(num / 10000000)) + - " Crore" + - (num % 10000000 ? " " + numberToWords(num % 10000000) : "") + ' Crore' + + (num % 10000000 ? ' ' + numberToWords(num % 10000000) : '') ); - return "Number too large"; + return 'Number too large'; }; // Helper to format date as 7-Aug-2025 function formatDateToDDMMMYYYY(dateStr) { - console.log(dateStr, "dateStrdateStr"); - if (!dateStr) return ""; + console.log(dateStr, 'dateStrdateStr'); + if (!dateStr) return ''; const date = new Date(dateStr); if (isNaN(date)) return dateStr; // fallback if invalid date const day = date.getDate(); - const month = date.toLocaleString("en-US", { month: "short" }); + const month = date.toLocaleString('en-US', { month: 'short' }); const year = date.getFullYear(); return `${day}-${month}-${year}`; } function removeTimeFromDate(dateStr) { - if (!dateStr) return ""; + if (!dateStr) return ''; // Split on ":" — first part will be "DD-MM-YYYY" - const parts = dateStr.split(":"); + const parts = dateStr.split(':'); return parts[0] || dateStr; } console.log( Date1, - moment(Date1).format("DD-MMM-YYYY"), - "datadatadatadatadatadata", + moment(Date1).format('DD-MMM-YYYY'), + 'datadatadatadatadatadata' ); // Extract data from table2Data - mapping from A4Standard structure const invoiceData = { // Company Details - mapped from A4Standard - companyName: table2Data?.CompName || table2Data?.BrName || "", - companyspecname: table2Data?.AppSpecificName || "", + companyName: table2Data?.CompName || table2Data?.BrName || '', + companyspecname: table2Data?.AppSpecificName || '', companyAddress: { - address1: table2Data?.AddressDetails?.[0]?.Address1 || "", - address2: table2Data?.AddressDetails?.[0]?.Address2 || "", - city: table2Data?.AddressDetails?.[0]?.City || "", - state: table2Data?.AddressDetails?.[0]?.State || "", - zip: table2Data?.AddressDetails?.[0]?.Zip || "", + address1: table2Data?.AddressDetails?.[0]?.Address1 || '', + address2: table2Data?.AddressDetails?.[0]?.Address2 || '', + city: table2Data?.AddressDetails?.[0]?.City || '', + state: table2Data?.AddressDetails?.[0]?.State || '', + zip: table2Data?.AddressDetails?.[0]?.Zip || '', }, - companyGSTIN: table2Data?.CompGSTIN || table2Data?.BrGSTIN || "", - companyEmail: table2Data?.CompanyEmail || table2Data?.BrEmail || "", - companyMobile: table2Data?.BrMobile || "", - companyMobile2: table2Data?.BrMobile2 || "", + companyGSTIN: table2Data?.CompGSTIN || table2Data?.BrGSTIN || '', + companyEmail: table2Data?.CompanyEmail || table2Data?.BrEmail || '', + companyMobile: table2Data?.BrMobile || '', + companyMobile2: table2Data?.BrMobile2 || '', // Invoice Details - mapped from A4Standard invoiceNo: table2Data?.OrderId ? extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus) - : "", - invoiceDate: moment(Date1).format("DD-MMM-YYYY"), + : '', + invoiceDate: moment(Date1).format('DD-MMM-YYYY'), // Customer Details - mapped from A4Standard CustomerDetails array customerName: table2Data?.CustomerDetails?.[0]?.CustSuppName || table2Data?.CustSuppName || - "", + '', customerMobile: - table2Data?.CustomerDetails?.[0]?.MobileNo || table2Data?.MobileNo || "", + table2Data?.CustomerDetails?.[0]?.MobileNo || table2Data?.MobileNo || '', customerGSTIN: table2Data?.CustomerDetails?.[0]?.CustGSTNo || table2Data?.CustGSTIN || - "", + '', customerAddress: { - address1: table2Data?.CustomerDetails?.[0]?.Address1 || "", - address2: table2Data?.CustomerDetails?.[0]?.Address2 || "", - state: table2Data?.CustomerDetails?.[0]?.State || "", + address1: table2Data?.CustomerDetails?.[0]?.Address1 || '', + address2: table2Data?.CustomerDetails?.[0]?.Address2 || '', + state: table2Data?.CustomerDetails?.[0]?.State || '', }, // Product Details - mapped from A4Standard productDetails @@ -167,7 +172,7 @@ const TaxInvoice = ({ taxAmount: Number(OrderDetailGST), grandTotal: Number(table2Data?.NetAmount || table2Data?.GrandTotal), totalBillAmount: Number( - table2Data?.BillAmount || table2Data?.NetAmount || 0, + table2Data?.BillAmount || table2Data?.NetAmount || 0 ), // Bank Details - mapped from A4Standard bankDetails: table2Data?.BankDetails?.[0] || null, @@ -176,31 +181,31 @@ const TaxInvoice = ({ let PageSize = printDatas?.PageSize; 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' ); // Calculate GST/IGST totals const cgstTotal = OrderDetailGST && OrderDetailGST.length > 0 ? Number( - OrderDetailGST?.reduce((sum, item) => sum + (item.CGST || 0), 0), + OrderDetailGST?.reduce((sum, item) => sum + (item.CGST || 0), 0) )?.toFixed(2) : 0; const sgstTotal = OrderDetailGST && OrderDetailGST.length > 0 ? Number( - OrderDetailGST?.reduce((sum, item) => sum + (item.SGST || 0), 0), + OrderDetailGST?.reduce((sum, item) => sum + (item.SGST || 0), 0) )?.toFixed(2) : 0; const igstTotal = OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( - OrderDetailIGST?.reduce((sum, item) => sum + (item.TaxAmt || 0), 0), + OrderDetailIGST?.reduce((sum, item) => sum + (item.TaxAmt || 0), 0) )?.toFixed(2) : 0; @@ -217,39 +222,39 @@ const TaxInvoice = ({ cgstTotal, sgstTotal, igstTotal, - "roundoff vaules", + 'roundoff vaules' ); function RoundOffFun(amount) { const roundedAmount = Math.round(amount); const roundOffValue = parseFloat((roundedAmount - amount).toFixed(2)); // const symbol = roundOffValue > 0 ? '+' : ''; // Add "+" symbol for positive values ${symbol} console.log( - "Rounded Amount:", + 'Rounded Amount:', roundedAmount, - "Round Off Value:", - roundOffValue, + 'Round Off Value:', + roundOffValue ); return `${roundOffValue.toFixed(2)}`; } - console.log("=== DEBUG INFO ==="); - console.log("table2Data?.productDetails:", table2Data?.productDetails); - console.log("GlobaldummyData:", GlobaldummyData); - console.log("TakeawayData:", TakeawayData); - console.log("DineInData:", DineInData); - console.log("PageSize:", PageSize); + console.log('=== DEBUG INFO ==='); + console.log('table2Data?.productDetails:', table2Data?.productDetails); + console.log('GlobaldummyData:', GlobaldummyData); + console.log('TakeawayData:', TakeawayData); + console.log('DineInData:', DineInData); + console.log('PageSize:', PageSize); // Allow up to 10 items per page const chunkSize = - table2Data?.OrderType !== "E" + table2Data?.OrderType !== 'E' ? isMobile ? 7 - : PageSize == "A5" + : PageSize == 'A5' ? 9 : 8 : isMobile ? 10 - : PageSize == "A5" + : PageSize == 'A5' ? 12 : 11; let dataSource = []; @@ -263,12 +268,12 @@ const TaxInvoice = ({ } console.log( - "Final DataSource:", + 'Final DataSource:', dataSource, - "Length:", + 'Length:', dataSource.length, - "ChunkSize:", - chunkSize, + 'ChunkSize:', + chunkSize ); const paginatedChunks = []; @@ -296,24 +301,24 @@ const TaxInvoice = ({ paginatedChunks.push([]); // Empty chunk for footer-only page } console.log( - "Paginated Chunks:", + 'Paginated Chunks:', paginatedChunks.length, - "Chunks:", - paginatedChunks.map((chunk, i) => `Chunk ${i}: ${chunk.length} items`), + 'Chunks:', + paginatedChunks.map((chunk, i) => `Chunk ${i}: ${chunk.length} items`) ); - console.log("Should footer be on new page:", shouldFooterBeOnNewPage); + console.log('Should footer be on new page:', shouldFooterBeOnNewPage); return (
    {paginatedChunks?.map((dataChunk, chunkIndex) => ( @@ -322,16 +327,16 @@ const TaxInvoice = ({ className={ isMobile ? `invoice-wrapper container pdf-page` - : `invoice-wrapper container print-chunk${chunkIndex > 0 ? " print-page-break" : ""}` + : `invoice-wrapper container print-chunk${chunkIndex > 0 ? ' print-page-break' : ''}` } style={{ - display: "flex", - flexDirection: "column", + display: 'flex', + flexDirection: 'column', // justifyContent: ((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) ? "space-between" : "", - height: isMobile ? "275mm" : PageSize == "A5" ? "130mm" : "245mm", - marginBottom: "0", + height: isMobile ? '275mm' : PageSize == 'A5' ? '130mm' : '245mm', + marginBottom: '0', pageBreakAfter: - chunkIndex < paginatedChunks.length - 1 ? "always" : "auto", + chunkIndex < paginatedChunks.length - 1 ? 'always' : 'auto', }} > {renderInvoiceContent(dataChunk, chunkIndex)} @@ -343,7 +348,7 @@ const TaxInvoice = ({ function renderInvoiceContent(dataChunk, chunkIndex) { console.log( `Rendering page ${chunkIndex + 1}, chunk has ${dataChunk.length} items:`, - dataChunk, + dataChunk ); const isFirstPage = chunkIndex === 0; @@ -355,7 +360,7 @@ const TaxInvoice = ({ paginatedChunks.length - 1 - (shouldFooterBeOnNewPage ? 1 : 0); const shouldShowTaxDetails = isLastDataChunk && dataChunk.length > 0; console.log( - `Page ${chunkIndex + 1}: isFirstPage=${isFirstPage}, isLastPage=${isLastPage}, isFooterOnlyPage=${isFooterOnlyPage},datachunkslength=${dataChunk.length}`, + `Page ${chunkIndex + 1}: isFirstPage=${isFirstPage}, isLastPage=${isLastPage}, isFooterOnlyPage=${isFooterOnlyPage},datachunkslength=${dataChunk.length}` ); return ( @@ -365,26 +370,26 @@ const TaxInvoice = ({ <>
    -

    - {table2Data?.OrderType === "E" - ? "Estimate" +

    + {table2Data?.OrderType === 'E' + ? 'Estimate' : BillName ? BillName - : "TAX INVOICE"} + : 'TAX INVOICE'}

    -
    - {ReprintType == "Duplicate" - ? "(DUPLICATE FOR RECIPIENT)" - : "(ORIGINAL FOR RECIPIENT)"} +
    + {ReprintType == 'Duplicate' + ? '(DUPLICATE FOR RECIPIENT)' + : '(ORIGINAL FOR RECIPIENT)'}
    @@ -392,54 +397,54 @@ const TaxInvoice = ({ )} {/* Main Container - Always show */} -
    +
    {/* Top Section - Company and Invoice Details - Only on first page */} {isFirstPage && ( -
    +
    {/* Left - Company Details */}
    - {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( - "" + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' ) : (
    {invoiceData.companyName}
    -
    +
    {invoiceData.companyspecname}
    {invoiceData.companyAddress.address1}
    {invoiceData.companyAddress.address2}
    - {invoiceData.companyAddress.city}{" "} + {invoiceData.companyAddress.city}{' '} {invoiceData.companyAddress.zip ? ` - ${invoiceData.companyAddress.zip}` - : ""} + : ''}
    {invoiceData.companyAddress.state}
    {invoiceData.companyGSTIN && ( -
    +
    GSTIN/UIN: {invoiceData.companyGSTIN}
    )} @@ -452,7 +457,7 @@ const TaxInvoice = ({ Mobile: +91 {invoiceData.companyMobile} {invoiceData.companyMobile2 ? `, ${invoiceData.companyMobile2}` - : ""} + : ''}
    )}
    @@ -460,16 +465,16 @@ const TaxInvoice = ({ {/* Buyer Details */}
    -
    Buyer (Bill to)
    -
    +
    Buyer (Bill to)
    +
    {invoiceData.customerName}
    {invoiceData.customerAddress.address1 && ( @@ -482,8 +487,8 @@ const TaxInvoice = ({
    Mobile: {invoiceData.customerMobile}
    )} {invoiceData.customerGSTIN && - table2Data?.OrderType !== "E" && ( -
    + table2Data?.OrderType !== 'E' && ( +
    GSTIN/UIN: {invoiceData.customerGSTIN}
    )} @@ -494,29 +499,29 @@ const TaxInvoice = ({
    {/* Right - Invoice Details */} -
    +
    {/* Invoice No and Date */}
    -
    Invoice No.
    -
    +
    Invoice No.
    +
    {invoiceData.invoiceNo}
    Dated
    -
    +
    {invoiceData.invoiceDate}
    @@ -525,31 +530,31 @@ const TaxInvoice = ({ {/* Delivery Note and Payment Terms */}
    -
    Delivery Note
    +
    Delivery Note
    -
    Mode/Terms of Payment
    +
    Mode/Terms of Payment
    @@ -557,31 +562,31 @@ const TaxInvoice = ({ {/* Reference and Other References */}
    -
    Reference No. & Date
    +
    Reference No. & Date
    -
    Other References
    +
    Other References
    @@ -589,60 +594,60 @@ const TaxInvoice = ({ {/* Buyer's Order */}
    -
    Buyer's Order No.
    +
    Buyer's Order No.
    -
    Dated
    +
    Dated
    {/* Dispatch Details */}
    -
    Dispatch Doc No.
    +
    Dispatch Doc No.
    -
    Delivery Note Date
    +
    Delivery Note Date
    @@ -650,26 +655,26 @@ const TaxInvoice = ({ {/* Dispatched through and Destination */}
    -
    Dispatched through
    +
    Dispatched through
    -
    +
    Destination
    @@ -679,12 +684,12 @@ const TaxInvoice = ({ {/* Terms of Delivery */}
    -
    Terms of Delivery
    +
    Terms of Delivery
    @@ -695,15 +700,15 @@ const TaxInvoice = ({ {!isFirstPage && (
    -

    - {isFooterOnlyPage ? "Tax Invoice" : "Tax Invoice "} +

    + {isFooterOnlyPage ? 'Tax Invoice' : 'Tax Invoice '}

    -
    +
    Invoice No: {invoiceData.invoiceNo}
    @@ -714,67 +719,67 @@ const TaxInvoice = ({
    {/* Table Header */}
    SL.No
    Description of Goods
    HSN/SAC
    Quantity
    Rate
    {/*
    per
    */} -
    +
    Amount
    @@ -786,102 +791,102 @@ const TaxInvoice = ({
    {chunkIndex * chunkSize + index + 1}
    - {item.ProdName || "Product Name"} + {item.ProdName || 'Product Name'}
    {item.BrandName && (
    - {item.BrandName}{" "} + {item.BrandName}{' '}
    )} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( (items) => - items.SerialNumber && items.SerialNumber !== "", + items.SerialNumber && items.SerialNumber !== '' )?.map((a, i) => (
    {a.SerialNumber}
    )) - : ""} + : ''} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( - (id) => id.IMEI1 !== "" || id.IMEI2 !== "", + (id) => id.IMEI1 !== '' || id.IMEI2 !== '' )?.map((id, i) => { - const imei1 = id.IMEI1 || ""; - const imei2 = id.IMEI2 || ""; + const imei1 = id.IMEI1 || ''; + const imei2 = id.IMEI2 || ''; return (
    - {[imei1, imei2].filter(Boolean).join(",")} + {[imei1, imei2].filter(Boolean).join(',')}
    ); }) - : ""} + : ''}
    - {item.HSN || ""} + {item.HSN || ''}
    - {item.SalesQty || 1} {item.UomName || "NOS"} + {item.SalesQty || 1} {item.UomName || 'NOS'}
    {Number( - table2Data?.OrderType !== "E" + table2Data?.OrderType !== 'E' ? item.Rate - item.ProdTaxAmt - : item.Rate || 0, - ).toLocaleString("en-IN", { + : item.Rate || 0 + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -889,17 +894,17 @@ const TaxInvoice = ({ {/*
    {item.UomName || 'NOS'}
    */}
    {Number( - table2Data?.OrderType !== "E" + table2Data?.OrderType !== 'E' ? item.WithoutTaxRate - : item.TotalAmt || 0, - ).toLocaleString("en-IN", { + : item.TotalAmt || 0 + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -912,150 +917,150 @@ const TaxInvoice = ({ {/* Total without tax amount */}
    -
    +
    -
    -
    -
    +
    +
    +
    {/*
    */}
    - ₹{" "} + ₹{' '} {Number( - table2Data?.OrderType !== "E" + table2Data?.OrderType !== 'E' ? invoiceData?.totalBillAmount - : invoiceData?.grandTotal, - ).toLocaleString("en-IN", { + : invoiceData?.grandTotal + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
    - {table2Data?.OrderType !== "E" && ( + {table2Data?.OrderType !== 'E' && ( <> {/* CGST */} {OrderDetailGST && OrderDetailGST.length > 0 && ( <>
    CGST
    {/*
    */}
    {OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {/* SGST */}
    SGST
    {/*
    */}
    {OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.SGST || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    @@ -1064,54 +1069,54 @@ const TaxInvoice = ({ {OrderDetailIGST && OrderDetailIGST.length > 0 && (
    IGST
    {/*
    */}
    {OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    )} @@ -1120,34 +1125,34 @@ const TaxInvoice = ({ {/* Rounding Off */}
    -
    +
    ROUNDING OFF
    -
    -
    -
    +
    +
    +
    {/*
    */} -
    +
    {RoundOffFun( - table2Data?.OrderType !== "E" + table2Data?.OrderType !== 'E' ? roundOffValue - : roundOffEstimateValue, + : roundOffEstimateValue )}
    @@ -1157,61 +1162,61 @@ const TaxInvoice = ({
     
     
     
     
     
    {/*
     
    */}
     
    @@ -1220,60 +1225,60 @@ const TaxInvoice = ({ {/* Total */}
    -
    +
    Total
    -
    +
    {totalQuantity || invoiceData.productDetails?.reduce( (sum, item) => sum + (item.SalesQty || 0), - 0, + 0 ) || - 0}{" "} + 0}{' '} NOS
    -
    +
    {/*
    */}
    - ₹{" "} + ₹{' '} {Number(invoiceData.grandTotal).toLocaleString( - "en-IN", + 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, - }, + } )}
    @@ -1284,71 +1289,71 @@ const TaxInvoice = ({ // Show empty row when no data
    -
    No items to display
    -
    -
    -
    -
    -
    +
    -
    @@ -1363,83 +1368,83 @@ const TaxInvoice = ({ {/* Amount in Words */}
    -
    +
    Amount Chargeable (in words)
    -
    +
    INR {numberToWords(Math.floor(invoiceData.grandTotal))} Only

    E. & O.E

    - {table2Data?.OrderType !== "E" && ( + {table2Data?.OrderType !== 'E' && ( <> {/* Tax Breakdown Table */} -
    +
    {OrderDetailGST && OrderDetailGST.length > 0 ? ( <> {/* Tax Table Header - Main Headers */}
    HSN/SAC
    Taxable Value
    CGST
    SGST/UTGST
    Tax Amount
    @@ -1448,64 +1453,64 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
    Rate
    Amount
    Rate
    Amount
    @@ -1514,94 +1519,94 @@ const TaxInvoice = ({
    - {taxItem.HSN || ""} + {taxItem.HSN || ''}
    {Number( - taxItem.WithOutTaxAmount || 0, - ).toLocaleString("en-IN", { + taxItem.WithOutTaxAmount || 0 + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
    {taxItem.TaxPercentage - ? taxItem.TaxPercentage / 2 + "%" - : "0%"} + ? taxItem.TaxPercentage / 2 + '%' + : '0%'}
    {Number(taxItem.CGST || 0).toLocaleString( - "en-IN", + 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, - }, + } )}
    {taxItem.TaxPercentage - ? taxItem.TaxPercentage / 2 + "%" - : "0%"} + ? taxItem.TaxPercentage / 2 + '%' + : '0%'}
    {Number(taxItem.SGST || 0).toLocaleString( - "en-IN", + 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, - }, + } )}
    -
    +
    {Number( - (taxItem.CGST || 0) + (taxItem.SGST || 0), - ).toLocaleString("en-IN", { + (taxItem.CGST || 0) + (taxItem.SGST || 0) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })} @@ -1610,27 +1615,27 @@ const TaxInvoice = ({ ))}
    Total
    {OrderDetailGST && OrderDetailGST.length > 0 @@ -1638,81 +1643,81 @@ const TaxInvoice = ({ OrderDetailGST?.reduce( (sum, item) => sum + (item.WithOutTaxAmount || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.SGST || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {OrderDetailGST && OrderDetailGST.length > 0 ? Number( OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0) + (item.SGST || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    @@ -1721,41 +1726,41 @@ const TaxInvoice = ({ {/* Tax Table Header - Main Headers */}
    HSN/SAC
    Taxable Value
    IGST
    Tax Amount
    @@ -1763,47 +1768,47 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
    Rate
    Amount
    {/* Tax Table Rows - Dynamic from OrderDetailGST */} @@ -1811,97 +1816,97 @@ const TaxInvoice = ({
    - {taxItem.HSN || ""} + {taxItem.HSN || ''}
    {Number( - taxItem.WithOutTaxAmount || 0, - ).toLocaleString("en-IN", { + taxItem.WithOutTaxAmount || 0 + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
    {taxItem.TaxPercentage - ? taxItem.TaxPercentage + "%" - : "0%"} + ? taxItem.TaxPercentage + '%' + : '0%'}
    {Number(taxItem.TaxAmt || 0).toLocaleString( - "en-IN", + 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, - }, + } )}
    -
    +
    {Number(taxItem.TaxAmt || 0).toLocaleString( - "en-IN", + 'en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, - }, + } )}
    - ))}{" "} + ))}{' '}
    Total
    {OrderDetailIGST && OrderDetailIGST.length > 0 @@ -1909,55 +1914,55 @@ const TaxInvoice = ({ OrderDetailIGST?.reduce( (sum, item) => sum + (item.WithOutTaxAmount || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    {OrderDetailIGST && OrderDetailIGST.length > 0 ? Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0, - ), - ).toLocaleString("en-IN", { + 0 + ) + ).toLocaleString('en-IN', { minimumFractionDigits: 2, maximumFractionDigits: 2, }) - : "0.00"} + : '0.00'}
    @@ -1966,50 +1971,50 @@ const TaxInvoice = ({ {/* Tax Table Header - Main Headers */}
    HSN/SAC
    Taxable Value
    CGST
    SGST/UTGST
    Tax Amount
    @@ -2018,199 +2023,199 @@ const TaxInvoice = ({ {/* Tax Table Sub-Headers */}
    Rate
    Amount
    Rate
    Amount
    -
    0.00
    0%
    0.00
    0%
    0.00
    -
    +
    0.00
    {/* Tax Table Total */}
    Total
    - {"0.00"} + {'0.00'}
    - {"0.00"} + {'0.00'}
    - {"0.00"} + {'0.00'}
    - {"0.00"} + {'0.00'}
    @@ -2220,31 +2225,31 @@ const TaxInvoice = ({ {/* Tax Amount in Words */}
    - Tax Amount (in words):{" "} - - INR{" "} + Tax Amount (in words):{' '} + + INR{' '} {numberToWords( Math.floor( invoiceData.taxAmount || OrderDetailGST?.reduce( (sum, item) => sum + (item.CGST || 0) + (item.SGST || 0), - 0, + 0 ) || Number( OrderDetailIGST?.reduce( (sum, item) => sum + (item.TaxAmt || 0), - 0, - ), + 0 + ) ) || - 0, - ), - )}{" "} + 0 + ) + )}{' '} Only
    @@ -2253,33 +2258,29 @@ const TaxInvoice = ({ )} {/* Bank Details and Signature */}
    + {/* Declaration */}
    Declaration @@ -2291,73 +2292,73 @@ const TaxInvoice = ({
    + {/* Signature Section */}
    {/* Bank Details */}
    - {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( - "" + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' ) : ( -
    +
    Company's Bank Details
    )} - {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( - "" + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' ) : (
    A/c Holder's Name: - - {" "} + + {' '} {invoiceData.companyName}
    Bank Name: - - {" "} - {invoiceData.bankDetails?.BankName || ""} + + {' '} + {invoiceData.bankDetails?.BankName || ''}
    - A/c No.:{" "} - - {invoiceData.bankDetails?.AccountNo || ""} + A/c No.:{' '} + + {invoiceData.bankDetails?.AccountNo || ''}
    - Branch & IFS Code:{" "} - - {invoiceData.bankDetails?.BankBranch || ""} &{" "} - {invoiceData.bankDetails?.IFSCCode || ""} + Branch & IFS Code:{' '} + + {invoiceData.bankDetails?.BankBranch || ''} &{' '} + {invoiceData.bankDetails?.IFSCCode || ''}
    {invoiceData.bankDetails?.SWIFTCode && (
    - + SWIFT Code: - - {" "} - {invoiceData.bankDetails?.SWIFTCode || ""} + + {' '} + {invoiceData.bankDetails?.SWIFTCode || ''}
    )} @@ -2366,21 +2367,21 @@ const TaxInvoice = ({
    - {!estimatePrintHeader && table2Data?.OrderType === "E" ? ( - "" + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' ) : (
    for {invoiceData.companyName} @@ -2388,28 +2389,28 @@ const TaxInvoice = ({ )}
    {/*
    DD
    @@ -2417,7 +2418,7 @@ const TaxInvoice = ({
    ELECTRONICS
    */}
    -
    +
    Authorised Signatory
    @@ -2432,9 +2433,9 @@ const TaxInvoice = ({ {isLastPage && (
    This is a Computer Generated Invoice
    diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx index 7c42ea0..16af439 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx @@ -30,6 +30,7 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss'; import QRCode from 'react-qr-code'; @@ -95,6 +96,7 @@ const PrintStyle1 = ({ const GlobalCashierName = useSelector(GlobalprintCashierName); const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); const GlobalSignatureImages = useSelector(GlobalSignatureImage); @@ -225,9 +227,12 @@ const PrintStyle1 = ({ } }); const hasMappedOffer = offers.some((offer) => - ['ItemWiseOffers', 'BundleOffers', 'QuantityWiseOffers', 'MemberShip'].includes( - offer.TableName - ) + [ + 'ItemWiseOffers', + 'BundleOffers', + 'QuantityWiseOffers', + 'MemberShip', + ].includes(offer.TableName) ); if (hasMappedOffer) { @@ -436,6 +441,7 @@ const PrintStyle1 = ({ style={{ fontSize: 'clamp(2rem, 2.5vw, 2rem)', fontWeight: '600', + color: SelectedHeaderColor, }} > {' '} @@ -3562,6 +3568,7 @@ const PrintStyle1 = ({ style={{ fontSize: 'clamp(2rem, 2.5vw, 2rem)', fontWeight: '600', + color: SelectedHeaderColor, }} > {' '} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx index 79de332..1672df1 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx @@ -27,6 +27,7 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import { GlobalUpiIDprint, @@ -121,6 +122,7 @@ const PrintStyle10 = ({ const paymentTypeUPI = PaymentStatus?.find( (ps) => ps.PaymentTypeName === 'UPI' ); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); let TermsAndConditions = printDatas?.TermsandConditions; let SignatureImg = printDatas?.Signature; @@ -407,7 +409,13 @@ const PrintStyle10 = ({
    -
    +
    {GlobaldummyData ? 'ABC Shop' : table2Data?.BrName}{' '} @@ -2926,7 +2934,10 @@ const PrintStyle10 = ({
    -
    +
    {GlobaldummyData ? 'ABC Shop' : table2Data?.BrName}{' '}
    {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx index a4cd8fa..8416fac 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx @@ -1,8 +1,11 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import QRcode from '../../../../Images/QRcode.png'; -import Logo from '../../../../Images/Logo.jpg' -import { extractLastNumber, extractLastNumberOrderId } from '../../../../Services/Others'; +import Logo from '../../../../Images/Logo.jpg'; +import { + extractLastNumber, + extractLastNumberOrderId, +} from '../../../../Services/Others'; import { GlobalprintSlNo, GlobalprintItem, @@ -26,139 +29,272 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; -import { GlobalUpiIDprint, PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; -import "../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.scss"; +import { + GlobalUpiIDprint, + PreferenceData, +} 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 signature from '../../../../Images/signatureimage.jpg'; import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin'; import { isMobile } from 'react-device-detect'; import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster'; - -const PrintStyle11 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, totalQuantityFilter, BranchCity, BranchZip, CashierName, totalQuantity, - OrderDetailGST, OrderDetailIGST, OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas, isPdf, SalesModePref, sportsAppPreference, - MembershipApplied = null }) => { - +const PrintStyle11 = ({ + index, + ExtraChargeTotal, + Date1, + base64Image, + PrintLogo, + totalQuantityFilter, + BranchCity, + BranchZip, + CashierName, + totalQuantity, + OrderDetailGST, + OrderDetailIGST, + OrderDetailVAT, + table2Data, + PaymentStatus, + PrintGreeting, + printDatas, + isPdf, + SalesModePref, + sportsAppPreference, + 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 Tax = FieldDetails?.["Tax"]; - const Quantity = FieldDetails?.["Quantity"]; - const Rate = FieldDetails?.["Rate"]; - 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 SLNO = FieldDetails?.['Sl.No']; + const Item = FieldDetails?.['Item']; + const MRP = FieldDetails?.['MRP']; + const Discount = FieldDetails?.['Discount']; + const Tax = FieldDetails?.['Tax']; + const Quantity = FieldDetails?.['Quantity']; + const Rate = FieldDetails?.['Rate']; + 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) - const GlobalMRP = useSelector(GlobalprintMRP) - const GlobalDiscount = useSelector(GlobalprintDiscount) - const GlobalTax = useSelector(GlobalprintTax) - 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 GlobalSlNo = useSelector(GlobalprintSlNo); + const GlobalItem = useSelector(GlobalprintItem); + const GlobalMRP = useSelector(GlobalprintMRP); + const GlobalDiscount = useSelector(GlobalprintDiscount); + const GlobalTax = useSelector(GlobalprintTax); + 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) + const GlobalthemeFormatr = useSelector(GlobalthemeFormat); + const GlobalBilltext = useSelector(GlobalBillName); const appPreferences = useSelector(ApplicationPreferences); const SettingData = useSelector(PreferenceData); const GlobalCashierName = useSelector(GlobalprintCashierName); const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); - const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => 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") + const estimatePrintHeader = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + 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' + ); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); - 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 keysLength = Object.keys(table2Data ?? {}).length; - let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S") + let PaymentStatusSuccess = PaymentStatus?.filter( + (ps) => ps.PaymentStatus === 'S' + ); if (keysLength > 0) { dispatch(changeReprintDataFound(true)); } - 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' + ); 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 : 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 products = [ - { ProdName: 'ITEM 1', Rate: 88.00, SalesQty: 2, MRP: 100, TotalAmt: 176, discount: 0, HSN: '01', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, - { ProdName: 'ITEM 2', Rate: 300.00, SalesQty: 1, MRP: 350, TotalAmt: 300, discount: 0, HSN: '02', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, - { ProdName: 'ITEM 3', Rate: 200.00, SalesQty: 1, MRP: 250, TotalAmt: 200, discount: 0, HSN: '03', Size: 250, UomName: 'g', ProdTaxPercentage: 0 }, - { ProdName: 'ITEM 4', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '04', Size: 250, UomName: 'g', ProdTaxPercentage: 18 }, - { ProdName: 'ITEM 5', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '05', Size: 250, UomName: 'g', ProdTaxPercentage: 40 }, - { ProdName: 'ITEM 6', Rate: 130.00, SalesQty: 1, MRP: 150, TotalAmt: 130, discount: 0, HSN: '06', Size: 250, UomName: 'g', ProdTaxPercentage: 0 }, - { ProdName: 'ITEM 7', Rate: 230.00, SalesQty: 1, MRP: 250, TotalAmt: 230, discount: 0, HSN: '08', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, + { + ProdName: 'ITEM 1', + Rate: 88.0, + SalesQty: 2, + MRP: 100, + TotalAmt: 176, + discount: 0, + HSN: '01', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, + { + ProdName: 'ITEM 2', + Rate: 300.0, + SalesQty: 1, + MRP: 350, + TotalAmt: 300, + discount: 0, + HSN: '02', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, + { + ProdName: 'ITEM 3', + Rate: 200.0, + SalesQty: 1, + MRP: 250, + TotalAmt: 200, + discount: 0, + HSN: '03', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 0, + }, + { + ProdName: 'ITEM 4', + Rate: 30.0, + SalesQty: 1, + MRP: 50, + TotalAmt: 30, + discount: 0, + HSN: '04', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 18, + }, + { + ProdName: 'ITEM 5', + Rate: 30.0, + SalesQty: 1, + MRP: 50, + TotalAmt: 30, + discount: 0, + HSN: '05', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 40, + }, + { + ProdName: 'ITEM 6', + Rate: 130.0, + SalesQty: 1, + MRP: 150, + TotalAmt: 130, + discount: 0, + HSN: '06', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 0, + }, + { + ProdName: 'ITEM 7', + Rate: 230.0, + SalesQty: 1, + MRP: 250, + TotalAmt: 230, + discount: 0, + HSN: '08', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, ]; - const chunkSize = PageSize == "A5" ? 8 : 11; + const chunkSize = PageSize == 'A5' ? 8 : 11; let dataSource = []; if (GlobaldummyData || TakeawayData?.length > 0) { @@ -172,1313 +308,4005 @@ const PrintStyle11 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, 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); 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: isMobile ? "295mm" : FormatTheme ? PageSize == "A5" ? '170mm' : "257mm" : "", }} key={chunkIndex}> - - + className={ + isMobile + ? `invoice-wrapper container pdf-page` + : `invoice-wrapper container print-chunk${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") ? '' :
    -
    - {(GlobalLogo && GlobaldummyData) ? image : null} - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? image : null} -
    -
    - {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} -
    - {/*
    +
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    +
    + {GlobalLogo && GlobaldummyData ? ( + image + ) : null} + {base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + image + ) : null} +
    +
    + {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} +
    + {/*
    Save green | Save nature
    */} +
    +
    +
    +
    +
    + {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 NO :{table2Data?.BrMobile} +
    +
    +
    +
    + {GlobaldummyData + ? 'CASH' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : ''}{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} +
    +
    + Bill No :{' '} + {GlobaldummyData + ? '553' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
    -
    -
    -
    - {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 NO :{table2Data?.BrMobile}
    + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`}
    -
    -
    {GlobaldummyData ? 'CASH' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`}
    -
    Bill No : {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`}
    } + )}
    - -
    - {(TakeawayData?.length > 0 || GlobaldummyData) && +
    + {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference &&
    Take Away
    } + {takeAwayPreference && ( +
    + Take Away +
    + )}
    GST Rate + GST Rate + Taxable Amount + {' '} {Number(item.SGST).toFixed(2)} + {' '} {Number(item.TotalAmt).toFixed(2)}
    - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && ( + + ) + : SLNO && } + {GlobaldummyData + ? GlobalItem && ( + + ) + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} {dataChunk?.map((item, index) => { return ( - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && ( + + )} + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - ) + ); })}
    S.NS.NItemItemQty { WeightasKg ?'Qty/Kg' :'Qty'}HSNHSNMRPMRPDis Dis Tax % Tax % RateRateAmtAmtS.NS.NItemItem + Qty + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + HSN + + HSN + + MRP + + MRP + + Dis{' '} + + Dis{' '} + + Tax %{' '} + + Tax %{' '} + + Rate + + Rate + + Amt + + Amt +
    {index + 1}{chunkIndex * chunkSize + index + 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?.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?.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.ProdTaxPercentage}{item?.ProdTaxPercentage || 0}{item?.Rate}{item?.Rate}{item?.TotalAmt}{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}{index + 1} + {chunkIndex * chunkSize + index + 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?.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?.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.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.Rate} + + {item?.Rate} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
    - } - {(DineInData?.length > 0 && dinePreference) && + )} + {DineInData?.length > 0 && dinePreference && ( <> -
    Dine In
    +
    + Dine In +
    - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && ( + + ) + : SLNO && } + {GlobaldummyData + ? GlobalItem && ( + + ) + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} {dataChunk?.map((item, index) => { return ( - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && ( + + )} + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - ) + ); })}
    S.NS.NItemItemQty { WeightasKg ?'Qty/Kg' :'Qty'}HSNHSNMRPMRPDis Dis Tax % Tax % RateRateAmtAmtS.NS.NItemItem + Qty + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + HSN + + HSN + + MRP + + MRP + + Dis{' '} + + Dis{' '} + + Tax %{' '} + + Tax %{' '} + + Rate + + Rate + + Amt + + Amt +
    {index + 1}{chunkIndex * chunkSize + index + 1}{item?.ProdName} -
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    -
    {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.ProdTaxPercentage}{item?.ProdTaxPercentage || 0}{item?.Rate}{item?.Rate}{item?.TotalAmt}{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}{index + 1} + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} +
    {item?.ProdName}
    +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    +
    + {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.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.Rate} + + {item?.Rate} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
    - } + )}
    - {((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme && - <> -
    -
    -
    -
    -
    -
    Qty
    -
    Items
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    Off
    - } - {/*
    SUB TOTAL
    + {chunkIndex === paginatedChunks.length - 1 && + !shouldFooterBeOnNewPage && + FormatTheme && ( + <> +
    +
    +
    +
    +
    +
    + Qty +
    +
    + Items +
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    + Off +
    + )} + {/*
    SUB TOTAL
    ROUND OFF
    */} +
    +
    +
    {GlobaldummyData ? '9' : totalQuantity}
    +
    + {GlobaldummyData + ? '8' + : totalQuantityFilter?.length} +
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    + {GlobaldummyData + ? '8' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} +
    + )} + {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount) ? Number(table2Data?.NetAmount) : 0}
    */} + {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    */} +
    -
    -
    {GlobaldummyData ? '9' : totalQuantity}
    -
    {GlobaldummyData ? '8' : totalQuantityFilter?.length}
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    {GlobaldummyData ? '8' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
    - } - {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount) ? Number(table2Data?.NetAmount) : 0}
    */} - {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    */} + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + takeAwayPreference && ( +
    + TakeAway :{Number(TakeawayTotal).toFixed(2)}/- +
    + )} + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + dinePreference && ( +
    + DineIn :{Number(DineInTotal).toFixed(2)}/- +
    + )} +
    + Amount : + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} + /-
    - {(DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference) && -
    TakeAway :{Number(TakeawayTotal).toFixed(2)}/-
    - } - {(DineInData?.length > 0 && TakeawayData?.length > 0 && dinePreference) && -
    DineIn :{Number(DineInTotal).toFixed(2)}/-
    - } -
    Amount :{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}/-
    -
    -
    - {(table2Data?.OrderType === "E") ? '' : -
    -
    +
    + {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 && ( + + + + + + + + + {OrderDetailGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + CGST + + SGST + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.CGST).toFixed(2)} + + {Number(item.SGST).toFixed(2)} + + {Number( + item.TotalAmt + ).toFixed(2)} +
    + )} -
    -
    - {((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) && - + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    +
    + + + + + + + {OrderDetailIGST?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    + Taxable Amount + + VAT +
    - - Taxable Amount - - CGST - - SGST - - Total Amount -
    - {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 + + + {OrderDetailVAT?.map((item) => ( + + + {item?.TaxPercentage || 0}% + + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + + {Number( + item.TaxAmt + ).toFixed(2)} + - {(OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) && - <> -
    - - - - - - - - - {OrderDetailIGST?.map((item) => - - - - - - - ) - } -
    - - Taxable Amount - - IGST - - Total Amount -
    - {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) && - <> -
    - - - - - - - - - - {OrderDetailVAT?.map((item) => - - - - - - - - ) - } -
    - - Taxable Amount - - VAT - - - Total Amount -
    - {item?.TaxPercentage || 0}% - - {Number(item.WithOutTaxAmount).toFixed(2)} - - {Number(item.TaxAmt).toFixed(2)} - {Number(item.TotalAmt).toFixed(2)}
    - - } - -
    -
    - - } + + {Number( + item.TotalAmt + ).toFixed(2)} + + + ))} + + + )} +
    +
    + + )} +
    -
    - } -
    -
    {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}  Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
    -
    - {GlobaldummyData ? ( - GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    + )} +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +  Payment :   + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} + /-{' '}
    - ) - ) : ( - CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    +
    + {GlobaldummyData + ? GlobalCredit && ( +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) + : CreditDetails && + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( + <> + {table2Data.CustomerDetails[0].OldCreditBal > + 0 ? ( +

    + Advance Amount: + {table2Data.CustomerDetails[0].OldCreditBal} +

    + ) : table2Data.CustomerDetails[0].OldCreditBal < + 0 ? ( +

    + {' '} + Opening Balance:{' '} + {Math.abs( + table2Data.CustomerDetails[0].OldCreditBal + )} +

    + ) : null} + + )} - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit" && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

    Advance Amount:{table2Data.CustomerDetails[0].OldCreditBal}

    - ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( -

    Opening Balance: {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)}

    + {/* 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} -
    - ) - )} - -
    - -
    - {PaymentStatusSuccess?.length > 1 && - <> - {/*

    Split Payment:

    */} - {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].toFixed(2)} +
    +
    + {PaymentStatusSuccess?.length > 1 && ( + <> + {/*

    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 && 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' && + table2Data?.SalesTableLinkDetails?.[0] + ?.WaiterName && ( +
    + Captain :{' '} + { + table2Data?.SalesTableLinkDetails?.[0] + ?.WaiterName + } +
    + )} + +
    + {Date1}
    - } - - {GlobaldummyData && -
    Customer : Customer Name
    - - } - {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData && -
    Customer : {table2Data?.CustSuppName} +
    + YOUR ORDER NO:{' '} + {table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)}
    - } - - - {table2Data?.BookingTypeName == 'Dine In' && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) && -
    - Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} -
    } - -
    {Date1}
    -
    YOUR ORDER NO: {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    +
    + {GlobaldummyData + ? GlobalQrcodet && ( +
    + QRcode +
    Scan to Pay
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : Qrcodet && + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    +
    + )}
    - {GlobaldummyData ? GlobalQrcodet &&
    - QRcode -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    +
    + +
    + {GlobaldummyData + ? GlobalIsnotes && ( +
    +

    + Notes : 10 days Return policy +

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

    + {Notestext} +

    + +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )} +
    - : (!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}

    - -
    -
    ) - } - - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (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 ? GlobalSignature && (
    -

    Signature

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

    Signature

    - -
    )} - -
    -
    - - {PrintGreeting?.SettingValue === "Y" && -
    -
    Thank You Visit Again
    -
    - } - - - } + {PrintGreeting?.SettingValue === 'Y' && ( +
    +
    + Thank You Visit Again +
    +
    + )} + + )}
    ))} - {shouldFooterBeOnNewPage && FormatTheme && + {shouldFooterBeOnNewPage && FormatTheme && (
    -
    <>
    -
    +
    -
    -
    -
    Qty
    -
    Items
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    Off
    - } +
    +
    +
    + Qty +
    +
    + Items +
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    + Off +
    + )} {/*
    SUB TOTAL
    ROUND OFF
    */}
    -
    +
    {GlobaldummyData ? '9' : totalQuantity}
    -
    {GlobaldummyData ? '8' : totalQuantityFilter?.length}
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    {GlobaldummyData ? '8' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
    - } +
    + {GlobaldummyData + ? '8' + : totalQuantityFilter?.length} +
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    + {GlobaldummyData + ? '8' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} +
    + )} {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount) ? Number(table2Data?.NetAmount) : 0}
    */} {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    */}
    - {(DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference) && -
    TakeAway :{Number(TakeawayTotal).toFixed(2)}/-
    - } - {(DineInData?.length > 0 && TakeawayData?.length > 0 && dinePreference) && -
    DineIn :{Number(DineInTotal).toFixed(2)}/-
    - } -
    Amount :{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}/-
    + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + takeAwayPreference && ( +
    + TakeAway :{Number(TakeawayTotal).toFixed(2)}/- +
    + )} + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + dinePreference && ( +
    + DineIn :{Number(DineInTotal).toFixed(2)}/- +
    + )} +
    + Amount : + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} + /- +

    - {(table2Data?.OrderType === "E") ? '' : -
    + {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) && - - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - CGST - - SGST - - - Total Amount -
    - {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) && - <> -
    - - - - - - - - {OrderDetailIGST?.map((item) => + {((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 - - IGST - - Total Amount -
    - - - + - - ) - } -
    - {item?.TaxPercentage || 0}% + + Taxable Amount - {Number(item.WithOutTaxAmount).toFixed(2)} + + CGST - {Number(item.TaxAmt).toFixed(2)} + + SGST + + Total Amount {Number(item.TotalAmt).toFixed(2)}
    - - } - {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) && - <> -
    - + {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 - - - VAT - - - Total Amount - - - {OrderDetailVAT?.map((item) => - - - {item?.TaxPercentage || 0}% - - - {Number(item.WithOutTaxAmount).toFixed(2)} - - - {Number(item.TaxAmt).toFixed(2)} - - {Number(item.TotalAmt).toFixed(2)} - - ) - } - - - } - -
    -
    - - } + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    + + + + + + + {OrderDetailIGST?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.TaxAmt).toFixed( + 2 + )} + + {Number( + item.TotalAmt + ).toFixed(2)} +
    + + )} +
    +
    + + )}
    - } -
    -
    {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}  Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
    -
    - {(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 && ( -
    - - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit" && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

    Advance Amount:{table2Data.CustomerDetails[0].OldCreditBal}

    - ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( -

    Opening Balance: {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)}

    - ) : 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} -
    - ) )} -
    +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +  Payment :   + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} + /-{' '} +
    +
    + {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 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( + <> + {table2Data.CustomerDetails[0].OldCreditBal > + 0 ? ( +

    + Advance Amount: + {table2Data.CustomerDetails[0].OldCreditBal} +

    + ) : table2Data.CustomerDetails[0].OldCreditBal < + 0 ? ( +

    + {' '} + Opening Balance:{' '} + {Math.abs( + table2Data.CustomerDetails[0].OldCreditBal + )} +

    + ) : null} + + )} -
    - {PaymentStatusSuccess?.length > 1 && + {/* 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} +
    + )} +
    +
    + {PaymentStatusSuccess?.length > 1 && ( <> {/*

    Split Payment:

    */} - {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].toFixed(2)} -
    - ))} + {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 && 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} + {GlobaldummyData && ( +
    + {' '} + Customer : Customer Name
    - } + )} + {table2Data?.CustSuppName && + table2Data?.CustSuppName !== undefined && + table2Data?.CustSuppName !== null && + !GlobaldummyData && ( +
    + Customer : {table2Data?.CustSuppName} +
    + )} + {table2Data?.BookingTypeName == 'Dine In' && + table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && ( +
    + Captain :{' '} + {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} +
    + )} - {table2Data?.BookingTypeName == 'Dine In' && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) && -
    - Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} -
    } - -
    {Date1}
    -
    YOUR ORDER NO: {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    +
    + {Date1} +
    +
    + YOUR ORDER NO:{' '} + {table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    - {GlobaldummyData ? GlobalQrcodet &&
    - QRcode -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    -
    - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (Qrcodet && paymentTypeUPI) && -
    - -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
    -
    } + {GlobaldummyData + ? GlobalQrcodet && ( +
    + QRcode +
    Scan to Pay
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !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}

    - -
    -
    ) - } - - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
    -

    - Terms & Conditions + {GlobaldummyData + ? GlobalIsnotes && ( +

    +

    + Notes : 10 days Return policy

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

    Signature

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

    Signature

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

    + {Notestext} +

    +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )}
    - {PrintGreeting?.SettingValue === "Y" && -
    -
    Thank You Visit Again
    + {PrintGreeting?.SettingValue === 'Y' && ( +
    +
    + Thank You Visit Again +
    - } - + )}
    - } -
    - : -
    + ) : ( +
    - - {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
    - -
    - {(GlobalLogo && GlobaldummyData) ? image : null} - {base64Image && (base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? image : null} -
    -
    - {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} -
    - {/*
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    +
    + {GlobalLogo && GlobaldummyData ? ( + image + ) : null} + {base64Image && + base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + image + ) : null} +
    +
    + {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} +
    + {/*
    Save green | Save nature
    */} +
    +
    +
    +
    +
    + {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 NO :{table2Data?.BrMobile} +
    +
    +
    +
    + {GlobaldummyData + ? GlobalBilltext + ? GlobalBilltext + : 'Cash' + ' Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' + : ''}{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`} +
    +
    + Bill No :{' '} + {GlobaldummyData + ? '553' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
    -
    -
    -
    - {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 NO :{table2Data?.BrMobile}
    + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode})`}
    -
    -
    {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`}
    -
    Bill No : {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode})`}
    } + )}
    - {(TakeawayData?.length > 0 || GlobaldummyData) && + {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference &&
    Take Away
    } + {takeAwayPreference && ( +
    + Take Away +
    + )} - +
    - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - {(GlobaldummyData ? products : TakeawayData)?.map((item, index) => { - return ( - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } - - ) - })} + {(GlobaldummyData ? products : TakeawayData)?.map( + (item, index) => { + return ( + + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} + + ); + } + )}
    S.NS.NItemItemQty { WeightasKg ?'Qty/Kg' :'Qty'}HSNHSNMRPMRPDis Dis Tax % Tax % RateRateAmtAmtS.NS.NItemItem + Qty + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + HSN + + HSN + + MRP + + MRP + + Dis{' '} + + Dis{' '} + + Tax %{' '} + + Tax %{' '} + + Rate + + Rate + + Amt + + Amt +
    {index + 1}{index + 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?.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?.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.ProdTaxPercentage}{item?.ProdTaxPercentage || 0}{item?.Rate}{item?.Rate}{item?.TotalAmt}{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}
    {index + 1}{index + 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?.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?.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.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.Rate} + + {item?.Rate} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
    - } - {(DineInData?.length > 0 && dinePreference) && + )} + {DineInData?.length > 0 && dinePreference && ( <> -
    Dine In
    +
    + Dine In +
    - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - {(GlobaldummyData ? products : DineInData)?.map((item, index) => { - return ( - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalAmount && : Amount && } - - ) - })} + {(GlobaldummyData ? products : DineInData)?.map( + (item, index) => { + return ( + + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} + + ); + } + )}
    S.NS.NItemItemQty { WeightasKg ?'Qty/Kg' :'Qty'}HSNHSNMRPMRPDis Dis Tax % Tax % RateRateAmtAmtS.NS.NItemItem + Qty + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + HSN + + HSN + + MRP + + MRP + + Dis{' '} + + Dis{' '} + + Tax %{' '} + + Tax %{' '} + + Rate + + Rate + + Amt + + Amt +
    {index + 1}{index + 1}{item?.ProdName} -
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    -
    {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.ProdTaxPercentage}{item?.ProdTaxPercentage || 0}{item?.Rate}{item?.Rate}{item?.TotalAmt}{item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}
    {index + 1}{index + 1}{item?.ProdName} +
    {item?.ProdName}
    +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    +
    + {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.ProdTaxPercentage} + + {item?.ProdTaxPercentage || 0} + + {item?.Rate} + + {item?.Rate} + + {item?.TotalAmt} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
    - } - - - + )}
    -
    +
    -
    -
    -
    Qty
    -
    Items
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    Off
    - } +
    +
    +
    + Qty +
    +
    + Items +
    + {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( +
    + Off +
    + )} {/*
    SUB TOTAL
    ROUND OFF
    */}
    -
    +
    {GlobaldummyData ? '9' : totalQuantity}
    -
    {GlobaldummyData ? '8' : totalQuantityFilter?.length}
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    {GlobaldummyData ? '8' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)}
    - } +
    + {GlobaldummyData ? '8' : totalQuantityFilter?.length} +
    + {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( +
    + {GlobaldummyData + ? '8' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} +
    + )} {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount) ? Number(table2Data?.NetAmount) : 0}
    */} {/*
    {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    */}
    - {(DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference) && -
    TakeAway :{Number(TakeawayTotal).toFixed(2)}/-
    - } - {(DineInData?.length > 0 && TakeawayData?.length > 0 && dinePreference) && -
    DineIn :{Number(DineInTotal).toFixed(2)}/-
    - } -
    Amount :{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}/-
    + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + takeAwayPreference && ( +
    + TakeAway :{Number(TakeawayTotal).toFixed(2)}/- +
    + )} + {DineInData?.length > 0 && + TakeawayData?.length > 0 && + dinePreference && ( +
    + DineIn :{Number(DineInTotal).toFixed(2)}/- +
    + )} +
    + Amount : + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} + /- +

    - {(table2Data?.OrderType === "E") ? '' : -
    + {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) && - - - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    - - Taxable Amount - - CGST - - SGST - - - Total Amount -
    - {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) && - <> -
    - - - - - - - - - {OrderDetailIGST?.map((item) => + {((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 - - IGST - - Total Amount -
    - + - - + - - ) - } -
    - {item?.TaxPercentage || 0}% + + Taxable Amount - {Number(item.WithOutTaxAmount).toFixed(2)} + + CGST - {Number(item.TaxAmt).toFixed(2)} + + SGST + + Total Amount {Number(item.TotalAmt).toFixed(2)}
    - - } - {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) && - <> -
    - + {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 - - - VAT - - - Total Amount - - - {OrderDetailVAT?.map((item) => - - - {item?.TaxPercentage || 0}% - - - {Number(item.WithOutTaxAmount).toFixed(2)} - - - {Number(item.TaxAmt).toFixed(2)} - - {Number(item.TotalAmt).toFixed(2)} - - ) - } - - - } - -
    -
    - - } + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    + + + + + + + + {OrderDetailIGST?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.TaxAmt).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} +
    + + )} +
    +
    + + )}
    - } -
    -
    {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}  Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
    + )} +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +  Payment :   + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} + /-{' '} +
    - {(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} ***`}
    + )} -
    +
    {/*
    CARD : *********12
    CARD HOLDER : CARD HOLDER NAME
    TOTAL SAVING : 0.00
    */} -
    - {PaymentStatusSuccess?.length > 1 && +
    + {PaymentStatusSuccess?.length > 1 && ( <> {/*

    Split Payment:

    */} {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].toFixed(2)} +
    + {paymentType}:{' '} + {aggregatedPayments[paymentType].toFixed(2)}
    ))} - } - {GlobaldummyData && GlobalCashierName && -
    Cashier : Cashier Name
    - - } - {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && CashierNameField && -
    Cashier : {CashierName} + )} + {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} + {GlobaldummyData && ( +
    + {' '} + Customer : Customer Name
    - } + )} + {table2Data?.CustSuppName && + table2Data?.CustSuppName !== undefined && + table2Data?.CustSuppName !== null && + !GlobaldummyData && ( +
    + Customer : {table2Data?.CustSuppName} +
    + )} + {table2Data?.BookingTypeName == 'Dine In' && + table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && ( +
    + Captain :{' '} + {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} +
    + )} - {table2Data?.BookingTypeName == 'Dine In' && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) && -
    - Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} -
    } - -
    {Date1}
    -
    YOUR ORDER NO: {table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    +
    + {Date1} +
    +
    + YOUR ORDER NO:{' '} + {table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    - {GlobaldummyData ? GlobalQrcodet &&
    - QRcode -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0}
    -
    - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (Qrcodet && paymentTypeUPI) && -
    - -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
    -
    } + {GlobaldummyData + ? GlobalQrcodet && ( +
    + QRcode +
    Scan to Pay
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !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}

    - -
    -
    ) - } - - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
    -

    - Terms & Conditions + {GlobaldummyData + ? GlobalIsnotes && ( +

    +

    + Notes : 10 days Return policy

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

    Signature

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

    Signature

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

    {Notestext}

    +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )}
    - {PrintGreeting?.SettingValue === "Y" && -
    + {PrintGreeting?.SettingValue === 'Y' && ( +
    {/*
    Terms & Condition
    Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy Xxxx Yyyy
    */} -
    Thank You Visit Again
    +
    + Thank You Visit Again +
    - } - + )}
    - - - -
    - } - +
    + )} ); }; diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx index 48226a3..d44e0c9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx @@ -1,8 +1,12 @@ import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; import QrImage from '../../../../Images/qrcode.jpg'; -import Logo from '../../../../Images/Logo.jpg' -import { extractLastNumber, extractLastNumberOrderId, printDiv } from '../../../../Services/Others'; +import Logo from '../../../../Images/Logo.jpg'; +import { + extractLastNumber, + extractLastNumberOrderId, + printDiv, +} from '../../../../Services/Others'; import { GlobalprintSlNo, GlobalprintItem, @@ -26,145 +30,276 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, -} from '../../../../Features/ThemeChange/ThemeChange' -import { GlobalUpiIDprint, PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; -import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.scss' + GlobalSelectedPrintHeaderColor, +} from '../../../../Features/ThemeChange/ThemeChange'; +import { + GlobalUpiIDprint, + PreferenceData, +} 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 signature from '../../../../Images/signatureimage.jpg'; import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin'; import { isMobile } from 'react-device-detect'; import { settingDataSelector } from '../../../../Features/PreferenceMaster/PreferenceMaster'; - - -const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, totalQuantityFilter, CashierName, totalQuantity, OrderDetailGST, OrderDetailIGST, - OrderDetailVAT, table2Data, PaymentStatus, PrintGreeting, printDatas, isPdf, sportsAppPreference, SalesModePref, - MembershipApplied = null }) => { - +const Printstyle12 = ({ + index, + ExtraChargeTotal, + Date1, + base64Image, + PrintLogo, + totalQuantityFilter, + CashierName, + totalQuantity, + OrderDetailGST, + OrderDetailIGST, + OrderDetailVAT, + table2Data, + PaymentStatus, + PrintGreeting, + printDatas, + 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 Tax = FieldDetails?.["Tax"]; - const Quantity = FieldDetails?.["Quantity"]; - const Rate = FieldDetails?.["Rate"]; - 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 SLNO = FieldDetails?.['Sl.No']; + const Item = FieldDetails?.['Item']; + const MRP = FieldDetails?.['MRP']; + const Discount = FieldDetails?.['Discount']; + const Tax = FieldDetails?.['Tax']; + const Quantity = FieldDetails?.['Quantity']; + const Rate = FieldDetails?.['Rate']; + 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) - const GlobalMRP = useSelector(GlobalprintMRP) - const GlobalDiscount = useSelector(GlobalprintDiscount) - const GlobalTax = useSelector(GlobalprintTax) - 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 GlobalSlNo = useSelector(GlobalprintSlNo); + const GlobalItem = useSelector(GlobalprintItem); + const GlobalMRP = useSelector(GlobalprintMRP); + const GlobalDiscount = useSelector(GlobalprintDiscount); + const GlobalTax = useSelector(GlobalprintTax); + 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) + 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 SettingData = useSelector(PreferenceData); - const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => 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") + const estimatePrintHeader = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + 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' + ); - 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 SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + + 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 keysLength = Object.keys(table2Data ?? {}).length; - let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S") + let PaymentStatusSuccess = PaymentStatus?.filter( + (ps) => ps.PaymentStatus === 'S' + ); const printDocument = () => { window.print(); - } + }; if (keysLength > 0) { dispatch(changeReprintDataFound(true)); } - 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' + ); 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 : 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 products = [ - { ProdName: 'ITEM 1', Rate: 88.00, SalesQty: 2, MRP: 100, TotalAmt: 176, discount: 0, HSN: '01', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, - { ProdName: 'ITEM 2', Rate: 300.00, SalesQty: 1, MRP: 350, TotalAmt: 300, discount: 0, HSN: '02', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, - { ProdName: 'ITEM 3', Rate: 200.00, SalesQty: 1, MRP: 250, TotalAmt: 200, discount: 0, HSN: '03', Size: 250, UomName: 'g', ProdTaxPercentage: 0 }, - { ProdName: 'ITEM 4', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '04', Size: 250, UomName: 'g', ProdTaxPercentage: 18 }, - { ProdName: 'ITEM 5', Rate: 30.00, SalesQty: 1, MRP: 50, TotalAmt: 30, discount: 0, HSN: '05', Size: 250, UomName: 'g', ProdTaxPercentage: 40 }, - { ProdName: 'ITEM 6', Rate: 130.00, SalesQty: 1, MRP: 150, TotalAmt: 130, discount: 0, HSN: '06', Size: 250, UomName: 'g', ProdTaxPercentage: 0 }, - { ProdName: 'ITEM 7', Rate: 230.00, SalesQty: 1, MRP: 250, TotalAmt: 230, discount: 0, HSN: '08', Size: 250, UomName: 'g', ProdTaxPercentage: 5 }, + { + ProdName: 'ITEM 1', + Rate: 88.0, + SalesQty: 2, + MRP: 100, + TotalAmt: 176, + discount: 0, + HSN: '01', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, + { + ProdName: 'ITEM 2', + Rate: 300.0, + SalesQty: 1, + MRP: 350, + TotalAmt: 300, + discount: 0, + HSN: '02', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, + { + ProdName: 'ITEM 3', + Rate: 200.0, + SalesQty: 1, + MRP: 250, + TotalAmt: 200, + discount: 0, + HSN: '03', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 0, + }, + { + ProdName: 'ITEM 4', + Rate: 30.0, + SalesQty: 1, + MRP: 50, + TotalAmt: 30, + discount: 0, + HSN: '04', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 18, + }, + { + ProdName: 'ITEM 5', + Rate: 30.0, + SalesQty: 1, + MRP: 50, + TotalAmt: 30, + discount: 0, + HSN: '05', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 40, + }, + { + ProdName: 'ITEM 6', + Rate: 130.0, + SalesQty: 1, + MRP: 150, + TotalAmt: 130, + discount: 0, + HSN: '06', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 0, + }, + { + ProdName: 'ITEM 7', + Rate: 230.0, + SalesQty: 1, + MRP: 250, + TotalAmt: 230, + discount: 0, + HSN: '08', + Size: 250, + UomName: 'g', + ProdTaxPercentage: 5, + }, ]; - const chunkSize = PageSize == "A5" ? 8 : 11; + const chunkSize = PageSize == 'A5' ? 8 : 11; let dataSource = []; if (GlobaldummyData || TakeawayData?.length > 0) { @@ -178,8 +313,11 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, 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 style12 = ``; const PrintA4 = async () => { - - await printDiv("PrintStyle12", style12, 'FontApply'); + await printDiv('PrintStyle12', style12, 'FontApply'); }; - 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}> - - + className={ + isMobile + ? `invoice-wrapper container pdf-page` + : `invoice-wrapper container print-chunk${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") ? '' :
    -
    -
    +
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    +
    +
    -
    {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 : '')} +
    + {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 + : '')} +
    +
    + {GlobaldummyData + ? GlobalBilltext + ? GlobalBilltext + : 'Cash' + ' Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + + ' Bill' + : ''} +
    +
    + {' '} + Mobile : +91{' '} + {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile} +
    + {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' && + table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && ( +
    + Captain :{' '} + {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} +
    + )} + {table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} +
    + )}
    -
    {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""}
    -
    Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
    - {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' && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) && -
    - Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} -
    } - {table2Data?.OrderType === "E" &&
    Estimate
    } + {GlobalLogo && GlobaldummyData && ( +
    + {' '} + image +
    + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( +
    + {' '} + image +
    + ) : null} +
    + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} +
    + )} +
    +
    + Bill No :{' '} + {GlobaldummyData + ? '553' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )} +
    +
    + {Date1}
    - {(GlobalLogo && GlobaldummyData) &&
    image
    } - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ?
    image
    : null} - -
    )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate
    } -
    -
    Bill No : {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    {Date1}
    -
    - {(TakeawayData?.length > 0 || GlobaldummyData) && +
    + {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference &&
    Take Away
    } + {takeAwayPreference && ( +
    + Take Away +
    + )}
    - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} {dataChunk?.map((item, index) => { return ( - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && - } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && ( + + )} + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - ) + ); })}
    S.NoS.NoDescriptionDesQty { WeightasKg ?'Qty/Kg' :'Qty'}MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmtS.NoS.NoDescriptionDesQty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + MRPMRPRateRateHSNHSN(%)(%) + Tax (%) + + Tax (%) + AmtAmt
    {index + 1}{chunkIndex * chunkSize + index + 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?.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?.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?.MRP}{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}{item?.Rate}{item?.Rate}{item?.HSN}{item?.HSN}{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}{index + 1} + {chunkIndex * chunkSize + index + 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?.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?.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?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {item?.Rate} + + {item?.HSN} + + {item?.HSN} + + {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} +
    - } - {(DineInData?.length > 0 && dinePreference) && + )} + {DineInData?.length > 0 && dinePreference && ( <> -
    Dine In
    +
    + Dine In +
    - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} {dataChunk?.map((item, index) => { return ( - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && - } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && ( + + )} + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} - ) + ); })}
    S.NoS.NoDescriptionDesQty { WeightasKg ?'Qty/Kg' :'Qty'}MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmtS.NoS.NoDescriptionDesQty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + MRPMRPRateRateHSNHSN(%)(%) + Tax (%) + + Tax (%) + AmtAmt
    {index + 1}{chunkIndex * chunkSize + index + 1}{item?.ProdName} -
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    -
    {item?.SalesQty}{item?.SalesQty}{item?.MRP}{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}{item?.Rate}{item?.Rate}{item?.HSN}{item?.HSN}{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}{index + 1} + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} +
    {item?.ProdName}
    +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    +
    + {item?.SalesQty} + + {item?.SalesQty} + + {item?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {item?.Rate} + + {item?.HSN} + + {item?.HSN} + + {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} +
    - } + )}
    - {((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme && - <> - -
    -
    -
    -
    -
    - Items -
    -
    :
    -
    - {GlobaldummyData ? '8' : totalQuantityFilter?.length} -
    -
    -
    -
    - Qty -
    -
    :
    -
    - {GlobaldummyData ? '9' : totalQuantity} -
    -
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    -
    - Off -
    + {chunkIndex === paginatedChunks.length - 1 && + !shouldFooterBeOnNewPage && + FormatTheme && ( + <> +
    +
    +
    +
    +
    Items
    :
    -
    - {GlobaldummyData ? '9' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)} +
    + {GlobaldummyData + ? '8' + : totalQuantityFilter?.length}
    - } - {/*
    +
    +
    Qty
    +
    :
    +
    + {GlobaldummyData ? '9' : totalQuantity} +
    +
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    +
    Off
    +
    :
    +
    + {GlobaldummyData + ? '9' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} +
    +
    + )} + {/*
    Extra Charges
    @@ -533,188 +1309,445 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo,
    */} -
    - - {(DineInData?.length > 0 && TakeawayData?.length > 0) && - <> - {takeAwayPreference &&
    -
    - TakeAway -
    -
    :
    -
    - {Number(TakeawayTotal).toFixed(2)} -
    -
    } - {dinePreference &&
    -
    - Dine In -
    -
    :
    -
    - {Number(DineInTotal).toFixed(2)} -
    -
    } - - } -
    -
    - Amount -
    -
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} -
    -
    - {PaymentStatusSuccess?.length > 1 && - <> - {/*

    Split Payment:

    */} - {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].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)) && - <> -
    -

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

    - {(OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) && - - - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    - - Taxable Amount - - CGST - - SGST - - Total Amount -
    - {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) && - <> -
    - - - - - - - - - {OrderDetailIGST?.map((item) => - - - - - - - ) - } -
    - - Taxable Amount - - IGST - - Total Amount -
    - {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) && - <> -
    - - - - - - - - - {OrderDetailVAT?.map((item) => - - - - - - - ) - } -
    - - Taxable Amount - - VAT - - Total Amount -
    - {item?.TaxPercentage || 0}% - - {Number(item.WithOutTaxAmount).toFixed(2)} - - {Number(item.TaxAmt).toFixed(2)} - {Number(item.TotalAmt).toFixed(2)}
    - - } +
    + {DineInData?.length > 0 && TakeawayData?.length > 0 && ( + <> + {takeAwayPreference && ( +
    +
    + TakeAway +
    +
    :
    +
    + {Number(TakeawayTotal).toFixed(2)} +
    - - } + )} + {dinePreference && ( +
    +
    + Dine In +
    +
    :
    +
    + {Number(DineInTotal).toFixed(2)} +
    +
    + )} + + )} +
    +
    + Amount +
    +
    :
    +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    - } -
    + {PaymentStatusSuccess?.length > 1 && ( + <> + {/*

    Split Payment:

    */} + {Object.keys(aggregatedPayments).map( + (paymentType) => ( +
    + {paymentType}:{' '} + {aggregatedPayments[paymentType].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)) && ( + <> +
    +

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

    + {OrderDetailGST?.length > 0 && + OrderDetailGST?.[0]?.TaxAmt > 0 && ( + + + + + + + + + {OrderDetailGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + CGST + + SGST + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.CGST).toFixed(2)} + + {Number(item.SGST).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} +
    + )} -
    -
    - {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}   Payment + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    + + + + + + + + {OrderDetailIGST?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.TaxAmt).toFixed(2)} + + {Number(item.TotalAmt).toFixed( + 2 + )} +
    + + )} +
    + + )} +
    + )} +
    + +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +   Payment +
    +
    :
    +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    -
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} -
    -
    - {/*
    + {/*
    Recived Amt
    @@ -732,193 +1765,465 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, 0.00
    */} - -
    -
    - - {GlobaldummyData ? ( - GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    - ) - ) : ( - CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    +
    - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit" && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

    Advance Amount:{table2Data.CustomerDetails[0].OldCreditBal}

    - ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( -

    Opening Balance: {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)}

    + {GlobaldummyData + ? GlobalCredit && ( +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) + : CreditDetails && + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( + <> + {table2Data.CustomerDetails[0].OldCreditBal > + 0 ? ( +

    + Advance Amount: + {table2Data.CustomerDetails[0].OldCreditBal} +

    + ) : table2Data.CustomerDetails[0].OldCreditBal < + 0 ? ( +

    + {' '} + Opening Balance:{' '} + {Math.abs( + table2Data.CustomerDetails[0].OldCreditBal + )} +

    + ) : 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} - +
    )} +
    - {/* 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} -
    - ) - )} -
    - -
    - -
    -
    Your Order No: {GlobaldummyData ? '53' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - -
    - - {GlobaldummyData ? GlobalQrcodet && -
    - image -
    Scan to Pay:
    -
    - ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} +
    +
    +
    + Your Order No:{' '} + {GlobaldummyData + ? '53' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)}
    - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (Qrcodet && paymentTypeUPI) && - -
    - -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
    -
    } - -
    - {(sportsAppPreference && MembershipApplied) &&
    {`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
    } - - -
    - {GlobaldummyData ? GlobalIsnotes && - (
    -

    Notes : 10 days Return policy

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

    {Notestext}

    - -
    -
    ) - } - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (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 ? GlobalSignature && (
    -

    Signature

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

    Signature

    - -
    )} + {GlobaldummyData + ? GlobalQrcodet && ( +
    + image +
    + {' '} + Scan to Pay:{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : Qrcodet && + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    +
    + )}
    -
    + {sportsAppPreference && MembershipApplied && ( +
    {`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
    + )} - {PrintGreeting?.SettingValue === "Y" && -
    - Thank You Visit Again +
    + {GlobaldummyData + ? GlobalIsnotes && ( +
    +

    + Notes : 10 days Return policy +

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

    + {Notestext} +

    + +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && + table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )} +
    - } - - } + {PrintGreeting?.SettingValue === 'Y' && ( +
    + Thank You Visit Again +
    + )} + + )}
    ))} - - {shouldFooterBeOnNewPage && FormatTheme && + {shouldFooterBeOnNewPage && FormatTheme && (
    -
    <> -
    -
    -
    -
    -
    - Items -
    +
    +
    +
    +
    Items
    :
    -
    +
    {GlobaldummyData ? '8' : totalQuantityFilter?.length}
    -
    -
    - Qty -
    +
    +
    Qty
    :
    -
    +
    {GlobaldummyData ? '9' : totalQuantity}
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    -
    - Off -
    + {(table2Data?.OverallDisc > 0 || + TotalOfferAmount > 0) && ( +
    +
    Off
    :
    -
    - {GlobaldummyData ? '9' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)} +
    + {GlobaldummyData + ? '9' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
    - } + )} {/*
    Extra Charges @@ -929,185 +2234,434 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo,
    */} -
    +
    - {(DineInData?.length > 0 && TakeawayData?.length > 0) && + {DineInData?.length > 0 && TakeawayData?.length > 0 && ( <> - {takeAwayPreference &&
    -
    - TakeAway + {takeAwayPreference && ( +
    +
    + TakeAway +
    +
    :
    +
    + {Number(TakeawayTotal).toFixed(2)} +
    -
    :
    -
    - {Number(TakeawayTotal).toFixed(2)} + )} + {dinePreference && ( +
    +
    + Dine In +
    +
    :
    +
    + {Number(DineInTotal).toFixed(2)} +
    -
    } - {dinePreference &&
    -
    - Dine In -
    -
    :
    -
    - {Number(DineInTotal).toFixed(2)} -
    -
    } + )} - } -
    -
    + )} +
    +
    Amount
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0}
    - {PaymentStatusSuccess?.length > 1 && + {PaymentStatusSuccess?.length > 1 && ( <> {/*

    Split Payment:

    */} - {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].toFixed(2)} -
    - ))} + {Object.keys(aggregatedPayments).map( + (paymentType) => ( +
    + {paymentType}:{' '} + {aggregatedPayments[paymentType].toFixed(2)} +
    + ) + )} - } - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : (
    - {((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) || - (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) || - (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && + {((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) => +

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

    + {OrderDetailGST?.length > 0 && + OrderDetailGST?.[0]?.TaxAmt > 0 && ( +
    - - Taxable Amount - - CGST - - SGST - - Total Amount -
    - - - - - - - ) - } -
    - {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) && - <> -
    - - - - - + - - + - {OrderDetailIGST?.map((item) => + {OrderDetailGST?.map((item) => ( - - - + + - - ) - } + ))}
    - + Taxable Amount - IGST + + CGST + + SGST + Total Amount
    + {item?.TaxPercentage || 0}% - {Number(item.WithOutTaxAmount).toFixed(2)} + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} - {Number(item.TaxAmt).toFixed(2)} + + {Number(item.CGST).toFixed(2)} + + {Number(item.SGST).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
    - - } - {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) && - <> -
    - + )} - - - - - - - {OrderDetailVAT?.map((item) => + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    +
    - - Taxable Amount - - VAT - - Total Amount -
    - + - - - - ) - } -
    - {item?.TaxPercentage || 0}% + + Taxable Amount - {Number(item.WithOutTaxAmount).toFixed(2)} + + IGST - {Number(item.TaxAmt).toFixed(2)} + + Total Amount {Number(item.TotalAmt).toFixed(2)}
    - - } - + {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 && ( + <> +
    + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.TaxAmt).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} +
    + + )}
    - } + )}
    - } -
    + )} +
    -
    -
    - {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}   Payment +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +   Payment
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0}
    {/*
    @@ -1128,339 +2682,1073 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, 0.00
    */} -
    - {GlobaldummyData ? ( - GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) - ) : ( - CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    + {GlobaldummyData + ? GlobalCredit && ( +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) + : CreditDetails && + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( + <> + {table2Data.CustomerDetails[0].OldCreditBal > + 0 ? ( +

    + Advance Amount: + {table2Data.CustomerDetails[0].OldCreditBal} +

    + ) : table2Data.CustomerDetails[0].OldCreditBal < + 0 ? ( +

    + {' '} + Opening Balance:{' '} + {Math.abs( + table2Data.CustomerDetails[0].OldCreditBal + )} +

    + ) : null} + + )} - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit" && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

    Advance Amount:{table2Data.CustomerDetails[0].OldCreditBal}

    - ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( -

    Opening Balance: {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)}

    - ) : 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} -
    - ) - )} + {/* 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} +
    + )}
    -
    - -
    -
    Your Order No: {GlobaldummyData ? '53' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - +
    +
    +
    + Your Order No:{' '} + {GlobaldummyData + ? '53' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    - {GlobaldummyData ? GlobalQrcodet && -
    - image -
    Scan to Pay:
    -
    - ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} -
    -
    - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (Qrcodet && paymentTypeUPI) && - -
    - -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
    -
    } - + {GlobaldummyData + ? GlobalQrcodet && ( +
    + image +
    + {' '} + Scan to Pay:{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : Qrcodet && + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    +
    + )}
    - {(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} ***`}
    + )} -
    - {GlobaldummyData ? GlobalIsnotes && - (
    -

    Notes : 10 days Return policy

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

    {Notestext}

    - -
    -
    ) - } - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
    -

    - Terms & Conditions + {GlobaldummyData + ? GlobalIsnotes && ( +

    +

    + Notes : 10 days Return policy

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

    Signature

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

    Signature

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

    + {Notestext} +

    +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

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

    {table2Data?.BrName}

    */} +
    +
    +
    + {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 + : '')} +
    +
    + {' '} + Mobile : +91{' '} + {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile} +
    + {GlobaldummyData && GlobalCashierName && ( +

    + {' '} + Cashier : Cashier Name +

    + )} + {CashierName && + CashierName !== undefined && + CashierName !== null && + !GlobaldummyData && + CashierNameField && ( +
    + Cashier : {CashierName} +
    + )} - : -
    - {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
    + {GlobaldummyData && ( +
    + {' '} + Customer : Customer Name +
    + )} + {table2Data?.CustSuppName && + table2Data?.CustSuppName !== undefined && + table2Data?.CustSuppName !== null && + !GlobaldummyData && ( +
    + Customer : {table2Data?.CustSuppName} +
    + )} - {/*

    {table2Data?.BrName}

    */} -
    -
    - -
    {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?.BookingTypeName == 'Dine In' && + table2Data?.SalesTableLinkDetails?.[0]?.WaiterName && ( +
    + Captain :{' '} + {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} +
    + )} + {table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} +
    + )}
    -
    Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
    - {GlobaldummyData && GlobalCashierName && -

    Cashier : Cashier Name

    - - } - {CashierName && CashierName !== undefined && CashierName !== null && !GlobaldummyData && CashierNameField && -
    Cashier : {CashierName} + {GlobalLogo && GlobaldummyData && ( +
    + {' '} + image
    - } - - {GlobaldummyData && -
    Customer : Customer Name
    - - } - {table2Data?.CustSuppName && table2Data?.CustSuppName !== undefined && table2Data?.CustSuppName !== null && !GlobaldummyData && -
    Customer : {table2Data?.CustSuppName} + )} + {base64Image && (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( +
    + {' '} + image
    - } - - - {table2Data?.BookingTypeName == 'Dine In' && (table2Data?.SalesTableLinkDetails?.[0]?.WaiterName) && -
    - Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} -
    } - {table2Data?.OrderType === "E" &&
    Estimate
    } + ) : null}
    - {(GlobalLogo && GlobaldummyData) &&
    image
    } - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ?
    image
    : null} -
    )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate
    } + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate{' '} +
    + )} {/*

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

    */} -
    -
    Bill No : {GlobaldummyData ? '553' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    {Date1}
    +
    +
    + Bill No :{' '} + {GlobaldummyData + ? '553' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )} +
    +
    + {Date1} +
    {/*
    */} - {(TakeawayData?.length > 0 || GlobaldummyData) && + {(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference &&
    Take Away
    } + {takeAwayPreference && ( +
    + Take Away +
    + )}
    - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && } + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && } + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && } - {(GlobaldummyData ? products : TakeawayData)?.map((item, index) => { - return ( - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && - } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } - - ) - })} + {(GlobaldummyData ? products : TakeawayData)?.map( + (item, index) => { + return ( + + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} + + ); + } + )}
    S.NoS.NoDescriptionDesQty { WeightasKg ?'Qty/Kg' :'Qty'}MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmtS.NoS.NoDescriptionDesQty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmt
    {index + 1}{index + 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?.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?.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?.MRP}{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}{item?.Rate}{item?.Rate}{item?.HSN}{item?.HSN}{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}
    {index + 1}{index + 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?.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?.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?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {item?.Rate} + + {item?.HSN} + + {item?.HSN} + + {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} +
    - } - {(DineInData?.length > 0 && dinePreference) && + )} + {DineInData?.length > 0 && dinePreference && ( <> -
    Dine In
    +
    + Dine In +
    - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && } + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && } + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && } + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && } - {(GlobaldummyData ? products : DineInData)?.map((item, index) => { - return ( - - {GlobaldummyData ? GlobalSlNo && : SLNO && } - {GlobaldummyData ? GlobalItem && : Item && - } - {GlobaldummyData ? GlobalQuantity && : Quantity && } - {GlobaldummyData ? GlobalMRP && : MRP && } - {GlobaldummyData ? GlobalRate && : Rate && } - {GlobaldummyData ? GlobalHsnCode && : HsnCode && } - {GlobaldummyData ? GlobalDiscount && : Discount && } - {GlobaldummyData ? GlobalTax && : (Tax && table2Data?.OrderType !== 'E') && } - {GlobaldummyData ? GlobalAmount && : Amount && } - - ) - })} + {(GlobaldummyData ? products : DineInData)?.map( + (item, index) => { + return ( + + {GlobaldummyData + ? GlobalSlNo && + : SLNO && } + {GlobaldummyData + ? GlobalItem && + : Item && ( + + )} + {GlobaldummyData + ? GlobalQuantity && ( + + ) + : Quantity && ( + + )} + {GlobaldummyData + ? GlobalMRP && ( + + ) + : MRP && ( + + )} + {GlobaldummyData + ? GlobalRate && ( + + ) + : Rate && ( + + )} + {GlobaldummyData + ? GlobalHsnCode && ( + + ) + : HsnCode && ( + + )} + {GlobaldummyData + ? GlobalDiscount && ( + + ) + : Discount && ( + + )} + {GlobaldummyData + ? GlobalTax && ( + + ) + : Tax && + table2Data?.OrderType !== 'E' && ( + + )} + {GlobaldummyData + ? GlobalAmount && ( + + ) + : Amount && ( + + )} + + ); + } + )}
    S.NoS.NoDescriptionDesQty { WeightasKg ?'Qty/Kg' :'Qty'}MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmtS.NoS.NoDescriptionDesQty + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + MRPMRPRateRateHSNHSN(%)(%)Tax (%)Tax (%)AmtAmt
    {index + 1}{index + 1}{item?.ProdName} -
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    -
    {item?.SalesQty}{item?.SalesQty}{item?.MRP}{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}{item?.Rate}{item?.Rate}{item?.HSN}{item?.HSN}{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}
    {index + 1}{index + 1}{item?.ProdName} +
    {item?.ProdName}
    +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    +
    + {item?.SalesQty} + + {item?.SalesQty} + + {item?.MRP} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + {item?.Rate} + + {item?.Rate} + + {item?.HSN} + + {item?.HSN} + + {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 -
    +
    +
    +
    +
    Items
    :
    -
    +
    {GlobaldummyData ? '8' : totalQuantityFilter?.length}
    -
    -
    - Qty -
    +
    +
    Qty
    :
    -
    +
    {GlobaldummyData ? '9' : totalQuantity}
    - {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && -
    -
    - Off -
    + {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( +
    +
    Off
    :
    -
    - {GlobaldummyData ? '9' : Number(TotalOfferAmount + table2Data?.OverallDisc).toFixed(2)} +
    + {GlobaldummyData + ? '9' + : Number( + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
    - } + )} {/*
    Extra Charges @@ -1471,187 +3759,411 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo,
    */} -
    +
    - {(DineInData?.length > 0 && TakeawayData?.length > 0) && + {DineInData?.length > 0 && TakeawayData?.length > 0 && ( <> - {takeAwayPreference &&
    -
    - TakeAway + {takeAwayPreference && ( +
    +
    + TakeAway +
    +
    :
    +
    + {Number(TakeawayTotal).toFixed(2)} +
    -
    :
    -
    - {Number(TakeawayTotal).toFixed(2)} + )} + {dinePreference && ( +
    +
    + Dine In +
    +
    :
    +
    + {Number(DineInTotal).toFixed(2)} +
    -
    } - {dinePreference &&
    -
    - Dine In -
    -
    :
    -
    - {Number(DineInTotal).toFixed(2)} -
    -
    } + )} - } -
    -
    - Amount -
    + )} +
    +
    Amount
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0}
    - {PaymentStatusSuccess?.length > 1 && + {PaymentStatusSuccess?.length > 1 && ( <> {/*

    Split Payment:

    */} {Object.keys(aggregatedPayments).map((paymentType) => ( -
    - {paymentType}: {aggregatedPayments[paymentType].toFixed(2)} +
    + {paymentType}:{' '} + {aggregatedPayments[paymentType].toFixed(2)}
    ))} - } - {(table2Data?.OrderType === "E") ? '' : + )} + {table2Data?.OrderType === 'E' ? ( + '' + ) : (
    - {((OrderDetailGST?.length > 0 && OrderDetailGST?.[0]?.TaxAmt > 0) || - (OrderDetailIGST?.length > 0 && OrderDetailIGST?.[0]?.TaxAmt > 0) || - (OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0)) && + {((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) => +

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

    + {OrderDetailGST?.length > 0 && + OrderDetailGST?.[0]?.TaxAmt > 0 && ( +
    - - Taxable Amount - - CGST - - SGST - - - Total Amount -
    - - - - - - - ) - } -
    - {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) && - <> -
    - - - - - + - - + - {OrderDetailIGST?.map((item) => + {OrderDetailGST?.map((item) => ( - - - + + - - - ) - } + ))}
    - + Taxable Amount - IGST + + CGST + + SGST + Total Amount
    + {item?.TaxPercentage || 0}% + {Number(item.WithOutTaxAmount).toFixed(2)} - {Number(item.TaxAmt).toFixed(2)} + + {Number(item.CGST).toFixed(2)} + + {Number(item.SGST).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} {Number(item.TotalAmt).toFixed(2)}
    - - } - {(OrderDetailVAT?.length > 0 && OrderDetailVAT?.[0]?.TaxAmt > 0) && - <> -
    - + )} - - - - - - - {OrderDetailVAT?.map((item) => + {OrderDetailIGST?.length > 0 && + OrderDetailIGST?.[0]?.TaxAmt > 0 && ( + <> +
    +
    - - Taxable Amount - - VAT - - Total Amount -
    - + - - - - ) - } -
    - {item?.TaxPercentage || 0}% + + Taxable Amount - {Number(item.WithOutTaxAmount).toFixed(2)} + + IGST - {Number(item.TaxAmt).toFixed(2)} + + Total Amount {Number(item.TotalAmt).toFixed(2)}
    - - } + {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 && ( + <> +
    + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number(item.WithOutTaxAmount).toFixed(2)} + + {Number(item.TaxAmt).toFixed(2)} + + {Number(item.TotalAmt).toFixed(2)} +
    + + )}
    - } + )}
    - } -
    + )} +
    -
    -
    - {PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : "Split"}   Payment +
    +
    + {PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : 'Split'}{' '} +   Payment
    :
    -
    - {GlobaldummyData ? '1,066.00' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} +
    + {GlobaldummyData + ? '1,066.00' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0}
    {/*
    @@ -1672,7 +4184,6 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo, 0.00
    */} -
    @@ -1692,137 +4203,346 @@ const Printstyle12 = ({ index, ExtraChargeTotal, Date1, base64Image, PrintLogo,
    */} - {GlobaldummyData ? ( - GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) - ) : ( - CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    + {GlobaldummyData + ? GlobalCredit && ( +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) + : CreditDetails && + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit' && ( + <> + {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( +

    + Advance Amount: + {table2Data.CustomerDetails[0].OldCreditBal} +

    + ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( +

    + {' '} + Opening Balance:{' '} + {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)} +

    + ) : null} + + )} - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === "Credit" && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

    Advance Amount:{table2Data.CustomerDetails[0].OldCreditBal}

    - ) : table2Data.CustomerDetails[0].OldCreditBal < 0 ? ( -

    Opening Balance: {Math.abs(table2Data.CustomerDetails[0].OldCreditBal)}

    - ) : 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} -
    - ) - )} + {/* 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} +
    + )}
    -
    - -
    -
    Your Order No: {GlobaldummyData ? '53' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - +
    +
    +
    + Your Order No:{' '} + {GlobaldummyData + ? '53' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    - {GlobaldummyData ? GlobalQrcodet && -
    - image -
    Scan to Pay:
    -
    - ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2) ? Number(table2Data?.NetAmount).toFixed(2) : 0} -
    -
    - : - (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (Qrcodet && paymentTypeUPI) && - -
    - -
    Scan to Pay
    -
    ₹{GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}
    -
    } - + {GlobaldummyData + ? GlobalQrcodet && ( +
    + image +
    + {' '} + Scan to Pay:{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2) + ? Number(table2Data?.NetAmount).toFixed(2) + : 0} +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : Qrcodet && + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    +
    + )}
    - {(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} ***`}
    + )} - -
    - {GlobaldummyData ? GlobalIsnotes && - (
    -

    Notes : 10 days Return policy

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

    {Notestext}

    - -
    -
    ) - } - -
    - {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. -
    -
    ) - : (!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : - (TermsnAdCondition == true && TermsAndConditions?.length > 0) && (
    -

    - Terms & Conditions + {GlobaldummyData + ? GlobalIsnotes && ( +

    +

    + Notes : 10 days Return policy

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

    Signature

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

    Signature

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

    {Notestext}

    +
    +
    + )} + +
    + {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. +
    +
    + ) + : !estimatePrintHeader && table2Data?.OrderType === 'E' + ? '' + : 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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )}
    - {PrintGreeting?.SettingValue === "Y" && -
    - Thank You Visit Again -
    - } + {PrintGreeting?.SettingValue === 'Y' && ( +
    Thank You Visit Again
    + )} {/*
    print
    */}
    - } - + )} - ) -} + ); +}; -export default Printstyle12 +export default Printstyle12; diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx index be9e6c8..91e728f 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx @@ -28,6 +28,7 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import Logo from '../../../../Images/Logo.jpg'; import QRCode from 'react-qr-code'; @@ -93,6 +94,7 @@ const Printstyle2 = ({ const paymentTypeUPI = PaymentStatus?.find( (ps) => ps.PaymentTypeName === 'UPI' ); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); console.log(Qrcodet, 'Qrcodet', paymentTypeUPI); const GlobalSignature = useSelector(GlobalprintSignature); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); @@ -399,7 +401,13 @@ const Printstyle2 = ({ fontWeight: '600', }} > -
    +
    {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
    @@ -2937,7 +2945,13 @@ const Printstyle2 = ({ fontWeight: '600', }} > -
    +
    {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
    diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx index c124a12..b5fcd03 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, @@ -25,37 +28,56 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; -import Logo from '../../../../Images/Logo.jpg' -import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss' +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 { + 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 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); @@ -68,110 +90,221 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan const GlobalHsnCode = useSelector(GlobalprintHsnCode); const GlobalQrcodet = useSelector(GlobalprintQrcodet); const GlobaldummyData = useSelector(GlobalPritdummyData); - console.log(GlobaldummyData, "GlobaldummyData print3"); + console.log(GlobaldummyData, 'GlobaldummyData print3'); const GlobalSignature = useSelector(GlobalprintSignature); 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 SettingData = useSelector(PreferenceData); - const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => 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 estimatePrintHeader = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + 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'); - 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 SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); - const PackageDetails = table2Data?.PackageDtl + 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(PackageDetails, 'PackageDetailsPackageDetails',); + const PackageDetails = table2Data?.PackageDtl; - let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S") + console.log(PackageDetails, 'PackageDetailsPackageDetails'); + + let PaymentStatusSuccess = PaymentStatus?.filter( + (ps) => ps.PaymentStatus === 'S' + ); 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 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 : 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 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 = []; @@ -186,1330 +319,4722 @@ 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); 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 ? image : null} - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? image : null} -
    {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
    +
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    +
    + {GlobaldummyData && GlobalLogo ? ( + image + ) : null} + {base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + image + ) : 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' && ( +
    + Estimate Bill{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )} + {table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {GlobaldummyData + ? 'Cash Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + : ''}{' '} + {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" &&
    Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } - {table2Data?.OrderType === "E" ? "" :
    {GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate Bill{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    - -
    )} - - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } + )}
    -
    BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    {GlobaldummyData ? formattedDate : Date1}
    +
    + {' '} + BILL NO : + {GlobaldummyData + ? '51' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}{' '} +
    +
    + {' '} + {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}) - - ))} -
    - :
    - ({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(",")}
    ); - } - ) : ""} -
    -
    } - {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 || 0 : item?.OfferValue || 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}
    -
    ({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 || 0 : item?.OfferValue || 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) && - - - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - CGST - - SGST - - - Total Amount -
    {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) && - <> -
    - - - - - - - - - - {OrderDetailIGST?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - IGST - - - Total Amount -
    {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) && - <> -
    - - - - - - - - - - {OrderDetailVAT?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - VAT - - - Total Amount -
    {item?.TaxPercentage || 0}% - {Number(item.WithOutTaxAmount).toFixed(2)} - - {Number(item.TaxAmt).toFixed(2)} - {Number(item.TotalAmt).toFixed(2)}
    - - } - + {(TakeawayData?.length > 0 || GlobaldummyData) && ( +
    + {takeAwayPreference && ( +
    + TakeAway
    - - } - -
    )} - {/*
    */} - - {/*
    */} - - -
    -
    {GlobaldummyData ? 'Cash' : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""}Payment :  {GlobaldummyData ? '1,066' : Number(table2Data?.NetAmount).toFixed(2)}/-
    -
    - -
    - -
    -
    Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - {PaymentStatusSuccess?.length > 1 && - <> - {/*

    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) => ( -

    + {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 &&
    -
    - Pngwing com +
    + {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}) + + ))} +
    + ) : ( +
    + ({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(',')} +
    + ); + }) + : ''} +
    +
    + )} + {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 || 0 + : item?.OfferValue || 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 && 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}
    +
    + ({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 || 0 + : item?.OfferValue || 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)}{' '} +
    +
    +
    -
    - {(!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 && ( + + + + + + + + + {OrderDetailGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + CGST + + SGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + -
    - ) - }} + + + {OrderDetailIGST?.map((item) => ( + + + + - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
    - {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. */} -
    -
    ) - } +
    + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + - {GlobaldummyData ? GlobalSignature && (
    -

    Signature

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

    Signature

    - -
    )} + + + {OrderDetailVAT?.map((item) => ( + + + + - )} + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {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" && - <> - {/*
    */} +
    +
    +
    + Your Order No : + {GlobaldummyData + ? '01' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    + {PaymentStatusSuccess?.length > 1 && ( + <> + {/*

    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} +
    + )} -
    Thank You Visit Again
    - - } + {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 && ( +
    +
    + Pngwing com +
    +
    + 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 && ( +
    +

    + {Notestext} +

    + +
    +
    + )} +
    + )} + + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {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 + ? 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 && ( +
    + + + + + + + + {OrderDetailGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + CGST + + SGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + - Total Amount - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    + Taxable Amount + + IGST +
    {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 && ( + <> +
    + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + - - - - - - - - {OrderDetailIGST?.map((item) => - - - - - - - - ) - } -
    + Taxable Amount + + VAT + + Total Amount +
    + {item?.TaxPercentage || 0}% + + {Number( + item.WithOutTaxAmount + ).toFixed(2)} + + {Number(item.TaxAmt).toFixed(2)} +
    - Taxable Amount - - IGST - - - Total Amount -
    {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) && - <> -
    - - - - - - - - - {OrderDetailVAT?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - VAT - - Total Amount -
    {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)} + /-{' '} +
    -
    - -
    -
    Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - {PaymentStatusSuccess?.length > 1 && +
    +
    +
    + Your Order No : + {GlobaldummyData + ? '01' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    + {PaymentStatusSuccess?.length > 1 && ( <> {/*

    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 && ( +
    +
    + Pngwing com +
    +
    + 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 && ( +
    +

    + {Notestext} +

    + +
    +
    + )} +
    )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
    - {GlobaldummyData ? GlobalQrcodet &&
    -
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {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 + ? GlobalSignature && ( +
    +

    + Signature +

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

    + Signature +

    + +
    + )} +
    + )} +
    + + {PrintGreeting?.SettingValue === 'Y' && ( + <> + {/*
    */} + +
    + Thank You Visit Again +
    + + )} + +
    +
    + )} +
    + ) : ( +
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    +
    + {GlobaldummyData && GlobalLogo ? ( + image + ) : null} + {base64Image && + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + image + ) : 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' && ( +
    + Estimate Bill{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )} + {table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {GlobaldummyData + ? GlobalBilltext + ? GlobalBilltext + : 'Cash' + ' Bill' + : BillName + ? BillName + : PaymentStatusSuccess?.length === 1 + ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' + : ''}{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )} +
    +
    + )} + + {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( +
    + Estimate Bill{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )} +
    +
    +
    +
    + {' '} + BILL NO : + {GlobaldummyData + ? '51' + : table2Data?.OrderId && + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}{' '} +
    +
    + {' '} + {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 +
    + )} +
    + +
    + {(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?.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(',')} +
    + ); + }) + : ''} +
    +
    + )} + {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 || 0 + : item?.OfferValue || 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 +
    + )} +
    + +
    + {(GlobaldummyData ? products : DineInData)?.map( + (item, index) => ( +
    + {GlobaldummyData + ? GlobalSlNo && ( +
    + {index + 1} +
    + ) + : SLNO && ( +
    + {index + 1} +
    + )} + {GlobaldummyData + ? GlobalItem && ( +
    + {item?.ProdName} +
    + ) + : Item && ( +
    +
    {item?.ProdName}
    +
    + ({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 || 0 + : item?.OfferValue || 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)}
    + )} +
    +
    + )} + {/*
    */} +
    +
    +
    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 && ( + + + + + + + + + {OrderDetailGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + CGST + + SGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + + + + + {OrderDetailIGST?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + IGST + + Total Amount +
    + {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 && ( + <> +
    + + + + + + + + + {OrderDetailVAT?.map((item) => ( + + + + + + + + ))} +
    + Taxable Amount + + VAT + + Total Amount +
    + {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)} + /-{' '} +
    +
    + + {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} +

    + )); + })()} +
    + )} +
    +
    +
    + Your Order No : + {GlobaldummyData + ? '01' + : table2Data?.SalesId && + extractLastNumber(table2Data?.SalesId)} +
    + {PaymentStatusSuccess?.length > 1 && ( + <> + {/*

    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 && ( +
    + Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName} +
    + )} + {sportsAppPreference && MembershipApplied && ( +
    {`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
    + )} +
    + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {GlobaldummyData + ? GlobalQrcodet && ( +
    +
    Pngwing com
    -
    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 && (
    -

    {Notestext}

    - -
    -
    ) - }
    } - - - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
    - {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 ? GlobalSignature && (
    -

    Signature

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

    Signature

    - -
    )} - -
    )} -
    - - - {PrintGreeting?.SettingValue === "Y" && - <> - {/*
    */} - -
    Thank You Visit Again
    - - } - - +
    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 && GlobalLogo ? image : null} - {(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? image : 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" &&
    Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } - {table2Data?.OrderType === "E" ? "" :
    {GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } -
    -
    )} - - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
    Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
    } -
    -
    -
    -
    BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
    -
    {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
    } -
    - -
    - {(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?.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(",")}
    ); - } - ) : ""} -
    -
    } - {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 || 0 : item?.OfferValue || 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
    } -
    - -
    - {(GlobaldummyData ? products : DineInData)?.map((item, index) => ( -
    - {GlobaldummyData ? GlobalSlNo &&
    {index + 1}
    : SLNO &&
    {index + 1}
    } - {GlobaldummyData ? GlobalItem &&
    {item?.ProdName}
    : Item && -
    -
    {item?.ProdName}
    -
    ({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 || 0 : item?.OfferValue || 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)}
    } -
    -
    - } - {/*
    */} -
    -
    -
    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) && - - - - - - - - - - {OrderDetailGST?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - CGST - - SGST - - - Total Amount -
    {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) && - <> -
    - - - - - - - - - - {OrderDetailIGST?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - IGST - - - Total Amount -
    {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) && - <> -
    - - - - - - - - - - {OrderDetailVAT?.map((item) => - - - - - - - - ) - } -
    - Taxable Amount - - VAT - - - Total Amount -
    {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)}/-
    -
    - - - {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} -

    - )); - })()} - -
    - ) - )} -
    - -
    -
    Your Order No :{GlobaldummyData ? '01' : table2Data?.SalesId && extractLastNumber(table2Data?.SalesId)}
    - {PaymentStatusSuccess?.length > 1 && - <> - {/*

    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) && -
    Captain : {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
    } - {(sportsAppPreference && MembershipApplied) &&
    {`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}
    } - -
    - {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
    - {GlobaldummyData ? GlobalQrcodet &&
    -
    - Pngwing com -
    -
    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}

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

    {Notestext}

    -
    -
    ) - }
    } +
    +
    + )} +
    + )} + {!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( + '' + ) : ( +
    + {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. */} +
    +
    + )} - {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : (
    - {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 ? 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 43b0472..2aaebc9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -28,9 +28,13 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss'; -import { GlobalUpiIDprint, PreferenceData } from '../../../../Features/BookingScreen/BookingData/BookingData'; +import { + GlobalUpiIDprint, + PreferenceData, +} from '../../../../Features/BookingScreen/BookingData/BookingData'; import QRCode from 'react-qr-code'; import signature from '../../../../Images/signatureimage.jpg'; import { ApplicationPreferences } from '../../../../Features/BrachLogin/BranchLogin'; @@ -131,6 +135,7 @@ const Printstyle4 = ({ const paymentTypeUPI = PaymentStatus?.find( (ps) => ps.PaymentTypeName === 'UPI' ); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); console.log(GlobalDiscount, Discount, 'Discount'); @@ -244,7 +249,7 @@ const Printstyle4 = ({ TotalAmt: 176, discount: 0, HSN: '01', - }, + }, { ProdName: 'ITEM 2', Rate: 300.0, @@ -253,7 +258,7 @@ const Printstyle4 = ({ TotalAmt: 300, discount: 0, HSN: '02', - }, + }, { ProdName: 'ITEM 3', Rate: 200.0, @@ -412,6 +417,7 @@ const Printstyle4 = ({ fontWeight: '600', width: '100%', textAlign: 'center', + color: SelectedHeaderColor, }} > {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}{' '} @@ -559,7 +565,7 @@ const Printstyle4 = ({ textAlign: 'right', }} > - {WeightasKg ?'Qty/Kg' :'Qty'} + {WeightasKg ? 'Qty/Kg' : 'Qty'} )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx index ee2bed5..8dc92f9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx @@ -28,6 +28,7 @@ import { GlobalprintLogo, GlobalprintCredit, GlobalprintTax, + GlobalSelectedPrintHeaderColor, } from '../../../../Features/ThemeChange/ThemeChange'; import { GlobalUpiIDprint, @@ -124,6 +125,8 @@ const PrintStyle5 = ({ (ps) => ps.PaymentTypeName === 'UPI' ); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + console.log(GlobalDiscount, Discount, 'Discount'); let TermsAndConditions = printDatas?.TermsandConditions; @@ -383,6 +386,7 @@ const PrintStyle5 = ({ style={{ fontSize: 'clamp(2rem, 2.5vw, 2rem)', fontWeight: '600', + color: SelectedHeaderColor, }} > {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} @@ -2595,6 +2599,7 @@ const PrintStyle5 = ({ style={{ fontSize: 'clamp(2rem, 2.5vw, 2rem)', fontWeight: '600', + color: SelectedHeaderColor, }} > {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}