printstylechanges

This commit is contained in:
Tamilselvan 2026-03-05 16:45:06 +05:30
parent b1a4f3ec16
commit 52bcdcff12
17 changed files with 3719 additions and 3612 deletions

3
.gitignore vendored
View File

@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?
src/routesConfig.jsx
vite.config.js

View File

@ -27,17 +27,17 @@ import {
GlobalprintCashierName,
GlobalprintLogo,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import '../../../../Styles/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.scss';
import QRCode from 'react-qr-code';
@ -105,6 +105,12 @@ const InvoiceTemplate = ({
const GlobalBilltext = useSelector(GlobalBillName);
const GlobalLogo = useSelector(GlobalprintLogo);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -120,7 +126,7 @@ const InvoiceTemplate = ({
)?.SettingValue === 'Y';
const keysLength = Object.keys(table2Data ?? {}).length;
console.log(GlobalDiscount, Discount, 'Discount');
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
@ -516,7 +522,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
},
];
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -952,7 +958,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="header-section" style={{...headerStyle}}>
<div className="header-section" style={{ ...headerStyle }}>
<div>
<div
style={{ display: 'flex', alignItems: 'center' }}
@ -1018,9 +1024,10 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0rem', fontWeight: '600' }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>
)}
@ -1160,7 +1167,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
}}
>
<thead>
<tr className="table-header" style={{...tableHeaderStyle}}>
<tr className="table-header" style={{ ...tableHeaderStyle }}>
{GlobaldummyData
? GlobalSlNo && (
<th className="table-header-cell">S.No</th>
@ -1309,17 +1316,17 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
{((GlobaldummyData ? products : dataChunk) || []).map(
(item, idx) => (
<tr key={idx} className="table-row"
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -1508,9 +1515,9 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
fontFamily: 'sans-serif',
}}
>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1548,10 +1555,9 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
fontFamily: 'sans-serif',
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1988,7 +1994,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
</div>
{/* Footer */}
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-grid" style={{ ...footerColorStyle }}>
<div className="footer-left">
{BankDetails?.length > 0 && (
<>
@ -2251,7 +2257,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
alignItems: 'flex-end',
justifyContent: 'space-around',
width: '100%',
padding: '0 10px',
padding: '0 10px',
padding: '0 10px',
whiteSpace: 'nowrap',
fontSize: '10px',
@ -2551,7 +2557,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
</div>
{/* Footer */}
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-grid" style={{ ...footerColorStyle }}>
<div className="footer-left">
{BankDetails?.length > 0 && (
<>
@ -2773,7 +2779,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="header-section" style={{...headerStyle}}>
<div className="header-section" style={{ ...headerStyle }}>
<div>
<div style={{ display: 'flex', alignItems: 'center' }}>
{GlobalLogo && GlobaldummyData && (
@ -2936,7 +2942,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
style={{ borderTop: '1px solid black' }}
>
<thead>
<tr className="table-header" style={{...tableHeaderStyle}}>
<tr className="table-header" style={{ ...tableHeaderStyle }}>
{GlobaldummyData
? GlobalSlNo && (
<th className="table-header-cell">S.No</th>
@ -3047,17 +3053,17 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
{((GlobaldummyData ? products : productsData) || []).map(
(item, idx) => (
<tr key={idx} className="table-row"
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
idx % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: idx % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td
@ -3224,9 +3230,9 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
className="table-header-cell"
style={{ textAlign: 'right' }}
>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3261,9 +3267,9 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
className="table-header-cell"
style={{ textAlign: 'right' }}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3279,7 +3285,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
alignItems: 'flex-start',
justifyContent: 'space-around',
width: '100%',
padding: '0 10px',
padding: '0 10px',
whiteSpace: 'nowrap',
fontSize: '10px',
flexWrap: 'wrap',
@ -3539,7 +3545,7 @@ const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
</div>
{/* Footer */}
<div className="footer-grid" style={{...footerColorStyle}}>
<div className="footer-grid" style={{ ...footerColorStyle }}>
<div className="footer-left">
{(BankDetails?.length > 0 || GlobaldummyData) && (
<>

File diff suppressed because it is too large Load Diff

View File

@ -130,6 +130,12 @@ const PrintA5Style11 = ({
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 Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -529,9 +535,10 @@ const PrintA5Style11 = ({
>
{' '}
<div>{Date1}</div>{' '}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>
</div>
@ -764,7 +771,7 @@ const PrintA5Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}
style={
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
@ -905,9 +912,9 @@ const PrintA5Style11 = ({
)
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -927,11 +934,9 @@ const PrintA5Style11 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt -
item?.OfferAmt || 0
: item?.TotalAmt -
item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1765,7 +1770,7 @@ const PrintA5Style11 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}
style={
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
@ -1882,9 +1887,9 @@ const PrintA5Style11 = ({
)
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1904,11 +1909,9 @@ const PrintA5Style11 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt -
item?.OfferAmt || 0
: item?.TotalAmt -
item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -2929,179 +2932,179 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
<div style={{...footerColorStyle}}>
<div style={{ ...footerColorStyle }}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: Notestext && (
<div>
<p
style={{
padding: '0rem 1rem',
textAlign: 'center',
}}
>
{Notestext}
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are not exchangeable
or refundable.
</li>
<li>
Please check the product before leaving the
counter.
</li>
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
: Notestext && (
<div>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
padding: '0rem 1rem',
textAlign: 'center',
}}
>
Terms & Conditions
{Notestext}
</p>
<ol
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are not exchangeable
or refundable.
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
<li>
Please check the product before leaving the
counter.
</li>
</ol>
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
<p
{GlobaldummyData
? GlobalSignature && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
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
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{ width: '70px', height: '40px' }}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
Signature
</p>
<img
style={{ width: '100px', height: '60px' }}
src={SignatureImg}
alt=""
/>
</div>
)}
<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>
))}
@ -3515,173 +3518,173 @@ const PrintA5Style11 = ({
>{`*** Membership ${table2Data?.NetAmount === 0 ? 'Free Hours' : 'Discount'} Utilized - ${MembershipApplied?.Detail?.[0]?.MembershipName} ***`}</div>
)}
<div style={{...footerColorStyle}}>
<div style={{ ...footerColorStyle }}>
{GlobaldummyData
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: Notestext && (
<div>
<p style={{ padding: '0rem 1rem', textAlign: 'center' }}>
{Notestext}
</p>
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
? GlobalIsnotes && (
<div>
<p style={{ padding: '0rem 1rem' }}>
Notes : 10 days Return policy
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are not exchangeable or
refundable.
</li>
<li>
Please check the product before leaving the counter.
</li>
</ol>
<hr className="PrintA4Style11-print-dottline" />
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
: Notestext && (
<div>
<p style={{ padding: '0rem 1rem', textAlign: 'center' }}>
{Notestext}
</p>
<ol
<hr className="PrintA4Style11-print-dottline" />
</div>
)}
<div
style={{
display: 'flex',
width: '90%',
padding: '0 1rem',
justifyContent: GlobaltermsAndConditions
? 'space-between'
: 'flex-end',
alignItems: 'center',
}}
>
{GlobaldummyData
? GlobaltermsAndConditions && (
<div
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
margin: '8px 0',
padding: '8px',
fontFamily: 'sans-serif',
width: '100%',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
<li>
Once goods are sold, they are not exchangeable or
refundable.
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
<li>
Please check the product before leaving the counter.
</li>
</ol>
</div>
)
: TermsnAdCondition == true &&
TermsAndConditions?.length > 0 && (
<div
style={{
margin: '8px 0',
fontFamily: 'sans-serif',
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
}}
>
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Terms & Conditions
</p>
<ol
style={{
fontSize: '12px',
paddingLeft: '18px',
margin: 0,
lineHeight: '1',
}}
>
{TermsAndConditions?.map((item) => (
<li style={{ textAlign: 'start' }}>
{item?.TermsandConditions}
</li>
))}
{/* <li>Please check the product before leaving the counter.</li> */}
</ol>
</div>
)}
{GlobaldummyData
? GlobalSignature && (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
<p
{GlobaldummyData
? GlobalSignature && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
paddingBottom: '1rem',
}}
>
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
<p
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
}}
>
Signature
</p>
<img
style={{ width: '70px', height: '40px' }}
src={
GlobalSignatureImages
? GlobalSignatureImages
: signature
}
alt=""
/>
</div>
)
: Signature == true && (
<div
style={{
fontSize: '13px',
fontWeight: 'bold',
marginBottom: '6px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
marginTop: '1rem',
paddingBottom: '1rem',
}}
>
Signature
</p>
<img
style={{ width: '100px', height: '60px' }}
src={SignatureImg}
alt=""
/>
</div>
)}
<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>
)}
</div>

View File

@ -47,6 +47,12 @@ const TaxInvoice = ({
setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
)?.SettingValue === 'Y';
let BillName = printDatas?.PrintHdrName;
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
@ -496,7 +502,7 @@ const TaxInvoice = ({
style={{
fontWeight: '700',
fontSize: '15px',
color: headerColor?.font
color: headerColor?.font
}}
>
{invoiceData.companyName}

View File

@ -128,6 +128,13 @@ const PrintStyle1 = ({
const GlobalBilltext = useSelector(GlobalBillName);
const appPreferences = useSelector(ApplicationPreferences);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const bookingTypePreference = appPreferences?.find(
(preference) => preference?.PreferredCatName === 'Booking Type'
)?.PreferenceCatDetails;
@ -494,15 +501,17 @@ const PrintStyle1 = ({
width: '100%',
}}
>
<div style={{ display: 'flex', justifyContent: 'center', ...(GlobaldummyData
? {
color: SelectedHeaderFontColor,
backgroundColor: SelectedHeaderColor,
}
: {
color: headerColor?.font,
backgroundColor: headerColor?.background,
}), }}>
<div style={{
display: 'flex', justifyContent: 'center', ...(GlobaldummyData
? {
color: SelectedHeaderFontColor,
backgroundColor: SelectedHeaderColor,
}
: {
color: headerColor?.font,
backgroundColor: headerColor?.background,
}),
}}>
{GlobaldummyData ? (
GlobalLogo && (
<img
@ -527,12 +536,12 @@ const PrintStyle1 = ({
''
) : (
<div className="PrintStyle1-print"
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
backgroundColor: GlobaldummyData ? SelectedHeaderColor : headerColor?.background,
}}>
style={{
fontSize: 'clamp(2rem, 2.5vw, 2rem)',
fontWeight: '600',
color: GlobaldummyData ? SelectedHeaderFontColor : headerColor?.font,
backgroundColor: GlobaldummyData ? SelectedHeaderColor : headerColor?.background,
}}>
<div>
{' '}
{GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}
@ -679,9 +688,10 @@ const PrintStyle1 = ({
{' '}
Date : {GlobaldummyData ? formattedDate : Date1}{' '}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
@ -977,9 +987,9 @@ const PrintStyle1 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1002,10 +1012,9 @@ const PrintStyle1 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== "C"
? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0)
: item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)}
</td>
)}
</tr>
@ -1216,9 +1225,9 @@ const PrintStyle1 = ({
: Discount == true && (
<td>
{' '}
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1241,10 +1250,9 @@ const PrintStyle1 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== "C"
? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0)
: item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)}
</td>
)}
</tr>
@ -4241,9 +4249,9 @@ const PrintStyle1 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -4266,9 +4274,10 @@ const PrintStyle1 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== "C"
? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0)
: item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)}
</td>
)}
</tr>
@ -4459,9 +4468,10 @@ const PrintStyle1 = ({
: Discount == true && (
<td>
{' '}
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -4478,15 +4488,15 @@ const PrintStyle1 = ({
)}
{GlobaldummyData
? GlobalAmount && (
<td style={{ textAlign: 'right' }}>
<td style={{ textAlign: "right" }}>
{item?.TotalAmt}
</td>
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
: Amount === true && (
<td style={{ textAlign: "right" }}>
{item?.Type !== "C"
? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0)
: item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)}
</td>
)}
</tr>

View File

@ -111,6 +111,12 @@ const PrintStyle10 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -577,9 +583,10 @@ const PrintStyle10 = ({
{' '}
{GlobaldummyData ? formattedDate : Date1}{' '}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', fontWeight: 600, textAlign: 'right' }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
<hr class="straightline" />
</div>
@ -883,9 +890,9 @@ const PrintStyle10 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -919,10 +926,9 @@ const PrintStyle10 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1180,9 +1186,9 @@ const PrintStyle10 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1216,10 +1222,9 @@ const PrintStyle10 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3496,9 +3501,9 @@ const PrintStyle10 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3532,9 +3537,9 @@ const PrintStyle10 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3753,9 +3758,9 @@ const PrintStyle10 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3789,9 +3794,9 @@ const PrintStyle10 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>

View File

@ -131,6 +131,12 @@ const PrintStyle11 = ({
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 Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -868,9 +874,9 @@ const PrintStyle11 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -904,10 +910,9 @@ const PrintStyle11 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -937,25 +942,25 @@ const PrintStyle11 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.N</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.N</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.N</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
@ -964,14 +969,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -979,14 +984,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -994,14 +999,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -1009,7 +1014,7 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -1017,7 +1022,7 @@ const PrintStyle11 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %{' '}
</th>
@ -1025,14 +1030,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -1040,14 +1045,14 @@ const PrintStyle11 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -1058,17 +1063,17 @@ const PrintStyle11 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1140,9 +1145,9 @@ const PrintStyle11 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1176,10 +1181,9 @@ const PrintStyle11 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1283,7 +1287,7 @@ const PrintStyle11 = ({
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
...netAmountStyle
...netAmountStyle
}}
>
Amount :
@ -2255,7 +2259,7 @@ const PrintStyle11 = ({
textAlign: 'right',
fontWeight: '600',
fontSize: '18px',
...netAmountStyle
...netAmountStyle
}}
>
Amount :
@ -3211,9 +3215,10 @@ const PrintStyle11 = ({
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>
)}
@ -3505,9 +3510,9 @@ const PrintStyle11 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3541,9 +3546,9 @@ const PrintStyle11 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3744,9 +3749,9 @@ const PrintStyle11 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3780,9 +3785,9 @@ const PrintStyle11 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>

View File

@ -31,16 +31,16 @@ import {
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -114,25 +114,31 @@ const Printstyle12 = ({
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor;
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
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 Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -504,7 +510,7 @@ const Printstyle12 = ({
await printDiv('PrintStyle12', style12, 'FontApply');
};
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -810,67 +816,67 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)}
</tr>
</thead>
@ -878,17 +884,17 @@ const Printstyle12 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1049,9 +1055,9 @@ const Printstyle12 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1074,10 +1080,9 @@ const Printstyle12 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1107,67 +1112,67 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle,}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle,}}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Description</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Description</th>
: Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%)
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)}
</tr>
</thead>
@ -1175,17 +1180,17 @@ const Printstyle12 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1269,9 +1274,9 @@ const Printstyle12 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1294,10 +1299,9 @@ const Printstyle12 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3290,7 +3294,7 @@ const Printstyle12 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle12-firstDiv" style={{...headerStyle}}>
<div className="PrintStyle12-firstDiv" style={{ ...headerStyle }}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div style={{ display: 'flex', flexDirection: 'column' }}>
<hr
@ -3466,58 +3470,58 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && <th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th>}
: MRP && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
: Rate && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Tax (%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
: Amount && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
</tr>
</thead>
<tbody>
@ -3525,17 +3529,17 @@ const Printstyle12 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3716,9 +3720,9 @@ const Printstyle12 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3741,9 +3745,9 @@ const Printstyle12 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3774,44 +3778,44 @@ const Printstyle12 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)
: MRP && <th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th>}
: MRP && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)
: Rate && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
: Rate && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)
: Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)}
{GlobaldummyData
? GlobalTax && (
@ -3819,13 +3823,13 @@ const Printstyle12 = ({
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount && <th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
: Amount && <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>}
</tr>
</thead>
<tbody>
@ -3833,17 +3837,17 @@ const Printstyle12 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3923,9 +3927,9 @@ const Printstyle12 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3948,9 +3952,9 @@ const Printstyle12 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -4094,7 +4098,7 @@ const Printstyle12 = ({
)}
</>
)}
<div style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}>
<div style={{ display: 'flex', justifyContent: 'space-between', ...netAmountStyle }}>
<div style={{ width: '45%', fontWeight: '600' }}>Amount</div>
<div> : </div>
<div

View File

@ -105,16 +105,16 @@ const Printstyle2 = ({
(ps) => ps.PaymentTypeName === 'UPI'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const GlobalSignature = useSelector(GlobalprintSignature);
const GlobaltermsAndConditions = useSelector(GlobalprinttermsAndConditions);
const GlobalSignatureImages = useSelector(GlobalSignatureImage);
@ -126,7 +126,13 @@ const Printstyle2 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const estimatePrintHeader =
@ -364,50 +370,50 @@ const Printstyle2 = ({
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle ={
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
color: GlobaldummyData
? SelectedHeaderFontColor
: headerColor?.font,
}
const tableHeaderStyle ={
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
const tableHeaderStyle = {
backgroundColor: GlobaldummyData
? SelectedTableHeaderColor
: tableHeaderColor?.background,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
color: GlobaldummyData
? SelectedTableHeaderFontColor
: tableHeaderColor?.font,
}
const tableBodyStyle ={
backgroundColor: GlobaldummyData
? SelectedTableBodyColor
: tableBodyColor?.background,
color: GlobaldummyData
? SelectedTableBodyFontColor
: tableBodyColor?.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,
const rowtypeStyle = GlobaldummyData ? SelectedRowType : tableBodyColor?.rowType;
const footerColorStyle = {
backgroundColor: GlobaldummyData
? SelectedTableFooterColor
: footerColor?.background,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
color: GlobaldummyData
? SelectedTableFooterFontColor
: footerColor?.font,
}
const netAmountStyle ={
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
const netAmountStyle = {
backgroundColor: GlobaldummyData
? SelectedNetAmountColor
: netAmtColor?.background,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
color: GlobaldummyData
? SelectedNetAmountFontColor
: netAmtColor?.font,
}
return (
<>
@ -461,7 +467,7 @@ const Printstyle2 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle2-fistDiv" style={{...headerStyle }}>
<div className="PrintStyle2-fistDiv" style={{ ...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row' }}>
{GlobaldummyData ? (
GlobalLogo && (
@ -584,7 +590,7 @@ const Printstyle2 = ({
{GlobaldummyData ? formattedDate : Date1}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>
@ -615,23 +621,23 @@ const Printstyle2 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
@ -639,14 +645,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalQuantity && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -654,14 +660,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
@ -669,14 +675,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
@ -684,14 +690,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -723,14 +729,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
@ -741,17 +747,17 @@ const Printstyle2 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
...tableBodyStyle
}
: {}
}>
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -797,7 +803,7 @@ const Printstyle2 = ({
</span>
))}
</div>
) : UomPrint?.SettingValue === 'Y' && (
) : UomPrint?.SettingValue === 'Y' && (
<div>
({item?.Size ? item?.Size : '1'}{' '}
@ -814,7 +820,7 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
&nbsp;
<div style={{ display: "flex", gap: "3px" ,flexDirection:"column"}}>
<div style={{ display: "flex", gap: "3px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length >
0
? item?.ProductIdentifierDtls?.filter(
@ -1000,23 +1006,23 @@ const Printstyle2 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>
)
: SLNO && <th style={{ ...tableHeaderStyle,width: '8px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
HSN
</th>
@ -1024,14 +1030,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalQuantity && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -1039,14 +1045,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
MRP
</th>
@ -1054,14 +1060,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Amt
</th>
@ -1069,14 +1075,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -1084,7 +1090,8 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{ width: '10px',textAlign: 'center',...tableHeaderStyle,
style={{
width: '10px', textAlign: 'center', ...tableHeaderStyle,
}}
>
Tax %
@ -1093,7 +1100,7 @@ const Printstyle2 = ({
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'center',}}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center', }}
>
Tax %
</th>
@ -1101,14 +1108,14 @@ const Printstyle2 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}
>
Rate
</th>
@ -1119,17 +1126,17 @@ const Printstyle2 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
...tableBodyStyle
}
: {}
}>
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -1156,17 +1163,17 @@ const Printstyle2 = ({
}}
>
<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>
}
</td>
)}
{GlobaldummyData
@ -1393,7 +1400,7 @@ const Printstyle2 = ({
!shouldFooterBeOnNewPage &&
FormatTheme && (
<>
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdDivMaster" style={{ ...netAmountStyle }}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>
@ -2061,7 +2068,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{GlobaldummyData
@ -2274,11 +2281,11 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
<>
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdDivMaster" style={{ ...netAmountStyle }}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>
@ -2932,7 +2939,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{GlobaldummyData
@ -3130,8 +3137,8 @@ const Printstyle2 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle2-fistDiv" style={{...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row'}}>
<div className="PrintStyle2-fistDiv" style={{ ...headerStyle }}>
<div style={{ display: 'flex', flexDirection: 'row' }}>
{GlobaldummyData ? (
GlobalLogo && (
<img
@ -3274,86 +3281,86 @@ const Printstyle2 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle,width: '8px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)}
@ -3364,17 +3371,17 @@ const Printstyle2 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -3419,7 +3426,7 @@ const Printstyle2 = ({
</span>
))}
</div>
) : UomPrint?.SettingValue === 'Y' && (
) : UomPrint?.SettingValue === 'Y' && (
<div>
({item?.Size ? item?.Size : '1'}{' '}
{item?.SinglePc == 'Y'
@ -3435,7 +3442,7 @@ const Printstyle2 = ({
? item?.BrandName
: ''}
&nbsp;
<div style={{ display: 'flex', gap: "3px",flexDirection:"column" }}>
<div style={{ display: 'flex', gap: "3px", flexDirection: "column" }}>
{item?.ProductIdentifierDtls?.length > 0
? item?.ProductIdentifierDtls.filter(
(items) =>
@ -3611,86 +3618,86 @@ const Printstyle2 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '8px' }}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '8px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item && <th style={{...tableHeaderStyle}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Amt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)
: Tax == true &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{ ...tableHeaderStyle,width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '8px', textAlign: 'right' }}>
Rate
</th>
)}
@ -3701,17 +3708,17 @@ const Printstyle2 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td className="Re-print-body-Rate">
@ -3738,17 +3745,17 @@ const Printstyle2 = ({
}}
>
<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>
}
</td>
)}
{GlobaldummyData
@ -3885,7 +3892,7 @@ const Printstyle2 = ({
<hr className="PrintStyle2-print-dottline" />
</div>
)}
<div className="PrintStyle2-ThirdDivMaster" style={{...netAmountStyle}}>
<div className="PrintStyle2-ThirdDivMaster" style={{ ...netAmountStyle }}>
<div className="PrintStyle2-ThirdP">
<div>
<div style={{ textAlign: 'left', fontWeight: '600' }}>Qty</div>
@ -4499,7 +4506,7 @@ const Printstyle2 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{GlobaldummyData

View File

@ -101,6 +101,12 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -200,7 +206,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
if (hasMappedOffer) {
const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type != "C" ? item.OfferAmt : item.OfferValue || 0), 0);
const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type !== 'C' ? (item?.OfferAmt || item?.DiscountAmt || 0) : (item?.OfferValue || item?.DiscountAmt || 0)), 0);
TotalOfferAmount += productTotal;
} else {
const Combothere = productsData?.filter(item => item?.Type == "C")
@ -289,7 +295,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{/* <div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : "fixed", top: 0, width: "100%" }}> */}
<div className="header" style={{ position: isMobile ? "" : GlobaldummyData ? "absolute" : isPdf ? "static" : "fixed", top: 0, width: "100%" }}>
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" style={{ ...headerStyle,}} >
{((!estimatePrintHeader && table2Data?.OrderType === "E") ? '' : <div className="PrintStyle3-print" style={{ ...headerStyle, }} >
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
{GlobaldummyData && GlobalLogo ? <img className='PrintStyle2-BrandImage' src={Logo} alt='image' width={100} /> : null}
{(base64Image && (PrintLogo?.SettingValue === "Y" || LogoField)) ? <img className='PrintStyle2-BrandImage' src={base64Image} alt='image' width={100} /> : null}
@ -319,9 +325,10 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
<div className="PrintStyle3-print-ordr-dtls">
<div style={{ lineheight: '50px' }}>
<div style={{ fontSize: '14px', fontWeight: 600 }} > BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)} </div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
<div style={{ fontSize: '14px', fontWeight: 600 }} > {GlobaldummyData ? formattedDate : Date1}</div>
</div>
@ -421,9 +428,15 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{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 ? GlobalQuantity && <div style={{ width: '100%', textAlign: 'center' }}>{item?.SalesQty}</div> : Quantity && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SalesQty}</div>}
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Rate}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}</div>
}
{GlobaldummyData ? GlobalTax && <div style={{ width: '100%', textAlign: 'right' }}>{item?.ProdTaxPercentage || 0}</div> : (Tax == true && table2Data?.OrderType !== 'E') && (<div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.ProdTaxPercentage || 0}</div>)}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} >
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</div>}
</div>
))}
</div>
@ -464,9 +477,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{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 ? GlobalQuantity && <div style={{ width: '100%', textAlign: 'right' }}>{item?.SalesQty}</div> : Quantity && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SalesQty}</div>}
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Rate}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}</div>}
{GlobaldummyData ? GlobalTax && <div style={{ width: '100%', textAlign: 'right' }}>{item?.ProdTaxPercentage || 0}</div> : (Tax == true && table2Data?.OrderType !== 'E') && (<div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.ProdTaxPercentage || 0}</div>)}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}</div>}
</div>
))}
</div>
@ -488,7 +503,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{((chunkIndex === paginatedChunks.length - 1) && (!shouldFooterBeOnNewPage)) && FormatTheme &&
<>
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div className="PrintStyle3-print-ttlovrl" style={{ ...netAmountStyle }}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>
@ -889,7 +904,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
}}
>
<>
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div className="PrintStyle3-print-ttlovrl" style={{ ...netAmountStyle }}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>
@ -1397,9 +1412,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{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 ? GlobalQuantity && <div style={{ width: '100%', textAlign: 'center' }}>{item?.SalesQty}</div> : Quantity && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SalesQty}</div>}
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Rate}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}</div>}
{GlobaldummyData ? GlobalTax && <div style={{ width: '100%', textAlign: 'right' }}>{item?.ProdTaxPercentage || 0}</div> : (Tax == true && table2Data?.OrderType !== 'E') && (<div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.ProdTaxPercentage || 0}</div>)}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}</div>}
</div>
))}
</div>
@ -1440,9 +1457,13 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
{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 ? GlobalQuantity && <div style={{ width: '100%', textAlign: 'right' }}>{item?.SalesQty}</div> : Quantity && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.SalesQty}</div>}
{GlobaldummyData ? GlobalRate && <div style={{ width: '100%', textAlign: 'right' }}>{item?.Rate}</div> : Rate && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Rate}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.Type != "C" ? item?.OfferAmt || 0 : item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalDiscount && <div style={{ width: '100%', textAlign: 'right' }}>{item?.discount}</div> : Discount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</div>}
{GlobaldummyData ? GlobalTax && <div style={{ width: '100%', textAlign: 'right' }}>{item?.ProdTaxPercentage || 0}</div> : (Tax == true && table2Data?.OrderType !== 'E') && (<div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }}>{item?.ProdTaxPercentage || 0}</div>)}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type != "C" ? item?.TotalAmt - item?.OfferAmt || 0 : item?.TotalAmt - item?.OfferValue || 0}</div>}
{GlobaldummyData ? GlobalAmount && <div style={{ width: '100%', textAlign: 'right' }} >{item?.TotalAmt}</div> : Amount && <div style={{ width: '100%', textAlign: 'right', fontWeight: 600 }} > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}</div>}
</div>
))}
</div>
@ -1459,7 +1480,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
</div>
}
{/* <br/> */}
<div className="PrintStyle3-print-ttlovrl" style={{...netAmountStyle}}>
<div className="PrintStyle3-print-ttlovrl" style={{ ...netAmountStyle }}>
<div>
<div style={{ fontWeight: '600' }}> Items : </div>
<div style={{ fontWeight: '600' }}> Qty : </div>

