Merge pull request 'print-colors-sq' (#231) from print-colors-sq into main

Reviewed-on: Pozomind/pozo-retail-app#231
This commit is contained in:
karthikalakshmi 2026-03-04 16:55:11 +05:30
commit bbd0ea6e63
16 changed files with 3328 additions and 1424 deletions

View File

@ -27,7 +27,17 @@ import {
GlobalprintCashierName,
GlobalprintLogo,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss';
import QRCode from 'react-qr-code';
@ -110,8 +120,23 @@ const InvoiceTemplate = ({
)?.SettingValue === 'Y';
const keysLength = Object.keys(table2Data ?? {}).length;
console.log(GlobalDiscount, Discount, 'Discount');
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let BankDetails = table2Data?.BankDetails;
let TermsAndConditions = printDatas?.TermsandConditions;
@ -491,6 +516,51 @@ const InvoiceTemplate = ({
},
];
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
<style>
@ -882,7 +952,7 @@ const InvoiceTemplate = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="header-section">
<div className="header-section" style={{...headerStyle}}>
<div>
<div
style={{ display: 'flex', alignItems: 'center' }}
@ -1090,7 +1160,7 @@ const InvoiceTemplate = ({
}}
>
<thead>
<tr className="table-header">
<tr className="table-header" style={{...tableHeaderStyle}}>
{GlobaldummyData
? GlobalSlNo && (
<th className="table-header-cell">S.No</th>
@ -1238,7 +1308,18 @@ const InvoiceTemplate = ({
<tbody>
{((GlobaldummyData ? products : dataChunk) || []).map(
(item, idx) => (
<tr key={idx} className="table-row">
<tr key={idx} className="table-row"
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -1562,13 +1643,14 @@ const InvoiceTemplate = ({
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-start',
width: '95%',
width: '100%',
whiteSpace: 'nowrap',
fontSize: '10px',
flexWrap: 'wrap',
alignItems: 'flex-end',
gap: '2px',
marginBottom: '0.5rem',
...netAmountStyle
}}
>
<div style={{ display: 'flex' }}>
@ -1906,7 +1988,7 @@ const InvoiceTemplate = ({
</div>
{/* Footer */}
<div className="footer-grid">
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-left">
{BankDetails?.length > 0 && (
<>
@ -2168,11 +2250,14 @@ const InvoiceTemplate = ({
flexDirection: 'column',
alignItems: 'flex-end',
justifyContent: 'space-around',
width: '95%',
width: '100%',
padding: '0 10px',
padding: '0 10px',
whiteSpace: 'nowrap',
fontSize: '10px',
flexWrap: 'wrap',
gap: '2px',
...netAmountStyle
}}
>
<div style={{ display: 'flex' }}>
@ -2466,7 +2551,7 @@ const InvoiceTemplate = ({
</div>
{/* Footer */}
<div className="footer-grid">
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-left">
{BankDetails?.length > 0 && (
<>
@ -2688,7 +2773,7 @@ const InvoiceTemplate = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="header-section">
<div className="header-section" style={{...headerStyle}}>
<div>
<div style={{ display: 'flex', alignItems: 'center' }}>
{GlobalLogo && GlobaldummyData && (
@ -2719,14 +2804,11 @@ const InvoiceTemplate = ({
) : null}
<h1
className="company-name"
style={{
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'Company Name' : companyName}
</h1>
</div>
<p>{companyAddress}</p>
<p>{GlobaldummyData ? 'Hosur Dharga tamil Nadu 653105' : companyAddress}</p>
{(companyPhone || GlobaldummyData) && (
<div>
Phone: {GlobaldummyData ? '999999XXXX' : companyPhone}
@ -2854,7 +2936,7 @@ const InvoiceTemplate = ({
style={{ borderTop: '1px solid black' }}
>
<thead>
<tr className="table-header">
<tr className="table-header" style={{...tableHeaderStyle}}>
{GlobaldummyData
? GlobalSlNo && (
<th className="table-header-cell">S.No</th>
@ -2964,7 +3046,18 @@ const InvoiceTemplate = ({
<tbody>
{((GlobaldummyData ? products : productsData) || []).map(
(item, idx) => (
<tr key={idx} className="table-row">
<tr key={idx} className="table-row"
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -3185,11 +3278,13 @@ const InvoiceTemplate = ({
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'space-around',
width: '95%',
width: '100%',
padding: '0 10px',
whiteSpace: 'nowrap',
fontSize: '10px',
flexWrap: 'wrap',
gap: '2px',
...netAmountStyle
}}
>
<div
@ -3444,7 +3539,7 @@ const InvoiceTemplate = ({
</div>
{/* Footer */}
<div className="footer-grid">
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-left">
{(BankDetails?.length > 0 || GlobaldummyData) && (
<>

View File

@ -32,6 +32,17 @@ import {
GlobalPritdummyData,
GlobalSignatureImage,
GlobalthemeFormat,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import signature from '../../../../Images/signatureimage.jpg';
import QRCode from 'react-qr-code';
@ -102,6 +113,23 @@ const PrintA4Style11 = ({
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 headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -279,6 +307,51 @@ const PrintA4Style11 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > 6;
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<div
style={{
@ -317,6 +390,7 @@ const PrintA4Style11 = ({
justifyContent: 'space-between',
alignItems: 'center',
textAlign: 'left',
...headerStyle
}}
>
<div
@ -489,7 +563,7 @@ const PrintA4Style11 = ({
<table className="A4TableStyle11" style={{ width: '100%' }}>
<thead>
<tr>
<td>
<td >
{/* Placeholder for the fixed-position header */}
<div className="page-headerA4Style11-space"> </div>
</td>
@ -520,6 +594,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
S.No
@ -530,20 +605,22 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
S.No
</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
HSN
@ -554,6 +631,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
HSN
@ -565,6 +643,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Qty
@ -575,6 +654,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
@ -586,6 +666,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
MRP
@ -596,6 +677,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
MRP
@ -607,6 +689,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Rate
@ -617,6 +700,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Rate
@ -628,6 +712,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Dis{' '}
@ -638,6 +723,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Dis{' '}
@ -649,6 +735,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Tax %
@ -660,6 +747,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Tax %
@ -671,6 +759,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Amt
@ -681,6 +770,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'right',
...tableHeaderStyle,
}}
>
Amt
@ -691,7 +781,18 @@ const PrintA4Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -944,7 +1045,8 @@ const PrintA4Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -1323,7 +1425,8 @@ const PrintA4Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{ ...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -1505,6 +1608,7 @@ const PrintA4Style11 = ({
</div>
)}
</div>
</div>
</div>
)}
@ -1576,6 +1680,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
S.No
@ -1586,6 +1691,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
S.No
@ -1600,6 +1706,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
HSN
@ -1610,6 +1717,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
HSN
@ -1621,6 +1729,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Qty
@ -1631,6 +1740,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
@ -1642,6 +1752,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
MRP
@ -1652,6 +1763,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
MRP
@ -1663,6 +1775,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Rate
@ -1673,6 +1786,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Rate
@ -1684,6 +1798,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Dis{' '}
@ -1694,6 +1809,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Dis{' '}
@ -1705,6 +1821,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Tax %
@ -1716,6 +1833,7 @@ const PrintA4Style11 = ({
style={{
width: '8%',
textAlign: 'center',
...tableHeaderStyle
}}
>
Tax %
@ -1728,6 +1846,7 @@ const PrintA4Style11 = ({
width: '8%',
textAlign: 'center',
textAlign: 'right',
...tableHeaderStyle
}}
>
Amt
@ -1739,6 +1858,7 @@ const PrintA4Style11 = ({
width: '8%',
textAlign: 'center',
textAlign: 'right',
...tableHeaderStyle
}}
>
Amt
@ -1749,7 +1869,18 @@ const PrintA4Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1975,7 +2106,8 @@ const PrintA4Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -2352,7 +2484,8 @@ const PrintA4Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -2534,6 +2667,7 @@ const PrintA4Style11 = ({
</div>
)}
</div>
</div>
</div>
)}
</div>
@ -2631,7 +2765,8 @@ const PrintA4Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -2945,7 +3080,8 @@ const PrintA4Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -3116,6 +3252,7 @@ const PrintA4Style11 = ({
)}
</div>
</div>
</div>
)}
</div>
))}
@ -3198,7 +3335,8 @@ const PrintA4Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -3494,7 +3632,8 @@ const PrintA4Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -3513,7 +3652,6 @@ const PrintA4Style11 = ({
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
@ -3659,6 +3797,7 @@ const PrintA4Style11 = ({
)}
</div>
</div>
</div>
</div>
)}
</div>

View File

@ -32,6 +32,17 @@ import {
GlobalPritdummyData,
GlobalSignatureImage,
GlobalthemeFormat,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import signature from '../../../../Images/signatureimage.jpg';
import Logo from '../../../../Images/Logo.jpg';
@ -102,6 +113,23 @@ const PrintA5Style11 = ({
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 headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -276,6 +304,51 @@ const PrintA5Style11 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > 6;
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<div
style={{
@ -314,6 +387,7 @@ const PrintA5Style11 = ({
justifyContent: 'space-between',
alignItems: 'center',
textAlign: 'left',
...headerStyle
}}
>
<div
@ -450,7 +524,7 @@ const PrintA5Style11 = ({
padding: '0rem 1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
flexDirection: 'column',
textAlign:'left'
textAlign: 'left'
}}
>
{' '}
@ -508,6 +582,7 @@ const PrintA5Style11 = ({
style={{
background: '#373B44',
color: '#fff',
...tableHeaderStyle,
}}
>
{GlobaldummyData
@ -688,7 +763,18 @@ const PrintA5Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -931,7 +1017,8 @@ const PrintA5Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -1249,187 +1336,189 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: Notestext && (
<div>
<p
style={{
padding: '0rem 1rem',
textAlign: 'center',
}}
>
{Notestext}
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
<div style={{ ...footerColorStyle }}>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are
not exchangeable or refundable.
</li>
<li>
Please check the product before
leaving the counter.
</li>
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
: Notestext && (
<div>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
padding: '0rem 1rem',
textAlign: 'center',
}}
>
Terms & Conditions
{Notestext}
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map(
(item) => (
<li
style={{
textAlign: 'start',
}}
>
{item?.TermsandConditions}
</li>
)
)}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
<p
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
Signature
</p>
<img
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are
not exchangeable or refundable.
</li>
<li>
Please check the product before
leaving the counter.
</li>
</ol>
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
width: '70px',
height: '40px',
}}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
Signature
</p>
<img
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map(
(item) => (
<li
style={{
textAlign: 'start',
}}
>
{item?.TermsandConditions}
</li>
)
)}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
width: '100px',
height: '60px',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
src={SignatureImg}
alt=""
/>
</div>
)}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{
width: '70px',
height: '40px',
}}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{
width: '100px',
height: '60px',
}}
src={SignatureImg}
alt=""
/>
</div>
)}
</div>
</div>
</div>
)}
@ -1494,6 +1583,7 @@ const PrintA5Style11 = ({
style={{
background: '#373B44',
color: '#fff',
...tableHeaderStyle
}}
>
{GlobaldummyData
@ -1674,7 +1764,18 @@ const PrintA5Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1893,7 +1994,8 @@ const PrintA5Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -2209,187 +2311,189 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: Notestext && (
<div>
<p
style={{
padding: '0rem 1rem',
textAlign: 'center',
}}
>
{Notestext}
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
<div style={{ ...footerColorStyle }}>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are
not exchangeable or refundable.
</li>
<li>
Please check the product before
leaving the counter.
</li>
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
: Notestext && (
<div>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
padding: '0rem 1rem',
textAlign: 'center',
}}
>
Terms & Conditions
{Notestext}
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map(
(item) => (
<li
style={{
textAlign: 'start',
}}
>
{item?.TermsandConditions}
</li>
)
)}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
<p
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
Signature
</p>
<img
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are
not exchangeable or refundable.
</li>
<li>
Please check the product before
leaving the counter.
</li>
</ol>
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
width: '70px',
height: '40px',
}}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
Signature
</p>
<img
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map(
(item) => (
<li
style={{
textAlign: 'start',
}}
>
{item?.TermsandConditions}
</li>
)
)}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
width: '100px',
height: '60px',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
src={SignatureImg}
alt=""
/>
</div>
)}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{
width: '70px',
height: '40px',
}}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{
width: '100px',
height: '60px',
}}
src={SignatureImg}
alt=""
/>
</div>
)}
</div>
</div>
</div>
)}
@ -2488,7 +2592,8 @@ const PrintA5Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -2824,7 +2929,8 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -2995,6 +3101,7 @@ const PrintA5Style11 = ({
)}
</div>
</div>
</div>
)}
</div>
))}
@ -3077,7 +3184,8 @@ const PrintA5Style11 = ({
fontSize: '25px',
fontWeight: '600',
padding: '10px',
backgroundColor: '#fdc716',
// backgroundColor: '#fdc716',
...netAmountStyle,
textAlign: 'center',
}}
>
@ -3407,7 +3515,8 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
{GlobaldummyData
<div style={{...footerColorStyle}}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
@ -3572,6 +3681,7 @@ const PrintA5Style11 = ({
)}
</div>
</div>
</div>
</div>
)}
</div>

View File

@ -3,6 +3,16 @@ import { useSelector } from 'react-redux';
import {
GlobalPritdummyData,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import { isMobile } from 'react-device-detect';
import { extractLastNumberOrderId } from '../../../../Services/Others';
@ -40,6 +50,22 @@ const TaxInvoice = ({
let companyColour = printDatas?.PrintHdrColor ?? '#00000';
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
// Function to convert number to words
const numberToWords = (num) => {
const a = [
@ -364,6 +390,51 @@ const TaxInvoice = ({
`Page ${chunkIndex + 1}: isFirstPage=${isFirstPage}, isLastPage=${isLastPage}, isFooterOnlyPage=${isFooterOnlyPage},datachunkslength=${dataChunk.length}`
);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{/* Header - Only on first page */}
@ -376,6 +447,7 @@ const TaxInvoice = ({
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
...headerStyle
}}
>
<div></div>
@ -732,6 +804,7 @@ const TaxInvoice = ({
// borderRight: '1px solid #000',
borderBottom: '1px solid #000',
borderTop: '1px solid #000',
...tableHeaderStyle
}}
>
<div
@ -795,6 +868,11 @@ const TaxInvoice = ({
display: 'grid',
gridTemplateColumns: '5% 40% 12% 11% 16% 16%',
// borderRight: '1px solid #000',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}
>
<div
@ -1274,6 +1352,7 @@ const TaxInvoice = ({
textAlign: 'right',
fontWeight: '700',
fontSize: '15px',
...netAmountStyle
}}
>
{' '}
@ -2437,6 +2516,7 @@ const TaxInvoice = ({
textAlign: 'center',
fontSize: '10px',
padding: '8px',
...footerColorStyle
}}
>
<div>This is a Computer Generated Invoice</div>

View File

@ -31,6 +31,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalRowType,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss';
import QRCode from 'react-qr-code';
@ -67,7 +77,6 @@ const PrintStyle1 = ({
const FieldDetails = useSelector(GloabalFieldDetails);
const SLNO = FieldDetails?.['Sl.No'];
const Item = FieldDetails?.['Item'];
console.log(Item, 'PrintStyle1PrintStyle1');
const MRP = FieldDetails?.['MRP'];
const Discount = FieldDetails?.['Discount'];
const Tax = FieldDetails?.['Tax'];
@ -80,6 +89,12 @@ const PrintStyle1 = ({
const LogoField = FieldDetails?.['Logo'];
const CreditDetails = FieldDetails?.['Credit details'];
const WeightasKg = FieldDetails?.['Weight'];
const HeaderColor = FieldDetails?.['Header Colour'];
const NetAmountColor = FieldDetails?.['Net Amount'];
const TableHeaderColour = FieldDetails?.['Table Header Colour'];
const TableBodyColour = FieldDetails?.['Table Body Colour'];
const FooterColor = FieldDetails?.['Footer Colour'];
console.log(FieldDetails, 'FieldDetailsFieldDetails', printDatas);
const GlobalSlNo = useSelector(GlobalprintSlNo);
const GlobalItem = useSelector(GlobalprintItem);
const GlobalMRP = useSelector(GlobalprintMRP);
@ -96,7 +111,16 @@ const PrintStyle1 = ({
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 GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
const GlobalIsnotes = useSelector(Globalnotes);
@ -128,10 +152,10 @@ const PrintStyle1 = ({
(setting) =>
setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
)?.SettingValue === 'Y';
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const keysLength = Object.keys(table2Data ?? {}).length;
const paymentTypeUPI = PaymentStatus?.find(
@ -145,6 +169,12 @@ const PrintStyle1 = ({
let BillName = printDatas?.PrintHdrName;
let FormatTheme = printDatas?.PrintType == 'S' ? true : false;
let PageSize = printDatas?.PageSize;
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const Signature = FieldDetails?.['signature'];
const TermsnAdCondition = FieldDetails?.['terms&conditions'];
const isEditedBill = PaymentStatus?.some(payment => {
@ -372,10 +402,42 @@ const PrintStyle1 = ({
: 0;
const shouldFooterBeOnNewPage =
lastChunkRows > (isMobile ? 11 : PageSize == 'A5' ? 5 : 10);
console.log(
PageSize == 'A5' ? '210mm' : '297mm',
'aggregatedPaymentsaggregatedPayments'
);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -432,7 +494,15 @@ const PrintStyle1 = ({
width: '100%',
}}
>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<div style={{ display: 'flex', justifyContent: 'center', ...(GlobaldummyData
? {
color: SelectedHeaderFontColor,
backgroundColor: SelectedHeaderColor,
}
: {
color: headerColor?.font,
backgroundColor: headerColor?.background,
}), }}>
{GlobaldummyData ? (
GlobalLogo && (
<img
@ -456,14 +526,14 @@ const PrintStyle1 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle1-print">
<div
<div className="PrintStyle1-print"
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
backgroundColor: GlobaldummyData ? SelectedHeaderColor : headerColor?.background,
}}>
<div>
{' '}
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
</div>
@ -664,58 +734,58 @@ const PrintStyle1 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)
: SLNO == true && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{ ...headerStyle }}>Item</th>
: Item == true && <th style={{ ...headerStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{ ...headerStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{ ...headerStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{ ...headerStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{ ...headerStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)}
{GlobaldummyData
? GlobalAmount && (
@ -723,6 +793,7 @@ const PrintStyle1 = ({
style={{
width: '10px',
textAlign: 'right',
...headerStyle,
}}
>
Amt
@ -733,6 +804,7 @@ const PrintStyle1 = ({
style={{
width: '10px',
textAlign: 'right',
...headerStyle,
}}
>
Amt
@ -742,7 +814,18 @@ const PrintStyle1 = ({
</thead>
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -758,7 +841,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{PackageDetails?.filter(
@ -798,7 +881,7 @@ const PrintStyle1 = ({
&nbsp;{' '}
{item?.BrandName !== null
? <div>{item?.BrandName}</div>
: ''}
: ''}
&nbsp;
<div style={{ display: "flex", gap: "2px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0
@ -953,58 +1036,58 @@ const PrintStyle1 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)
: SLNO == true && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{ ...headerStyle, }}>Item</th>
: Item == true && <th style={{ ...headerStyle, }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{ ...headerStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{ ...headerStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{ ...headerStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{ ...headerStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)}
{GlobaldummyData
? GlobalAmount && (
@ -1012,6 +1095,7 @@ const PrintStyle1 = ({
style={{
width: '10px',
textAlign: 'right',
...headerStyle,
}}
>
Amt
@ -1022,6 +1106,7 @@ const PrintStyle1 = ({
style={{
width: '10px',
textAlign: 'right',
...headerStyle,
}}
>
Amt
@ -1031,7 +1116,18 @@ const PrintStyle1 = ({
</thead>
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1047,20 +1143,20 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
</div>
}
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
</div>
}
{sportsAppPreference &&
`${item?.BookingDate?.trim()
? `(${dateFormatChange(item.BookingDate)})`
@ -1225,6 +1321,7 @@ const PrintStyle1 = ({
padding: 0,
fontSize: '10px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -1815,6 +1912,7 @@ const PrintStyle1 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2091,6 +2189,7 @@ const PrintStyle1 = ({
padding: 0,
fontSize: '10px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -2667,6 +2766,7 @@ const PrintStyle1 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2922,6 +3022,7 @@ const PrintStyle1 = ({
padding: 0,
fontSize: '10px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -3491,6 +3592,7 @@ const PrintStyle1 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -3696,7 +3798,21 @@ const PrintStyle1 = ({
id={`PrintStyle1-${index}`}
style={{ fontFamily: "'Courier New', Courier, monospace" }}
>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<div
style={{
display: "flex",
justifyContent: "center",
...(GlobaldummyData
? {
color: SelectedHeaderFontColor,
backgroundColor: SelectedHeaderColor,
}
: {
color: headerColor?.font,
backgroundColor: headerColor?.background,
}),
}}
>
{GlobaldummyData ? (
GlobalLogo && (
<img
@ -3720,12 +3836,17 @@ const PrintStyle1 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle1-print">
<div className="PrintStyle1-print"
style={
GlobaldummyData
? { color: SelectedHeaderFontColor, backgroundColor: SelectedHeaderColor }
: { color: headerColor?.font, backgroundColor: headerColor?.background }
}>
<div
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
// color: SelectedHeaderColor,
}}
>
{' '}
@ -3900,60 +4021,60 @@ const PrintStyle1 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.No</th>
? GlobalSlNo && <th style={{ ...headerStyle, width: '10px' }}>S.No</th>
: SLNO == true && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{ textAlign: 'left' }}>Item</th>
<th style={{ ...headerStyle, textAlign: 'left' }}>Item</th>
)
: Item == true && <th>Item</th>}
: Item == true && <th style={{ ...headerStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{ ...headerStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{ ...headerStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{ width: '10px' }}>MRP</th>
: MRP == true && <th style={{ width: '10px' }}>MRP</th>}
? GlobalMRP && <th style={{ ...headerStyle, width: '10px' }}>MRP</th>
: MRP == true && <th style={{ ...headerStyle, width: '10px' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && <th style={{ width: '10px' }}>Rate</th>
? GlobalRate && <th style={{ ...headerStyle, width: '10px' }}>Rate</th>
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && <th style={{ width: '10px' }}>Tax %</th>
? GlobalTax && <th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...headerStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount == true && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...headerStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3962,7 +4083,18 @@ const PrintStyle1 = ({
<tbody>
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3978,7 +4110,7 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{PackageDetails?.filter(
@ -3999,7 +4131,7 @@ const PrintStyle1 = ({
))}
</div>
) : (
UomPrint?.SettingValue === 'Y' &&
UomPrint?.SettingValue === 'Y' &&
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@ -4019,7 +4151,7 @@ const PrintStyle1 = ({
{item?.BrandName !== null
? item?.BrandName
: ''}
&nbsp;
&nbsp;
<div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
@ -4167,58 +4299,58 @@ const PrintStyle1 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.No</th>
? GlobalSlNo && <th style={{ ...headerStyle, width: '10px' }}>S.No</th>
: SLNO == true && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{ ...headerStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{ ...headerStyle, }}>Item</th>
: Item == true && <th style={{ ...headerStyle, }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{ ...headerStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{ ...headerStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{ ...headerStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{ width: '10px' }}>MRP</th>
: MRP == true && <th style={{ width: '10px' }}>MRP</th>}
? GlobalMRP && <th style={{ ...headerStyle, width: '10px' }}>MRP</th>
: MRP == true && <th style={{ ...headerStyle, width: '10px' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && <th style={{ width: '10px' }}>Rate</th>
? GlobalRate && <th style={{ ...headerStyle, width: '10px' }}>Rate</th>
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{ ...headerStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{ ...headerStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && <th style={{ width: '10px' }}>Tax %</th>
? GlobalTax && <th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax %</th>
<th style={{ ...headerStyle, width: '10px' }}>Tax %</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...headerStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount == true && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...headerStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -4227,7 +4359,18 @@ const PrintStyle1 = ({
<tbody>
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -4243,20 +4386,20 @@ const PrintStyle1 = ({
? GlobalItem && <td>{item?.ProdName}</td>
: Item == true && (
<td
>
<div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' &&
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
</div>
}
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
? 'PCS'
: item?.Type != 'C'
? item?.UomName
: 'COMBO'}
)
</div>
}
{sportsAppPreference &&
`${item?.BookingDate?.trim()
? `(${dateFormatChange(item.BookingDate)})`
@ -4414,6 +4557,7 @@ const PrintStyle1 = ({
padding: 0,
fontSize: '10px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -4954,7 +5098,6 @@ const PrintStyle1 = ({
)}
<hr className="PrintStyle1-print-dottline" />
<div
className="page-footerA4Style11"
style={{
@ -4962,6 +5105,7 @@ const PrintStyle1 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -28,6 +28,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -131,6 +141,22 @@ const PrintStyle10 = ({
(ps) => ps.PaymentTypeName === 'UPI'
);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const isEditedBill = PaymentStatus?.some((payment) => {
const type = payment?.AdjustmentType?.toLowerCase();
@ -349,7 +375,51 @@ const PrintStyle10 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -407,7 +477,7 @@ const PrintStyle10 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle10-print">
<div className="PrintStyle10-print" style={{ ...headerStyle }}>
<div style={{ display: 'flex' }}>
<div>
{GlobalLogo && GlobaldummyData ? (
@ -433,7 +503,6 @@ const PrintStyle10 = ({
className="ShopName"
style={{
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData
@ -541,25 +610,25 @@ const PrintStyle10 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.N</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
)
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -567,14 +636,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -582,14 +651,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -597,14 +666,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -612,7 +681,7 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -620,7 +689,7 @@ const PrintStyle10 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -628,14 +697,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -643,14 +712,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -660,7 +729,18 @@ const PrintStyle10 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -872,25 +952,25 @@ const PrintStyle10 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.N</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
)
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -898,14 +978,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -913,14 +993,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -928,14 +1008,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -943,7 +1023,7 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -951,7 +1031,7 @@ const PrintStyle10 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -959,14 +1039,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -974,14 +1054,14 @@ const PrintStyle10 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -991,7 +1071,18 @@ const PrintStyle10 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -1155,7 +1246,7 @@ const PrintStyle10 = ({
flexDirection: 'column',
rowGap: '0.1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 1rem)',
...netAmountStyle,
fontWeight: '600',
}}
>
@ -1898,6 +1989,7 @@ const PrintStyle10 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2118,7 +2210,7 @@ const PrintStyle10 = ({
flexDirection: 'column',
rowGap: '0.1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 1rem)',
...netAmountStyle,
fontWeight: '600',
}}
>
@ -2840,6 +2932,7 @@ const PrintStyle10 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -3036,7 +3129,7 @@ const PrintStyle10 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle10-print">
<div className="PrintStyle10-print" style={{ ...headerStyle }}>
<div style={{ display: 'flex' }}>
<div>
{GlobalLogo && GlobaldummyData ? (
@ -3060,7 +3153,7 @@ const PrintStyle10 = ({
<div className="Address" style={{ fontWeight: '600' }}>
<div
className="ShopName"
style={{ fontWeight: '600', color: SelectedHeaderColor }}
style={{ fontWeight: '600', }}
>
{GlobaldummyData ? 'ABC Shop' : table2Data?.BrName}{' '}
</div>
@ -3152,86 +3245,86 @@ const PrintStyle10 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.N</th>
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3241,7 +3334,18 @@ const PrintStyle10 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -3460,47 +3564,47 @@ const PrintStyle10 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.N</th>
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
@ -3511,35 +3615,35 @@ const PrintStyle10 = ({
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3549,7 +3653,18 @@ const PrintStyle10 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -3699,8 +3814,8 @@ const PrintStyle10 = ({
flexDirection: 'column',
rowGap: '0.1rem',
fontSize: 'clamp(0.7rem, 2.5vw, 1rem)',
fontWeight: '600',
...netAmountStyle
}}
>
<div className="PrintStyle10-items">
@ -3739,7 +3854,7 @@ const PrintStyle10 = ({
<div>{Number(DineInTotal).toFixed(2)}</div>
</div>
)}
<div className="PrintStyle10-total">
<div className="PrintStyle10-total" >
<div>Amount :</div>
<div>
{GlobaldummyData
@ -4381,6 +4496,7 @@ const PrintStyle10 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -30,6 +30,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -105,6 +115,22 @@ const PrintStyle11 = ({
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);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -333,7 +359,51 @@ const PrintStyle11 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -391,8 +461,8 @@ const PrintStyle11 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div>
<div className="PrintStyle11-print">
<div style={{ ...headerStyle }}>
<div className="PrintStyle11-print" style={{ ...headerStyle }}>
{GlobalLogo && GlobaldummyData ? (
<img
className="PrintStyle2-BrandImage"
@ -531,25 +601,25 @@ const PrintStyle11 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.N</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
)
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
@ -558,14 +628,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -573,14 +643,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -588,14 +658,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -603,7 +673,7 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -611,7 +681,7 @@ const PrintStyle11 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -619,14 +689,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -634,14 +704,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -651,7 +721,18 @@ const PrintStyle11 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -856,25 +937,25 @@ const PrintStyle11 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.N</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.N</th>
)
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
@ -883,14 +964,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -898,14 +979,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -913,14 +994,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -928,7 +1009,7 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -936,7 +1017,7 @@ const PrintStyle11 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -944,14 +1025,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -959,14 +1040,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -976,7 +1057,18 @@ const PrintStyle11 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1191,6 +1283,7 @@ const PrintStyle11 = ({
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
...netAmountStyle
}}
>
Amount :
@ -1859,6 +1952,7 @@ const PrintStyle11 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2161,6 +2255,7 @@ const PrintStyle11 = ({
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
...netAmountStyle
}}
>
Amount :
@ -2812,6 +2907,7 @@ const PrintStyle11 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -3016,8 +3112,8 @@ const PrintStyle11 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div>
<div className="PrintStyle11-print">
<div style={{ ...headerStyle }}>
<div className="PrintStyle11-print" style={{ ...headerStyle }} >
{GlobalLogo && GlobaldummyData ? (
<img
className="PrintStyle2-BrandImage"
@ -3155,87 +3251,87 @@ const PrintStyle11 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.N</th>
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3245,7 +3341,18 @@ const PrintStyle11 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3466,87 +3573,87 @@ const PrintStyle11 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.N</th>
: SLNO && <th style={{ width: '10px' }}>S.N</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3556,7 +3663,18 @@ const PrintStyle11 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3752,6 +3870,7 @@ const PrintStyle11 = ({
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
...netAmountStyle
}}
>
Amount :
@ -4323,6 +4442,7 @@ const PrintStyle11 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -31,6 +31,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -104,6 +114,25 @@ const Printstyle12 = ({
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 headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -475,6 +504,51 @@ const Printstyle12 = ({
await printDiv('PrintStyle12', style12, 'FontApply');
};
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -736,74 +810,85 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th>S.No</th>
: SLNO && <th>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Description</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ textAlign: 'right' }}>Qty</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th>
)
: Amount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)}
</tr>
</thead>
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1022,74 +1107,85 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th>S.No</th>
: SLNO && <th>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle,}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle,}}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Description</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Description</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ textAlign: 'right' }}>Qty</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
)
: MRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th>
)}
</tr>
</thead>
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1374,6 +1470,7 @@ const Printstyle12 = ({
style={{
display: 'flex',
justifyContent: 'space-between',
...netAmountStyle
}}
>
<div style={{ width: '45%', fontWeight: '600' }}>
@ -2008,6 +2105,7 @@ const Printstyle12 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2366,6 +2464,7 @@ const Printstyle12 = ({
style={{
display: 'flex',
justifyContent: 'space-between',
...netAmountStyle
}}
>
<div style={{ width: '45%', fontWeight: '600' }}>
@ -2995,6 +3094,7 @@ const Printstyle12 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -3190,7 +3290,7 @@ const Printstyle12 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle12-firstDiv">
<div className="PrintStyle12-firstDiv" style={{...headerStyle}}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div style={{ display: 'flex', flexDirection: 'column' }}>
<hr
@ -3366,65 +3466,76 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th>S.No</th>
: SLNO && <th>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Description</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ textAlign: 'right' }}>Qty</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
)
: MRP && <th style={{ textAlign: 'right' }}>MRP</th>}
: MRP && <th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && <th style={{ textAlign: 'right' }}>Rate</th>}
: Rate && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ textAlign: 'right' }}>Tax (%)</th>
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Tax (%)</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ textAlign: 'right' }}>Tax (%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && <th style={{ textAlign: 'right' }}>Amt</th>}
: Amount && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
</tr>
</thead>
<tbody>
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3663,65 +3774,76 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th>S.No</th>
: SLNO && <th>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Description</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ textAlign: 'right' }}>Qty</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{ textAlign: 'right' }}>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ textAlign: 'right' }}>MRP</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && <th style={{ textAlign: 'right' }}>MRP</th>}
: MRP && <th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && (
<th style={{ textAlign: 'right' }}>Rate</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && <th style={{ textAlign: 'right' }}>Rate</th>}
: Rate && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{ textAlign: 'right' }}>HSN</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{ textAlign: 'right' }}>(%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ textAlign: 'right' }}>Tax (%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ textAlign: 'right' }}>Tax (%)</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && <th style={{ textAlign: 'right' }}>Amt</th>}
: Amount && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
</tr>
</thead>
<tbody>
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3972,7 +4094,7 @@ const Printstyle12 = ({
)}
</>
)}
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}>
<div style={{ width: '45%', fontWeight: '600' }}>Amount</div>
<div> : </div>
<div
@ -4576,6 +4698,7 @@ const Printstyle12 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -29,6 +29,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalRowType,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import QRCode from 'react-qr-code';
@ -95,7 +105,16 @@ const Printstyle2 = ({
(ps) => ps.PaymentTypeName === 'UPI'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
console.log(Qrcodet, 'Qrcodet', paymentTypeUPI);
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 GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
@ -140,6 +159,12 @@ const Printstyle2 = ({
let BillName = printDatas?.PrintHdrName;
let FormatTheme = printDatas?.PrintType == 'S' ? true : false;
let PageSize = printDatas?.PageSize;
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const Signature = FieldDetails?.['signature'];
const TermsnAdCondition = FieldDetails?.['terms&conditions'];
@ -339,7 +364,51 @@ const Printstyle2 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle ={
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle ={
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle ={
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData? SelectedRowType: tableBodyColor?.rowType;
const footerColorStyle ={
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle ={
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -392,7 +461,7 @@ const Printstyle2 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle2-fistDiv">
<div className="PrintStyle2-fistDiv" style={{...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row' }}>
{GlobaldummyData ? (
GlobalLogo && (
@ -425,7 +494,7 @@ const Printstyle2 = ({
style={{
fontSize: '18px',
fontWeight: '600',
color: SelectedHeaderColor,
// color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -546,23 +615,23 @@ const Printstyle2 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '8px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
)
: SLNO && <th style={{ width: '8px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
@ -570,14 +639,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -585,14 +654,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
@ -600,14 +669,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
@ -615,14 +684,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -633,6 +702,7 @@ const Printstyle2 = ({
style={{
width: '10px',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Tax %
@ -644,6 +714,7 @@ const Printstyle2 = ({
style={{
width: '10px',
textAlign: 'center',
...tableHeaderStyle,
}}
>
Tax %
@ -652,14 +723,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
@ -669,7 +740,18 @@ const Printstyle2 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -918,23 +1000,23 @@ const Printstyle2 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '8px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
)
: SLNO && <th style={{ width: '8px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle,width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
@ -942,14 +1024,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -957,14 +1039,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
@ -972,14 +1054,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
@ -987,14 +1069,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -1002,9 +1084,7 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{
width: '10px',
textAlign: 'center',
style={{ width: '10px',textAlign: 'center',...tableHeaderStyle,
}}
>
Tax %
@ -1013,10 +1093,7 @@ const Printstyle2 = ({
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th
style={{
width: '10px',
textAlign: 'center',
}}
style={{...tableHeaderStyle, width: '10px', textAlign: 'center',}}
>
Tax %
</th>
@ -1024,14 +1101,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '8px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
@ -1041,7 +1118,18 @@ const Printstyle2 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -1305,7 +1393,7 @@ const Printstyle2 = ({
!shouldFooterBeOnNewPage &&
FormatTheme && (
<>
<div className="PrintStyle2-ThirdDivMaster">
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>
@ -1973,6 +2061,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -2185,10 +2274,11 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
<>
<div className="PrintStyle2-ThirdDivMaster">
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>
@ -2842,6 +2932,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData
@ -3039,8 +3130,8 @@ const Printstyle2 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle2-fistDiv">
<div style={{ display: 'flex', flexDirection: 'row' }}>
<div className="PrintStyle2-fistDiv" style={{...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row'}}>
{GlobaldummyData ? (
GlobalLogo && (
<img
@ -3073,7 +3164,7 @@ const Printstyle2 = ({
style={{
fontSize: '18px',
fontWeight: '600',
color: SelectedHeaderColor,
// color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -3183,86 +3274,86 @@ const Printstyle2 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '8px' }}>S.No</th>
: SLNO && <th style={{ width: '8px' }}>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle,width: '8px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)}
@ -3272,7 +3363,18 @@ const Printstyle2 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -3509,86 +3611,86 @@ const Printstyle2 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '8px' }}>S.No</th>
: SLNO && <th style={{ width: '8px' }}>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle,width: '8px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '8px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)}
@ -3598,7 +3700,18 @@ const Printstyle2 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -3772,7 +3885,7 @@ const Printstyle2 = ({
<hr className="PrintStyle2-print-dottline" />
</div>
)}
<div className="PrintStyle2-ThirdDivMaster">
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>Qty</div>
@ -4386,6 +4499,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -25,6 +25,17 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg'
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss'
@ -68,7 +79,6 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const GlobalHsnCode = useSelector(GlobalprintHsnCode);
const GlobalQrcodet = useSelector(GlobalprintQrcodet);
const GlobaldummyData = useSelector(GlobalPritdummyData);
console.log(GlobaldummyData, "GlobaldummyData print3");
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
@ -79,10 +89,21 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
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 SettingData = useSelector(PreferenceData);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
)?.[0];
const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y';
const estimateTitle =
SettingData?.[0]?.SettingDtlDetails?.find(
@ -106,7 +127,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const PackageDetails = table2Data?.PackageDtl
console.log(PackageDetails, 'PackageDetailsPackageDetails',);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S")
const keysLength = Object.keys(table2Data ?? {}).length;
@ -208,7 +234,51 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
}
const lastChunkRows = paginatedChunks.length > 0 ? paginatedChunks[paginatedChunks.length - 1].length : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == "A5" ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
@ -219,7 +289,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{/* <div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : "fixed", top: 0, width: "100%" }}> */}
<div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : isPdf ? "static" : "fixed", top: 0, width: "100%" }}>
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" >
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" style={{ ...headerStyle,}} >
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
{GlobaldummyData && GlobalLogo ? <img className='PrintStyle2-BrandImage' src={Logo} alt='image' width={100} /> : null}
{(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? <img className='PrintStyle2-BrandImage' src={base64Image} alt='image' width={100} /> : null}
@ -265,7 +335,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(TakeawayData?.length > 0 || GlobaldummyData) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table">
{takeAwayPreference && <div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >TakeAway</div>}
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
<div style={{ ...tableHeaderStyle, display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '200%', textAlign: 'left', fontWeight: 600 }}>ITEM</div> : Item && <div style={{ width: '300%', textAlign: 'left', fontWeight: 600 }}>ITEM</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div>}
@ -279,7 +349,14 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
<div style={{ marginTop: '5px' }}>
{dataChunk?.map((item, index) => (
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem' }}>
<div style={{
display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center' }}>{index + 1}</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>{chunkIndex * chunkSize + index + 1}</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
@ -292,7 +369,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</span>
))}
</div>
: UomPrint?.SettingValue === 'Y' &&<div>
: UomPrint?.SettingValue === 'Y' && <div>
({item?.Size ? item?.Size : "1"}{" "}
{item?.SinglePc == "Y"
? "PCS"
@ -302,7 +379,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
</div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp;
<div style={{ display: 'flex', gap: "3px",flexDirection:"column"}}>
<div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
@ -355,7 +432,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(DineInData?.length > 0 && dinePreference) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table">
<div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >Dine In</div>
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
<div style={{ ...tableHeaderStyle, display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'center', fontWeight: 600 }}>ITEM</div> : Item && <div style={{ width: '300%', textAlign: 'center', fontWeight: 600 }}>ITEM</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div>}
@ -369,12 +446,19 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
<div style={{ marginTop: '5px' }}>
{dataChunk?.map((item, index) => (
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem' }}>
<div style={{
display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center' }}>{index + 1}</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>{chunkIndex * chunkSize + index + 1}</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div>
{UomPrint?.SettingValue === 'Y' && <div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div>}
{UomPrint?.SettingValue === 'Y' && <div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div>}
</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
{GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>}
@ -404,7 +488,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme &&
<>
<div className="PrintStyle3-print-ttlovrl">
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>
@ -719,6 +803,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid",
pageBreakInside: "avoid",
minHeight: "auto",
...footerColorStyle
}}
>
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div>
@ -804,7 +889,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
}}
>
<>
<div className="PrintStyle3-print-ttlovrl">
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>
@ -1114,6 +1199,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid",
pageBreakInside: "avoid",
minHeight: "auto",
...footerColorStyle
}}
>
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div>
@ -1183,7 +1269,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
:
<div className="PrintStyle3MasterDiv" id={`PrintStyle3-${index}`} style={{ fontFamily: "'Courier New', Courier, monospace" }}>
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" >
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" style={{ ...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
{GlobaldummyData && GlobalLogo ? <img className='PrintStyle2-BrandImage' src={Logo} alt='image' width={100} /> : null}
{(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? <img className='PrintStyle2-BrandImage' src={base64Image} alt='image' width={100} /> : null}
@ -1225,7 +1311,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(TakeawayData?.length > 0 || GlobaldummyData) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table">
{takeAwayPreference && <div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >TakeAway</div>}
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
<div style={{ ...tableHeaderStyle, display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '200%', textAlign: 'left', fontWeight: 600 }}>ITEM</div> : Item && <div style={{ width: '300%', textAlign: 'left', fontWeight: 600 }}>ITEM</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '150%', textAlign: 'right', fontWeight: 600 }}>HSN</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div>}
@ -1239,7 +1325,14 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
<div style={{ marginTop: '5px' }}>
{(GlobaldummyData ? products : TakeawayData)?.map((item, index) => (
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem' }}>
<div style={{
display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center' }}>{index + 1}</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>{index + 1}</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
@ -1262,7 +1355,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
)
</div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp;
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
<div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
@ -1315,7 +1408,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(DineInData?.length > 0 && dinePreference) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table">
<div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >Dine In</div>
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
<div style={{ ...tableHeaderStyle, display: 'flex', justifyContent: 'space-between', width: '100%', fontweight: '600', gap: '0.2rem' }}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>S.No</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'center', fontWeight: 600 }}>ITEM</div> : Item && <div style={{ width: '300%', textAlign: 'center', fontWeight: 600 }}>ITEM</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>HSN</div>}
@ -1329,12 +1422,19 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
<div style={{ marginTop: '5px' }}>
{(GlobaldummyData ? products : DineInData)?.map((item, index) => (
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem' }}>
<div style={{
display: 'flex', justifyContent: 'space-between', width: '100%', gap: '0.2rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}>
{GlobaldummyData ? GlobalSlNo && <div style={{ width: '100%', textAlign: 'center' }}>{index + 1}</div> : SLNO && <div style={{ width: '100%', textAlign: 'center', fontWeight: 600 }}>{index + 1}</div>}
{GlobaldummyData ? GlobalItem && <div style={{ width: '300%', textAlign: 'left' }}>{item?.ProdName}</div> : Item &&
<div style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div>
{ UomPrint?.SettingValue === 'Y' &&<div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div>}
{UomPrint?.SettingValue === 'Y' && <div>({item?.Size ? item?.Size : "1"} {item?.SinglePc == 'Y' ? 'PCS' : item?.Type != "C" ? item?.UomName : "COMBO"})</div>}
</div>}
{GlobaldummyData ? GlobalHsnCode && <div style={{ width: '100%', textAlign: 'right' }}>{item?.HSN}</div> : HsnCode && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.HSN}</div>}
{GlobaldummyData ? GlobalMRP && <div style={{ width: '100%', textAlign: 'right', }}>{item?.MRP}</div> : MRP && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SinglePc === 'Y' ? item?.Rate : item?.MRP}</div>}
@ -1359,7 +1459,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</div>
}
{/* <br/> */}
<div className="PrintStyle3-print-ttlovrl">
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>
@ -1670,6 +1770,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid",
pageBreakInside: "avoid",
minHeight: "auto",
...footerColorStyle
}}
>
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div>

View File

@ -28,7 +28,17 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.scss';
import {
@ -101,6 +111,17 @@ 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 SettingData = useSelector(PreferenceData);
const totalGSTData = [
(OrderDetailGST || []).reduce(
@ -143,9 +164,13 @@ const Printstyle4 = ({
const paymentTypeUPI = PaymentStatus?.find(
(ps) => ps.PaymentTypeName === 'UPI'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
console.log(GlobalDiscount, Discount, 'Discount');
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
@ -347,7 +372,52 @@ const Printstyle4 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
console.log(paginatedChunks, 'paginatedChunks');
console.log(paginatedChunks, 'paginatedChunks')
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -408,7 +478,7 @@ const Printstyle4 = ({
) : (
<div
className="PrintStyle4-fistDiv"
style={{ flexDirection: 'column' }}
style={{ flexDirection: 'column',...headerStyle }}
>
<div
style={{
@ -439,7 +509,6 @@ const Printstyle4 = ({
fontWeight: '600',
width: '100%',
textAlign: 'center',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}{' '}
@ -572,138 +641,150 @@ const Printstyle4 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>#</th>
)
: SLNO && <th style={{ width: '10px' }}>#</th>}
<th style={{...tableHeaderStyle, width: '10px' }}>#</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>#</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)
: Quantity && (
<th
style={{
width: '30px',
textAlign: 'right',
}}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '30px',
textAlign: 'right',
}}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)
: HsnCode && (
<th
style={{
width: '30px',
textAlign: 'right',
}}
>
HSN
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '30px',
textAlign: 'right',
}}
>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th
style={{
width: '10px',
textAlign: 'center',
}}
>
MRP
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'center',
}}
>
MRP
</th>
)
: MRP && (
<th
style={{
width: '30px',
textAlign: 'right',
}}
>
MRP
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '30px',
textAlign: 'right',
}}
>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{
width: '30px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '30px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)
: Rate && (
<th
style={{
width: '40px',
textAlign: 'right',
}}
>
Rate
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '40px',
textAlign: 'right',
}}
>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)
: Amount && (
<th
style={{
width: '30px',
textAlign: 'right',
}}
>
Amt
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '30px',
textAlign: 'right',
}}
>
Amt
</th>
)}
</tr>
</thead>
<tbody>
@ -731,7 +812,19 @@ const Printstyle4 = ({
) ?? [];
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{/* SL NO */}
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
@ -878,144 +971,167 @@ const Printstyle4 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>#</th>
)
: SLNO && <th style={{ width: '10px' }}>#</th>}
<th style={{...tableHeaderStyle, width: '10px' }}>#</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>#</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)
: Quantity && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Qty
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)
: HsnCode && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
MRP
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
MRP
</th>
)
: MRP && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
MRP
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)
: Rate && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)
: Amount && (
<th
style={{
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)}
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
>
Amt
</th>
)}
</tr>
</thead>
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1171,6 +1287,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
...netAmountStyle
}}
>
{' '}
@ -1921,6 +2038,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2161,6 +2279,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
...netAmountStyle
}}
>
<div>Sub Total</div>
@ -2896,6 +3015,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -3105,7 +3225,7 @@ const Printstyle4 = ({
) : (
<div
className="PrintStyle4-fistDiv"
style={{ flexDirection: 'column' }}
style={{ flexDirection: 'column',...headerStyle }}
>
<div
style={{
@ -3114,14 +3234,14 @@ const Printstyle4 = ({
alignItems: 'center',
}}
>
{/* {GlobaldummyData && GlobalLogo ? (
{GlobaldummyData && GlobalLogo ? (
<img
className="PrintStyle2-BrandImage"
src={Logo}
alt="image"
/>
) : null} */}
{/* {base64Image &&
) : null}
{base64Image &&
(PrintLogo?.SettingValue === 'Y' || LogoField) ? (
<img
className="PrintStyle2-BrandImage"
@ -3129,7 +3249,7 @@ const Printstyle4 = ({
alt="image"
width={100}
/>
) : null} */}
) : null}
<div
style={{
fontSize: '16px',
@ -3268,55 +3388,55 @@ const Printstyle4 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>#</th>
: SLNO && <th style={{ width: '10px' }}>#</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>#</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>#</th>}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
Qty
</th>
)
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '30px', textAlign: 'right' }}>
Qty
</th>
)}
<th style={{...tableHeaderStyle, width: '30px', textAlign: 'right' }}>
Qty
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
HSN
</th>
)
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '30px', textAlign: 'right' }}>
HSN
</th>
)}
<th style={{...tableHeaderStyle, width: '30px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'center' }}>
MRP
</th>
)
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '30px', textAlign: 'center' }}>
MRP
</th>
)}
<th style={{...tableHeaderStyle, width: '30px', textAlign: 'center' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '25px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
<th style={{...tableHeaderStyle, width: '25px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{/* {GlobaldummyData
? GlobalTax && (
<th
@ -3341,33 +3461,44 @@ const Printstyle4 = ({
)} */}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
Rate
</th>
)
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '40px', textAlign: 'right' }}>
Rate
</th>
)}
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
Amt
</th>
)
<th style={{...tableHeaderStyle, width: '30px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '30px', textAlign: 'right' }}>
Amt
</th>
)}
<th style={{...tableHeaderStyle, width: '30px', textAlign: 'right' }}>
Amt
</th>
)}
</tr>
</thead>
<tbody>
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3740,7 +3871,18 @@ const Printstyle4 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3933,6 +4075,7 @@ const Printstyle4 = ({
borderBottom: '1px dashed #000',
borderTop: '1px dashed #000',
padding: '5px 0',
...netAmountStyle
}}
>
<div>Sub Total</div>
@ -4623,6 +4766,7 @@ const Printstyle4 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -29,6 +29,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -102,6 +112,16 @@ const PrintStyle5 = ({
const SettingData = useSelector(PreferenceData);
const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo);
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 GlobalCredit = useSelector(GlobalprintCredit);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
@ -134,8 +154,12 @@ const PrintStyle5 = ({
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
console.log(GlobalDiscount, Discount, 'Discount');
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
@ -319,7 +343,51 @@ const PrintStyle5 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 2 : 7);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -377,7 +445,7 @@ const PrintStyle5 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle5-Head">
<div className="PrintStyle5-Head" style={{ ...headerStyle }}>
<div
style={{
alignItems: 'center',
@ -405,7 +473,6 @@ const PrintStyle5 = ({
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -532,6 +599,7 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
...tableHeaderStyle
}}
>
{GlobaldummyData
@ -652,6 +720,11 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}
>
{GlobaldummyData
@ -940,6 +1013,7 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
...tableHeaderStyle
}}
>
{GlobaldummyData
@ -1060,6 +1134,11 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}
>
{GlobaldummyData
@ -1444,7 +1523,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{ fontWeight: '600', fontSize: '19px' }}
style={{ fontWeight: '600', fontSize: '19px',...netAmountStyle, }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}
@ -1777,6 +1856,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2191,7 +2271,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{ fontWeight: '600', fontSize: '19px' }}
style={{ fontWeight: '600', fontSize: '19px',...netAmountStyle, }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}
@ -2505,6 +2585,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2711,7 +2792,7 @@ const PrintStyle5 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle5-Head">
<div className="PrintStyle5-Head" style={{ ...headerStyle }}>
<div
style={{
display: 'flex',
@ -2739,7 +2820,6 @@ const PrintStyle5 = ({
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -2857,6 +2937,7 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
...tableHeaderStyle
}}
>
{GlobaldummyData
@ -2976,6 +3057,11 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}
>
{GlobaldummyData
@ -3087,19 +3173,19 @@ const PrintStyle5 = ({
<div>
{/* 📏 Size + UOM */}
<div>
{UomPrint?.SettingValue === 'Y' && (
<>
{item?.Size || "1"}{" "}
{item?.SinglePc === "Y"
? "PCS"
: item?.Type !== "C"
? item?.UomName
: "COMBO"}
</>
)}
</div>
{UomPrint?.SettingValue === 'Y' && (
<>
{item?.Size || "1"}{" "}
{item?.SinglePc === "Y"
? "PCS"
: item?.Type !== "C"
? item?.UomName
: "COMBO"}
</>
)}
</div>
{/* 🏷 Brand */}
{item?.BrandName && <div>{item.BrandName}</div>}
@ -3241,6 +3327,7 @@ const PrintStyle5 = ({
fontSize: 'clamp(1rem, 2.5vw, 1.2rem)',
width: '100%',
gap: '0.5rem',
...tableHeaderStyle
}}
>
{GlobaldummyData
@ -3360,6 +3447,11 @@ const PrintStyle5 = ({
fontWeight: '600',
width: '100%',
gap: '0.5rem',
...(index % 2 === 0 && rowtypeStyle === "even"
? tableBodyStyle
: index % 2 === 1 && rowtypeStyle === "odd"
? tableBodyStyle
: {})
}}
>
{GlobaldummyData
@ -3683,7 +3775,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{ fontWeight: '600', fontSize: '19px' }}
style={{...netAmountStyle, fontWeight: '600', fontSize: '19px' }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}
@ -3992,6 +4084,7 @@ const PrintStyle5 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -29,7 +29,17 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -103,7 +113,17 @@ const Printstyle6 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
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);
console.log(CashierNameField, "GlobaldummyData")
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
@ -146,7 +166,12 @@ const Printstyle6 = ({
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
)
console.log(GlobalDiscount, Discount, 'Discount');
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
@ -331,7 +356,51 @@ const Printstyle6 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -389,7 +458,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle6-firstDiv">
<div className="PrintStyle6-firstDiv" style={{...headerStyle}}>
<div
className="P6HdBrnchName"
style={{
@ -422,7 +491,7 @@ const Printstyle6 = ({
/>
) : null}
</div>
<div style={{ color: SelectedHeaderColor }}>
<div>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
</div>
</div>
@ -551,12 +620,12 @@ const Printstyle6 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -566,7 +635,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -579,6 +648,7 @@ const Printstyle6 = ({
? GlobalHsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -589,6 +659,7 @@ const Printstyle6 = ({
: HsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -600,6 +671,7 @@ const Printstyle6 = ({
? GlobalMRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -610,6 +682,7 @@ const Printstyle6 = ({
: MRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -621,6 +694,7 @@ const Printstyle6 = ({
? GlobalDiscount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -631,6 +705,7 @@ const Printstyle6 = ({
: Discount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -642,6 +717,7 @@ const Printstyle6 = ({
? GlobalTax && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -653,6 +729,7 @@ const Printstyle6 = ({
table2Data?.OrderType !== 'E' && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -664,6 +741,7 @@ const Printstyle6 = ({
? GlobalRate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -674,6 +752,7 @@ const Printstyle6 = ({
: Rate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -685,6 +764,7 @@ const Printstyle6 = ({
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -695,6 +775,7 @@ const Printstyle6 = ({
: Amount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -707,7 +788,18 @@ const Printstyle6 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -946,12 +1038,12 @@ const Printstyle6 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -961,7 +1053,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -974,6 +1066,7 @@ const Printstyle6 = ({
? GlobalHsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -984,6 +1077,7 @@ const Printstyle6 = ({
: HsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -995,6 +1089,7 @@ const Printstyle6 = ({
? GlobalMRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1005,6 +1100,7 @@ const Printstyle6 = ({
: MRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1016,6 +1112,7 @@ const Printstyle6 = ({
? GlobalDiscount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1026,6 +1123,7 @@ const Printstyle6 = ({
: Discount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1037,6 +1135,7 @@ const Printstyle6 = ({
? GlobalTax && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1048,6 +1147,7 @@ const Printstyle6 = ({
table2Data?.OrderType !== 'E' && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1059,6 +1159,7 @@ const Printstyle6 = ({
? GlobalRate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1069,6 +1170,7 @@ const Printstyle6 = ({
: Rate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1080,6 +1182,7 @@ const Printstyle6 = ({
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1090,6 +1193,7 @@ const Printstyle6 = ({
: Amount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1102,7 +1206,18 @@ const Printstyle6 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1682,7 +1797,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv">
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div
style={{
textAlign: 'left',
@ -2082,6 +2197,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2683,7 +2799,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv">
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div
style={{
textAlign: 'left',
@ -3077,6 +3193,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -3283,7 +3400,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle6-firstDiv">
<div className="PrintStyle6-firstDiv" style={{...headerStyle}}>
<div
className="P6HdBrnchName"
style={{
@ -3311,7 +3428,7 @@ const Printstyle6 = ({
/>
) : null}
</div>
<div style={{ color: SelectedHeaderColor }}>
<div >
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
</div>
</div>
@ -3436,11 +3553,11 @@ const Printstyle6 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.No</th>
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -3448,7 +3565,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -3459,68 +3576,68 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
AMt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3530,7 +3647,18 @@ const Printstyle6 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3727,11 +3855,11 @@ const Printstyle6 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.No</th>
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -3739,7 +3867,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -3750,68 +3878,68 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
AMt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3821,7 +3949,18 @@ const Printstyle6 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -4380,7 +4519,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv">
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div
style={{
textAlign: 'left',
@ -4757,6 +4896,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -26,6 +26,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@ -99,7 +109,23 @@ const PrintStyle7 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -349,7 +375,51 @@ const PrintStyle7 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -408,7 +478,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle7-print">
<div className="PrintStyle7-print" style={{...headerStyle}}>
{/* <div style={{ fontSize: '16px', fontWeight: '600' }}> {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}</div> */}
<div
style={{
@ -437,7 +507,6 @@ const PrintStyle7 = ({
style={{
fontSize: '16px',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{' '}
@ -575,63 +644,64 @@ const PrintStyle7 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
)
: SLNO == true && (
<th style={{ width: '10px' }}>S</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -642,6 +712,7 @@ const PrintStyle7 = ({
: Amount == true && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -653,7 +724,18 @@ const PrintStyle7 = ({
</thead>
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -719,11 +801,11 @@ const PrintStyle7 = ({
{(item?.ProductIdentifierDtls ?? [])
.find(items => items.SerialNumber || items.IMEI1 || items.IMEI2)?.Description && (
<div>
{(item?.ProductIdentifierDtls ?? [])
.find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description}
</div>
)}
<div>
{(item?.ProductIdentifierDtls ?? [])
.find(items => items.SerialNumber || items.IMEI1 || items.IMEI2).Description}
</div>
)}
</div>
</td>
)}
@ -836,63 +918,64 @@ const PrintStyle7 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO == true && (
<th style={{ width: '10px' }}>S.NO</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.NO</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle,}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{ ...tableHeaderStyle,width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -903,6 +986,7 @@ const PrintStyle7 = ({
: Amount == true && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -914,7 +998,18 @@ const PrintStyle7 = ({
</thead>
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1436,6 +1531,7 @@ const PrintStyle7 = ({
justifyContent: 'center',
fontSize: '16px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -1771,6 +1867,7 @@ const PrintStyle7 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2343,6 +2440,7 @@ const PrintStyle7 = ({
justifyContent: 'center',
fontSize: '16px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -2676,6 +2774,7 @@ const PrintStyle7 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2885,7 +2984,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle7-print">
<div className="PrintStyle7-print" style={{...headerStyle}}>
<div
style={{
display: 'flex',
@ -2913,7 +3012,6 @@ const PrintStyle7 = ({
style={{
fontSize: '16px',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{' '}
@ -3052,58 +3150,58 @@ const PrintStyle7 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10%' }}>S.No</th>
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10%' }}>S.No</th>
: SLNO == true && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '30%', textAlign: 'left' }}>
<th style={{...tableHeaderStyle, width: '30%', textAlign: 'left' }}>
Item
</th>
)
: Item == true && <th>Item</th>}
: Item == true && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && <th style={{}}>HSN</th>
? GlobalHsnCode && <th style={{...tableHeaderStyle}}>HSN</th>
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && <th style={{}}>Qty</th>
? GlobalQuantity && <th style={{...tableHeaderStyle}}>Qty</th>
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{}}>MRP</th>
? GlobalMRP && <th style={{...tableHeaderStyle}}>MRP</th>
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && <th style={{}}>Rate</th>
? GlobalRate && <th style={{...tableHeaderStyle}}>Rate</th>
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && <th style={{}}>Dis </th>
? GlobalDiscount && <th style={{...tableHeaderStyle,}}>Dis </th>
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ textAlign: 'right' }}>Amt</th>
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount == true && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3112,7 +3210,18 @@ const PrintStyle7 = ({
<tbody>
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3176,12 +3285,12 @@ const PrintStyle7 = ({
{(item?.ProductIdentifierDtls ?? []).find(
items => items.SerialNumber || items.IMEI1 || items.IMEI2
)?.Description && (
<div>
{(item?.ProductIdentifierDtls ?? []).find(
items => items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}
</div>
)}
<div>
{(item?.ProductIdentifierDtls ?? []).find(
items => items.SerialNumber || items.IMEI1 || items.IMEI2
).Description}
</div>
)}
</div>
</td>
)}
@ -3293,64 +3402,64 @@ const PrintStyle7 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S</th>
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S</th>
: SLNO == true && (
<th style={{ width: '10px' }}>S</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
)}
{GlobaldummyData
? GlobalItem && <th>Item</th>
: Item == true && <th>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle}}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{ width: '10px' }}>HSN</th>
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px' }}>Qty</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ width: '10px' }}>
<th style={{...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{ width: '10px' }}>MRP</th>
? GlobalMRP && <th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
: MRP == true && (
<th style={{ width: '10px' }}>MRP</th>
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{ width: '10px' }}>Rate</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{ width: '10px' }}>Dis </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px' }}>Tax % </th>
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount == true && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3359,7 +3468,18 @@ const PrintStyle7 = ({
<tbody>
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3848,6 +3968,7 @@ const PrintStyle7 = ({
justifyContent: 'center',
fontSize: '16px',
fontWeight: '600',
...netAmountStyle
}}
>
Amount :
@ -4162,6 +4283,7 @@ const PrintStyle7 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -29,6 +29,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@ -150,6 +160,22 @@ 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 headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
console.log(GlobalDiscount, Discount, 'Discount');
@ -361,7 +387,51 @@ const Printstyle8 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -419,7 +489,7 @@ const Printstyle8 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle8-fistDiv" style={{}}>
<div className="PrintStyle8-fistDiv" style={{...headerStyle}}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div
@ -449,7 +519,6 @@ const Printstyle8 = ({
style={{
fontSize: 'clamp(1.25rem, 2.5vw, 1.75rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -562,6 +631,7 @@ const Printstyle8 = ({
? GlobalSlNo && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'center',
}}
@ -572,6 +642,7 @@ const Printstyle8 = ({
: SLNO && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'center',
}}
@ -580,12 +651,13 @@ const Printstyle8 = ({
</th>
)}
{GlobaldummyData
? GlobalItem && <th>Dis</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -596,6 +668,7 @@ const Printstyle8 = ({
: HsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -607,6 +680,7 @@ const Printstyle8 = ({
? GlobalMRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -617,6 +691,7 @@ const Printstyle8 = ({
: MRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -628,6 +703,7 @@ const Printstyle8 = ({
? GlobalRate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -638,6 +714,7 @@ const Printstyle8 = ({
: Rate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -649,6 +726,7 @@ const Printstyle8 = ({
? GlobalDiscount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -659,6 +737,7 @@ const Printstyle8 = ({
: Discount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -670,6 +749,7 @@ const Printstyle8 = ({
? GlobalTax && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -681,6 +761,7 @@ const Printstyle8 = ({
table2Data?.OrderType !== 'E' && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -692,6 +773,7 @@ const Printstyle8 = ({
? GlobalQuantity && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -702,6 +784,7 @@ const Printstyle8 = ({
: Quantity && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -713,6 +796,7 @@ const Printstyle8 = ({
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -723,6 +807,7 @@ const Printstyle8 = ({
: Amount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -735,7 +820,18 @@ const Printstyle8 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -931,6 +1027,7 @@ const Printstyle8 = ({
? GlobalSlNo && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'center',
}}
@ -941,6 +1038,7 @@ const Printstyle8 = ({
: SLNO && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'center',
}}
@ -949,12 +1047,13 @@ const Printstyle8 = ({
</th>
)}
{GlobaldummyData
? GlobalItem && <th>Dis</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -965,6 +1064,7 @@ const Printstyle8 = ({
: HsnCode && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -976,6 +1076,7 @@ const Printstyle8 = ({
? GlobalMRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -986,6 +1087,7 @@ const Printstyle8 = ({
: MRP && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -997,6 +1099,7 @@ const Printstyle8 = ({
? GlobalRate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1007,6 +1110,7 @@ const Printstyle8 = ({
: Rate && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1018,6 +1122,7 @@ const Printstyle8 = ({
? GlobalDiscount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1028,6 +1133,7 @@ const Printstyle8 = ({
: Discount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1039,6 +1145,7 @@ const Printstyle8 = ({
? GlobalTax && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1050,6 +1157,7 @@ const Printstyle8 = ({
table2Data?.OrderType !== 'E' && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1061,6 +1169,7 @@ const Printstyle8 = ({
? GlobalQuantity && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1071,6 +1180,7 @@ const Printstyle8 = ({
: Quantity && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1082,6 +1192,7 @@ const Printstyle8 = ({
? GlobalAmount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1092,6 +1203,7 @@ const Printstyle8 = ({
: Amount && (
<th
style={{
...tableHeaderStyle,
width: '10px',
textAlign: 'right',
}}
@ -1104,7 +1216,18 @@ const Printstyle8 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1256,7 +1379,7 @@ const Printstyle8 = ({
FormatTheme && (
<>
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px' }}>
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div
style={{
display: 'flex',
@ -2051,6 +2174,7 @@ const Printstyle8 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2262,7 +2386,7 @@ const Printstyle8 = ({
>
<>
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px' }}>
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div
style={{
display: 'flex',
@ -3036,6 +3160,7 @@ const Printstyle8 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -3234,7 +3359,7 @@ const Printstyle8 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle8-fistDiv" style={{}}>
<div className="PrintStyle8-fistDiv" style={{...headerStyle}}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div
style={{
@ -3263,7 +3388,6 @@ const Printstyle8 = ({
style={{
fontSize: 'clamp(1.25rem, 2.5vw, 1.75rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
>
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -3370,95 +3494,95 @@ const Printstyle8 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)
: SLNO && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{ textAlign: 'left' }}>Dis</th>
<th style={{...tableHeaderStyle, textAlign: 'left' }}>Dis</th>
)
: Item && <th>Des</th>}
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3468,7 +3592,18 @@ const Printstyle8 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3632,93 +3767,93 @@ const Printstyle8 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)
: SLNO && (
<th style={{ width: '10px', textAlign: 'center' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)}
{GlobaldummyData
? GlobalItem && <th>Dis</th>
: Item && <th>Des</th>}
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3728,7 +3863,18 @@ const Printstyle8 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3878,7 +4024,7 @@ const Printstyle8 = ({
</>
)}
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px' }}>
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ width: '40%' }}>Items </div>
<div> : </div>
@ -4590,6 +4736,7 @@ const Printstyle8 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -29,6 +29,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@ -144,7 +154,23 @@ const PrintStyle9 = ({
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
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;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
let TermsAndConditions = printDatas?.TermsandConditions;
let SignatureImg = printDatas?.Signature;
let Notestext = printDatas?.Notes;
@ -351,7 +377,51 @@ const PrintStyle9 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle = {
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.font,
}
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
{FormatTheme ? (
@ -409,7 +479,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle9-print">
<div className="PrintStyle9-print" style={{...headerStyle}}>
<div
style={{
display: 'flex',
@ -437,7 +507,6 @@ const PrintStyle9 = ({
style={{
fontSize: 'clamp(1.5rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
className="PrintStyle9-Branch"
>
@ -582,25 +651,25 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -608,14 +677,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -623,14 +692,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -638,14 +707,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -653,7 +722,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -661,7 +730,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -669,14 +738,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -684,14 +753,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -701,7 +770,18 @@ const PrintStyle9 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -895,25 +975,25 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px' }}>S.No</th>
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{ width: '10px' }}>Item</th>
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{ width: '10px' }}>Item</th>}
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -921,14 +1001,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -936,14 +1016,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -951,14 +1031,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -966,7 +1046,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -974,7 +1054,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -982,14 +1062,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -997,14 +1077,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{ width: '10px', textAlign: 'right' }}
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -1014,7 +1094,18 @@ const PrintStyle9 = ({
<tbody>
{dataChunk?.map((item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1242,6 +1333,7 @@ const PrintStyle9 = ({
style={{
display: 'flex',
justifyContent: 'space-between',
...netAmountStyle
}}
>
<div style={{ fontWeight: '700' }}>Net Amount:</div>
@ -1922,6 +2014,7 @@ const PrintStyle9 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2245,7 +2338,7 @@ const PrintStyle9 = ({
<hr className="PrintStyle9-print-dottline" />
<div
style={{ display: 'flex', justifyContent: 'space-between' }}
style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}
>
<div style={{ fontWeight: '700' }}>Net Amount:</div>
<div style={{ fontWeight: '700', marginRight: '0.5rem' }}>
@ -2903,6 +2996,7 @@ const PrintStyle9 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -3118,7 +3212,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle9-print">
<div className="PrintStyle9-print" style={{...headerStyle}}>
<div
style={{
display: 'flex',
@ -3146,7 +3240,6 @@ const PrintStyle9 = ({
style={{
fontSize: 'clamp(1.5rem, 2.5vw, 2rem)',
fontWeight: '600',
color: SelectedHeaderColor,
}}
className="PrintStyle9-Branch"
>
@ -3296,89 +3389,89 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{ width: '10px', textAlign: 'left' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'left' }}>
S.No
</th>
)
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3388,7 +3481,18 @@ const PrintStyle9 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3546,86 +3650,86 @@ const PrintStyle9 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{ width: '10px' }}>S.No</th>
: SLNO && <th style={{ width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{ width: '10px' }}>Item</th>
: Item && <th style={{ width: '10px' }}>Item</th>}
? GlobalItem && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{ width: '10px', textAlign: 'right' }}>
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3635,7 +3739,18 @@ const PrintStyle9 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => {
return (
<tr key={index}>
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3846,7 +3961,7 @@ const PrintStyle9 = ({
<hr className="PrintStyle9-print-dottline" />
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}>
<div style={{ fontWeight: '700' }}>Net Amount:</div>
<div style={{ fontWeight: '700', marginRight: '0.5rem' }}>
{GlobaldummyData
@ -4483,6 +4598,7 @@ const PrintStyle9 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (