diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx index d02210c..252c9c7 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx @@ -99,6 +99,11 @@ const InvoiceTemplate = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const keysLength = Object.keys(table2Data ?? {}).length; console.log(GlobalDiscount, Discount, 'Discount'); @@ -837,8 +842,8 @@ const InvoiceTemplate = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: FormatTheme @@ -893,7 +898,7 @@ const InvoiceTemplate = ({ )} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Brand Logo )} {/* Invoice Title */}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} @@ -1080,146 +1085,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 + + )} @@ -1228,249 +1233,249 @@ 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?.ProdName}
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
+ {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount} PCS{' '} + {item.ParcelQty} PACK ( + {item.ParcelType}) + + ))} +
+ ) : ( +
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+ )} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null ) -
- )} -  {' '} - {item?.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(',')} -
- ); - }) - : ''} - - )} + )?.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} + + )} ) )} @@ -1915,28 +1920,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}
@@ -1948,80 +1953,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. -
-
- ) + 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. */} +
+
+ )}
+
+ +
+ ) + : Signature == true && ( +
+ {!estimatePrintHeader && + table2Data?.OrderType === 'E' ? ( + '' + ) : ( -
- ) - : Signature == true && ( -
- {!estimatePrintHeader && - table2Data?.OrderType === 'E' ? ( - '' - ) : ( - - )} -
- )} + )} +
+ )}

(Common Seal)

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

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