View File

@ -123,6 +123,12 @@ const PrintStyle5 = ({
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const GlobalCredit = useSelector(GlobalprintCredit);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -949,9 +955,9 @@ const PrintStyle5 = ({
<div
style={{ width: '100%', textAlign: 'right' }}
>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
{GlobaldummyData
@ -983,9 +989,9 @@ const PrintStyle5 = ({
style={{ width: '100%', textAlign: 'right' }}
>
{' '}
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
</div>
@ -1272,9 +1278,9 @@ const PrintStyle5 = ({
<div
style={{ width: '100%', textAlign: 'right' }}
>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
{GlobaldummyData
@ -1306,9 +1312,9 @@ const PrintStyle5 = ({
style={{ width: '100%', textAlign: 'right' }}
>
{' '}
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
</div>
@ -1523,7 +1529,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{ fontWeight: '600', fontSize: '19px',...netAmountStyle, }}
style={{ fontWeight: '600', fontSize: '19px', ...netAmountStyle, }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}
@ -2271,7 +2277,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{ fontWeight: '600', fontSize: '19px',...netAmountStyle, }}
style={{ fontWeight: '600', fontSize: '19px', ...netAmountStyle, }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}
@ -2895,9 +2901,10 @@ const PrintStyle5 = ({
>
{' '}
<div> {GlobaldummyData ? formattedDate : Date1}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '14px', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>{' '}
<div>
@ -3270,9 +3277,9 @@ const PrintStyle5 = ({
)
: Discount && (
<div style={{ width: '100%', textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
{GlobaldummyData
@ -3296,9 +3303,9 @@ const PrintStyle5 = ({
: Amount && (
<div style={{ width: '100%', textAlign: 'right' }}>
{' '}
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
</div>
@ -3561,9 +3568,9 @@ const PrintStyle5 = ({
)
: Discount && (
<div style={{ width: '100%', textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
{GlobaldummyData
@ -3587,9 +3594,9 @@ const PrintStyle5 = ({
: Amount && (
<div style={{ width: '100%', textAlign: 'right' }}>
{' '}
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</div>
)}
</div>
@ -3775,7 +3782,7 @@ const PrintStyle5 = ({
<div
className="align-style"
style={{...netAmountStyle, fontWeight: '600', fontSize: '19px' }}
style={{ ...netAmountStyle, fontWeight: '600', fontSize: '19px' }}
>
{' '}
<div>Amount </div> <div> : </div>{' '}

View File

@ -29,17 +29,17 @@ import {
GlobalprintLogo,
GlobalprintCredit,
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import {
GlobalUpiIDprint,
@ -113,17 +113,23 @@ const Printstyle6 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
console.log(CashierNameField, "GlobaldummyData")
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
@ -356,7 +362,7 @@ const Printstyle6 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -458,7 +464,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle6-firstDiv" style={{...headerStyle}}>
<div className="PrintStyle6-firstDiv" style={{ ...headerStyle }}>
<div
className="P6HdBrnchName"
style={{
@ -620,12 +626,12 @@ const Printstyle6 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -635,7 +641,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -789,17 +795,17 @@ const Printstyle6 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
...tableBodyStyle
}
: {}
}>
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -957,9 +963,9 @@ const Printstyle6 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1005,10 +1011,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1038,12 +1043,12 @@ const Printstyle6 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -1053,7 +1058,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -1207,17 +1212,17 @@ const Printstyle6 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
...tableBodyStyle
}
: {}
}>
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1345,9 +1350,9 @@ const Printstyle6 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1393,10 +1398,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1797,7 +1801,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div className="PrintStyle6-secondDiv" style={{ ...netAmountStyle }}>
<div
style={{
textAlign: 'left',
@ -2197,7 +2201,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -2799,7 +2803,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div className="PrintStyle6-secondDiv" style={{ ...netAmountStyle }}>
<div
style={{
textAlign: 'left',
@ -3193,7 +3197,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
@ -3400,7 +3404,7 @@ const Printstyle6 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle6-firstDiv" style={{...headerStyle}}>
<div className="PrintStyle6-firstDiv" style={{ ...headerStyle }}>
<div
className="P6HdBrnchName"
style={{
@ -3526,9 +3530,10 @@ const Printstyle6 = ({
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
<div style={{ fontSize: '12px' }}>{Date1}</div>
@ -3553,11 +3558,11 @@ const Printstyle6 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -3565,7 +3570,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -3576,68 +3581,68 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
AMt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3648,17 +3653,17 @@ const Printstyle6 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3775,9 +3780,9 @@ const Printstyle6 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3823,9 +3828,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3855,11 +3860,11 @@ const Printstyle6 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData ? (
(GlobalItem || GlobalQuantity) && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: 'ITEM /DES/'}{' '}
@ -3867,7 +3872,7 @@ const Printstyle6 = ({
</th>
)
) : (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{GlobaldummyData
? GlobalItem && 'ITEM /DES/'
: Item && 'ITEM /DES/'}{' '}
@ -3878,34 +3883,34 @@ const Printstyle6 = ({
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
@ -3917,29 +3922,29 @@ const Printstyle6 = ({
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
AMt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3950,17 +3955,17 @@ const Printstyle6 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -4094,9 +4099,9 @@ const Printstyle6 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -4142,9 +4147,9 @@ const Printstyle6 = ({
// paddingRight: "20px",
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -4519,7 +4524,7 @@ const Printstyle6 = ({
</div>
</div>
)}
<div className="PrintStyle6-secondDiv" style={{...netAmountStyle}}>
<div className="PrintStyle6-secondDiv" style={{ ...netAmountStyle }}>
<div
style={{
textAlign: 'left',
@ -4896,7 +4901,7 @@ const Printstyle6 = ({
pageBreakBefore: 'avoid',
pageBreakInside: 'avoid',
minHeight: 'auto',
...footerColorStyle
...footerColorStyle
}}
>
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (

View File

@ -109,18 +109,18 @@ const PrintStyle7 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@ -129,6 +129,12 @@ const PrintStyle7 = ({
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const estimatePrintHeader =
SettingData?.[0]?.SettingDtlDetails?.find(
(setting) =>
@ -375,7 +381,7 @@ const PrintStyle7 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -478,7 +484,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle7-print" style={{...headerStyle}}>
<div className="PrintStyle7-print" style={{ ...headerStyle }}>
{/* <div style={{ fontSize: '16px', fontWeight: '600' }}> {GlobaldummyData ? 'XYZ Shop' : table2Data?.BrName}</div> */}
<div
style={{
@ -644,58 +650,58 @@ const PrintStyle7 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S</th>
)
: SLNO == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle,}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Item</th>
: Item == true && <th style={{ ...tableHeaderStyle, }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
@ -725,17 +731,17 @@ const PrintStyle7 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -859,9 +865,9 @@ const PrintStyle7 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -884,10 +890,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -918,58 +923,58 @@ const PrintStyle7 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.NO</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.NO</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle,}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Item</th>
: Item == true && <th style={{ ...tableHeaderStyle, }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{ ...tableHeaderStyle,width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)
: MRP == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
@ -999,17 +1004,17 @@ const PrintStyle7 = ({
<tbody>
{dataChunk?.map((item, index) => (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1125,9 +1130,9 @@ const PrintStyle7 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1150,10 +1155,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -2984,7 +2988,7 @@ const PrintStyle7 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle7-print" style={{...headerStyle}}>
<div className="PrintStyle7-print" style={{ ...headerStyle }}>
<div
style={{
display: 'flex',
@ -3108,9 +3112,10 @@ const PrintStyle7 = ({
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
</div>
<div className="PrintStyle7-SecondDiv2">
@ -3150,58 +3155,58 @@ const PrintStyle7 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10%' }}>S.No</th>
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10%' }}>S.No</th>
: SLNO == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{...tableHeaderStyle, width: '30%', textAlign: 'left' }}>
<th style={{ ...tableHeaderStyle, width: '30%', textAlign: 'left' }}>
Item
</th>
)
: Item == true && <th style={{...tableHeaderStyle}}>Item</th>}
: Item == true && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && <th style={{...tableHeaderStyle}}>HSN</th>
? GlobalHsnCode && <th style={{ ...tableHeaderStyle }}>HSN</th>
: HsnCode == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && <th style={{...tableHeaderStyle}}>Qty</th>
? GlobalQuantity && <th style={{ ...tableHeaderStyle }}>Qty</th>
: Quantity == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{...tableHeaderStyle}}>MRP</th>
? GlobalMRP && <th style={{ ...tableHeaderStyle }}>MRP</th>
: MRP == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && <th style={{...tableHeaderStyle}}>Rate</th>
? GlobalRate && <th style={{ ...tableHeaderStyle }}>Rate</th>
: Rate == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && <th style={{...tableHeaderStyle,}}>Dis </th>
? GlobalDiscount && <th style={{ ...tableHeaderStyle, }}>Dis </th>
: Discount == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
<th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)
: Amount == true && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3211,17 +3216,17 @@ const PrintStyle7 = ({
{(GlobaldummyData ? products : TakeawayData)?.map(
(item, index) => (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3344,9 +3349,9 @@ const PrintStyle7 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3369,9 +3374,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3402,64 +3407,64 @@ const PrintStyle7 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S</th>
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S</th>
: SLNO == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>S</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Item</th>
: Item == true && <th style={{...tableHeaderStyle}}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle }}>Item</th>
: Item == true && <th style={{ ...tableHeaderStyle }}>Item</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)
: HsnCode == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>HSN</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>HSN</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px' }}>Qty</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Qty</th>
)
: Quantity == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>
<th style={{ ...tableHeaderStyle, width: '10px' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalMRP && <th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
? GlobalMRP && <th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
: MRP == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>MRP</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>MRP</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)
: Rate == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Rate</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Rate</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)
: Discount == true && (
<th style={{...tableHeaderStyle, width: '10px' }}>Dis </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Dis </th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px' }}>Tax % </th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Tax % </th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount == true && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3469,17 +3474,17 @@ const PrintStyle7 = ({
{(GlobaldummyData ? products : DineInData)?.map(
(item, index) => (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3583,9 +3588,9 @@ const PrintStyle7 = ({
? GlobalDiscount && <td>{item.discount}</td>
: Discount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3608,9 +3613,9 @@ const PrintStyle7 = ({
)
: Amount == true && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>

View File

@ -30,15 +30,15 @@ import {
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@ -115,6 +115,12 @@ const Printstyle8 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -160,17 +166,17 @@ const Printstyle8 = ({
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@ -387,7 +393,7 @@ const Printstyle8 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 13);
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -489,7 +495,7 @@ const Printstyle8 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle8-fistDiv" style={{...headerStyle}}>
<div className="PrintStyle8-fistDiv" style={{ ...headerStyle }}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div
@ -651,8 +657,8 @@ const Printstyle8 = ({
</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Dis</th>
: Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
@ -821,17 +827,17 @@ const Printstyle8 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -944,9 +950,9 @@ const Printstyle8 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -990,10 +996,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1047,8 +1052,8 @@ const Printstyle8 = ({
</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Dis</th>
: Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th
@ -1217,17 +1222,17 @@ const Printstyle8 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -1312,9 +1317,9 @@ const Printstyle8 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1358,10 +1363,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -1379,7 +1383,7 @@ const Printstyle8 = ({
FormatTheme && (
<>
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div style={{ fontSize: '12px', ...netAmountStyle }}>
<div
style={{
display: 'flex',
@ -2386,7 +2390,7 @@ const Printstyle8 = ({
>
<>
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div style={{ fontSize: '12px', ...netAmountStyle }}>
<div
style={{
display: 'flex',
@ -3359,7 +3363,7 @@ const Printstyle8 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle8-fistDiv" style={{...headerStyle}}>
<div className="PrintStyle8-fistDiv" style={{ ...headerStyle }}>
{/* <h3>{table2Data?.BrName}</h3> */}
<div
style={{
@ -3461,9 +3465,10 @@ const Printstyle8 = ({
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '10px', fontWeight: 600 }}>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
<div style={{ fontSize: "10px" }}>
{GlobaldummyData ? formattedDate : Date1}
@ -3494,95 +3499,95 @@ const Printstyle8 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)
: SLNO && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)}
{GlobaldummyData
? GlobalItem && (
<th style={{...tableHeaderStyle, textAlign: 'left' }}>Dis</th>
<th style={{ ...tableHeaderStyle, textAlign: 'left' }}>Dis</th>
)
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
: Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3593,17 +3598,17 @@ const Printstyle8 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3686,9 +3691,9 @@ const Printstyle8 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3732,9 +3737,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3767,93 +3772,93 @@ const Printstyle8 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)
: SLNO && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'center' }}>
S.No
</th>
)}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Dis</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Dis</th>
: Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rt
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
(%)
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3864,17 +3869,17 @@ const Printstyle8 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && (
<td style={{ textAlign: 'center' }}>
@ -3963,9 +3968,9 @@ const Printstyle8 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -4009,9 +4014,9 @@ const Printstyle8 = ({
textAlign: 'right',
}}
>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -4024,7 +4029,7 @@ const Printstyle8 = ({
</>
)}
<hr className="PrintStyle8-print-dottline" />
<div style={{ fontSize: '12px',...netAmountStyle }}>
<div style={{ fontSize: '12px', ...netAmountStyle }}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div style={{ width: '40%' }}>Items </div>
<div> : </div>

View File

@ -30,15 +30,15 @@ import {
GlobalprintTax,
GlobalSelectedPrintHeaderColor,
GlobalSelectedPrintHeaderFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
GlobalSelectedTableHeaderColor,
GlobalSelectedTableHeaderFontColor,
GlobalSelectedTableBodyFontColor,
GlobalSelectedTableBodyColor,
GlobalRowType,
GlobalSelectedFooterColor,
GlobalSelectedFooterFontColor,
GlobalSelectedNetAmountColor,
GlobalSelectedNetAmountFontColor,
} from '../../../../Features/ThemeChange/ThemeChange';
import Logo from '../../../../Images/Logo.jpg';
import {
@ -112,6 +112,12 @@ const PrintStyle9 = ({
const GlobalLogo = useSelector(GlobalprintLogo);
const GlobalCredit = useSelector(GlobalprintCredit);
const SettingData = useSelector(PreferenceData);
const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname'
);
const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find(
(setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname'
);
const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom'
)?.[0];
@ -154,18 +160,18 @@ const PrintStyle9 = ({
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
);
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const SelectedHeaderColor = useSelector(GlobalSelectedPrintHeaderColor);
const SelectedHeaderFontColor = useSelector(GlobalSelectedPrintHeaderFontColor);
const SelectedTableHeaderColor = useSelector(GlobalSelectedTableHeaderColor);
const SelectedTableHeaderFontColor = useSelector(GlobalSelectedTableHeaderFontColor);
const SelectedTableBodyColor = useSelector(GlobalSelectedTableBodyColor);
const SelectedTableBodyFontColor = useSelector(GlobalSelectedTableBodyFontColor);
const SelectedRowType = useSelector(GlobalRowType);
const SelectedTableFooterColor = useSelector(GlobalSelectedFooterColor);
const SelectedTableFooterFontColor = useSelector(GlobalSelectedFooterFontColor);
const SelectedNetAmountColor = useSelector(GlobalSelectedNetAmountColor);
const SelectedNetAmountFontColor = useSelector(GlobalSelectedNetAmountFontColor);
let printColors = printDatas?.PrintColors;
const headerColor = printColors?.find(obj => obj.headerColor)?.headerColor;
const tableHeaderColor = printColors?.find(obj => obj.tableHeaderColor)?.tableHeaderColor;
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
@ -377,7 +383,7 @@ const PrintStyle9 = ({
? paginatedChunks[paginatedChunks.length - 1].length
: 0;
const shouldFooterBeOnNewPage = lastChunkRows > (PageSize == 'A5' ? 5 : 10);
const headerStyle = {
const headerStyle = {
backgroundColor: GlobaldummyData
? SelectedHeaderColor
: headerColor?.background,
@ -479,7 +485,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle9-print" style={{...headerStyle}}>
<div className="PrintStyle9-print" style={{ ...headerStyle }}>
<div
style={{
display: 'flex',
@ -651,25 +657,25 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -677,14 +683,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -692,14 +698,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -707,14 +713,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -722,7 +728,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -730,7 +736,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -738,14 +744,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -753,14 +759,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -771,17 +777,17 @@ const PrintStyle9 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -907,9 +913,9 @@ const PrintStyle9 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -943,10 +949,9 @@ const PrintStyle9 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -975,25 +980,25 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && (
<th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
<th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
)
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Qty
</th>
)
: Quantity && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
@ -1001,14 +1006,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalHsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
)
: HsnCode && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
HSN
</th>
@ -1016,14 +1021,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalMRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
)
: MRP && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
MRP
</th>
@ -1031,14 +1036,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalDiscount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
)
: Discount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Dis{' '}
</th>
@ -1046,7 +1051,7 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalTax && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -1054,7 +1059,7 @@ const PrintStyle9 = ({
: Tax &&
table2Data?.OrderType !== 'E' && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Tax %
</th>
@ -1062,14 +1067,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalRate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
)
: Rate && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Rate
</th>
@ -1077,14 +1082,14 @@ const PrintStyle9 = ({
{GlobaldummyData
? GlobalAmount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
)
: Amount && (
<th
style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}
style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}
>
Amt
</th>
@ -1095,17 +1100,17 @@ const PrintStyle9 = ({
{dataChunk?.map((item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && (
@ -1179,9 +1184,9 @@ const PrintStyle9 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -1215,10 +1220,9 @@ const PrintStyle9 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue ||
0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -2338,7 +2342,7 @@ const PrintStyle9 = ({
<hr className="PrintStyle9-print-dottline" />
<div
style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}
style={{ display: 'flex', justifyContent: 'space-between', ...netAmountStyle }}
>
<div style={{ fontWeight: '700' }}>Net Amount:</div>
<div style={{ fontWeight: '700', marginRight: '0.5rem' }}>
@ -3212,7 +3216,7 @@ const PrintStyle9 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
''
) : (
<div className="PrintStyle9-print" style={{...headerStyle}}>
<div className="PrintStyle9-print" style={{ ...headerStyle }}>
<div
style={{
display: 'flex',
@ -3338,10 +3342,11 @@ const PrintStyle9 = ({
table2Data?.FYStatus
)}
</div>
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', fontWeight: 600 }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
</div>}
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontWeight: '600' }}>
{' '}
Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
</div>}
<div style={{ fontSize: '12px', fontWeight: '400' }}>
{' '}
{GlobaldummyData ? formattedDate : Date1}{' '}
@ -3389,89 +3394,89 @@ const PrintStyle9 = ({
<tr>
{GlobaldummyData
? GlobalSlNo && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'left' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'left' }}>
S.No
</th>
)
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{ ...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3482,17 +3487,17 @@ const PrintStyle9 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3583,11 +3588,12 @@ const PrintStyle9 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
? GlobalTax && (
<td style={{ textAlign: 'right' }}>
@ -3619,9 +3625,9 @@ const PrintStyle9 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3650,86 +3656,86 @@ const PrintStyle9 = ({
<thead>
<tr>
{GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle, width: '10px' }}>S.No</th>}
? GlobalSlNo && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>
: SLNO && <th style={{ ...tableHeaderStyle, width: '10px' }}>S.No</th>}
{GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{...tableHeaderStyle, width: '10px' }}>Item</th>}
? GlobalItem && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>
: Item && <th style={{ ...tableHeaderStyle, width: '10px' }}>Item</th>}
{GlobaldummyData
? GlobalQuantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Qty
</th>
)
: Quantity && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
{WeightasKg ? 'Qty/Kg' : 'Qty'}
</th>
)}
{GlobaldummyData
? GlobalHsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)
: HsnCode && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
HSN
</th>
)}
{GlobaldummyData
? GlobalMRP && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)
: MRP && (
<th style={{...tableHeaderStyle,width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
MRP
</th>
)}
{GlobaldummyData
? GlobalDiscount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)
: Discount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Dis{' '}
</th>
)}
{GlobaldummyData
? GlobalTax && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)
: Tax &&
table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Tax %
</th>
)}
{GlobaldummyData
? GlobalRate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)
: Rate && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Rate
</th>
)}
{GlobaldummyData
? GlobalAmount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)
: Amount && (
<th style={{...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
<th style={{ ...tableHeaderStyle, width: '10px', textAlign: 'right' }}>
Amt
</th>
)}
@ -3740,17 +3746,17 @@ const PrintStyle9 = ({
(item, index) => {
return (
<tr key={index}
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
style={
index % 2 !== 1 && rowtypeStyle === "even"
? {
...tableBodyStyle
}
: index % 2 === 1 && rowtypeStyle === "odd"
? {
...tableBodyStyle
}
: {}
}>
{GlobaldummyData
? GlobalSlNo && <td>{index + 1}</td>
: SLNO && <td>{index + 1}</td>}
@ -3818,9 +3824,9 @@ const PrintStyle9 = ({
)
: Discount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.OfferAmt || 0
: item?.OfferValue || 0}
{item?.Type !== 'C'
? (item?.OfferAmt || item?.DiscountAmt || 0)
: (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
{GlobaldummyData
@ -3854,9 +3860,9 @@ const PrintStyle9 = ({
)
: Amount && (
<td style={{ textAlign: 'right' }}>
{item?.Type != 'C'
? item?.TotalAmt - item?.OfferAmt || 0
: item?.TotalAmt - item?.OfferValue || 0}
{item?.Type !== 'C'
? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0)
: item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
</td>
)}
</tr>
@ -3961,7 +3967,7 @@ const PrintStyle9 = ({
<hr className="PrintStyle9-print-dottline" />
<div style={{ display: 'flex', justifyContent: 'space-between',...netAmountStyle }}>
<div style={{ display: 'flex', justifyContent: 'space-between', ...netAmountStyle }}>
<div style={{ fontWeight: '700' }}>Net Amount:</div>
<div style={{ fontWeight: '700', marginRight: '0.5rem' }}>
{GlobaldummyData