+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
@@ -797,8 +803,8 @@ const Printstyle2 = ({
))}
- ) : UomPrint?.SettingValue === 'Y' && (
-
+ ) : UomPrint?.SettingValue === 'Y' && (
+
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -814,7 +820,7 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
-
+
{item?.ProductIdentifierDtls?.length >
0
? item?.ProductIdentifierDtls?.filter(
@@ -1000,23 +1006,23 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalSlNo && (
- | S.No |
+ S.No |
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalHsnCode && (
HSN
|
)
: HsnCode && (
HSN
|
@@ -1024,14 +1030,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalQuantity && (
Qty
|
)
: Quantity && (
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
@@ -1039,14 +1045,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalMRP && (
MRP
|
)
: MRP && (
MRP
|
@@ -1054,14 +1060,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalAmount && (
Amt
|
)
: Amount && (
Amt
|
@@ -1069,14 +1075,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalDiscount && (
Dis{' '}
|
)
: Discount && (
Dis{' '}
|
@@ -1084,7 +1090,8 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalTax && (
Tax %
@@ -1093,7 +1100,7 @@ const Printstyle2 = ({
: Tax == true &&
table2Data?.OrderType !== 'E' && (
|
Tax %
|
@@ -1101,14 +1108,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalRate && (
Rate
|
)
: Rate && (
Rate
|
@@ -1119,17 +1126,17 @@ const Printstyle2 = ({
{dataChunk?.map((item, index) => {
return (
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -1156,17 +1163,17 @@ const Printstyle2 = ({
}}
>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- }
+ {UomPrint?.SettingValue === 'Y' &&
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ }
|
)}
{GlobaldummyData
@@ -1393,7 +1400,7 @@ const Printstyle2 = ({
!shouldFooterBeOnNewPage &&
FormatTheme && (
<>
-
+
@@ -2061,7 +2068,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{GlobaldummyData
@@ -2274,11 +2281,11 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
<>
-
+
@@ -2932,7 +2939,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{GlobaldummyData
@@ -3130,8 +3137,8 @@ const Printstyle2 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
-
+
+
{GlobaldummyData ? (
GlobalLogo && (
{GlobaldummyData
- ? GlobalSlNo && | S.No |
- : SLNO && S.No | }
+ ? GlobalSlNo && S.No |
+ : SLNO && S.No | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
@@ -3363,18 +3370,18 @@ const Printstyle2 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
-
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
@@ -3419,7 +3426,7 @@ const Printstyle2 = ({
))}
- ) : UomPrint?.SettingValue === 'Y' && (
+ ) : UomPrint?.SettingValue === 'Y' && (
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -3435,7 +3442,7 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
-
+
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
@@ -3611,86 +3618,86 @@ const Printstyle2 = ({
{GlobaldummyData
- ? GlobalSlNo && | S.No |
- : SLNO && S.No | }
+ ? GlobalSlNo && S.No |
+ : SLNO && S.No | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
@@ -3701,17 +3708,17 @@ const Printstyle2 = ({
(item, index) => {
return (
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -3738,17 +3745,17 @@ const Printstyle2 = ({
}}
>
{item?.ProdName}
- {UomPrint?.SettingValue === 'Y' &&
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- }
+ {UomPrint?.SettingValue === 'Y' &&
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ }
|
)}
{GlobaldummyData
@@ -3885,7 +3892,7 @@ const Printstyle2 = ({
)}
-
+
Qty
@@ -4499,7 +4506,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{GlobaldummyData
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
index 5b0199a..7ce5a5e 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx
@@ -101,6 +101,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const SettingData = useSelector(PreferenceData);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@@ -200,7 +206,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
if (hasMappedOffer) {
- const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type != "C" ? item.OfferAmt : item.OfferValue || 0), 0);
+ const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type !== 'C' ? (item?.OfferAmt || item?.DiscountAmt || 0) : (item?.OfferValue || item?.DiscountAmt || 0)), 0);
TotalOfferAmount += productTotal;
} else {
const Combothere = productsData?.filter(item => item?.Type == "C")
@@ -289,7 +295,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{/* */}
- {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
+ {((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' :
{GlobaldummyData && GlobalLogo ?  : null}
{(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ?  : null}
@@ -319,9 +325,10 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
- {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
}
{GlobaldummyData ? formattedDate : Date1}
@@ -421,9 +428,15 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalMRP && {item?.MRP} : MRP && {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP} }
{GlobaldummyData ? GlobalQuantity && {item?.SalesQty} : Quantity && {item?.SalesQty} }
{GlobaldummyData ? GlobalRate && {item?.Rate} : Rate && {item?.Rate} }
- {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount &&
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
+ }
{GlobaldummyData ? GlobalTax && {item?.ProdTaxPercentage || 0} : (Tax == true && table2Data?.OrderType !== 'E') && ( {item?.ProdTaxPercentage || 0} )}
- {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount &&
+ {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
+ }
))}
@@ -464,9 +477,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalMRP && {item?.MRP} : MRP && {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP} }
{GlobaldummyData ? GlobalQuantity && {item?.SalesQty} : Quantity && {item?.SalesQty} }
{GlobaldummyData ? GlobalRate && {item?.Rate} : Rate && {item?.Rate} }
- {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)} }
{GlobaldummyData ? GlobalTax && {item?.ProdTaxPercentage || 0} : (Tax == true && table2Data?.OrderType !== 'E') && ( {item?.ProdTaxPercentage || 0} )}
- {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} }
))}
@@ -488,7 +503,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme &&
<>
-
+
Items :
Qty :
@@ -889,7 +904,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
}}
>
<>
-
+
Items :
Qty :
@@ -1397,9 +1412,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalMRP && {item?.MRP} : MRP && {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP} }
{GlobaldummyData ? GlobalQuantity && {item?.SalesQty} : Quantity && {item?.SalesQty} }
{GlobaldummyData ? GlobalRate && {item?.Rate} : Rate && {item?.Rate} }
- {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)} }
{GlobaldummyData ? GlobalTax && {item?.ProdTaxPercentage || 0} : (Tax == true && table2Data?.OrderType !== 'E') && ( {item?.ProdTaxPercentage || 0} )}
- {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} }
))}
@@ -1440,9 +1457,13 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{GlobaldummyData ? GlobalMRP && {item?.MRP} : MRP && {item?.SinglePc === 'Y' ? item?.Rate : item?.MRP} }
{GlobaldummyData ? GlobalQuantity && {item?.SalesQty} : Quantity && {item?.SalesQty} }
{GlobaldummyData ? GlobalRate && {item?.Rate} : Rate && {item?.Rate} }
- {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount && {item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalDiscount && {item?.discount} : Discount &&
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
+ }
{GlobaldummyData ? GlobalTax && {item?.ProdTaxPercentage || 0} : (Tax == true && table2Data?.OrderType !== 'E') && ( {item?.ProdTaxPercentage || 0} )}
- {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0} }
+ {GlobaldummyData ? GlobalAmount && {item?.TotalAmt} : Amount && {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} }
))}
@@ -1459,7 +1480,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
}
{/* */}
-
+
Items :
Qty :
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
index 2e85ece..41a31f4 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx
@@ -28,7 +28,7 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
- GlobalSelectedPrintHeaderColor,
+ GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
@@ -111,18 +111,24 @@ const Printstyle4 = ({
const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
- const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
- const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
- const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
- const SelectedRowType = useSelector(GlobalRowType);
- const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
- const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
+ const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
+ const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
+ const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedRowType = useSelector(GlobalRowType);
+ const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
+ const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
+ const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const SettingData = useSelector(PreferenceData);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const totalGSTData = [
(OrderDetailGST || []).reduce(
(acc, item) => ({
@@ -444,8 +450,8 @@ const Printstyle4 = ({
flexDirection: 'column',
justifyContent:
chunkIndex === paginatedChunks.length - 1 &&
- !shouldFooterBeOnNewPage &&
- FormatTheme
+ !shouldFooterBeOnNewPage &&
+ FormatTheme
? 'space-between'
: '',
height: isMobile
@@ -478,7 +484,7 @@ const Printstyle4 = ({
) : (
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
{' '}
@@ -574,10 +580,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
{/* {GlobaldummyData ? formattedDate : Date1} */}
@@ -641,17 +647,17 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- | # |
+ # |
)
- : SLNO && # | }
+ : SLNO && # | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{/* SL NO */}
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{/* ITEM COLUMN */}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {/* Product Name */}
- {item?.ProdName}
+ |
+ {/* Product Name */}
+ {item?.ProdName}
- {/* Package OR Size */}
- {packageList.length > 0 ? (
-
- {packageList.map((pkg, i) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y'
- ? (item?.Size || '1') +
- (item?.SinglePc === 'Y'
- ? ' PCS'
- : item?.Type !== 'C'
- ? ` ${item?.UomName}`
- : ' COMBO')
- : ''}
- {item?.BrandName || ''}
-
- )}
+ {/* Package OR Size */}
+ {packageList.length > 0 ? (
+
+ {packageList.map((pkg, i) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y'
+ ? (item?.Size || '1') +
+ (item?.SinglePc === 'Y'
+ ? ' PCS'
+ : item?.Type !== 'C'
+ ? ` ${item?.UomName}`
+ : ' COMBO')
+ : ''}
+ {item?.BrandName || ''}
+
+ )}
- {/* Serials */}
- {serials.map((s, i) => (
- {s}
- ))}
+ {/* Serials */}
+ {serials.map((s, i) => (
+ {s}
+ ))}
- {/* IMEIs */}
- {imeis.map((iVal, i) => (
- {iVal}
- ))}
+ {/* IMEIs */}
+ {imeis.map((iVal, i) => (
+ {iVal}
+ ))}
- {/* Description from first identifier */}
- {descriptions[0] && (
- {descriptions[0]}
- )}
- |
- )}
+ {/* Description from first identifier */}
+ {descriptions[0] && (
+ {descriptions[0]}
+ )}
+
+ )}
{/* Quantity */}
{(GlobaldummyData
? GlobalQuantity
: Quantity) && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{/* HSN */}
{(GlobaldummyData
? GlobalHsnCode
: HsnCode) && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{/* MRP */}
{(GlobaldummyData ? GlobalMRP : MRP) && (
@@ -921,12 +927,12 @@ const Printstyle4 = ({
{(GlobaldummyData
? GlobalDiscount
: Discount) && (
-
- {item?.Type !== 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
{/* Rate */}
{(GlobaldummyData ? GlobalRate : Rate) && (
@@ -940,9 +946,9 @@ const Printstyle4 = ({
{item?.Type !== 'C'
? (item?.TotalAmt || 0) -
- (item?.OfferAmt || 0)
+ (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.TotalAmt || 0) -
- (item?.OfferValue || 0)}
+ (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -971,12 +977,12 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalSlNo && (
- | # |
+ # |
)
- : SLNO && # | }
+ : SLNO && # | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
{
return (
|
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
-
- {chunkIndex * chunkSize + index + 1}
- |
- )}
+
+ {chunkIndex * chunkSize + index + 1}
+ |
+ )}
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+
+ {item?.ProdName}
+ {UomPrint?.SettingValue === 'Y' && (
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ )}
+ |
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
- |
- )
+
+ {item?.SalesQty}
+ |
+ )
: Quantity && (
-
- {item?.SalesQty}
- |
- )}
+
+ {item?.SalesQty}
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- {item?.HSN}
- |
- )
+
+ {item?.HSN}
+ |
+ )
: HsnCode && (
-
- {item?.HSN}
- |
- )}
+
+ {item?.HSN}
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- {item?.MRP}
- |
- )
+
+ {item?.MRP}
+ |
+ )
: MRP && (
-
- {item?.SinglePc === 'Y'
- ? item?.Rate
- : item?.MRP}
- |
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: 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 || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
);
})}
@@ -1287,7 +1292,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
- ...netAmountStyle
+ ...netAmountStyle
}}
>
{' '}
@@ -1324,11 +1329,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -1493,17 +1498,17 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' +
- ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' +
+ ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -1774,7 +1779,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -1800,83 +1805,83 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
- Advance Amount:
- Opening Balance:
-
- )
+
+ Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
- items.push({
- label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(
- 2
- ),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(
+ 2
+ ),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{/*
*/}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -1885,59 +1890,59 @@ const Printstyle4 = ({
{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
+ )}
+
+
+ )}
)}
@@ -2038,7 +2043,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2047,28 +2052,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -2088,137 +2093,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving
- the counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving
+ the counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
- 0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
- 
-
- )
+ Signature
+
+ 
+
+ )
: Signature == true && (
-
+
-
- Signature
-
- 
-
- )}
+ Signature
+
+ 
+
+ )}
)}
@@ -2279,7 +2284,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
- ...netAmountStyle
+ ...netAmountStyle
}}
>
Sub Total
@@ -2315,11 +2320,11 @@ const Printstyle4 = ({
{GlobaldummyData
? '1,066'
: Number(
- productsData?.reduce(
- (a, b) => a + b.SalesQty,
- 0
- )
- )}
+ productsData?.reduce(
+ (a, b) => a + b.SalesQty,
+ 0
+ )
+ )}
@@ -2484,16 +2489,16 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor(
- (num % 100) / 10
- )
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor(
+ (num % 100) / 10
+ )
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -2764,7 +2769,7 @@ const Printstyle4 = ({
: '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -2788,81 +2793,81 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalCredit && (
-
- Advance Amount:
- Opening Balance:
-
- )
+
+ Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName ===
- 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
- items.push({
- label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName ===
+ 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
-
- {i.label}
-
- :
-
- {i.value}
-
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+
+ {i.label}
+
+ :
+
+ {i.value}
+
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2871,55 +2876,55 @@ const Printstyle4 = ({
{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)}
+
+
+ )}
)}
@@ -3015,7 +3020,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -3024,28 +3029,28 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
-
- {Notestext}
-
+
- )}
+
+
+ )}
)}
@@ -3065,137 +3070,137 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not
- exchangeable or refundable.
-
- -
- Please check the product before leaving the
- counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not
+ exchangeable or refundable.
+
+ -
+ Please check the product before leaving the
+ counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
- 0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
- 
-
- )
+ Signature
+
+ 
+
+ )
: Signature == true && (
-
+
-
- Signature
-
- 
-
- )}
+ Signature
+
+ 
+
+ )}
)}
@@ -3225,7 +3230,7 @@ const Printstyle4 = ({
) : (
) : null}
{base64Image &&
- (PrintLogo?.SettingValue === 'Y' || LogoField) ? (
+ (PrintLogo?.SettingValue === 'Y' || LogoField) ? (

- ) : null}
+ ) : null}
{' '}
@@ -3317,9 +3322,11 @@ const Printstyle4 = ({
>
Dt: {GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' && (
- Name : {table2Data?.SalesMode == 'R' ? 'RT' : 'WS'}
- )}
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
+ }
@@ -3327,10 +3334,10 @@ const Printstyle4 = ({
{GlobaldummyData
? '51'
: table2Data?.OrderId &&
- extractLastNumberOrderId(
- table2Data?.OrderId,
- table2Data?.FYStatus
- )}
+ extractLastNumberOrderId(
+ table2Data?.OrderId,
+ table2Data?.FYStatus
+ )}
@@ -3388,52 +3395,52 @@ const Printstyle4 = ({
{GlobaldummyData
- ? GlobalSlNo && | # |
- : SLNO && # | }
+ ? GlobalSlNo && # |
+ : SLNO && # | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
Qty
|
)}
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
@@ -3461,23 +3468,23 @@ const Printstyle4 = ({
)} */}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Amt
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3488,56 +3495,56 @@ const Printstyle4 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
+ |
+ {item?.ProdName}
- {/* Serial Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
+ {/* Serial Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
- {/* IMEI Numbers */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
+ {/* IMEI Numbers */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.find(
- (d) =>
- d.SerialNumber || d.IMEI1 || d.IMEI2
- )?.Description && (
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.find(
+ (d) =>
+ d.SerialNumber || d.IMEI1 || d.IMEI2
+ )?.Description && (
{
item.ProductIdentifierDtls.find(
@@ -3549,56 +3556,56 @@ const Printstyle4 = ({
}
)}
- |
- )}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
-
- {/* Package Details */}
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- ).length > 0 ? (
-
- {PackageDetails?.filter(
- (pkg) => pkg.ProdId === item.ProdId
- )?.map((pkg, index) => (
-
- {pkg.ParcelCount} PCS{' '}
- {pkg.ParcelQty} PACK (
- {pkg.ParcelType})
-
- ))}
+
+ {/* Package Details */}
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ ).length > 0 ? (
+
+ {PackageDetails?.filter(
+ (pkg) => pkg.ProdId === item.ProdId
+ )?.map((pkg, index) => (
+
+ {pkg.ParcelCount} PCS{' '}
+ {pkg.ParcelQty} PACK (
+ {pkg.ParcelType})
+
+ ))}
- {/* Serial */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.SerialNumber
- )?.map((d, i) => (
-
- {d.SerialNumber}
-
- ))}
+ {/* Serial */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.SerialNumber
+ )?.map((d, i) => (
+
+ {d.SerialNumber}
+
+ ))}
- {/* IMEI */}
- {item?.ProductIdentifierDtls?.filter(
- (d) => d.IMEI1 || d.IMEI2
- )?.map((d, i) => (
-
- {[d.IMEI1, d.IMEI2]
- .filter(Boolean)
- .join(', ')}
-
- ))}
+ {/* IMEI */}
+ {item?.ProductIdentifierDtls?.filter(
+ (d) => d.IMEI1 || d.IMEI2
+ )?.map((d, i) => (
+
+ {[d.IMEI1, d.IMEI2]
+ .filter(Boolean)
+ .join(', ')}
+
+ ))}
- {/* Description from first identifier */}
- {item?.ProductIdentifierDtls?.find(
- (d) =>
- d.SerialNumber ||
- d.IMEI1 ||
- d.IMEI2
- )?.Description && (
+ {/* Description from first identifier */}
+ {item?.ProductIdentifierDtls?.find(
+ (d) =>
+ d.SerialNumber ||
+ d.IMEI1 ||
+ d.IMEI2
+ )?.Description && (
{
item.ProductIdentifierDtls.find(
@@ -3610,141 +3617,141 @@ const Printstyle4 = ({
}
)}
-
- ) : (
-
- {UomPrint?.SettingValue === 'Y' && (
- <>
- ({item?.Size || '1'}){' '}
- {item?.SinglePc === 'Y'
- ? 'PCS'
- : item?.Type !== 'C'
- ? item?.UomName
- : 'COMBO'}{' '}
- >
- )}
- {item?.BrandName || ''}
-
- )}
-
- |
- )
+
+ ) : (
+
+ {UomPrint?.SettingValue === 'Y' && (
+ <>
+ ({item?.Size || '1'}){' '}
+ {item?.SinglePc === 'Y'
+ ? 'PCS'
+ : item?.Type !== 'C'
+ ? item?.UomName
+ : 'COMBO'}{' '}
+ >
+ )}
+ {item?.BrandName || ''}
+
+ )}
+
+
+ )
: 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}
- {GlobaldummyData
- ? GlobalTax && (
- |
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )
- : Tax == true &&
- table2Data?.OrderType !== 'E' && (
-
- {/* */}
-
- GST:{' '}
- {' '}
- {item?.ProdTaxPercentage || 0}
- |
- )}
-
- )}
+
+ {item?.SinglePc === 'Y'
+ ? item?.Rate
+ : item?.MRP}
+ {GlobaldummyData
+ ? GlobalTax && (
+ |
+ {/* */}
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
+ : Tax == true &&
+ table2Data?.OrderType !== 'E' && (
+
+ {/* */}
+
+ GST:{' '}
+ {' '}
+ {item?.ProdTaxPercentage || 0}
+ |
+ )}
+
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- {item.discount}
- |
- )
+
+ {item.discount}
+ |
+ )
: Discount && (
-
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
- |
- )}
+
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 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 || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
);
}
@@ -3779,48 +3786,48 @@ const Printstyle4 = ({
: Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
- Qty
- |
- )
+
+ Qty
+ |
+ )
: Quantity && (
-
- Qty
- |
- )}
+
+ Qty
+ |
+ )}
{GlobaldummyData
? GlobalHsnCode && (
-
- HSN
- |
- )
+
+ HSN
+ |
+ )
: HsnCode && (
-
- HSN
- |
- )}
+
+ HSN
+ |
+ )}
{GlobaldummyData
? GlobalMRP && (
-
- MRP
- |
- )
+
+ MRP
+ |
+ )
: MRP && (
-
- MRP
- |
- )}
+
+ MRP
+ |
+ )}
{GlobaldummyData
? GlobalDiscount && (
-
- Dis{' '}
- |
- )
+
+ Dis{' '}
+ |
+ )
: Discount && (
-
- Dis{' '}
- |
- )}
+
+ Dis{' '}
+ |
+ )}
{/* {GlobaldummyData
? GlobalTax && (
- Rate
- |
- )
+
+ Rate
+ |
+ )
: Rate && (
-
- Rate
- |
- )}
+
+ Rate
+ |
+ )}
{GlobaldummyData
? GlobalAmount && (
-
- Amt
- |
- )
+
+ Amt
+ |
+ )
: Amount && (
-
- Amt
- |
- )}
+
+ Amt
+ |
+ )}
@@ -3872,76 +3879,90 @@ const Printstyle4 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
{GlobaldummyData
? GlobalItem && {item?.ProdName} |
: Item && (
-
- {item?.ProdName}
- {(
- (item?.ProductIdentifierDtls?.length > 0
- ? item?.ProductIdentifierDtls.filter(
- (items) => items.SerialNumber
- )
- .map(
- (a, index) => ` ${a.SerialNumber}`
- )
- .join('')
- : '') +
- (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(',')}`;
- })
- .join('')
- : '') +
- (item?.ProductIdentifierDtls?.length >
- 0 &&
+ |
+ {item?.ProdName}
+ {(
+ (item?.ProductIdentifierDtls?.length > 0
+ ? item?.ProductIdentifierDtls.filter(
+ (items) => items.SerialNumber
+ )
+ .map(
+ (a, index) => ` ${a.SerialNumber}`
+ )
+ .join('')
+ : '') +
+ (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(',')}`;
+ })
+ .join('')
+ : '') +
+ (item?.ProductIdentifierDtls?.length >
+ 0 &&
item?.ProductIdentifierDtls.find(
(item1) =>
item1.IMEI1 ||
item1.IMEI2 ||
item1.SerialNumber
)?.Description
- ? ` ${
- item.ProductIdentifierDtls.find(
- (item1) =>
- item1.IMEI1 ||
- item1.IMEI2 ||
- item1.SerialNumber
- ).Description
- }`
- : '')
- ).trim()}
- |
- )}
+ ? ` ${item.ProductIdentifierDtls.find(
+ (item1) =>
+ item1.IMEI1 ||
+ item1.IMEI2 ||
+ item1.SerialNumber
+ ).Description
+ }`
+ : '')
+ ).trim()}
+
+ )}
{GlobaldummyData
? GlobalQuantity && (
-
- {item?.SalesQty}
+ |
+ {item?.SalesQty}
+
+ ({item?.Size ? item?.Size : '1'}{' '}
+ {item?.SinglePc == 'Y'
+ ? 'PCS'
+ : item?.Type != 'C'
+ ? item?.UomName
+ : 'COMBO'}
+ )
+
+ |
+ )
+ : Quantity && (
+
+ {item?.SalesQty}
+ {UomPrint?.SettingValue === 'Y' && (
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@@ -3951,98 +3972,83 @@ const Printstyle4 = ({
: 'COMBO'}
)
- |
- )
- : Quantity && (
-
- {item?.SalesQty}
- {UomPrint?.SettingValue === 'Y' && (
-
- ({item?.Size ? item?.Size : '1'}{' '}
- {item?.SinglePc == 'Y'
- ? 'PCS'
- : item?.Type != 'C'
- ? item?.UomName
- : 'COMBO'}
- )
-
- )}
- |
- )}
+ )}
+
+ )}
{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 || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
{GlobaldummyData
? GlobalTax && (
-
- {item?.ProdTaxPercentage || 0}
- |
- )
+
+ {item?.ProdTaxPercentage || 0}
+ |
+ )
: Tax == true &&
- 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 || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
+ |
+ )}
);
}
@@ -4265,14 +4271,14 @@ const Printstyle4 = ({
' hundred' +
(num % 100
? ' ' +
- (num % 100 < 20
- ? ones[num % 100]
- : tens[
- Math.floor((num % 100) / 10)
- ] +
- (num % 10
- ? ' ' + ones[num % 10]
- : ''))
+ (num % 100 < 20
+ ? ones[num % 100]
+ : tens[
+ Math.floor((num % 100) / 10)
+ ] +
+ (num % 10
+ ? ' ' + ones[num % 10]
+ : ''))
: '')
);
return num.toString();
@@ -4532,7 +4538,7 @@ const Printstyle4 = ({
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
{Math.abs(
(lastTransaction?.BeforeAdjustment ?? 0) -
- (lastTransaction?.AfterAdjustment ?? 0)
+ (lastTransaction?.AfterAdjustment ?? 0)
).toFixed(2)}
@@ -4555,79 +4561,79 @@ const Printstyle4 = ({
)}
{GlobaldummyData
? GlobalCredit && (
-
- Advance Amount:
- Opening Balance:
-
- )
+
+ Advance Amount:
+ Opening Balance:
+
+ )
: CreditDetails &&
- table2Data?.CustomerDetails?.length > 0 && (
-
- {(() => {
- const c = table2Data.CustomerDetails[0];
- const items = [];
+ table2Data?.CustomerDetails?.length > 0 && (
+
+ {(() => {
+ const c = table2Data.CustomerDetails[0];
+ const items = [];
- if (
- PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
- ) {
- if (c.OldCreditBal !== 0) {
- items.push({
- label:
- c.OldCreditBal > 0
- ? 'Advance Amount'
- : 'Opening Balance',
- value: Math.abs(c.OldCreditBal).toFixed(2),
- });
- }
- }
-
- if (c.CurrentCreditBal !== 0) {
+ if (
+ PaymentStatusSuccess?.[0]?.PaymentTypeName === 'Credit'
+ ) {
+ if (c.OldCreditBal !== 0) {
items.push({
label:
- c.CurrentCreditBal > 0
- ? 'Current Advance Amount'
- : 'Current Balance Amount',
- value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ c.OldCreditBal > 0
+ ? 'Advance Amount'
+ : 'Opening Balance',
+ value: Math.abs(c.OldCreditBal).toFixed(2),
});
}
+ }
- return items.map((i, idx) => (
-
- {i.label}
- :
- {i.value}
-
- ));
- })()}
-
- )}
+ if (c.CurrentCreditBal !== 0) {
+ items.push({
+ label:
+ c.CurrentCreditBal > 0
+ ? 'Current Advance Amount'
+ : 'Current Balance Amount',
+ value: Math.abs(c.CurrentCreditBal).toFixed(2),
+ });
+ }
+
+ return items.map((i, idx) => (
+
+ {i.label}
+ :
+ {i.value}
+
+ ));
+ })()}
+
+ )}
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4636,51 +4642,51 @@ const Printstyle4 = ({
{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)}
- )}
+
+ )}
)}
@@ -4766,7 +4772,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
- ...footerColorStyle
+ ...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -4775,21 +4781,21 @@ const Printstyle4 = ({
{GlobaldummyData
? GlobalIsnotes && (
-
-
- Notes : 10 days Return policy
-
+
+
+ Notes : 10 days Return policy
+
-
-
- )
+
+
+ )
: Notestext && (
-
+ )}
)}
@@ -4809,136 +4815,136 @@ const Printstyle4 = ({
>
{GlobaldummyData
? GlobaltermsAndConditions && (
-
+
-
- Terms & Conditions
-
-
- -
- Once goods are sold, they are not exchangeable or
- refundable.
-
- -
- Please check the product before leaving the counter.
-
-
-
- )
+ Terms & Conditions
+
+
+ -
+ Once goods are sold, they are not exchangeable or
+ refundable.
+
+ -
+ Please check the product before leaving the counter.
+
+
+
+ )
: TermsnAdCondition == true &&
- TermsAndConditions?.length > 0 && (
- 0 && (
+
+
-
- Terms & Conditions
-
-
- {TermsAndConditions?.map((item) => (
- -
- {item?.TermsandConditions}
-
- ))}
- {/* - Please check the product before leaving the counter.
*/}
-
-
- )}
+ Terms & Conditions
+
+
+ {TermsAndConditions?.map((item) => (
+ -
+ {item?.TermsandConditions}
+
+ ))}
+ {/* - Please check the product before leaving the counter.
*/}
+
+
+ )}
{GlobaldummyData
? GlobalSignature && (
-
+
-
- Signature
-
- 
-
- )
+ Signature
+
+ 
+
+ )
: Signature == true && (
-
+
-
- Signature
-
- 
-
- )}
+ Signature
+
+ 
+
+ )}
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
index e893aa8..8564b68 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx
@@ -123,6 +123,12 @@ const PrintStyle5 = ({
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const GlobalCredit = useSelector(GlobalprintCredit);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@@ -949,9 +955,9 @@ const PrintStyle5 = ({
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
)}
{GlobaldummyData
@@ -983,9 +989,9 @@ const PrintStyle5 = ({
style={{ width: '100%', textAlign: 'right' }}
>
{' '}
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1272,9 +1278,9 @@ const PrintStyle5 = ({
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
)}
{GlobaldummyData
@@ -1306,9 +1312,9 @@ const PrintStyle5 = ({
style={{ width: '100%', textAlign: 'right' }}
>
{' '}
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1523,7 +1529,7 @@ const PrintStyle5 = ({
{' '}
Amount : {' '}
@@ -2271,7 +2277,7 @@ const PrintStyle5 = ({
{' '}
Amount : {' '}
@@ -2895,9 +2901,10 @@ const PrintStyle5 = ({
>
{' '}
{GlobaldummyData ? formattedDate : Date1}
- {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
}
{' '}
@@ -3270,9 +3277,9 @@ const PrintStyle5 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
)}
{GlobaldummyData
@@ -3296,9 +3303,9 @@ const PrintStyle5 = ({
: Amount && (
{' '}
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -3561,9 +3568,9 @@ const PrintStyle5 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
)}
{GlobaldummyData
@@ -3587,9 +3594,9 @@ const PrintStyle5 = ({
: Amount && (
{' '}
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -3775,7 +3782,7 @@ const PrintStyle5 = ({
{' '}
Amount : {' '}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
index c14c2e5..7178191 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx
@@ -29,17 +29,17 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
- GlobalSelectedPrintHeaderColor,
- GlobalSelectedPrintHeaderFontColor,
- GlobalSelectedTableHeaderColor,
- GlobalSelectedTableHeaderFontColor,
- GlobalSelectedTableBodyFontColor,
- GlobalSelectedTableBodyColor,
- GlobalRowType,
- GlobalSelectedFooterColor,
- GlobalSelectedFooterFontColor,
- GlobalSelectedNetAmountColor,
- GlobalSelectedNetAmountFontColor,
+ GlobalSelectedPrintHeaderColor,
+ GlobalSelectedPrintHeaderFontColor,
+ GlobalSelectedTableHeaderColor,
+ GlobalSelectedTableHeaderFontColor,
+ GlobalSelectedTableBodyFontColor,
+ GlobalSelectedTableBodyColor,
+ GlobalRowType,
+ GlobalSelectedFooterColor,
+ GlobalSelectedFooterFontColor,
+ GlobalSelectedNetAmountColor,
+ GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@@ -113,17 +113,23 @@ const Printstyle6 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
- const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
- const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
- const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
- const SelectedRowType = useSelector(GlobalRowType);
- const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
- const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
+ const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
+ const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
+ const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedRowType = useSelector(GlobalRowType);
+ const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
+ const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
+ const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
console.log(CashierNameField, "GlobaldummyData")
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
@@ -356,7 +362,7 @@ const Printstyle6 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
- const headerStyle = {
+ const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@@ -458,7 +464,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
{GlobaldummyData
? GlobalSlNo && (
- S.No |
+ S.No |
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@@ -635,7 +641,7 @@ const Printstyle6 = ({
|
)
) : (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@@ -789,17 +795,17 @@ const Printstyle6 = ({
{dataChunk?.map((item, index) => {
return (
|
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
@@ -957,9 +963,9 @@ const Printstyle6 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -1005,10 +1011,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1038,12 +1043,12 @@ const Printstyle6 = ({
{GlobaldummyData
? GlobalSlNo && (
- | S.No |
+ S.No |
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@@ -1053,7 +1058,7 @@ const Printstyle6 = ({
|
)
) : (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@@ -1207,17 +1212,17 @@ const Printstyle6 = ({
{dataChunk?.map((item, index) => {
return (
|
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
@@ -1345,9 +1350,9 @@ const Printstyle6 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -1393,10 +1398,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1797,7 +1801,7 @@ const Printstyle6 = ({
)}
-
+
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -2799,7 +2803,7 @@ const Printstyle6 = ({
)}
-
+
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@@ -3400,7 +3404,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
- {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
}
{Date1}
@@ -3553,11 +3558,11 @@ const Printstyle6 = ({
{GlobaldummyData
- ? GlobalSlNo && | S.No |
- : SLNO && S.No | }
+ ? GlobalSlNo && S.No |
+ : SLNO && S.No | }
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@@ -3565,7 +3570,7 @@ const Printstyle6 = ({
|
)
) : (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@@ -3576,68 +3581,68 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
- |
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
AMt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3648,17 +3653,17 @@ const Printstyle6 = ({
(item, index) => {
return (
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
@@ -3775,9 +3780,9 @@ const Printstyle6 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -3823,9 +3828,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -3855,11 +3860,11 @@ const Printstyle6 = ({
{GlobaldummyData
- ? GlobalSlNo && | S.No |
- : SLNO && S.No | }
+ ? GlobalSlNo && S.No |
+ : SLNO && S.No | }
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@@ -3867,7 +3872,7 @@ const Printstyle6 = ({
|
)
) : (
-
+ |
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@@ -3878,34 +3883,34 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
- |
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
@@ -3917,29 +3922,29 @@ const Printstyle6 = ({
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
AMt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3950,17 +3955,17 @@ const Printstyle6 = ({
(item, index) => {
return (
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
@@ -4094,9 +4099,9 @@ const Printstyle6 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -4142,9 +4147,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -4519,7 +4524,7 @@ const Printstyle6 = ({
)}
-
+
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
index 5300bb6..53385fe 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx
@@ -109,18 +109,18 @@ const PrintStyle7 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
- const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
- const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
- const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
- const SelectedRowType = useSelector(GlobalRowType);
- const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
- const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
- let printColors = printDatas?.PrintColors;
+ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
+ const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
+ const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
+ const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedRowType = useSelector(GlobalRowType);
+ const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
+ const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
+ const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@@ -129,6 +129,12 @@ const PrintStyle7 = ({
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@@ -375,7 +381,7 @@ const PrintStyle7 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
- const headerStyle = {
+ const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@@ -478,7 +484,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
{/* {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName} */}
{GlobaldummyData
? GlobalSlNo && (
- S |
+ S |
)
: SLNO == true && (
- S |
+ S |
)}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item == true && Item | }
+ ? GlobalItem && Item |
+ : Item == true && Item | }
{GlobaldummyData
? GlobalHsnCode && (
- HSN |
+ HSN |
)
: HsnCode == true && (
- HSN |
+ HSN |
)}
{GlobaldummyData
? GlobalQuantity && (
- Qty |
+ Qty |
)
: Quantity == true && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalMRP && (
- MRP |
+ MRP |
)
: MRP == true && (
- MRP |
+ MRP |
)}
{GlobaldummyData
? GlobalRate && (
- Rate |
+ Rate |
)
: Rate == true && (
- Rate |
+ Rate |
)}
{GlobaldummyData
? GlobalDiscount && (
- Dis |
+ Dis |
)
: Discount == true && (
- Dis |
+ Dis |
)}
{GlobaldummyData
? GlobalTax && (
- Tax % |
+ Tax % |
)
: Tax &&
table2Data?.OrderType !== 'E' && (
- Tax % |
+ Tax % |
)}
{GlobaldummyData
? GlobalAmount && (
@@ -725,17 +731,17 @@ const PrintStyle7 = ({
{dataChunk?.map((item, index) => (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -859,9 +865,9 @@ const PrintStyle7 = ({
? GlobalDiscount && | {item.discount} |
: Discount == true && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -884,10 +890,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -918,58 +923,58 @@ const PrintStyle7 = ({
{GlobaldummyData
? GlobalSlNo && (
- | S.No |
+ S.No |
)
: SLNO == true && (
- S.NO |
+ S.NO |
)}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item == true && Item | }
+ ? GlobalItem && Item |
+ : Item == true && Item | }
{GlobaldummyData
? GlobalHsnCode && (
- HSN |
+ HSN |
)
: HsnCode == true && (
- HSN |
+ HSN |
)}
{GlobaldummyData
? GlobalQuantity && (
- Qty |
+ Qty |
)
: Quantity == true && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalMRP && (
- MRP |
+ MRP |
)
: MRP == true && (
- MRP |
+ MRP |
)}
{GlobaldummyData
? GlobalRate && (
- Rate |
+ Rate |
)
: Rate == true && (
- Rate |
+ Rate |
)}
{GlobaldummyData
? GlobalDiscount && (
- Dis |
+ Dis |
)
: Discount == true && (
- Dis |
+ Dis |
)}
{GlobaldummyData
? GlobalTax && (
- Tax % |
+ Tax % |
)
: Tax &&
table2Data?.OrderType !== 'E' && (
- Tax % |
+ Tax % |
)}
{GlobaldummyData
? GlobalAmount && (
@@ -999,17 +1004,17 @@ const PrintStyle7 = ({
{dataChunk?.map((item, index) => (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -1125,9 +1130,9 @@ const PrintStyle7 = ({
? GlobalDiscount && | {item.discount} |
: Discount == true && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -1150,10 +1155,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -2984,7 +2988,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
- {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
}
@@ -3150,58 +3155,58 @@ const PrintStyle7 = ({
{GlobaldummyData
- ? GlobalSlNo && | S.No |
+ ? GlobalSlNo && S.No |
: SLNO == true && (
- S.No |
+ S.No |
)}
{GlobaldummyData
? GlobalItem && (
-
+ |
Item
|
)
- : Item == true && Item | }
+ : Item == true && Item | }
{GlobaldummyData
- ? GlobalHsnCode && HSN |
+ ? GlobalHsnCode && HSN |
: HsnCode == true && (
- HSN |
+ HSN |
)}
{GlobaldummyData
- ? GlobalQuantity && Qty |
+ ? GlobalQuantity && Qty |
: Quantity == true && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
- ? GlobalMRP && MRP |
+ ? GlobalMRP && MRP |
: MRP == true && (
- MRP |
+ MRP |
)}
{GlobaldummyData
- ? GlobalRate && Rate |
+ ? GlobalRate && Rate |
: Rate == true && (
- Rate |
+ Rate |
)}
{GlobaldummyData
- ? GlobalDiscount && Dis |
+ ? GlobalDiscount && Dis |
: Discount == true && (
- Dis |
+ Dis |
)}
{GlobaldummyData
? GlobalTax && (
- Tax % |
+ Tax % |
)
: Tax &&
table2Data?.OrderType !== 'E' && (
- Tax % |
+ Tax % |
)}
{GlobaldummyData
? GlobalAmount && (
- Amt |
+ Amt |
)
: Amount == true && (
-
+ |
Amt
|
)}
@@ -3211,17 +3216,17 @@ const PrintStyle7 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -3344,9 +3349,9 @@ const PrintStyle7 = ({
? GlobalDiscount && | {item.discount} |
: Discount == true && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -3369,9 +3374,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -3402,64 +3407,64 @@ const PrintStyle7 = ({
{GlobaldummyData
- ? GlobalSlNo && | S |
+ ? GlobalSlNo && S |
: SLNO == true && (
- S |
+ S |
)}
{GlobaldummyData
- ? GlobalItem && Item |
- : Item == true && Item | }
+ ? GlobalItem && Item |
+ : Item == true && Item | }
{GlobaldummyData
? GlobalHsnCode && (
- HSN |
+ HSN |
)
: HsnCode == true && (
- HSN |
+ HSN |
)}
{GlobaldummyData
? GlobalQuantity && (
- Qty |
+ Qty |
)
: Quantity == true && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
- ? GlobalMRP && MRP |
+ ? GlobalMRP && 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 % |
+ Tax % |
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount == true && (
-
+ |
Amt
|
)}
@@ -3469,17 +3474,17 @@ const PrintStyle7 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -3583,9 +3588,9 @@ const PrintStyle7 = ({
? GlobalDiscount && | {item.discount} |
: Discount == true && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -3608,9 +3613,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
index 37887f5..90d6e07 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx
@@ -30,15 +30,15 @@ import {
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
- GlobalSelectedTableHeaderColor,
- GlobalSelectedTableHeaderFontColor,
- GlobalSelectedTableBodyFontColor,
- GlobalSelectedTableBodyColor,
- GlobalRowType,
- GlobalSelectedFooterColor,
- GlobalSelectedFooterFontColor,
- GlobalSelectedNetAmountColor,
- GlobalSelectedNetAmountFontColor,
+ GlobalSelectedTableHeaderColor,
+ GlobalSelectedTableHeaderFontColor,
+ GlobalSelectedTableBodyFontColor,
+ GlobalSelectedTableBodyColor,
+ GlobalRowType,
+ GlobalSelectedFooterColor,
+ GlobalSelectedFooterFontColor,
+ GlobalSelectedNetAmountColor,
+ GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@@ -115,6 +115,12 @@ const Printstyle8 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@@ -160,17 +166,17 @@ const Printstyle8 = ({
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
- const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
- const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
- const SelectedRowType = useSelector(GlobalRowType);
- const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
- const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
- let printColors = printDatas?.PrintColors;
+ const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
+ const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
+ const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedRowType = useSelector(GlobalRowType);
+ const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
+ const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
+ const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@@ -387,7 +393,7 @@ const Printstyle8 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
- const headerStyle = {
+ const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@@ -489,7 +495,7 @@ const Printstyle8 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
{/* {table2Data?.BrName} */}
)}
{GlobaldummyData
- ? GlobalItem && Dis |
- : Item && Des | }
+ ? GlobalItem && Dis |
+ : Item && Des | }
{GlobaldummyData
? GlobalHsnCode && (
{
return (
|
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -944,9 +950,9 @@ const Printstyle8 = ({
)
: Discount && (
|
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -990,10 +996,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1047,8 +1052,8 @@ const Printstyle8 = ({
)}
{GlobaldummyData
- ? GlobalItem && Dis |
- : Item && Des | }
+ ? GlobalItem && Dis |
+ : Item && Des | }
{GlobaldummyData
? GlobalHsnCode && (
{
return (
|
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -1312,9 +1317,9 @@ const Printstyle8 = ({
)
: Discount && (
|
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -1358,10 +1363,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -1379,7 +1383,7 @@ const Printstyle8 = ({
FormatTheme && (
<>
-
+
<>
-
+
+
{/* {table2Data?.BrName} */}
- {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
}
{GlobaldummyData ? formattedDate : Date1}
@@ -3494,95 +3499,95 @@ const Printstyle8 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
+ |
S.No
|
)
: SLNO && (
-
+ |
S.No
|
)}
{GlobaldummyData
? GlobalItem && (
- Dis |
+ Dis |
)
- : Item && Des | }
+ : Item && Des | }
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rt
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
(%)
|
)
: Discount && (
-
+ |
(%)
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3593,17 +3598,17 @@ const Printstyle8 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -3686,9 +3691,9 @@ const Printstyle8 = ({
)
: Discount && (
|
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -3732,9 +3737,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -3767,93 +3772,93 @@ const Printstyle8 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
+ |
S.No
|
)
: SLNO && (
-
+ |
S.No
|
)}
{GlobaldummyData
- ? GlobalItem && Dis |
- : Item && Des | }
+ ? GlobalItem && Dis |
+ : Item && Des | }
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rt
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
(%)
|
)
: Discount && (
-
+ |
(%)
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3864,17 +3869,17 @@ const Printstyle8 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && (
|
@@ -3963,9 +3968,9 @@ const Printstyle8 = ({
)
: Discount && (
|
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -4009,9 +4014,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
)}
@@ -4024,7 +4029,7 @@ const Printstyle8 = ({
>
)}
-
+
Items
:
diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
index 076051a..681f255 100644
--- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
+++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx
@@ -30,15 +30,15 @@ import {
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
- GlobalSelectedTableHeaderColor,
- GlobalSelectedTableHeaderFontColor,
- GlobalSelectedTableBodyFontColor,
- GlobalSelectedTableBodyColor,
- GlobalRowType,
- GlobalSelectedFooterColor,
- GlobalSelectedFooterFontColor,
- GlobalSelectedNetAmountColor,
- GlobalSelectedNetAmountFontColor,
+ GlobalSelectedTableHeaderColor,
+ GlobalSelectedTableHeaderFontColor,
+ GlobalSelectedTableBodyFontColor,
+ GlobalSelectedTableBodyColor,
+ GlobalRowType,
+ GlobalSelectedFooterColor,
+ GlobalSelectedFooterFontColor,
+ GlobalSelectedNetAmountColor,
+ GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@@ -112,6 +112,12 @@ const PrintStyle9 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
+ const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
+ );
+ const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
+ (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
+ );
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@@ -154,18 +160,18 @@ const PrintStyle9 = ({
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
);
- const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
- const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
- const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
- const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
- const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
- const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
- const SelectedRowType = useSelector(GlobalRowType);
- const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
- const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
- const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
- const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
- let printColors = printDatas?.PrintColors;
+ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
+ const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
+ const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
+ const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
+ const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
+ const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
+ const SelectedRowType = useSelector(GlobalRowType);
+ const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
+ const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
+ const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
+ const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
+ let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@@ -377,7 +383,7 @@ const PrintStyle9 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
- const headerStyle = {
+ const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@@ -479,7 +485,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
{GlobaldummyData
? GlobalSlNo && (
- S.No |
+ S.No |
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData
? GlobalItem && (
- Item |
+ Item |
)
- : Item && Item | }
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
Qty
|
)
: Quantity && (
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
@@ -677,14 +683,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
HSN
|
)
: HsnCode && (
HSN
|
@@ -692,14 +698,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
MRP
|
)
: MRP && (
MRP
|
@@ -707,14 +713,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
Dis{' '}
|
)
: Discount && (
Dis{' '}
|
@@ -722,7 +728,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
Tax %
|
@@ -730,7 +736,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
Tax %
|
@@ -738,14 +744,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
Rate
|
)
: Rate && (
Rate
|
@@ -753,14 +759,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
Amt
|
)
: Amount && (
Amt
|
@@ -771,17 +777,17 @@ const PrintStyle9 = ({
{dataChunk?.map((item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
@@ -907,9 +913,9 @@ const PrintStyle9 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -943,10 +949,9 @@ const PrintStyle9 = ({
)
: Amount && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -975,25 +980,25 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalSlNo && (
- | S.No |
+ S.No |
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData
? GlobalItem && (
- Item |
+ Item |
)
- : Item && Item | }
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
Qty
|
)
: Quantity && (
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
@@ -1001,14 +1006,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
HSN
|
)
: HsnCode && (
HSN
|
@@ -1016,14 +1021,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
MRP
|
)
: MRP && (
MRP
|
@@ -1031,14 +1036,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
Dis{' '}
|
)
: Discount && (
Dis{' '}
|
@@ -1046,7 +1051,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
Tax %
|
@@ -1054,7 +1059,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
Tax %
|
@@ -1062,14 +1067,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
Rate
|
)
: Rate && (
Rate
|
@@ -1077,14 +1082,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
Amt
|
)
: Amount && (
Amt
|
@@ -1095,17 +1100,17 @@ const PrintStyle9 = ({
{dataChunk?.map((item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && (
@@ -1179,9 +1184,9 @@ const PrintStyle9 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -1215,10 +1220,9 @@ const PrintStyle9 = ({
)
: Amount && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue ||
- 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -2338,7 +2342,7 @@ const PrintStyle9 = ({
Net Amount:
@@ -3212,7 +3216,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
-
+
- {SalesModePref?.SettingValue == 'Y' &&
- {' '}
- Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
- }
+ {SalesModePref?.SettingValue == 'Y' &&
+ {' '}
+ Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
+
+ }
{' '}
{GlobaldummyData ? formattedDate : Date1}{' '}
@@ -3389,89 +3394,89 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalSlNo && (
- |
+ |
S.No
|
)
- : SLNO && S.No | }
+ : SLNO && S.No | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3482,17 +3487,17 @@ const PrintStyle9 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
@@ -3583,11 +3588,12 @@ const PrintStyle9 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
+
{GlobaldummyData
? GlobalTax && (
@@ -3619,9 +3625,9 @@ const PrintStyle9 = ({
)
: Amount && (
|
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -3650,86 +3656,86 @@ const PrintStyle9 = ({
{GlobaldummyData
- ? GlobalSlNo && | S.No |
- : SLNO && S.No | }
+ ? GlobalSlNo && S.No |
+ : SLNO && S.No | }
{GlobaldummyData
- ? GlobalItem && Item |
- : Item && Item | }
+ ? GlobalItem && Item |
+ : Item && Item | }
{GlobaldummyData
? GlobalQuantity && (
-
+ |
Qty
|
)
: Quantity && (
-
+ |
{WeightasKg ? 'Qty/Kg' : 'Qty'}
|
)}
{GlobaldummyData
? GlobalHsnCode && (
-
+ |
HSN
|
)
: HsnCode && (
-
+ |
HSN
|
)}
{GlobaldummyData
? GlobalMRP && (
-
+ |
MRP
|
)
: MRP && (
-
+ |
MRP
|
)}
{GlobaldummyData
? GlobalDiscount && (
-
+ |
Dis{' '}
|
)
: Discount && (
-
+ |
Dis{' '}
|
)}
{GlobaldummyData
? GlobalTax && (
-
+ |
Tax %
|
)
: Tax &&
table2Data?.OrderType !== 'E' && (
-
+ |
Tax %
|
)}
{GlobaldummyData
? GlobalRate && (
-
+ |
Rate
|
)
: Rate && (
-
+ |
Rate
|
)}
{GlobaldummyData
? GlobalAmount && (
-
+ |
Amt
|
)
: Amount && (
-
+ |
Amt
|
)}
@@ -3740,17 +3746,17 @@ const PrintStyle9 = ({
(item, index) => {
return (
+ style={
+ index % 2 !== 1 && rowtypeStyle === "even"
+ ? {
+ ...tableBodyStyle
+ }
+ : index % 2 === 1 && rowtypeStyle === "odd"
+ ? {
+ ...tableBodyStyle
+ }
+ : {}
+ }>
{GlobaldummyData
? GlobalSlNo && | {index + 1} |
: SLNO && {index + 1} | }
@@ -3818,9 +3824,9 @@ const PrintStyle9 = ({
)
: Discount && (
- {item?.Type != 'C'
- ? item?.OfferAmt || 0
- : item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? (item?.OfferAmt || item?.DiscountAmt || 0)
+ : (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
{GlobaldummyData
@@ -3854,9 +3860,9 @@ const PrintStyle9 = ({
)
: Amount && (
- {item?.Type != 'C'
- ? item?.TotalAmt - item?.OfferAmt || 0
- : item?.TotalAmt - item?.OfferValue || 0}
+ {item?.Type !== 'C'
+ ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
+ : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
|
)}
@@ -3961,7 +3967,7 @@ const PrintStyle9 = ({
-
+
Net Amount:
{GlobaldummyData
| |