- {/*
*/} -
- )} + {/*
*/} +
+ )}
@@ -2435,7 +2440,7 @@ const InvoiceTemplate = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const currentDate = new Date(); console.log(OrderDetailGST, 'OrderDetailGST'); const day = currentDate.getDate().toString().padStart(2, '0'); @@ -336,7 +341,7 @@ const PrintA4Style11 = ({
)} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( Mobile: +91{' '} {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile} @@ -394,7 +399,7 @@ const PrintA4Style11 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{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 && ( - 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 + + )} @@ -675,181 +680,181 @@ const PrintA4Style11 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO == true && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.name} : Item == true && ( - -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => - pkg.ProdId === item.ProdId - ).length > 0 ? ( -
- {PackageDetails?.filter( - (pkg) => - pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount} PCS{' '} - {item.ParcelQty} PACK ( - {item.ParcelType}) - - ))} -
- ) : ( -
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} + +
{item?.ProdName}
+ {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + ).length > 0 ? ( +
+ {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount} PCS{' '} + {item.ParcelQty} PACK ( + {item.ParcelType}) + + ))} +
+ ) : ( +
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+ )} +  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls + ?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == + '' || + items.SerialNumber == null ) -
- )} -  {' '} - {item?.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(',')} -
- ); - }) - : ''} - - )} + )?.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} + + )} ))} @@ -888,7 +893,7 @@ const PrintA4Style11 = ({
ITEMS
Qty
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
OFFER
) : ( '' @@ -914,11 +919,11 @@ const PrintA4Style11 = ({ : totalQuantity}
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
{Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
) : ( @@ -941,8 +946,8 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).toFixed(2)} @@ -977,7 +982,7 @@ const PrintA4Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -989,33 +994,33 @@ const PrintA4Style11 = ({ )} {GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > - 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0] - ?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > + 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0] + ?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0] .OldCreditBal > 0 ? ( @@ -1028,8 +1033,8 @@ const PrintA4Style11 = ({ }

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

{' '} Opening Balance:{' '} @@ -1043,30 +1048,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' && @@ -1217,58 +1222,58 @@ 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. -
-
- ) + 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 +

+ +
+ )} )} @@ -1561,60 +1566,60 @@ 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 && ( - 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 + + )} @@ -1741,159 +1746,159 @@ 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 - ) - )?.map((a) => { - return ( -
{a.SerialNumber}
- ); - }) - : ''}{' '} - {item?.ProductIdentifierDtls - ?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = - item2.IMEI1 || ''; - const imei2 = - item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} - - )} + +
{item?.ProdName}
+
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+  {' '} + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls + ?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == + '' || + items.SerialNumber == null + ) + )?.map((a) => { + return ( +
{a.SerialNumber}
+ ); + }) + : ''}{' '} + {item?.ProductIdentifierDtls + ?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = + item2.IMEI1 || ''; + const imei2 = + item2.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) + : ''} + + )} {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} + + )} ))} @@ -1932,7 +1937,7 @@ const PrintA4Style11 = ({
ITEMS
Qty
{TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
OFFER
) : ( '' @@ -1958,11 +1963,11 @@ const PrintA4Style11 = ({ : totalQuantity} {TotalOfferAmount > 0 || - table2Data?.OverallDisc ? ( + table2Data?.OverallDisc ? (
{Number( TotalOfferAmount + - table2Data?.OverallDisc + table2Data?.OverallDisc ).toFixed(2)}
) : ( @@ -1985,8 +1990,8 @@ const PrintA4Style11 = ({ {GlobaldummyData ? '1066' : Number( - table2Data?.NetAmount - ).toFixed(2)} + table2Data?.NetAmount + ).toFixed(2)} @@ -2021,7 +2026,7 @@ const PrintA4Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2033,33 +2038,33 @@ const PrintA4Style11 = ({ )} {GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > - 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0] - ?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > + 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0] + ?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0] .OldCreditBal > 0 ? ( @@ -2072,8 +2077,8 @@ const PrintA4Style11 = ({ }

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

{' '} Opening Balance:{' '} @@ -2087,30 +2092,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' && @@ -2259,58 +2264,58 @@ 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. -
-
- ) + 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 +

+ +
+ )} )} @@ -2675,7 +2680,7 @@ const PrintA4Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2687,34 +2692,34 @@ const PrintA4Style11 = ({ )} {GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > - 0 ? ( + 0 ? (

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

+ +
+ )} )} @@ -3242,7 +3247,7 @@ const PrintA4Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3254,31 +3259,31 @@ const PrintA4Style11 = ({ )} {GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > 0 ? (

@@ -3298,25 +3303,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' && @@ -3411,50 +3416,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. -
-
- ) + 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 +

+ +
+ )} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx index 220a7b5..dddd6a9 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx @@ -106,6 +106,11 @@ const PrintA5Style11 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const currentDate = new Date(); console.log(FieldDetails, 'FieldDetails'); const day = currentDate.getDate().toString().padStart(2, '0'); @@ -978,7 +983,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -1959,7 +1964,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2552,7 +2557,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2593,7 +2598,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3141,7 +3146,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3182,7 +3187,7 @@ const PrintA5Style11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx index 058627f..be3057c 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/TaxInvoice.jsx @@ -30,6 +30,11 @@ const TaxInvoice = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; let BillName = printDatas?.PrintHdrName; let companyColour = printDatas?.PrintHdrColor ?? '#00000'; @@ -374,7 +379,7 @@ const TaxInvoice = ({ >

- {table2Data?.OrderType === 'E' + {table2Data?.OrderType === 'E' && estimateTitle ? 'Estimate' : BillName ? BillName diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx index 03f6566..59dae4a 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx @@ -106,6 +106,11 @@ const PrintStyle10 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -367,8 +372,8 @@ const PrintStyle10 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -410,7 +415,7 @@ const PrintStyle10 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
-
Mobile:+91{' '} {GlobaldummyData ? '8428XXXXXX' : table2Data?.BrMobile}

- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -481,7 +486,7 @@ const PrintStyle10 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
@@ -529,120 +534,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 + + )} @@ -651,232 +656,232 @@ 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(',')} +
+ ); + }) + : ''} +
+ ) : ( +
+ ({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} + + )} ); })} @@ -904,120 +909,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 + + )} @@ -1026,141 +1031,141 @@ 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}
+
+ ({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} + + )} ); })} @@ -1201,17 +1206,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 && ( @@ -1582,31 +1587,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 ? ( @@ -1618,7 +1623,7 @@ const PrintStyle10 = ({ }

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

{' '} Opening Balance:{' '} @@ -1631,40 +1636,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 && ( <> @@ -1735,80 +1740,80 @@ const PrintStyle10 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
- QR Code -
- {' '} - Scan To Pay{' '} -
-
- {' '} - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( +
+ QR Code
- -
- 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 + )} +
+
+ )}
)}
@@ -1862,7 +1867,7 @@ const PrintStyle10 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (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. -
-
- ) + 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 +

+ +
+ )}

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

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

