This commit is contained in:
Tamilselvan 2026-03-05 14:04:20 +05:30
parent a123ddfe5e
commit 0027bb1f49
1 changed files with 151 additions and 145 deletions

View File

@ -130,6 +130,12 @@ const Printstyle12 = ({
const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor; const tableBodyColor = printColors?.find(obj => obj.tableBodyColor)?.tableBodyColor;
const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor; const footerColor = printColors?.find(obj => obj.footerColor)?.footerColor;
const netAmtColor = printColors?.find(obj => obj.netAmtColor)?.netAmtColor; 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( const UomPrint = SettingData?.[0]?.SettingDtlDetails?.filter(
(i) => i.SettingIdName === 'PrintUom' (i) => i.SettingIdName === 'PrintUom'
)?.[0]; )?.[0];
@ -810,67 +816,67 @@ const Printstyle12 = ({
<thead> <thead>
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th> ? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>} : SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th> ? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>} : Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
) )
: Quantity && ( : Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '} {' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'} {WeightasKg ? 'Qty/Kg' : 'Qty'}
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalMRP && ( ? GlobalMRP && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
) )
: MRP && ( : MRP && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalRate && ( ? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
) )
: Rate && ( : Rate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalHsnCode && ( ? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
) )
: HsnCode && ( : HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalDiscount && ( ? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
) )
: Discount && ( : Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalTax && ( ? GlobalTax && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%) Tax (%)
</th> </th>
) )
: Tax && : Tax &&
table2Data?.OrderType !== 'E' && ( table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%) Tax (%)
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalAmount && ( ? GlobalAmount && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
) )
: Amount && ( : Amount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)} )}
</tr> </tr>
</thead> </thead>
@ -1107,67 +1113,67 @@ const Printstyle12 = ({
<thead> <thead>
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle,}}>S.No</th> ? GlobalSlNo && <th style={{ ...tableHeaderStyle, }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle,}}>S.No</th>} : SLNO && <th style={{ ...tableHeaderStyle, }}>S.No</th>}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle,}}>Description</th> ? GlobalItem && <th style={{ ...tableHeaderStyle, }}>Description</th>
: Item && <th style={{...tableHeaderStyle,}}>Des</th>} : Item && <th style={{ ...tableHeaderStyle, }}>Des</th>}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
) )
: Quantity && ( : Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '} {' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'} {WeightasKg ? 'Qty/Kg' : 'Qty'}
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalMRP && ( ? GlobalMRP && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>MRP</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
) )
: MRP && ( : MRP && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>MRP</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>MRP</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalRate && ( ? GlobalRate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
) )
: Rate && ( : Rate && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Rate</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Rate</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalHsnCode && ( ? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
) )
: HsnCode && ( : HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalDiscount && ( ? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
) )
: Discount && ( : Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalTax && ( ? GlobalTax && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%) Tax (%)
</th> </th>
) )
: Tax && : Tax &&
table2Data?.OrderType !== 'E' && ( table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
Tax (%) Tax (%)
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalAmount && ( ? GlobalAmount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Amt</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
) )
: Amount && ( : Amount && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Amt</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Amt</th>
)} )}
</tr> </tr>
</thead> </thead>
@ -3290,7 +3296,7 @@ const Printstyle12 = ({
{!estimatePrintHeader && table2Data?.OrderType === 'E' ? ( {!estimatePrintHeader && table2Data?.OrderType === 'E' ? (
'' ''
) : ( ) : (
<div className="PrintStyle12-firstDiv" style={{...headerStyle}}> <div className="PrintStyle12-firstDiv" style={{ ...headerStyle }}>
{/* <h3>{table2Data?.BrName}</h3> */} {/* <h3>{table2Data?.BrName}</h3> */}
<div style={{ display: 'flex', flexDirection: 'column' }}> <div style={{ display: 'flex', flexDirection: 'column' }}>
<hr <hr
@ -3466,58 +3472,58 @@ const Printstyle12 = ({
<thead> <thead>
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th> ? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>} : SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th> ? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>} : Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
) )
: Quantity && ( : Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '} {' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'} {WeightasKg ? 'Qty/Kg' : 'Qty'}
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalMRP && ( ? 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 {GlobaldummyData
? GlobalRate && ( ? 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 {GlobaldummyData
? GlobalHsnCode && ( ? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
) )
: HsnCode && ( : HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalDiscount && ( ? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
) )
: Discount && ( : Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalTax && ( ? GlobalTax && (
<th style={{ ...tableHeaderStyle,textAlign: 'right' }}>Tax (%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
) )
: Tax && : Tax &&
table2Data?.OrderType !== 'E' && ( table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalAmount && ( ? 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> </tr>
</thead> </thead>
<tbody> <tbody>
@ -3774,44 +3780,44 @@ const Printstyle12 = ({
<thead> <thead>
<tr> <tr>
{GlobaldummyData {GlobaldummyData
? GlobalSlNo && <th style={{...tableHeaderStyle}}>S.No</th> ? GlobalSlNo && <th style={{ ...tableHeaderStyle }}>S.No</th>
: SLNO && <th style={{...tableHeaderStyle}}>S.No</th>} : SLNO && <th style={{ ...tableHeaderStyle }}>S.No</th>}
{GlobaldummyData {GlobaldummyData
? GlobalItem && <th style={{...tableHeaderStyle}}>Description</th> ? GlobalItem && <th style={{ ...tableHeaderStyle }}>Description</th>
: Item && <th style={{...tableHeaderStyle}}>Des</th>} : Item && <th style={{ ...tableHeaderStyle }}>Des</th>}
{GlobaldummyData {GlobaldummyData
? GlobalQuantity && ( ? GlobalQuantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Qty</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Qty</th>
) )
: Quantity && ( : Quantity && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>
{' '} {' '}
{WeightasKg ? 'Qty/Kg' : 'Qty'} {WeightasKg ? 'Qty/Kg' : 'Qty'}
</th> </th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalMRP && ( ? 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 {GlobaldummyData
? GlobalRate && ( ? 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 {GlobaldummyData
? GlobalHsnCode && ( ? GlobalHsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
) )
: HsnCode && ( : HsnCode && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>HSN</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>HSN</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalDiscount && ( ? GlobalDiscount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
) )
: Discount && ( : Discount && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>(%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>(%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalTax && ( ? GlobalTax && (
@ -3819,13 +3825,13 @@ const Printstyle12 = ({
) )
: Tax && : Tax &&
table2Data?.OrderType !== 'E' && ( table2Data?.OrderType !== 'E' && (
<th style={{...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th> <th style={{ ...tableHeaderStyle, textAlign: 'right' }}>Tax (%)</th>
)} )}
{GlobaldummyData {GlobaldummyData
? GlobalAmount && ( ? 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> </tr>
</thead> </thead>
<tbody> <tbody>
@ -4094,7 +4100,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 style={{ width: '45%', fontWeight: '600' }}>Amount</div>
<div> : </div> <div> : </div>
<div <div