diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx index 5bd9c09..0d62bd5 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx @@ -115,7 +115,8 @@ const Printstyle8 = ({ )?.SettingValue === 'Y'; const estimateTitle = SettingData?.[0]?.SettingDtlDetails?.find( - (setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle' + (setting) => + setting?.SettingIdName?.toLowerCase() === 'estimatetitle' )?.SettingValue === 'Y'; const bookingTypePreference = appPreferences?.find( (preference) => preference?.PreferredCatName === 'Booking Type' @@ -386,8 +387,8 @@ const Printstyle8 = ({ flexDirection: 'column', justifyContent: chunkIndex === paginatedChunks.length - 1 && - !shouldFooterBeOnNewPage && - FormatTheme + !shouldFooterBeOnNewPage && + FormatTheme ? 'space-between' : '', height: isMobile @@ -436,7 +437,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
)} @@ -505,8 +506,8 @@ const Printstyle8 = ({ : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName : ''}{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} )} @@ -516,12 +517,16 @@ const Printstyle8 = ({ {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )} -
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} +
} +
{GlobaldummyData ? formattedDate : Date1}
@@ -555,176 +560,176 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -733,145 +738,174 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {chunkIndex * chunkSize + index + 1} - - ) + + {chunkIndex * chunkSize + index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - ).length > 0 ? ( + +
{item?.ProdName}
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
+ {PackageDetails?.filter( + (pkg) => + pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount}PCS + {item.ParcelQty}PACK( + {item.ParcelType}) + + ))} +
+ ) : ( + UomPrint?.SettingValue === 'Y' && (
- {PackageDetails?.filter( - (pkg) => - pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount}PCS - {item.ParcelQty}PACK( - {item.ParcelType}) - - ))} + ({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'}
- ) : ( - UomPrint?.SettingValue === 'Y' && ( -
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
- ) - )} - - )} + ) + )} +
+ {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (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(',')} +
+ ); + }) + : ''} + {item?.ProductIdentifierDtls?.length > 0 + ? item?.ProductIdentifierDtls.filter( + (items) => + items.SerialNumber || items.IMEI1 || id.IMEI2 + )?.map((a, i) => ( + {a.Description} + )) + + : ''} +
+ + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -901,176 +935,176 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -1079,161 +1113,147 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {chunkIndex * chunkSize + index + 1} - - )} + + {chunkIndex * chunkSize + index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
{item?.ProdName}
+ +
{item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
- {UomPrint?.SettingValue === 'Y' - ? `${item?.Size || '1'} ${ - item?.SinglePc === 'Y' - ? 'PCS' - : item?.Type !== 'C' - ? item?.UomName - : 'COMBO' - }` - : ''} - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > - 0 - ? item?.ProductIdentifierDtls?.filter( - (items) => - !( - items.SerialNumber == '' || - items.SerialNumber == null - ) - )?.map((a) => { - return ( -
{a.SerialNumber}
- ); - }) - : ''}{' '} - {item?.ProductIdentifierDtls?.length > - 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = item2.IMEI1 || ''; - const imei2 = item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} + ({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'}
- - )} + )} + {item?.BrandName !== null &&
{item?.BrandName}
} +
+ {(item?.ProductIdentifierDtls ?? []) + .filter(items => items.SerialNumber) + .map((a, i) => ( +
+ {a.SerialNumber} +
+ ))} + + {(item?.ProductIdentifierDtls ?? []) + .filter(id => id.IMEI1 || id.IMEI2) + .map((id, i) => ( +
+ {[id.IMEI1, id.IMEI2].filter(Boolean).join(",")} +
+ ))} + + {(item?.ProductIdentifierDtls ?? []) + .filter(items => items.SerialNumber || items.IMEI1 || items.IMEI2) + .map((a, i) => + a.Description ? ( +
+ {a.Description} +
+ ) : null + )} +
+ + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || - 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || + 0} + + )} ); })} @@ -1288,29 +1308,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 && ( @@ -1749,10 +1769,8 @@ const Printstyle8 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs( - (lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0) - ).toFixed(2)} + {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > - 0 ? ( + 0 ? (

Advance Amount: {table2Data.CustomerDetails[0].OldCreditBal} @@ -1844,26 +1862,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 && ( @@ -1971,53 +1989,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 + )} +
+
+ )}
)}
@@ -2027,7 +2045,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} +