{' '} Opening Balance:{' '} @@ -2594,40 +2599,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 && ( <> @@ -2689,76 +2694,76 @@ const PrintStyle10 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
- QR Code -
- {' '} - Scan To Pay{' '} -
-
- {' '} - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( +
+ QR Code
- -
- 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)} +
+
+ )}
)} @@ -2812,7 +2817,7 @@ const PrintStyle10 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
{sportsAppPreference && MembershipApplied && ( @@ -2874,23 +2879,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. -
-
- ) + 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 +

+ + + )} )} @@ -3077,7 +3082,7 @@ const PrintStyle10 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
-
@@ -3097,23 +3102,23 @@ const PrintStyle10 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (table2Data?.AddressDetails?.[0]?.Address1 || '') + - (table2Data?.AddressDetails?.[0]?.City - ? (table2Data?.AddressDetails?.[0]?.Address1 && - table2Data?.AddressDetails?.[0]?.City - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.City - : '') + - (table2Data?.AddressDetails?.[0]?.Zip - ? (table2Data?.AddressDetails?.[0]?.City && - table2Data?.AddressDetails?.[0]?.Zip - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.Zip - : '')} + (table2Data?.AddressDetails?.[0]?.City + ? (table2Data?.AddressDetails?.[0]?.Address1 && + table2Data?.AddressDetails?.[0]?.City + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.City + : '') + + (table2Data?.AddressDetails?.[0]?.Zip + ? (table2Data?.AddressDetails?.[0]?.City && + table2Data?.AddressDetails?.[0]?.Zip + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.Zip + : '')}

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

- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -3140,7 +3145,7 @@ const PrintStyle10 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -3189,82 +3194,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 + + )} @@ -3274,213 +3279,213 @@ 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(',')} +
+ ); + }) + : ''} +
+ ) : ( +
+ ({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 ? 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} + + )} ); } @@ -3515,82 +3520,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 + + )} @@ -3600,130 +3605,130 @@ 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}
+
+ ({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} + + )} ); } @@ -3763,8 +3768,8 @@ const PrintStyle10 = ({ {GlobaldummyData ? '8' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)}
)} @@ -4128,31 +4133,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 ? (

@@ -4171,34 +4176,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 && ( <> @@ -4254,66 +4259,66 @@ const PrintStyle10 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
- QR Code -
- {' '} - Scan To Pay{' '} -
-
- {' '} - ₹{' '} - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( +
+ QR Code
- -
- 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)} +
+
+ )}
)} @@ -4363,7 +4368,7 @@ const PrintStyle10 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (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. -
-
- ) + 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 +

