diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx index 252c9c7..90b40ab 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx @@ -94,6 +94,9 @@ const InvoiceTemplate = ({ const GlobalBilltext = useSelector(GlobalBillName); const GlobalLogo = useSelector(GlobalprintLogo); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -101,8 +104,7 @@ const InvoiceTemplate = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const keysLength = Object.keys(table2Data ?? {}).length; console.log(GlobalDiscount, Discount, 'Discount'); @@ -154,7 +156,7 @@ const InvoiceTemplate = ({ let PaymentStatusSuccess = PaymentStatus?.filter( (ps) => ps.PaymentStatus === 'S' ); - const isEditedBill = PaymentStatus?.some(payment => { + const isEditedBill = PaymentStatus?.some((payment) => { const type = payment?.AdjustmentType?.toLowerCase(); return ( (type === 'extra' || type === 'refund') && @@ -164,15 +166,15 @@ const InvoiceTemplate = ({ }); const lastTransaction = PaymentStatus?.find( (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' - ) + ); const TakeawayTotal = TakeawayData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, - 0, + 0 ); const PackageDetails = table2Data?.PackageDtl; const DineInTotal = DineInData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, - 0, + 0 ); const aggregatedPayments = PaymentStatusSuccess?.reduce( (acc, paymentdata) => { @@ -187,7 +189,7 @@ const InvoiceTemplate = ({ return acc; }, - {}, + {} ); const productsData = table2Data?.productDetails || []; const offers = table2Data?.OrderOfferDetails || []; @@ -351,7 +353,7 @@ const InvoiceTemplate = ({ const companyName = table2Data?.CompName; const companyAddress = table2Data?.AddressDetails?.[0]?.Address1 + - (table2Data?.AddressDetails?.[0]?.Address2 || '') || + (table2Data?.AddressDetails?.[0]?.Address2 || '') || '#589, 2nd floor, VP Chambers, 1st cross, 3rd block, Koramangala, Bengaluru- 560034.'; const companyPhone = table2Data?.BrMobile + ',' + table2Data?.BrMobile2 !== null @@ -842,8 +844,8 @@ const InvoiceTemplate = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: FormatTheme @@ -898,7 +900,7 @@ const InvoiceTemplate = ({ )} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Brand Logo )} @@ -980,7 +982,7 @@ const InvoiceTemplate = ({ ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + - ' Bill' + ' Bill' : ''} )} @@ -1085,146 +1087,146 @@ const InvoiceTemplate = ({ {GlobaldummyData ? GlobalSlNo && ( - S.No - ) + S.No + ) : SLNO == true && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item == true && ( - - Item - - )} + + Item + + )} {GlobaldummyData ? GlobalHsnCode && ( - HSN - ) + HSN + ) : HsnCode == true && ( - - HSN{' '} - - )} + + HSN{' '} + + )} {GlobaldummyData ? GlobalQuantity && ( - Qty - ) + Qty + ) : Quantity == true && ( - - {' '} - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {/* UOM UOM */} {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 % + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalAmount && ( - Amount - ) + Amount + ) : Amount == true && ( - - Amount - - )} + + Amount + + )} @@ -1233,249 +1235,251 @@ const InvoiceTemplate = ({ {GlobaldummyData ? GlobalSlNo && ( - - {chunkIndex * chunkSize + idx + 1} - - ) + + {chunkIndex * chunkSize + idx + 1} + + ) : SLNO == true && ( - - {chunkIndex * chunkSize + idx + 1} - - )} + + {chunkIndex * chunkSize + idx + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName} - - ) + + {item?.ProdName} + + ) : 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 - ) - )?.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 ( + +
{item?.ProdName}
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
+ {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount} PCS{' '} + {item.ParcelQty} PACK ( + {item.ParcelType}) + + ))} +
+ ) : ( + UomPrint?.SettingValue === 'Y' && (
- {[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(',')} +
+ ); + }) + : ''} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode == true && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : 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?.Rate} - - )} + + {' '} + {item?.Rate} + + )} {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} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : 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} + + )} ) )} @@ -1804,7 +1808,7 @@ const InvoiceTemplate = ({ {Number( GlobaldummyData ? 736 - : table2Data?.NetAmount, + : table2Data?.NetAmount )?.toFixed(2)} @@ -1855,7 +1859,7 @@ const InvoiceTemplate = ({ fontWeight: 600, color: lastTransaction?.AdjustmentType === - 'REFUND' + 'REFUND' ? '#000' : '#000', }} @@ -1863,7 +1867,7 @@ const InvoiceTemplate = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === - 'REFUND' + 'REFUND' ? '-' : '+'} {( @@ -1920,28 +1924,28 @@ const InvoiceTemplate = ({
Bank Name:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.BankName}
Account No.:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.AccountNo}
IFSC Code:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.IFSCCode}
Branch Name:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.BankBranch}
@@ -1953,80 +1957,80 @@ const InvoiceTemplate = ({
{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. */} +
    +
    + )}
    - -
    - ) - : Signature == true && ( -
    - {!estimatePrintHeader && - table2Data?.OrderType === 'E' ? ( - '' - ) : ( +
    - )} -
    - )} +
    + ) + : Signature == true && ( +
    + {!estimatePrintHeader && + table2Data?.OrderType === 'E' ? ( + '' + ) : ( + + )} +
    + )}

    (Common Seal)

    @@ -2102,28 +2106,28 @@ const InvoiceTemplate = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    - {/*
    */} -
    - )} + {/*
    */} +
    + )}
    @@ -2382,7 +2386,7 @@ const InvoiceTemplate = ({
    {Number( - GlobaldummyData ? 736 : table2Data?.NetAmount, + GlobaldummyData ? 736 : table2Data?.NetAmount )?.toFixed(2)}
    {isEditedBill && lastTransaction && ( @@ -2428,7 +2432,7 @@ const InvoiceTemplate = ({ fontWeight: 600, color: lastTransaction?.AdjustmentType === - 'REFUND' + 'REFUND' ? '#000' : '#000', }} @@ -2436,11 +2440,13 @@ const InvoiceTemplate = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === - 'REFUND' + 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    Bank Name:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.BankName}
    Account No.:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.AccountNo}
    IFSC Code:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.IFSCCode}
    Branch Name:{' '} {!estimatePrintHeader && - table2Data?.OrderType === 'E' + table2Data?.OrderType === 'E' ? '' : BankDetails?.[0]?.BankBranch}
    @@ -2512,80 +2518,80 @@ const InvoiceTemplate = ({
    {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. */} +
    +
    + )}
    Authorised Signatory

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

    (Common Seal)

    @@ -2656,28 +2662,28 @@ const InvoiceTemplate = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    - {/*
    */} -
    - )} + {/*
    */} +
    + )}
    @@ -2709,7 +2715,7 @@ const InvoiceTemplate = ({ )} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Brand Logo {GlobaldummyData ? GlobalSlNo && ( - S.No - ) + S.No + ) : SLNO == true && ( - S.No - )} + S.No + )} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item == true && ( - Item - )} + Item + )} {GlobaldummyData ? GlobalHsnCode && ( - HSN - ) + HSN + ) : HsnCode == true && ( - HSN - )} + HSN + )} {GlobaldummyData ? GlobalQuantity && ( - Qty - ) + Qty + ) : Quantity == true && ( - - {' '} - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {' '} + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {/* UOM UOM */} {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 % + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalAmount && ( - Amount - ) + Amount + ) : Amount == true && ( - Amount - )} + Amount + )} {/* Taxable IGST @@ -2970,206 +2976,208 @@ const InvoiceTemplate = ({ {GlobaldummyData ? GlobalSlNo && ( - - {idx + 1} - - ) + + {idx + 1} + + ) : SLNO == true && ( - - {idx + 1} - - )} + + {idx + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName} - - ) + + {item?.ProdName} + + ) : Item == true && ( - -
    {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}
    +
    + {UomPrint?.SettingValue === 'Y' + ? `${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} - - ) + + {item?.HSN} + + ) : HsnCode == true && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : 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?.Rate} - - )} + + {' '} + {item?.Rate} + + )} {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} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : 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} + + )} - ), + ) )} @@ -3352,13 +3360,13 @@ const InvoiceTemplate = ({ Total Amount Payable {Number( - GlobaldummyData ? 736 : table2Data?.NetAmount, + GlobaldummyData ? 736 : table2Data?.NetAmount )?.toFixed(2)}
    {Number( - GlobaldummyData ? 736 : table2Data?.NetAmount, + GlobaldummyData ? 736 : table2Data?.NetAmount )?.toFixed(2)}
    {isEditedBill && lastTransaction && ( @@ -3391,7 +3399,7 @@ const InvoiceTemplate = ({
    {(lastTransaction?.BeforeAdjustment || 0).toFixed( - 2, + 2 )} @@ -3411,8 +3419,10 @@ const InvoiceTemplate = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {(lastTransaction?.AfterAdjustment || 0).toFixed( - 2, + 2 )}
    @@ -3476,80 +3486,80 @@ const InvoiceTemplate = ({
    {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. */} +
    +
    + )}
    Authorised Signatory

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

    (Common Seal)

    @@ -3617,23 +3627,23 @@ const InvoiceTemplate = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    - {/*
    */} -
    - )} + {/*
    */} +
    + )}
    )} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx index a4b1057..b65f885 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx @@ -101,6 +101,9 @@ const PrintA4Style11 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -108,8 +111,7 @@ const PrintA4Style11 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const currentDate = new Date(); console.log(OrderDetailGST, 'OrderDetailGST'); @@ -142,7 +144,7 @@ const PrintA4Style11 = ({ let PaymentStatusSuccess = PaymentStatus?.filter( (ps) => ps.PaymentStatus === 'S' ); - const isEditedBill = PaymentStatus?.some(payment => { + const isEditedBill = PaymentStatus?.some((payment) => { const type = payment?.AdjustmentType?.toLowerCase(); return ( (type === 'extra' || type === 'refund') && @@ -152,7 +154,7 @@ const PrintA4Style11 = ({ }); const lastTransaction = PaymentStatus?.find( (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' - ) + ); const TakeawayTotal = TakeawayData?.reduce( (accumulator, currentValue) => accumulator + currentValue.TotalAmt, @@ -341,7 +343,7 @@ const PrintA4Style11 = ({ )} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Mobile: +91{' '} {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile} @@ -399,17 +401,19 @@ const PrintA4Style11 = ({ )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( -
    - Estimate -
    - )} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' && + estimateTitle && ( +
    + Estimate +
    + )}
    {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 % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount == true && ( - - Amt - - )} + + Amt + + )} @@ -680,181 +684,187 @@ 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 - ) - )?.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 ( + +
    {item?.ProdName}
    + {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + ).length > 0 ? ( +
    + {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount} PCS{' '} + {item.ParcelQty} PACK ( + {item.ParcelType}) + + ))} +
    + ) : ( + UomPrint?.SettingValue === + 'Y' && (
    - {[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(',')} +
    + ); + }) + : ''} + + )} {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} - ) + {item.ProdTaxPercentage} + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + 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} + + )} ))} @@ -893,7 +903,7 @@ const PrintA4Style11 = ({
    ITEMS
    Qty
    {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
    OFFER
    ) : ( '' @@ -919,11 +929,11 @@ const PrintA4Style11 = ({ : totalQuantity}
    {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
    {Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
    ) : ( @@ -946,26 +956,50 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).toFixed(2)} {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {( + lastTransaction?.BeforeAdjustment || + 0 + ).toFixed(2)} +
    {'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === + 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? + 0) - + (lastTransaction?.AfterAdjustment ?? + 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {( + lastTransaction?.AfterAdjustment || + 0 + ).toFixed(2)} +
    )} {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 ? ( @@ -1033,8 +1093,8 @@ const PrintA4Style11 = ({ }

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

    {' '} Opening Balance:{' '} @@ -1048,30 +1108,30 @@ 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' && @@ -1222,58 +1282,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 +

    + +
    + )}
    )} @@ -1566,178 +1626,178 @@ 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 % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount == true && ( - - Amt - - )} + + Amt + + )} @@ -1746,159 +1806,161 @@ const PrintA4Style11 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO == true && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item == true && ( - -
    {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 + +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({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?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode == true && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : 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?.Rate} - - )} + + {' '} + {item?.Rate} + + )} {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} - ) + {item.ProdTaxPercentage} + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : 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} + + )} ))} @@ -1937,7 +1999,7 @@ const PrintA4Style11 = ({
    ITEMS
    Qty
    {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
    OFFER
    ) : ( '' @@ -1963,11 +2025,11 @@ const PrintA4Style11 = ({ : totalQuantity} {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
    {Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
    ) : ( @@ -1990,26 +2052,50 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).toFixed(2)} {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {( + lastTransaction?.BeforeAdjustment || + 0 + ).toFixed(2)} +
    {'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === + 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? + 0) - + (lastTransaction?.AfterAdjustment ?? + 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {( + lastTransaction?.AfterAdjustment || + 0 + ).toFixed(2)} +
    )} {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 ? ( @@ -2077,8 +2189,8 @@ const PrintA4Style11 = ({ }

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

    {' '} Opening Balance:{' '} @@ -2092,30 +2204,30 @@ 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' && @@ -2264,58 +2376,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 +

    + +
    + )}
    )} @@ -2552,7 +2664,7 @@ const PrintA4Style11 = ({ )} - {(PaymentStatusSuccess?.length > 1 && !isEditedBill) && ( + {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> {/*

    Split Payment:

    */} {Object.keys(aggregatedPayments).map((paymentType) => ( @@ -2650,20 +2762,38 @@ const PrintA4Style11 = ({ {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed( + 2 + )} +
    {'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed( + 2 + )} +
    )} {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > - 0 ? ( + 0 ? (

    Advance Amount: {table2Data.CustomerDetails[0].OldCreditBal} @@ -2737,26 +2883,26 @@ 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' && @@ -2863,54 +3009,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 +

    + +
    + )}
    )} @@ -3217,20 +3363,36 @@ const PrintA4Style11 = ({ {isEditedBill && lastTransaction && ( -
    +
    -
    - Bill Gross Amount - {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    + + Bill Gross Amount + + + {(lastTransaction?.BeforeAdjustment || 0).toFixed(2)} +
    {'Adjustment Amount'} - {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {lastTransaction?.AdjustmentType === 'REFUND' + ? '-' + : '+'} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    - Net Bill Amount - {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    + + Net Bill Amount + + + {(lastTransaction?.AfterAdjustment || 0).toFixed(2)} +
    )} {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > 0 ? (

    @@ -3303,25 +3479,25 @@ 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' && @@ -3416,50 +3592,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/ThermalPrinter/PrintStyle1.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx index 929fed2..b95ba1a 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx @@ -128,6 +128,10 @@ const PrintStyle1 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; + const keysLength = Object.keys(table2Data ?? {}).length; const paymentTypeUPI = PaymentStatus?.find( @@ -772,6 +776,7 @@ const PrintStyle1 = ({ ))} ) : ( + UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1032,6 +1037,7 @@ const PrintStyle1 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1041,6 +1047,7 @@ const PrintStyle1 = ({ : 'COMBO'} )
    +} {sportsAppPreference && `${item?.BookingDate?.trim() ? `(${dateFormatChange(item.BookingDate)})` @@ -3982,6 +3989,7 @@ const PrintStyle1 = ({ ))}
    ) : ( + UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -4223,6 +4231,7 @@ const PrintStyle1 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -4232,6 +4241,7 @@ const PrintStyle1 = ({ : 'COMBO'} )
    + } {sportsAppPreference && `${item?.BookingDate?.trim() ? `(${dateFormatChange(item.BookingDate)})` diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx index 59dae4a..835542b 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx @@ -101,6 +101,9 @@ const PrintStyle10 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -108,8 +111,7 @@ const PrintStyle10 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' @@ -372,8 +374,8 @@ const PrintStyle10 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -415,7 +417,7 @@ const PrintStyle10 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Mobile:+91{' '} {GlobaldummyData @@ -486,15 +488,20 @@ const PrintStyle10 = ({
    )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( -
    - Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} -
    - )} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' && + estimateTitle && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )}
    {GlobaldummyData ? GlobalSlNo && ( - S.N - ) + S.N + ) : SLNO && S.N} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax %{' '} - - ) + + Tax %{' '} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax %{' '} - - )} + table2Data?.OrderType !== 'E' && ( + + Tax %{' '} + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -656,232 +663,234 @@ const PrintStyle10 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName}( - {item?.Size + item?.UomName}) - - ) + + {item?.ProdName}( + {item?.Size + item?.UomName}) + + ) : 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?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > + +
    {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 > + ? 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 > + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
    + {[imei1, imei2] + .filter(Boolean) + .join(',')} +
    + ); + }) + : ''} +
    + ) : ( +
    + {UomPrint?.SettingValue === 'Y' + ? `${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 > + ? 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?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
    + {[imei1, imei2] + .filter(Boolean) + .join(',')} +
    + ); + }) + : ''} +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item.ProdTaxPercentage} - - ) + + {item.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -909,120 +918,120 @@ const PrintStyle10 = ({ {GlobaldummyData ? GlobalSlNo && ( - S.N - ) + S.N + ) : SLNO && S.N} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax %{' '} - - ) + + Tax %{' '} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax %{' '} - - )} + table2Data?.OrderType !== 'E' && ( + + Tax %{' '} + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -1031,141 +1040,143 @@ const PrintStyle10 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName}( - {item?.Size + item?.UomName}) - - ) + + {item?.ProdName}( + {item?.Size + item?.UomName}) + + ) : Item && ( - -
    {item?.ProdName}
    -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    - - )} + +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item.ProdTaxPercentage} - - ) + + {item.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -1206,17 +1217,17 @@ const PrintStyle10 = ({
    {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
    -
    Off :
    -
    - {GlobaldummyData - ? '8' - : Number( +
    +
    Off :
    +
    + {GlobaldummyData + ? '8' + : Number( TotalOfferAmount + table2Data?.OverallDisc ).toFixed(2)} -
    - )} +
    + )} {DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference && ( @@ -1587,31 +1598,31 @@ const PrintStyle10 = ({
    {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 ? ( @@ -1623,7 +1634,7 @@ const PrintStyle10 = ({ }

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

    {' '} Opening Balance:{' '} @@ -1636,40 +1647,40 @@ const PrintStyle10 = ({ )} - {/* 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} +
    + )}
    {' '} BILL NO :{' '} {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )}{' '} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}{' '}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> @@ -1740,80 +1751,80 @@ const PrintStyle10 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QR Code -
    - {' '} - Scan To Pay{' '} +
    + QR Code +
    + {' '} + Scan To Pay{' '} +
    +
    + {' '} + ₹{' '} + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed( + 2 + )} +
    -
    - {' '} - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
    -
    - ) + ) : Qrcodet && - paymentTypeUPI && ( -
    - + paymentTypeUPI && (
    - Scan to Pay{' '} + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed( + 2 + )} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
    -
    - )} + )}
    )}
    @@ -1866,8 +1877,10 @@ const PrintStyle10 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {/*
    Terms & Condition
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

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

    + +
    + )} )} @@ -2174,8 +2187,8 @@ const PrintStyle10 = ({ {GlobaldummyData ? '8' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2550,34 +2563,34 @@ const PrintStyle10 = ({ {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: { @@ -2586,7 +2599,7 @@ const PrintStyle10 = ({ }

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

    {' '} Opening Balance:{' '} @@ -2599,40 +2612,40 @@ const PrintStyle10 = ({ )} - {/* 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} +
    + )}
    {' '} BILL NO :{' '} {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )}{' '} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}{' '}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> @@ -2694,76 +2707,76 @@ const PrintStyle10 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QR Code -
    - {' '} - Scan To Pay{' '} +
    + QR Code +
    + {' '} + Scan To Pay{' '} +
    +
    + {' '} + ₹{' '} + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - {' '} - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    - ) + ) : Qrcodet && - paymentTypeUPI && ( -
    - + paymentTypeUPI && (
    - Scan to Pay{' '} + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    - )} + )}
    )}
    @@ -2816,8 +2829,10 @@ const PrintStyle10 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {sportsAppPreference && MembershipApplied && ( @@ -2879,23 +2894,23 @@ const PrintStyle10 = ({ > {GlobaldummyData ? GlobalIsnotes && ( -
    -

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

    + + + )} )} @@ -3082,7 +3097,7 @@ const PrintStyle10 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Mobile:+91{' '} {GlobaldummyData ? '8428XXXXXX' : table2Data?.BrMobile} @@ -3145,13 +3160,15 @@ const PrintStyle10 = ({ )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( -
    - Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} -
    - )} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' && + estimateTitle && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )}
    Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax %{' '} - - ) + + Tax %{' '} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax %{' '} - - )} + table2Data?.OrderType !== 'E' && ( + + Tax %{' '} + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3279,213 +3296,215 @@ const PrintStyle10 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} + + {index + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName}({item?.Size + item?.UomName}) - - ) + + {item?.ProdName}({item?.Size + item?.UomName}) + + ) : 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?.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?.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(',')} +
    + ); + }) + : ''} +
    + ) : ( +
    + {UomPrint?.SettingValue === 'Y' + ? `${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 ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item.ProdTaxPercentage} - - ) + + {item.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3520,82 +3539,82 @@ const PrintStyle10 = ({ : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax %{' '} - - ) + + Tax %{' '} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax %{' '} - - )} + table2Data?.OrderType !== 'E' && ( + + Tax %{' '} + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3605,130 +3624,132 @@ const PrintStyle10 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} + + {index + 1} + + )} {GlobaldummyData ? GlobalItem && ( - - {item?.ProdName}({item?.Size + item?.UomName}) - - ) + + {item?.ProdName}({item?.Size + item?.UomName}) + + ) : Item && ( - -
    {item?.ProdName}
    -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    - - )} + +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item.ProdTaxPercentage} - - ) + + {item.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3768,8 +3789,8 @@ const PrintStyle10 = ({ {GlobaldummyData ? '8' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
    )} @@ -4133,31 +4154,31 @@ const PrintStyle10 = ({ {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 ? (

    @@ -4176,34 +4197,34 @@ const PrintStyle10 = ({ )} - {/* 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} +
    + )}
    {' '} BILL NO :{' '} {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )}{' '} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}{' '}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> @@ -4259,66 +4280,66 @@ const PrintStyle10 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QR Code -
    - {' '} - Scan To Pay{' '} +
    + QR Code +
    + {' '} + 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)} -
    -
    - )} + )}
    )}
    @@ -4367,8 +4388,10 @@ const PrintStyle10 = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - 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/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx index 91e6fba..b30bfc9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx @@ -105,6 +105,9 @@ const PrintStyle11 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -717,13 +720,16 @@ const PrintStyle11 = ({ ) : (
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} @@ -1014,6 +1020,8 @@ const PrintStyle11 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && +
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1023,6 +1031,7 @@ const PrintStyle11 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData @@ -3328,13 +3337,16 @@ const PrintStyle11 = ({
    ) : (
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} @@ -3588,6 +3600,8 @@ const PrintStyle11 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && +
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -3597,6 +3611,7 @@ const PrintStyle11 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx index 5b9df75..0082adf 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx @@ -104,6 +104,9 @@ const Printstyle12 = ({ const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -880,13 +883,16 @@ const Printstyle12 = ({
    ) : (
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} @@ -1127,6 +1133,8 @@ const Printstyle12 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && +
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1136,6 +1144,7 @@ const Printstyle12 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData @@ -3510,13 +3519,16 @@ const Printstyle12 = ({
    ) : (
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} @@ -3739,6 +3751,8 @@ const Printstyle12 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' + &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -3748,6 +3762,7 @@ const Printstyle12 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx index 9ca5fa0..ddaf455 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx @@ -107,6 +107,9 @@ const Printstyle2 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -706,7 +709,8 @@ const Printstyle2 = ({ ))}
    - ) : ( + ) : UomPrint?.SettingValue === 'Y' && ( +
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1045,6 +1049,7 @@ const Printstyle2 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1054,6 +1059,7 @@ const Printstyle2 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData @@ -3292,7 +3298,7 @@ const Printstyle2 = ({ ))}
    - ) : ( + ) : UomPrint?.SettingValue === 'Y' && (
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -3592,6 +3598,7 @@ const Printstyle2 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -3601,6 +3608,7 @@ const Printstyle2 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx index 63321b5..b238d59 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx @@ -80,6 +80,9 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( @@ -279,7 +282,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan ))}
    - :
    + : UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : "1"}{" "} {item?.SinglePc == "Y" ? "PCS" @@ -333,7 +336,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {GlobaldummyData ? GlobalItem &&
    {item?.ProdName}
    : Item &&
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    }
    } {GlobaldummyData ? GlobalHsnCode &&
    {item?.HSN}
    : HsnCode &&
    {item?.HSN}
    } {GlobaldummyData ? GlobalMRP &&
    {item?.MRP}
    : MRP &&
    {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
    } @@ -1200,7 +1203,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan ))}
    - :
    + : UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : "1"}{" "} {item?.SinglePc == "Y" ? "PCS" @@ -1254,7 +1257,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {GlobaldummyData ? GlobalItem &&
    {item?.ProdName}
    : Item &&
    {item?.ProdName}
    -
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    + { UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})
    }
    } {GlobaldummyData ? GlobalHsnCode &&
    {item?.HSN}
    : HsnCode &&
    {item?.HSN}
    } {GlobaldummyData ? GlobalMRP &&
    {item?.MRP}
    : MRP &&
    {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}
    } diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx index 435e7ae..07f43c2 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -114,6 +114,9 @@ const Printstyle4 = ({ ), ]; console.log(table2Data, 'table2Data'); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -765,12 +768,14 @@ const Printstyle4 = ({ ) : (
    {( - (item?.Size || '1') + - (item?.SinglePc === 'Y' - ? ' PCS' - : item?.Type !== 'C' + (UomPrint?.SettingValue === 'Y' + ? (item?.Size || '1') + + (item?.SinglePc === 'Y' + ? ' PCS' + : item?.Type !== 'C' ? ` ${item?.UomName}` - : ' COMBO') + + : ' COMBO') + : '') + (item?.BrandName ? ` ${item?.BrandName}` : '') + @@ -1062,6 +1067,7 @@ const Printstyle4 = ({ }} >
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -1071,6 +1077,7 @@ const Printstyle4 = ({ : 'COMBO'} )
    + } )} {GlobaldummyData @@ -3368,13 +3375,7 @@ const Printstyle4 = ({ }} >
    {item?.ProdName}
    - - )} - {GlobaldummyData - ? GlobalQuantity && ( - - {item?.SalesQty} -
    +
    {PackageDetails?.filter( (pkg) => pkg.ProdId === item.ProdId ).length > 0 ? ( @@ -3424,12 +3425,14 @@ const Printstyle4 = ({ ) : (
    {( - (item?.Size || '1') + - (item?.SinglePc === 'Y' - ? ' PCS' - : item?.Type !== 'C' + (UomPrint?.SettingValue === 'Y' + ? (item?.Size || '1') + + (item?.SinglePc === 'Y' + ? ' PCS' + : item?.Type !== 'C' ? ` ${item?.UomName}` - : ' COMBO') + + : ' COMBO') + : '') + (item?.BrandName ? ` ${item?.BrandName}` : '') + @@ -3464,6 +3467,13 @@ const Printstyle4 = ({ )}
    + )} + {GlobaldummyData + ? GlobalQuantity && ( + + {item?.SalesQty} + + ) : Quantity && ( @@ -3829,15 +3839,17 @@ const Printstyle4 = ({ : Quantity && ( {item?.SalesQty} -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    + {UomPrint?.SettingValue === 'Y' && +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + } )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx index 52d8ee5..fb3da9a 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx @@ -103,6 +103,9 @@ const PrintStyle5 = ({ const GlobalCashierName = useSelector(GlobalprintCashierName); const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -673,6 +676,7 @@ const PrintStyle5 = ({ ) : ( <>
    {item?.ProdName}
    + { UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -680,7 +684,7 @@ const PrintStyle5 = ({ (GlobaldummyData ? GlobalQuantity && item?.SalesQty : item?.SalesQty)} -
    +
    } )}
    @@ -740,12 +744,12 @@ const PrintStyle5 = ({
    ) : (
    - {(item?.Size || '1') + + {UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') + (item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName - : 'COMBO') + + : 'COMBO')) :"" + (item?.BrandName || '') + (item?.ProductIdentifierDtls?.filter( (items) => @@ -1052,6 +1056,7 @@ const PrintStyle5 = ({ ) : ( <>
    {item?.ProdName}
    + { UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -1060,6 +1065,7 @@ const PrintStyle5 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty)}
    + } )}
    @@ -1076,6 +1082,7 @@ const PrintStyle5 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    {(item?.Size ? item?.Size : '1') + (item?.SinglePc == 'Y' @@ -1088,6 +1095,7 @@ const PrintStyle5 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty)}
    + } )}
    @@ -2955,6 +2963,7 @@ const PrintStyle5 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && (
    {item?.Size + item?.UomName + @@ -2963,6 +2972,7 @@ const PrintStyle5 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty)}
    +)} )}
    @@ -3025,12 +3035,12 @@ const PrintStyle5 = ({
    ) : (
    - {(item?.Size || '1') + + {UomPrint?.SettingValue === 'Y' ?((item?.Size || '1') + (item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName - : 'COMBO') + + : 'COMBO')):"" + (item?.BrandName || '') + (item?.ProductIdentifierDtls?.filter( (items) => @@ -3307,6 +3317,7 @@ const PrintStyle5 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y'&&
    {item?.Size + item?.UomName + @@ -3315,6 +3326,7 @@ const PrintStyle5 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty)}
    +} )}
    @@ -3332,12 +3344,12 @@ const PrintStyle5 = ({ <>
    {item?.ProdName}
    - {(item?.Size ? item?.Size : '1') + + {UomPrint?.SettingValue === 'Y'? ((item?.Size ? item?.Size : '1') + (item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName - : 'COMBO') + + : 'COMBO') ):""+ '-' + (GlobaldummyData ? GlobalQuantity && item?.SalesQty diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx index edb1308..9ca3128 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx @@ -105,6 +105,9 @@ const Printstyle6 = ({ const SettingData = useSelector(PreferenceData); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); console.log(CashierNameField, "GlobaldummyData") + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -730,6 +733,7 @@ const Printstyle6 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -738,6 +742,7 @@ const Printstyle6 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty}
    + } )} @@ -779,6 +784,7 @@ const Printstyle6 = ({
    )) ) : ( + UomPrint?.SettingValue === 'Y' && ({item?.Size ? item?.Size : '1'} {item?.SinglePc === 'Y' @@ -1096,6 +1102,7 @@ const Printstyle6 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -1104,6 +1111,7 @@ const Printstyle6 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty}
    + } )} @@ -1119,7 +1127,7 @@ const Printstyle6 = ({ `(${item?.Size + item?.UomName})` : Item && item?.ProdName + - `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})`) + + UomPrint?.SettingValue === 'Y' ? `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})` : '' ) + item?.BrandName !== null ? item?.BrandName @@ -3514,6 +3522,7 @@ const Printstyle6 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -3522,6 +3531,7 @@ const Printstyle6 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty}
    + } )} @@ -3559,6 +3569,7 @@ const Printstyle6 = ({ )) ) : ( + UomPrint?.SettingValue === 'Y' && ({item?.Size ? item?.Size : '1'} {item?.SinglePc === 'Y' @@ -3807,6 +3818,7 @@ const Printstyle6 = ({ ) : ( <>
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' &&
    {item?.Size + item?.UomName + @@ -3815,6 +3827,7 @@ const Printstyle6 = ({ ? GlobalQuantity && item?.SalesQty : item?.SalesQty}
    + } )} @@ -3830,7 +3843,7 @@ const Printstyle6 = ({ `(${item?.Size + item?.UomName})` : Item && item?.ProdName + - `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})`) + + UomPrint?.SettingValue === 'Y' ? `(${item?.Size ? item?.Size : '1'}${item?.SinglePc == 'Y' ? 'PCS' : item?.Type != 'C' ? item?.UomName : 'COMBO'})` : '' ) + item?.BrandName !== null ? item?.BrandName diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx index a579908..2d2917d 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx @@ -100,6 +100,9 @@ const PrintStyle7 = ({ const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -687,6 +690,7 @@ const PrintStyle7 = ({ ))} ) : ( + UomPrint?.SettingValue === 'Y' &&
    ({item?.Size ? item?.Size : '1'}{' '} {item?.SinglePc == 'Y' @@ -909,13 +913,16 @@ const PrintStyle7 = ({ >
    {item?.ProdName}
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} @@ -3122,15 +3129,16 @@ const PrintStyle7 = ({ ))}
    ) : ( -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    + UomPrint?.SettingValue === 'Y' && +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    )} )} @@ -3331,13 +3339,16 @@ const PrintStyle7 = ({ >
    {item?.ProdName}
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) + {UomPrint?.SettingValue === 'Y' + ? `${item?.Size || '1'} ${ + item?.SinglePc === 'Y' + ? 'PCS' + : item?.Type !== 'C' + ? item?.UomName + : 'COMBO' + }` + : '' + } {item?.BrandName !== null ? item?.BrandName : ''} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx index c188e0f..5bd9c09 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx @@ -105,6 +105,9 @@ const Printstyle8 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -112,8 +115,7 @@ const Printstyle8 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' @@ -384,8 +386,8 @@ const Printstyle8 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -434,7 +436,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
    {GlobaldummyData ? formattedDate : Date1} @@ -553,176 +555,176 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -731,143 +733,145 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {chunkIndex * chunkSize + index + 1} - - ) + + {chunkIndex * chunkSize + index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {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?.ProdName}
    + {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
    + {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount}PCS + {item.ParcelQty}PACK( + {item.ParcelType}) + + ))} +
    + ) : ( + UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    ) -
    - )} - - )} + )} + + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -897,176 +901,176 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -1075,159 +1079,161 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {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'} - ) - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > + +
    {item?.ProdName}
    +
    + {UomPrint?.SettingValue === 'Y' + ? `${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 > + ? 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?.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} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -1282,29 +1288,29 @@ const Printstyle8 = ({
    {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( +
    +
    Off
    +
    :
    -
    Off
    -
    :
    -
    - {GlobaldummyData - ? '10' - : Number( + {GlobaldummyData + ? '10' + : Number( TotalOfferAmount + table2Data?.OverallDisc ).toFixed(2)} -
    - )} +
    + )} {DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference && ( @@ -1743,8 +1749,10 @@ const Printstyle8 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    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} @@ -1836,26 +1844,26 @@ const Printstyle8 = ({ )} - {/* 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} +
    + )}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( @@ -1963,53 +1971,53 @@ const Printstyle8 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    -
    - image +
    +
    + image +
    +
    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{' '} + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed( + 2 + )} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
    -
    - )} + )}
    )}
    @@ -2019,7 +2027,7 @@ const Printstyle8 = ({ {GlobaldummyData ? '01' : table2Data?.SalesId && - extractLastNumber(table2Data?.SalesId)} + extractLastNumber(table2Data?.SalesId)}
    {sportsAppPreference && MembershipApplied && (
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    )} @@ -2082,137 +2090,137 @@ const Printstyle8 = ({ > {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 +

    + +
    + )}
    )} @@ -2305,8 +2313,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2740,8 +2748,10 @@ const Printstyle8 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    -
    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} @@ -2830,26 +2840,26 @@ const Printstyle8 = ({ )} - {/* 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} +
    + )}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( @@ -2952,49 +2962,49 @@ const Printstyle8 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    -
    - image +
    +
    + image +
    +
    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{' '} + paymentTypeUPI && ( +
    + +
    + Scan to Pay{' '} +
    +
    + ₹ + {GlobaldummyData + ? '1,066' + : Number(table2Data?.NetAmount).toFixed(2)} +
    -
    - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
    -
    - )} + )}
    )}
    @@ -3004,7 +3014,7 @@ const Printstyle8 = ({ {GlobaldummyData ? '01' : table2Data?.SalesId && - extractLastNumber(table2Data?.SalesId)} + extractLastNumber(table2Data?.SalesId)}
    {sportsAppPreference && MembershipApplied && (
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    )} @@ -3067,137 +3077,137 @@ const Printstyle8 = ({ > {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 +

    + + + )} )} @@ -3238,7 +3248,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
    {GlobaldummyData ? formattedDate : Date1} @@ -3353,98 +3363,98 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && ( - Dis - ) + Dis + ) : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3454,141 +3464,143 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} + + {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?.ProdName}
    + {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
    + {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount}PCS + {item.ParcelQty}PACK( + {item.ParcelType}) + + ))} +
    + ) : ( + UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    ) -
    - )} - - )} + )} + + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3619,96 +3631,96 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3718,154 +3730,156 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} + + {index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
    {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}
    +
    + {UomPrint?.SettingValue === 'Y' + ? `${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} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3917,8 +3931,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
    )} @@ -4329,8 +4343,10 @@ const Printstyle8 = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    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} - - )} + 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} +
    + )}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( @@ -4524,47 +4540,47 @@ const Printstyle8 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    -
    - image +
    +
    + image +
    +
    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)} +
    -
    - )} + )}
    )}
    @@ -4596,21 +4612,21 @@ const Printstyle8 = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    {Notestext}

    +
    +

    {Notestext}

    -
    -
    - )} +
    +
    + )}
    )} @@ -4630,136 +4646,136 @@ const Printstyle8 = ({ > {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/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx index c2360d1..c4100be 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx @@ -102,6 +102,9 @@ const PrintStyle9 = ({ const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); + const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( + (i) => i.SettingIdName === 'PrintUom' + )?.[0]; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -109,8 +112,7 @@ const PrintStyle9 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => - setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' @@ -374,8 +376,8 @@ const PrintStyle9 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -422,7 +424,7 @@ const PrintStyle9 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
    @@ -519,10 +521,10 @@ const PrintStyle9 = ({ {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
    {' '} @@ -532,21 +534,23 @@ const PrintStyle9 = ({
    )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( -
    - Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} -
    - )} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' && + estimateTitle && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )}
    @@ -575,120 +579,120 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && ( - S.No - ) + S.No + ) : SLNO && S.No} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -698,207 +702,207 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && {index + 1} : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {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?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > + +
    {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 > + ? 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 > + ? 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 > + ? 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?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
    + {[imei1, imei2] + .filter(Boolean) + .join(',')} +
    + ); + }) + : ''} +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -925,120 +929,120 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && ( - S.No - ) + S.No + ) : SLNO && S.No} {GlobaldummyData ? GlobalItem && ( - Item - ) + Item + ) : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -1048,116 +1052,118 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && {index + 1} : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {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'} - ) -
    - - )} + +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -1202,25 +1208,25 @@ const PrintStyle9 = ({ )} {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
    - Off : -
    - {GlobaldummyData - ? '1,066' - : Number( +
    + Off : +
    + {GlobaldummyData + ? '1,066' + : Number( TotalOfferAmount + table2Data?.OverallDisc ).toFixed(2)} -
    - )} +
    + )}
    {GlobaldummyData ? GlobalCredit && ( -
    -
    Advance Amount:
    -
    Opening Balance:
    -
    - ) +
    +
    Advance Amount:
    +
    Opening Balance:
    +
    + ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
    - {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
    + {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > - 0 ? ( + 0 ? (

    Advance Amount: {table2Data.CustomerDetails[0].OldCreditBal} @@ -1667,26 +1673,26 @@ const PrintStyle9 = ({ )} - {/* 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} +
    + )}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> @@ -1793,54 +1799,54 @@ const PrintStyle9 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QRcode -
    - Scan to Pay{' '} +
    + QRcode +
    + 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 - )} -
    -
    - )} + )}
    )}
    @@ -1892,8 +1898,10 @@ const PrintStyle9 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    @@ -1958,23 +1966,23 @@ const PrintStyle9 = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    )} @@ -1994,137 +2002,137 @@ const PrintStyle9 = ({ > {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 +

    + +
    + )}
    )} @@ -2222,8 +2230,8 @@ const PrintStyle9 = ({ {GlobaldummyData ? '1,066' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2616,34 +2624,34 @@ const PrintStyle9 = ({ {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} @@ -2661,26 +2669,26 @@ const PrintStyle9 = ({ )} - {/* 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} +
    + )}
    {PaymentStatusSuccess?.length > 1 && !isEditedBill && ( <> @@ -2781,50 +2789,50 @@ const PrintStyle9 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QRcode -
    - Scan to Pay{' '} +
    + QRcode +
    + 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)} -
    -
    - )} + )}
    )}
    @@ -2875,8 +2883,10 @@ const PrintStyle9 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    @@ -2939,23 +2949,23 @@ const PrintStyle9 = ({
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    - {Notestext} -

    +
    +

    + {Notestext} +

    -
    -
    - )} +
    +
    + )}
    )} @@ -2975,137 +2985,137 @@ const PrintStyle9 = ({ > {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 +

    + + + )} )} @@ -3162,7 +3172,7 @@ const PrintStyle9 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
    @@ -3268,10 +3278,10 @@ const PrintStyle9 = ({ {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )}
    {' '} @@ -3281,21 +3291,23 @@ const PrintStyle9 = ({
    )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( -
    - Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} -
    - )} + {!estimatePrintHeader && + table2Data?.OrderType === 'E' && + estimateTitle && ( +
    + Estimate{' '} + {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} +
    + )}
    @@ -3320,92 +3332,92 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && S.No} {GlobaldummyData ? GlobalItem && Item : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3419,140 +3431,142 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
    {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}
    +
    + {UomPrint?.SettingValue === 'Y' + ? `${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 ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3586,82 +3600,82 @@ const PrintStyle9 = ({ : Item && Item} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalDiscount && ( - - Dis{' '} - - ) + + Dis{' '} + + ) : Discount && ( - - Dis{' '} - - )} + + Dis{' '} + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rate - - )} + + Rate + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3675,108 +3689,110 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
    {item?.ProdName}
    -
    - ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
    - - )} + +
    {item?.ProdName}
    + {UomPrint?.SettingValue === 'Y' && ( +
    + ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
    + )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - {item?.HSN} - - ) + + {item?.HSN} + + ) : HsnCode && ( - - {item?.HSN} - - )} + + {item?.HSN} + + )} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item.discount} - - ) + + {item.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3829,8 +3845,8 @@ const PrintStyle9 = ({ {GlobaldummyData ? '1,066' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
    )} @@ -4219,31 +4235,31 @@ const PrintStyle9 = ({ {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 ? (

    @@ -4262,24 +4278,24 @@ const PrintStyle9 = ({ )} - {/* 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 && !isEditedBill && ( <> @@ -4368,46 +4384,46 @@ const PrintStyle9 = ({
    {GlobaldummyData ? GlobalQrcodet && ( -
    - QRcode -
    Scan to Pay
    -
    - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} +
    + QRcode +
    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)} +
    -
    - )} + )}
    )}
    @@ -4455,8 +4471,10 @@ const PrintStyle9 = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + {Math.abs( + (lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0) + ).toFixed(2)}
    {GlobaldummyData ? GlobalIsnotes && ( -
    -

    - Notes : 10 days Return policy -

    +
    +

    + Notes : 10 days Return policy +

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

    {Notestext}

    +
    +

    {Notestext}

    -
    -
    - )} +
    +
    + )}
    )} @@ -4563,137 +4581,137 @@ const PrintStyle9 = ({ > {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 +

    + + + )} )}