-
-
- )} +
+
+ )}
)} @@ -2090,137 +2108,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 +

+ + + )} )} @@ -2313,8 +2331,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -2748,10 +2766,8 @@ const Printstyle8 = ({ {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs( - (lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0) - ).toFixed(2)} + {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === - 'Credit' && ( + table2Data?.CustomerDetails?.length > 0 && ( +
+ {/* OLD CREDIT BAL */} + {PaymentStatusSuccess?.[0]?.PaymentTypeName === + 'Credit' && ( <> {table2Data.CustomerDetails[0].OldCreditBal > - 0 ? ( + 0 ? (

Advance Amount: {table2Data.CustomerDetails[0].OldCreditBal} @@ -2840,26 +2856,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 && ( @@ -2962,49 +2978,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)} +
+
+ )}
)}
@@ -3014,7 +3030,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} +

-
-
- )} +
+
+ )}
)} @@ -3077,137 +3093,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 +

+ + + )} )} @@ -3248,7 +3264,7 @@ const Printstyle8 = ({ /> ) : null} {base64Image && - (PrintLogo?.SettingValue === 'Y' || LogoField) ? ( + (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
Estimate{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */}
)} @@ -3318,8 +3334,8 @@ const Printstyle8 = ({ : PaymentStatusSuccess?.length === 1 ? PaymentStatusSuccess?.[0]?.PaymentTypeName + ' Bill' : ''}{' '} - {SalesModePref?.SettingValue == 'Y' && - `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} + {/* {SalesModePref?.SettingValue == 'Y' && + `(${table2Data?.SalesMode ? table2Data?.SalesMode : 'R'})`} */} )} @@ -3329,12 +3345,16 @@ const Printstyle8 = ({ {GlobaldummyData ? '553' : table2Data?.OrderId && - extractLastNumberOrderId( - table2Data?.OrderId, - table2Data?.FYStatus - )} + extractLastNumberOrderId( + table2Data?.OrderId, + table2Data?.FYStatus + )} -
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} +
} +
{GlobaldummyData ? formattedDate : Date1}
@@ -3363,98 +3383,98 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && ( - Dis - ) + Dis + ) : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3464,143 +3484,137 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} + + {index + 1} + + )} {GlobaldummyData ? GlobalItem && {item?.ProdName} : Item && ( - -
{item?.ProdName}
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - ).length > 0 ? ( + +
{item?.ProdName}
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + ).length > 0 ? ( +
+ {PackageDetails?.filter( + (pkg) => pkg.ProdId === item.ProdId + )?.map((item, index) => ( + + {item.ParcelCount}PCS + {item.ParcelQty}PACK( + {item.ParcelType}) + + ))} +
+ ) : ( + UomPrint?.SettingValue === 'Y' && (
- {PackageDetails?.filter( - (pkg) => pkg.ProdId === item.ProdId - )?.map((item, index) => ( - - {item.ParcelCount}PCS - {item.ParcelQty}PACK( - {item.ParcelType}) - - ))} + ({item?.Size || '1'}) {item?.SinglePc === 'Y' ? 'PCS' : item?.Type !== 'C' ? item?.UomName : 'COMBO'}
- ) : ( - UomPrint?.SettingValue === 'Y' && ( -
- ({item?.Size ? item?.Size : '1'}{' '} - {item?.SinglePc == 'Y' - ? 'PCS' - : item?.Type != 'C' - ? item?.UomName - : 'COMBO'} - ) -
- ) - )} - - )} + ) + )} + + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3631,96 +3645,96 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - S.No - - ) + + S.No + + ) : SLNO && ( - - S.No - - )} + + S.No + + )} {GlobaldummyData ? GlobalItem && Dis : Item && Des} {GlobaldummyData ? GlobalHsnCode && ( - - HSN - - ) + + HSN + + ) : HsnCode && ( - - HSN - - )} + + HSN + + )} {GlobaldummyData ? GlobalMRP && ( - - MRP - - ) + + MRP + + ) : MRP && ( - - MRP - - )} + + MRP + + )} {GlobaldummyData ? GlobalRate && ( - - Rate - - ) + + Rate + + ) : Rate && ( - - Rt - - )} + + Rt + + )} {GlobaldummyData ? GlobalDiscount && ( - - (%) - - ) + + (%) + + ) : Discount && ( - - (%) - - )} + + (%) + + )} {GlobaldummyData ? GlobalTax && ( - - Tax % - - ) + + Tax % + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - Tax % - - )} + table2Data?.OrderType !== 'E' && ( + + Tax % + + )} {GlobaldummyData ? GlobalQuantity && ( - - Qty - - ) + + Qty + + ) : Quantity && ( - - {WeightasKg ? 'Qty/Kg' : 'Qty'} - - )} + + {WeightasKg ? 'Qty/Kg' : 'Qty'} + + )} {GlobaldummyData ? GlobalAmount && ( - - Amt - - ) + + Amt + + ) : Amount && ( - - Amt - - )} + + Amt + + )} @@ -3730,156 +3744,154 @@ const Printstyle8 = ({ {GlobaldummyData ? GlobalSlNo && ( - - {index + 1} - - ) + + {index + 1} + + ) : SLNO && ( - - {index + 1} - - )} - {GlobaldummyData - ? GlobalItem && {item?.ProdName} - : Item && ( - -
{item?.ProdName}
+ + {index + 1} + + )} + {GlobaldummyData ? ( + GlobalItem && {item?.ProdName} + ) : ( + Item && ( + + {/* 🏷 Product Name */} +
{item?.ProdName}
+ + {/* 📦 Size */} + {UomPrint?.SettingValue === 'Y' && (
- {UomPrint?.SettingValue === 'Y' - ? `${item?.Size || '1'} ${ - item?.SinglePc === 'Y' - ? 'PCS' - : item?.Type !== 'C' - ? item?.UomName - : 'COMBO' - }` - : ''} - {item?.BrandName !== null - ? item?.BrandName - : ''} -   - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls?.filter( - (items) => - !( - items.SerialNumber == '' || - items.SerialNumber == null - ) - )?.map((a) => { - return
{a.SerialNumber}
; - }) - : ''}{' '} - {item?.ProductIdentifierDtls?.length > 0 - ? item?.ProductIdentifierDtls.filter( - (item1) => - item1.IMEI1 !== '' || - item1.IMEI2 !== '' - )?.map((item2) => { - const imei1 = item2.IMEI1 || ''; - const imei2 = item2.IMEI2 || ''; - return ( -
- {[imei1, imei2] - .filter(Boolean) - .join(',')} -
- ); - }) - : ''} + ({item?.Size || "1"}) {item?.SinglePc === "Y" ? "PCS" : item?.Type !== "C" ? item?.UomName : "COMBO"}
- - )} + )} + + {/* 🏷 Brand */} + {item?.BrandName && ( +
{item.BrandName}
+ )} + + {/* 🔢 Identifiers */} +
+ {(item?.ProductIdentifierDtls ?? []).map((data, i) => { + const hasSerial = data.SerialNumber; + const hasIMEI = data.IMEI1 || data.IMEI2; + + return ( +
+ {hasSerial &&
{data.SerialNumber}
} + + {hasIMEI && ( +
+ {[data.IMEI1, data.IMEI2] + .filter(Boolean) + .join(",")} +
+ )} + + {(hasSerial || hasIMEI) && data.Description && ( +
{data.Description}
+ )} +
+ ); + })} +
+ + ) + )} {GlobaldummyData ? GlobalHsnCode && {item?.HSN} : HsnCode && {item?.HSN}} {GlobaldummyData ? GlobalMRP && ( - - {item?.MRP} - - ) + + {item?.MRP} + + ) : MRP && ( - - {item?.SinglePc === 'Y' - ? item?.Rate - : item?.MRP} - - )} + + {item?.SinglePc === 'Y' + ? item?.Rate + : item?.MRP} + + )} {GlobaldummyData ? GlobalRate && ( - - {item?.Rate} - - ) + + {item?.Rate} + + ) : Rate && ( - - {item?.Rate} - - )} + + {item?.Rate} + + )} {GlobaldummyData ? GlobalDiscount && ( - - {item?.discount} - - ) + + {item?.discount} + + ) : Discount && ( - - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.OfferAmt || 0 + : item?.OfferValue || 0} + + )} {GlobaldummyData ? GlobalTax && ( - - {item?.ProdTaxPercentage} - - ) + + {item?.ProdTaxPercentage} + + ) : Tax && - table2Data?.OrderType !== 'E' && ( - - {item?.ProdTaxPercentage || 0} - - )} + table2Data?.OrderType !== 'E' && ( + + {item?.ProdTaxPercentage || 0} + + )} {GlobaldummyData ? GlobalQuantity && ( - - {item?.SalesQty} - - ) + + {item?.SalesQty} + + ) : Quantity && ( - - {item?.SalesQty} - - )} + + {item?.SalesQty} + + )} {GlobaldummyData ? GlobalAmount && ( - - {item?.TotalAmt} - - ) + + {item?.TotalAmt} + + ) : Amount && ( - - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} - - )} + + {item?.Type != 'C' + ? item?.TotalAmt - item?.OfferAmt || 0 + : item?.TotalAmt - item?.OfferValue || 0} + + )} ); } @@ -3931,8 +3943,8 @@ const Printstyle8 = ({ {GlobaldummyData ? '10' : Number( - TotalOfferAmount + table2Data?.OverallDisc - ).toFixed(2)} + TotalOfferAmount + table2Data?.OverallDisc + ).toFixed(2)} )} @@ -4343,10 +4355,8 @@ const Printstyle8 = ({ {'Adjustment Amount'} {lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'} - {Math.abs( - (lastTransaction?.BeforeAdjustment ?? 0) - - (lastTransaction?.AfterAdjustment ?? 0) - ).toFixed(2)} + {Math.abs((lastTransaction?.BeforeAdjustment ?? 0) - + (lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
{GlobaldummyData ? GlobalCredit && ( -
-
Advance Amount:
-
Opening Balance:
-
- ) +
+
Advance Amount:
+
Opening Balance:
+
+ ) : CreditDetails && - table2Data?.CustomerDetails?.length > 0 && ( -
- {/* OLD CREDIT BAL */} - {PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit' && ( - <> - {table2Data.CustomerDetails[0].OldCreditBal > 0 ? ( -

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

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

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

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

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

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

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

+ ) : null} + + )} - {/* CURRENT CREDIT BAL */} - {table2Data.CustomerDetails[0].CurrentCreditBal > 0 ? ( -

- {' '} - Current Advance Amount:{' '} - {table2Data.CustomerDetails[0].CurrentCreditBal} -

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

- {' '} - Current Balance Amount:{' '} - {Math.abs(table2Data.CustomerDetails[0].CurrentCreditBal)} -

- ) : null} -
- )} + {/* CURRENT CREDIT BAL */} + {table2Data.CustomerDetails[0].CurrentCreditBal > 0 ? ( +

+ {' '} + Current Advance Amount:{' '} + {table2Data.CustomerDetails[0].CurrentCreditBal} +

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

+ {' '} + Current Balance Amount:{' '} + {Math.abs(table2Data.CustomerDetails[0].CurrentCreditBal)} +

+ ) : null} +
+ )}
{PaymentStatusSuccess?.length > 1 && !isEditedBill && ( @@ -4540,47 +4550,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)} +
+
+ )}
)}
@@ -4612,21 +4622,21 @@ const Printstyle8 = ({
{GlobaldummyData ? GlobalIsnotes && ( -
-

- Notes : 10 days Return policy -

+
+

+ Notes : 10 days Return policy +

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

{Notestext}

+
+

{Notestext}

-
-
- )} +
+
+ )}
)} @@ -4646,136 +4656,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 +

+ + + )} )}