+ + + )} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx index ba36f70..91e6fba 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx @@ -110,6 +110,11 @@ const PrintStyle11 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -481,7 +486,7 @@ const PrintStyle11 = ({ )} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
@@ -1830,7 +1835,7 @@ const PrintStyle11 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -4293,7 +4298,7 @@ const PrintStyle11 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -632,7 +637,7 @@ const Printstyle12 = ({ {table2Data?.SalesTableLinkDetails?.[0]?.WaiterName}
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
ps.PaymentTypeName === 'UPI' ); - const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); console.log(Qrcodet, 'Qrcodet', paymentTypeUPI); const GlobalSignature = useSelector(GlobalprintSignature); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); @@ -112,6 +112,11 @@ const Printstyle2 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -413,7 +418,7 @@ const Printstyle2 = ({ fontWeight: '600', }} > -
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2589,7 +2594,7 @@ const Printstyle2 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3039,7 +3044,7 @@ const Printstyle2 = ({ fontWeight: '600', }} > -
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx index f69c9c4..63321b5 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx @@ -80,7 +80,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan const GlobalLogo = useSelector(GlobalprintLogo); const GlobalCredit = useSelector(GlobalprintCredit); const SettingData = useSelector(PreferenceData); - const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y' + const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find((preference) => preference?.PreferredCatName === 'Booking Type')?.PreferenceCatDetails const dinePreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "dine in" && type?.PreferredStatus === 'Y') const takeAwayPreference = bookingTypePreference?.find((type) => type?.PreferredSubCatName?.toLowerCase() === "take away" && type?.PreferredStatus === 'Y') @@ -223,13 +228,13 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {table2Data?.BrGSTIN &&
GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} + {table2Data?.OrderType === "E" && estimateTitle &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} {table2Data?.OrderType === "E" ? "" :
{GlobaldummyData ? 'Cash Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
)} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} + {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
@@ -537,7 +542,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -936,7 +941,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -1150,12 +1155,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {table2Data?.BrGSTIN &&
GST NO :{GlobaldummyData ? '334bhbsagbysfgbfgbu' : table2Data?.BrGSTIN},
}
Mobile : +91 {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === "E" &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} + {table2Data?.OrderType === "E" && estimateTitle &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} {table2Data?.OrderType === "E" ? "" :
{GlobaldummyData ? GlobalBilltext ? GlobalBilltext : "Cash" + ' Bill' : BillName ? BillName : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ""} {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
)} - {(!estimatePrintHeader && table2Data?.OrderType === "E") &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
} + {(!estimatePrintHeader && table2Data?.OrderType === "E" && estimateTitle) &&
Estimate Bill {SalesModePref?.SettingValue == 'Y' && `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`}
}
@@ -1454,7 +1459,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx index 6169ab0..435e7ae 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -119,6 +119,11 @@ const Printstyle4 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -428,7 +433,7 @@ const Printstyle4 = ({ fontWeight: '600', width: '100%', textAlign: 'center', - color: SelectedHeaderColor, + color: SelectedHeaderColor, }} > {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}{' '} @@ -495,7 +500,7 @@ const Printstyle4 = ({ {/*
{GlobaldummyData ? formattedDate : Date1}
*/}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference && -
- TakeAway -
- } + {takeAwayPreference && +
+ TakeAway +
+ }
@@ -572,15 +577,15 @@ const Printstyle4 = ({ ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && (
- {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2644,7 +2649,7 @@ const Printstyle4 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3196,7 +3201,7 @@ const Printstyle4 = ({
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{(TakeawayData?.length > 0 || GlobaldummyData) && ( <> - {takeAwayPreference && -
- Take Away -
- } + {takeAwayPreference && +
+ Take Away +
+ }
@@ -4398,7 +4403,7 @@ const Printstyle4 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx index 6479693..52d8ee5 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx @@ -108,6 +108,11 @@ const PrintStyle5 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -429,7 +434,7 @@ const PrintStyle5 = ({ ? '1234567890' : table2Data?.BrMobile}{' '}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -455,7 +460,7 @@ const PrintStyle5 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
@@ -1499,7 +1504,7 @@ const PrintStyle5 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2240,7 +2245,7 @@ const PrintStyle5 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2721,7 +2726,7 @@ const PrintStyle5 = ({ Mobile : {GlobaldummyData ? '1234567890' : table2Data?.BrMobile}{' '}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -2749,7 +2754,7 @@ const PrintStyle5 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
Estimate{' '} {SalesModePref?.SettingValue == 'Y' && @@ -3696,7 +3701,7 @@ const PrintStyle5 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx index 35b8030..edb1308 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx @@ -110,6 +110,11 @@ const Printstyle6 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -441,7 +446,7 @@ const Printstyle6 = ({ Mobile : {table2Data?.BrMobile}
} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2698,7 +2703,7 @@ const Printstyle6 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -3297,7 +3302,7 @@ const Printstyle6 = ({ Mobile : {table2Data?.BrMobile}
} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx index 058358c..a579908 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx @@ -105,6 +105,11 @@ const PrintStyle7 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -453,7 +458,7 @@ const PrintStyle7 = ({ : '') + table2Data?.AddressDetails?.[0]?.Zip : '')}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -141,7 +146,7 @@ const Printstyle8 = ({ (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' ); - const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); console.log(GlobalDiscount, Discount, 'Discount'); @@ -379,8 +384,8 @@ const Printstyle8 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -429,7 +434,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} @@ -455,13 +460,13 @@ const Printstyle8 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (BranchAddress || '') + - (BranchCity - ? (BranchAddress && BranchCity ? '-' : '') + - BranchCity - : '') + - (BranchZip - ? (BranchCity && BranchZip ? '-' : '') + BranchZip - : '')} + (BranchCity + ? (BranchAddress && BranchCity ? '-' : '') + + BranchCity + : '') + + (BranchZip + ? (BranchCity && BranchZip ? '-' : '') + BranchZip + : '')}
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{GlobaldummyData ? formattedDate : Date1} @@ -548,176 +553,176 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -726,143 +731,143 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && : HsnCode && } {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); })} @@ -892,176 +897,176 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -1070,159 +1075,159 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) + : ''} + + + )} {GlobaldummyData ? GlobalHsnCode && : HsnCode && } {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); })} @@ -1277,29 +1282,29 @@ const Printstyle8 = ({ {(table2Data?.OverallDisc > 0 || TotalOfferAmount > 0) && ( -
-
Off
-
:
- {GlobaldummyData - ? '10' - : Number( +
Off
+
:
+
+ {GlobaldummyData + ? '10' + : Number( TotalOfferAmount + table2Data?.OverallDisc ).toFixed(2)} +
-
- )} + )} {DineInData?.length > 0 && TakeawayData?.length > 0 && takeAwayPreference && ( @@ -1739,7 +1744,7 @@ const Printstyle8 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (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} @@ -1831,26 +1836,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 && ( @@ -1958,53 +1963,53 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
-
- image -
-
Scan to Pay:
-
- {' '} - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed( - 2 - )} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( -
- +
+ 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 + )} +
+
+ )}
)}
@@ -2014,7 +2019,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} +

-
-
- )} +
+
+ )}
)} @@ -2077,137 +2082,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. -
-
- ) + 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 +

