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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -25,6 +25,17 @@ import {
GlobalprintLogo, GlobalprintLogo,
GlobalprintCredit, GlobalprintCredit,
GlobalprintTax, GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange'; } from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg' import Logo from '../../../../Images/Logo.jpg'
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss' import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.scss'
@ -68,7 +79,6 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const GlobalHsnCode = useSelector(GlobalprintHsnCode); const GlobalHsnCode = useSelector(GlobalprintHsnCode);
const GlobalQrcodet = useSelector(GlobalprintQrcodet); const GlobalQrcodet = useSelector(GlobalprintQrcodet);
const GlobaldummyData = useSelector(GlobalPritdummyData); const GlobaldummyData = useSelector(GlobalPritdummyData);
console.log(GlobaldummyData, "GlobaldummyData print3");
const GlobalSignature = useSelector(GlobalprintSignature); const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions); const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage); const GlobalSignatureImages = useSelector(GlobalSignatureImage);
@ -79,10 +89,21 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const GlobalCashierName = useSelector(GlobalprintCashierName); const GlobalCashierName = useSelector(GlobalprintCashierName);
const GlobalLogo = useSelector(GlobalprintLogo); const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit); 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 SettingData = useSelector(PreferenceData);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter( const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom' (i) => i.SettingIdName === 'PrintUom'
)?.[0]; )?.[0];
const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y'; const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find(setting => setting?.SettingIdName?.toLowerCase() === 'estimateprintheader')?.SettingValue === 'Y';
const estimateTitle = const estimateTitle =
SettingData?.[0]?.SettingDtlDetails?.find( SettingData?.[0]?.SettingDtlDetails?.find(
@ -106,7 +127,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const PackageDetails = table2Data?.PackageDtl 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") let PaymentStatusSuccess = PaymentStatus?.filter(ps => ps.PaymentStatus === "S")
const keysLength = Object.keys(table2Data ?? {}).length; 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 lastChunkRows = paginatedChunks.length > 0 ? paginatedChunks[paginatedChunks.length - 1].length : 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == "A5" ? 5 : 10); 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 ( 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" : "fixed", top: 0, width: "100%" }}> */}
<div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : isPdf ? "static" : "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' }}> <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
{GlobaldummyData && GlobalLogo ? <img className='PrintStyle2-BrandImage' src={Logo} alt='image' width={100} /> : null} {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} {(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) && {(TakeawayData?.length > 0 || GlobaldummyData) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table"> <div style={{ width: '95%' }} className="PrintStyle3-print-table">
{takeAwayPreference && <div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >TakeAway</div>} {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 ? 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 ? 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>} {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' }}> <div style={{ marginTop: '5px' }}>
{dataChunk?.map((item, index) => ( {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 ? 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 && {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 style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
@ -292,7 +369,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</span> </span>
))} ))}
</div> </div>
: UomPrint?.SettingValue === 'Y' &&<div> : UomPrint?.SettingValue === 'Y' && <div>
({item?.Size ? item?.Size : "1"}{" "} ({item?.Size ? item?.Size : "1"}{" "}
{item?.SinglePc == "Y" {item?.SinglePc == "Y"
? "PCS" ? "PCS"
@ -302,7 +379,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
) )
</div>)} </div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp; &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?.length > 0
? item?.ProductIdentifierDtls.filter( ? item?.ProductIdentifierDtls.filter(
(items) => (items) =>
@ -355,7 +432,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(DineInData?.length > 0 && dinePreference) && {(DineInData?.length > 0 && dinePreference) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table"> <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', 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 ? 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 ? 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>} {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' }}> <div style={{ marginTop: '5px' }}>
{dataChunk?.map((item, index) => ( {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 ? 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 && {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 style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div> <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>} </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 ? 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>} {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 && {((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme &&
<> <>
<div className="PrintStyle3-print-ttlovrl"> <div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div> <div>
<div style={{ fontWeight: '600' }}> Items : </div> <div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div> <div style={{ fontWeight: '600' }}> Qty : </div>
@ -719,6 +803,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid", pageBreakBefore: "avoid",
pageBreakInside: "avoid", pageBreakInside: "avoid",
minHeight: "auto", minHeight: "auto",
...footerColorStyle
}} }}
> >
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div> {(!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>
<div style={{ fontWeight: '600' }}> Items : </div> <div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div> <div style={{ fontWeight: '600' }}> Qty : </div>
@ -1114,6 +1199,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid", pageBreakBefore: "avoid",
pageBreakInside: "avoid", pageBreakInside: "avoid",
minHeight: "auto", minHeight: "auto",
...footerColorStyle
}} }}
> >
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div> {(!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" }}> <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' }}> <div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
{GlobaldummyData && GlobalLogo ? <img className='PrintStyle2-BrandImage' src={Logo} alt='image' width={100} /> : null} {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} {(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) && {(TakeawayData?.length > 0 || GlobaldummyData) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table"> <div style={{ width: '95%' }} className="PrintStyle3-print-table">
{takeAwayPreference && <div style={{ display: 'flex', width: '100%', justifyContent: 'center', alignItems: "center" }} >TakeAway</div>} {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 ? 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 ? 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>} {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' }}> <div style={{ marginTop: '5px' }}>
{(GlobaldummyData ? products : TakeawayData)?.map((item, index) => ( {(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 ? 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 && {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 style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
@ -1262,7 +1355,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
) )
</div>)} </div>)}
&nbsp; {item?.BrandName !== null ? item?.BrandName : ""}&nbsp; &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?.length > 0
? item?.ProductIdentifierDtls.filter( ? item?.ProductIdentifierDtls.filter(
(items) => (items) =>
@ -1315,7 +1408,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{(DineInData?.length > 0 && dinePreference) && {(DineInData?.length > 0 && dinePreference) &&
<div style={{ width: '95%' }} className="PrintStyle3-print-table"> <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', 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 ? 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 ? 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>} {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' }}> <div style={{ marginTop: '5px' }}>
{(GlobaldummyData ? products : DineInData)?.map((item, index) => ( {(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 ? 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 && {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 style={{ display: 'flex', flexDirection: 'column', width: '300%', textAlign: 'left', fontWeight: 600 }}>
<div>{item?.ProdName}</div> <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>} </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 ? 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>} {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> </div>
} }
{/* <br/> */} {/* <br/> */}
<div className="PrintStyle3-print-ttlovrl"> <div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div> <div>
<div style={{ fontWeight: '600' }}> Items : </div> <div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div> <div style={{ fontWeight: '600' }}> Qty : </div>
@ -1670,6 +1770,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
pageBreakBefore: "avoid", pageBreakBefore: "avoid",
pageBreakInside: "avoid", pageBreakInside: "avoid",
minHeight: "auto", minHeight: "auto",
...footerColorStyle
}} }}
> >
{(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div> {(!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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