+ + + )} )} @@ -2300,8 +2305,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2736,7 +2741,7 @@ const Printstyle8 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (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} @@ -2825,26 +2830,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 && ( @@ -2947,49 +2952,49 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
-
- image -
-
Scan to Pay:
-
- {' '} - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( -
- +
+ 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)} +
+
+ )}
)}
@@ -2999,7 +3004,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} +

-
-
- )} +
+
+ )}
)} @@ -3062,137 +3067,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. -
-
- ) + 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 +

+ + + )} )} @@ -3233,7 +3238,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} @@ -3259,12 +3264,12 @@ const Printstyle8 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (BranchAddress || '') + - (BranchCity - ? (BranchAddress && BranchCity ? '-' : '') + BranchCity - : '') + - (BranchZip - ? (BranchCity && BranchZip ? '-' : '') + BranchZip - : '')} + (BranchCity + ? (BranchAddress && BranchCity ? '-' : '') + BranchCity + : '') + + (BranchZip + ? (BranchCity && BranchZip ? '-' : '') + BranchZip + : '')}
)} - {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{GlobaldummyData ? formattedDate : Date1} @@ -3348,98 +3353,98 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && ( - - ) + + ) : Item && } {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3449,141 +3454,141 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && : HsnCode && } {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3614,96 +3619,96 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3713,154 +3718,154 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && : HsnCode && } {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3912,8 +3917,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -4271,7 +4276,7 @@ const Printstyle8 = ({ )} - +
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (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 && ( @@ -4519,47 +4524,47 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalQrcodet && ( -
-
- image -
-
Scan to Pay:
-
- {' '} - ₹ - {GlobaldummyData - ? '1,066' - : Number(table2Data?.NetAmount).toFixed(2)} -
-
- ) - : Qrcodet && - paymentTypeUPI && ( -
- +
+ 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)} +
+
+ )}
)}
@@ -4591,21 +4596,21 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

{Notestext}

+
+

{Notestext}

-
-
- )} +
+
+ )}
)} @@ -4625,136 +4630,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. -
-
- ) + 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 +

+ + + )} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx index 72fb44a..c2360d1 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx @@ -107,6 +107,11 @@ const PrintStyle9 = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -136,7 +141,7 @@ const PrintStyle9 = ({ (ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y' ); - const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); + const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor); let TermsAndConditions = printDatas?.TermsandConditions; let SignatureImg = printDatas?.Signature; let Notestext = printDatas?.Notes; @@ -369,8 +374,8 @@ const PrintStyle9 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -417,7 +422,7 @@ const PrintStyle9 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( @@ -451,18 +456,18 @@ const PrintStyle9 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (table2Data?.AddressDetails?.[0]?.Address1 || '') + - (table2Data?.AddressDetails?.[0]?.City - ? (table2Data?.AddressDetails?.[0]?.Address1 && - table2Data?.AddressDetails?.[0]?.City - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.City - : '') + - (table2Data?.AddressDetails?.[0]?.Zip - ? (table2Data?.AddressDetails?.[0]?.City && - table2Data?.AddressDetails?.[0]?.Zip - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.Zip - : '')} + (table2Data?.AddressDetails?.[0]?.City + ? (table2Data?.AddressDetails?.[0]?.Address1 && + table2Data?.AddressDetails?.[0]?.City + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.City + : '') + + (table2Data?.AddressDetails?.[0]?.Zip + ? (table2Data?.AddressDetails?.[0]?.City && + table2Data?.AddressDetails?.[0]?.Zip + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.Zip + : '')}
@@ -470,7 +475,7 @@ const PrintStyle9 = ({ Mobile : +91{' '} {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{' '} @@ -527,7 +532,7 @@ const PrintStyle9 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{GlobaldummyData ? GlobalSlNo && ( -
- ) + + ) : SLNO && } {GlobaldummyData ? GlobalItem && ( - - ) + + ) : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -693,207 +698,207 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + ? 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 && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); })} @@ -920,120 +925,120 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && ( - - ) + + ) : SLNO && } {GlobaldummyData ? GlobalItem && ( - - ) + + ) : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -1043,116 +1048,116 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalSlNo && : SLNO && ( - - )} + + )} {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); })} @@ -1197,25 +1202,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} @@ -1662,26 +1667,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 && ( <> @@ -1788,54 +1793,54 @@ 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 + )} +
+
+ )}
)}
@@ -1888,7 +1893,7 @@ const PrintStyle9 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -1953,23 +1958,23 @@ const PrintStyle9 = ({
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
)} @@ -1989,137 +1994,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. -
-
- ) + 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 +

+ +
+ )}
)} @@ -2217,8 +2222,8 @@ const PrintStyle9 = ({ {GlobaldummyData ? '1,066' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2611,34 +2616,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} @@ -2656,26 +2661,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 && ( <> @@ -2776,50 +2781,50 @@ 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)} +
+
+ )}
)}
@@ -2871,7 +2876,7 @@ const PrintStyle9 = ({ ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
@@ -2934,23 +2939,23 @@ const PrintStyle9 = ({
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

- {Notestext} -

+
+

+ {Notestext} +

-
-
- )} +
+
+ )}
)} @@ -2970,137 +2975,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. -
-
- ) + 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 +

+ + + )} )} @@ -3157,7 +3162,7 @@ const PrintStyle9 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( @@ -3192,18 +3197,18 @@ const PrintStyle9 = ({ {GlobaldummyData ? 'BranchAddress, Town- 635XXX City - State' : (table2Data?.AddressDetails?.[0]?.Address1 || '') + - (table2Data?.AddressDetails?.[0]?.City - ? (table2Data?.AddressDetails?.[0]?.Address1 && - table2Data?.AddressDetails?.[0]?.City - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.City - : '') + - (table2Data?.AddressDetails?.[0]?.Zip - ? (table2Data?.AddressDetails?.[0]?.City && - table2Data?.AddressDetails?.[0]?.Zip - ? '-' - : '') + table2Data?.AddressDetails?.[0]?.Zip - : '')} + (table2Data?.AddressDetails?.[0]?.City + ? (table2Data?.AddressDetails?.[0]?.Address1 && + table2Data?.AddressDetails?.[0]?.City + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.City + : '') + + (table2Data?.AddressDetails?.[0]?.Zip + ? (table2Data?.AddressDetails?.[0]?.City && + table2Data?.AddressDetails?.[0]?.Zip + ? '-' + : '') + table2Data?.AddressDetails?.[0]?.Zip + : '')}
@@ -3211,7 +3216,7 @@ const PrintStyle9 = ({ Mobile : +91{' '} {GlobaldummyData ? '986XXXXXXX' : table2Data?.BrMobile}
- {table2Data?.OrderType === 'E' && ( + {table2Data?.OrderType === 'E' && estimateTitle && (
{' '} @@ -3276,7 +3281,7 @@ const PrintStyle9 = ({
)} - {!estimatePrintHeader && table2Data?.OrderType === 'E' && ( + {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
{GlobaldummyData ? GlobalSlNo && ( -
- ) + + ) : SLNO && } {GlobaldummyData ? GlobalItem && : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3414,140 +3419,140 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3581,82 +3586,82 @@ const PrintStyle9 = ({ : Item && } {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} @@ -3670,108 +3675,108 @@ const PrintStyle9 = ({ {GlobaldummyData ? GlobalItem && : Item && ( - - )} + + )} {GlobaldummyData ? GlobalQuantity && ( - - ) + + ) : Quantity && ( - - )} + + )} {GlobaldummyData ? GlobalHsnCode && ( - - ) + + ) : HsnCode && ( - - )} + + )} {GlobaldummyData ? GlobalMRP && ( - - ) + + ) : MRP && ( - - )} + + )} {GlobaldummyData ? GlobalDiscount && ( - - ) + + ) : Discount && ( - - )} + + )} {GlobaldummyData ? GlobalTax && ( - - ) + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - )} + table2Data?.OrderType !== 'E' && ( + + )} {GlobaldummyData ? GlobalRate && ( - - ) + + ) : Rate && ( - - )} + + )} {GlobaldummyData ? GlobalAmount && ( - - ) + + ) : Amount && ( - - )} + + )} ); } @@ -3824,8 +3829,8 @@ const PrintStyle9 = ({ {GlobaldummyData ? '1,066' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -4214,31 +4219,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 ? (

@@ -4257,24 +4262,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 && ( <> @@ -4363,46 +4368,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)}
- )} +
+ )}
)}
@@ -4451,7 +4456,7 @@ const PrintStyle9 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)} + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

{Notestext}

+
+

{Notestext}

-
-
- )} +
+
+ )}
)} @@ -4558,137 +4563,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. -
-
- ) + 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 +

+ + + )} )} diff --git a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx index 63b030d..c60e4a2 100644 --- a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx +++ b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx @@ -133,6 +133,11 @@ const PaymentPdfBooking = ({ (setting) => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader' )?.SettingValue === 'Y'; + const estimateTitle = + SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' )?.PreferenceCatDetails; @@ -402,8 +407,8 @@ const PaymentPdfBooking = ({ {table2Data?.AddressDetails?.[0]?.City && table2Data?.AddressDetails?.[0]?.Zip && table2Data?.AddressDetails?.[0]?.City + - '- ' + - table2Data?.AddressDetails?.[0]?.Zip} + '- ' + + table2Data?.AddressDetails?.[0]?.Zip}

)} @@ -435,7 +440,7 @@ const PaymentPdfBooking = ({ )}
- {table2Data?.OrderType === 'E' ? ( + {table2Data?.OrderType === 'E' && estimateTitle ? (
0 ? item?.ProductIdentifierDtls.filter( - (items) => - items.SerialNumber && - items.SerialNumber !== '' - ).map((a, i) => ( -
{a.SerialNumber}
- )) + (items) => + items.SerialNumber && + items.SerialNumber !== '' + ).map((a, i) => ( +
{a.SerialNumber}
+ )) : ''} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( - (id) => id.IMEI1 !== '' || id.IMEI2 !== '' - ).map((id, i) => { - const imei1 = id.IMEI1 || ''; - const imei2 = id.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) + (id) => id.IMEI1 !== '' || id.IMEI2 !== '' + ).map((id, i) => { + const imei1 = id.IMEI1 || ''; + const imei2 = id.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) : ''}
@@ -618,25 +623,25 @@ const PaymentPdfBooking = ({   {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( - (items) => - items.SerialNumber && - items.SerialNumber !== '' - ).map((a, i) => ( -
{a.SerialNumber}
- )) + (items) => + items.SerialNumber && + items.SerialNumber !== '' + ).map((a, i) => ( +
{a.SerialNumber}
+ )) : ''} {item?.ProductIdentifierDtls?.length > 0 ? item?.ProductIdentifierDtls.filter( - (id) => id.IMEI1 !== '' || id.IMEI2 !== '' - ).map((id, i) => { - const imei1 = id.IMEI1 || ''; - const imei2 = id.IMEI2 || ''; - return ( -
- {[imei1, imei2].filter(Boolean).join(',')} -
- ); - }) + (id) => id.IMEI1 !== '' || id.IMEI2 !== '' + ).map((id, i) => { + const imei1 = id.IMEI1 || ''; + const imei2 = id.IMEI2 || ''; + return ( +
+ {[imei1, imei2].filter(Boolean).join(',')} +
+ ); + }) : ''} )} @@ -1252,7 +1257,7 @@ const PaymentPdfBooking = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} {Math.abs( (lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0) + (lastTransaction?.AfterAdjustment ?? 0) ).toFixed(2)}
- S.No - + S.No + - S.No - + S.No + DisDes - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Rate - + Rate + - Rt - + Rt + - (%) - + (%) + - (%) - + (%) + - Tax % - + Tax % + - Tax % - + Tax % + - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - Amt - + Amt + - Amt - + Amt +
- {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - ).length > 0 ? ( -
- {PackageDetails?.filter( - (pkg) => - pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount}PCS - {item.ParcelQty}PACK( - {item.ParcelType}) - - ))} -
- ) : ( -
- ({item?.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}) + + ))} +
+ ) : ( +
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+ )} +
{item?.HSN}{item?.HSN} - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.discount} - + {item?.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
- S.No - + S.No + - S.No - + S.No + DisDes - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Rate - + Rate + - Rt - + Rt + - (%) - + (%) + - (%) - + (%) + - Tax % - + Tax % + - Tax % - + Tax % + - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - Amt - + Amt + - Amt - + Amt +
- {index + 1} - + {index + 1} + - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} -
{item?.ProdName}
-
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > +
+
{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 > + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null + ) + )?.map((a) => { + return ( +
{a.SerialNumber}
+ ); + }) + : ''}{' '} + {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = item2.IMEI1 || ''; - const imei2 = item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} -
-
{item?.HSN}{item?.HSN} - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.discount} - + {item?.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
- S.No - + S.No + - S.No - + S.No + DisDisDes - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Rate - + Rate + - Rt - + Rt + - (%) - + (%) + - (%) - + (%) + - Tax % - + Tax % + - Tax % - + Tax % + - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - Amt - + Amt + - Amt - + Amt +
- {index + 1} - + {index + 1} + - {index + 1} - + {index + 1} + {item?.ProdName} -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - ).length > 0 ? ( -
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount}PCS - {item.ParcelQty}PACK( - {item.ParcelType}) - - ))} -
- ) : ( -
- ({item?.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}) + + ))} +
+ ) : ( +
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+ )} +
{item?.HSN}{item?.HSN} - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.discount} - + {item?.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
- S.No - + S.No + - S.No - + S.No + DisDes - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Rate - + Rate + - Rt - + Rt + - (%) - + (%) + - (%) - + (%) + - Tax % - + Tax % + - Tax % - + Tax % + - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - Amt - + Amt + - Amt - + Amt +
- {index + 1} - + {index + 1} + - {index + 1} - + {index + 1} + {item?.ProdName} -
{item?.ProdName}
-
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls?.filter( - (items) => - !( - items.SerialNumber == '' || - items.SerialNumber == null - ) - )?.map((a) => { - return
{a.SerialNumber}
; - }) - : ''}{' '} - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = item2.IMEI1 || ''; - const imei2 = item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} -
-
+
{item?.ProdName}
+
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null + ) + )?.map((a) => { + return
{a.SerialNumber}
; + }) + : ''}{' '} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) + : ''} +
+
{item?.HSN}{item?.HSN} - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.discount} - + {item?.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
S.NoS.NoS.NoItemItemItem - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Tax % - + Tax % + - Tax % - + Tax % + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
{index + 1} - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - ).length > 0 ? ( -
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount}PCS - {item.ParcelQty}PACK( - {item.ParcelType}) - - ))} - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > +
+
{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?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
S.NoS.NoS.NoItemItemItem - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Tax % - + Tax % + - Tax % - + Tax % + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
{index + 1} - {chunkIndex * chunkSize + index + 1} - + {chunkIndex * chunkSize + index + 1} + {item?.ProdName} -
{item?.ProdName}
-
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
-
+
{item?.ProdName}
+
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+
- {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} +
- S.No - + S.No + S.NoItemItem - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Tax % - + Tax % + - Tax % - + Tax % + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
{item?.ProdName} -
{item?.ProdName}
-
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls?.filter( - (items) => - !( - items.SerialNumber == '' || - items.SerialNumber == null - ) - )?.map((a) => { - return
{a.SerialNumber}
; - }) - : ''}{' '} - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = item2.IMEI1 || ''; - const imei2 = item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} -
-
+
{item?.ProdName}
+
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) + {item?.BrandName !== null + ? item?.BrandName + : ''} +   + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls?.filter( + (items) => + !( + items.SerialNumber == '' || + items.SerialNumber == null + ) + )?.map((a) => { + return
{a.SerialNumber}
; + }) + : ''}{' '} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (item1) => + item1.IMEI1 !== '' || + item1.IMEI2 !== '' + )?.map((item2) => { + const imei1 = item2.IMEI1 || ''; + const imei2 = item2.IMEI2 || ''; + return ( +
+ {[imei1, imei2] + .filter(Boolean) + .join(',')} +
+ ); + }) + : ''} +
+
- {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +
Item - Qty - + Qty + - {WeightasKg ? 'Qty/Kg' : 'Qty'} - + {WeightasKg ? 'Qty/Kg' : 'Qty'} + - HSN - + HSN + - HSN - + HSN + - MRP - + MRP + - MRP - + MRP + - Dis{' '} - + Dis{' '} + - Dis{' '} - + Dis{' '} + - Tax % - + Tax % + - Tax % - + Tax % + - Rate - + Rate + - Rate - + Rate + - Amt - + Amt + - Amt - + Amt +
{item?.ProdName} -
{item?.ProdName}
-
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
-
+
{item?.ProdName}
+
+ ({item?.Size ? item?.Size : '1'}{' '} + {item?.SinglePc == 'Y' + ? 'PCS' + : item?.Type != 'C' + ? item?.UomName + : 'COMBO'} + ) +
+
- {item?.SalesQty} - + {item?.SalesQty} + - {item?.SalesQty} - + {item?.SalesQty} + - {item?.HSN} - + {item?.HSN} + - {item?.HSN} - + {item?.HSN} + - {item?.MRP} - + {item?.MRP} + - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + - {item.discount} - + {item.discount} + - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + - {item?.ProdTaxPercentage} - + {item?.ProdTaxPercentage} + - {item?.ProdTaxPercentage || 0} - + {item?.ProdTaxPercentage || 0} + - {item?.Rate} - + {item?.Rate} + - {item?.Rate} - + {item?.Rate} + - {item?.TotalAmt} - + {item?.TotalAmt} + - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} +