Update src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx
This commit is contained in:
parent
ee5a7f723b
commit
423a82c646
|
|
@ -60,6 +60,7 @@ const PrintA4Style11 = ({
|
|||
printDatas,
|
||||
sportsAppPreference,
|
||||
MembershipApplied = null,
|
||||
SalesModePref,
|
||||
}) => {
|
||||
const GlobalthemeFormatr = useSelector(GlobalthemeFormat);
|
||||
const GlobalSignature = useSelector(GlobalprintSignature);
|
||||
|
|
@ -111,7 +112,8 @@ const PrintA4Style11 = ({
|
|||
)?.SettingValue === 'Y';
|
||||
const estimateTitle =
|
||||
SettingData?.[0]?.SettingDtlDetails?.find(
|
||||
(setting) => setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
|
||||
(setting) =>
|
||||
setting?.SettingIdName?.toLowerCase() === 'estimatetitle'
|
||||
)?.SettingValue === 'Y';
|
||||
const currentDate = new Date();
|
||||
console.log(OrderDetailGST, 'OrderDetailGST');
|
||||
|
|
@ -144,7 +146,7 @@ const PrintA4Style11 = ({
|
|||
let PaymentStatusSuccess = PaymentStatus?.filter(
|
||||
(ps) => ps.PaymentStatus === 'S'
|
||||
);
|
||||
const isEditedBill = PaymentStatus?.some((payment) => {
|
||||
const isEditedBill = PaymentStatus?.some(payment => {
|
||||
const type = payment?.AdjustmentType?.toLowerCase();
|
||||
return (
|
||||
(type === 'extra' || type === 'refund') &&
|
||||
|
|
@ -154,7 +156,7 @@ const PrintA4Style11 = ({
|
|||
});
|
||||
const lastTransaction = PaymentStatus?.find(
|
||||
(ps) => ps.PaymentStatus === 'S' && ps?.LastOrderTran === 'Y'
|
||||
);
|
||||
)
|
||||
|
||||
const TakeawayTotal = TakeawayData?.reduce(
|
||||
(accumulator, currentValue) => accumulator + currentValue.TotalAmt,
|
||||
|
|
@ -401,9 +403,7 @@ const PrintA4Style11 = ({
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!estimatePrintHeader &&
|
||||
table2Data?.OrderType === 'E' &&
|
||||
estimateTitle && (
|
||||
{!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && (
|
||||
<div
|
||||
style={{
|
||||
textTransform: 'uppercase',
|
||||
|
|
@ -430,6 +430,10 @@ const PrintA4Style11 = ({
|
|||
table2Data?.OrderId,
|
||||
table2Data?.FYStatus
|
||||
)}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
{GlobaldummyData && '685'}
|
||||
</div>
|
||||
<div style={{ textAlign: 'center', width: '24vw' }}>
|
||||
|
|
@ -449,10 +453,16 @@ const PrintA4Style11 = ({
|
|||
justifyContent: 'space-between',
|
||||
padding: '0rem 1rem',
|
||||
fontSize: 'clamp(0.7rem, 2.5vw, 0.8rem)',
|
||||
flexDirection: 'column',
|
||||
textAlign: 'left'
|
||||
}}
|
||||
>
|
||||
{' '}
|
||||
<div>{Date1}</div>{' '}
|
||||
{SalesModePref?.SettingValue == 'Y' && <div style={{ fontSize: '13px', margin: '0rem 0.5rem', fontWeight: 600 }}>
|
||||
{' '}
|
||||
Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '}
|
||||
</div>}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -693,93 +703,79 @@ const PrintA4Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.name}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.name}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
(pkg) => pkg.ProdId === item.ProdId
|
||||
).length > 0 ? (
|
||||
<div>
|
||||
{PackageDetails?.filter(
|
||||
(pkg) =>
|
||||
pkg.ProdId === item.ProdId
|
||||
)?.map((item, index) => (
|
||||
<span
|
||||
key={index}
|
||||
style={{ display: 'block' }}
|
||||
>
|
||||
{item.ParcelCount} PCS{' '}
|
||||
{item.ParcelQty} PACK (
|
||||
{item.ParcelType})
|
||||
{PackageDetails
|
||||
?.filter((pkg) => pkg.ProdId === item.ProdId)
|
||||
?.map((pkg, index) => (
|
||||
<span key={index} style={{ display: "block" }}>
|
||||
{pkg.ParcelCount} PCS {pkg.ParcelQty} PACK ({pkg.ParcelType})
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
UomPrint?.SettingValue ===
|
||||
'Y' && (
|
||||
UomPrint?.SettingValue === 'Y' && (
|
||||
<div>
|
||||
(
|
||||
{item?.Size
|
||||
? item?.Size
|
||||
: '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
{' '}
|
||||
{item?.BrandName !== null
|
||||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
items.SerialNumber ==
|
||||
'' ||
|
||||
items.SerialNumber == null
|
||||
)
|
||||
)?.map((a) => {
|
||||
return (
|
||||
<div>{a.SerialNumber}</div>
|
||||
);
|
||||
})
|
||||
: ''}{' '}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 !== '' ||
|
||||
item1.IMEI2 !== ''
|
||||
)?.map((item2) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return (
|
||||
<div>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Serial Numbers */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={`serial-${index}`}>
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
</div>
|
||||
))}
|
||||
|
||||
{/* IMEI */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => {
|
||||
const imei1 = id?.IMEI1 || "";
|
||||
const imei2 = id?.IMEI2 || "";
|
||||
|
||||
return (
|
||||
(imei1 || imei2) && (
|
||||
<div key={`imei-${index}`}>
|
||||
{[imei1, imei2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
})}
|
||||
|
||||
{/* Description */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) &&
|
||||
id?.Description && (
|
||||
<div key={`desc-${index}`}>
|
||||
{id.Description}
|
||||
</div>
|
||||
)
|
||||
))}
|
||||
|
||||
</td>
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
|
|
@ -962,44 +958,20 @@ const PrintA4Style11 = ({
|
|||
</div>
|
||||
</div>
|
||||
{isEditedBill && lastTransaction && (
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
marginTop: '2px',
|
||||
paddingTop: '2px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
borderTop: '1px dashed #000',
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
width: '100%', marginTop: '2px',
|
||||
paddingTop: '2px', display: 'flex', justifyContent: 'center', alignItems: 'flex-start',
|
||||
flexDirection: 'column', borderTop: '1px dashed #000'
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
width: '100%',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
color: '#000',
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Bill Gross Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(
|
||||
lastTransaction?.BeforeAdjustment ||
|
||||
0
|
||||
).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600, }}>Bill Gross Amount</span>
|
||||
<strong>{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -1007,47 +979,21 @@ const PrintA4Style11 = ({
|
|||
justifyContent: 'space-between',
|
||||
fontWeight: 600,
|
||||
color:
|
||||
lastTransaction?.AdjustmentType ===
|
||||
'REFUND'
|
||||
lastTransaction?.AdjustmentType === 'REFUND'
|
||||
? '#000'
|
||||
: '#000',
|
||||
}}
|
||||
>
|
||||
<span>{'Adjustment Amount'}</span>
|
||||
<span>
|
||||
{lastTransaction?.AdjustmentType ===
|
||||
'REFUND'
|
||||
? '-'
|
||||
: '+'}
|
||||
{Math.abs(
|
||||
(lastTransaction?.BeforeAdjustment ??
|
||||
0) -
|
||||
(lastTransaction?.AfterAdjustment ??
|
||||
0)
|
||||
).toFixed(2)}
|
||||
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
|
||||
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '4px',
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
color: '#000',
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Net Bill Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(
|
||||
lastTransaction?.AfterAdjustment ||
|
||||
0
|
||||
).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '4px' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>Net Bill Amount</span>
|
||||
<strong>{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1815,68 +1761,58 @@ const PrintA4Style11 = ({
|
|||
{chunkIndex * chunkSize + index + 1}
|
||||
</td>
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalItem && <td>{item?.ProdName}</td>
|
||||
: Item == true && (
|
||||
{GlobaldummyData ? (
|
||||
GlobalItem && <td>{item?.ProdName}</td>
|
||||
) : (
|
||||
Item && (
|
||||
<td
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
}}
|
||||
>
|
||||
{/* Product Name */}
|
||||
<div>{item?.ProdName}</div>
|
||||
|
||||
{/* Size + UOM */}
|
||||
{UomPrint?.SettingValue === 'Y' && (
|
||||
<div>
|
||||
({item?.Size ? item?.Size : '1'}{' '}
|
||||
{item?.SinglePc == 'Y'
|
||||
? 'PCS'
|
||||
: item?.Type != 'C'
|
||||
({item?.Size || "1"}{" "}
|
||||
{item?.SinglePc === "Y"
|
||||
? "PCS"
|
||||
: item?.Type !== "C"
|
||||
? item?.UomName
|
||||
: 'COMBO'}
|
||||
: "COMBO"}
|
||||
)
|
||||
</div>
|
||||
)}
|
||||
{' '}
|
||||
{item?.BrandName !== null
|
||||
? item?.BrandName
|
||||
: ''}
|
||||
|
||||
{item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls?.filter(
|
||||
(items) =>
|
||||
!(
|
||||
items.SerialNumber ==
|
||||
'' ||
|
||||
items.SerialNumber == null
|
||||
)
|
||||
)?.map((a) => {
|
||||
return (
|
||||
<div>{a.SerialNumber}</div>
|
||||
);
|
||||
})
|
||||
: ''}{' '}
|
||||
{item?.ProductIdentifierDtls
|
||||
?.length > 0
|
||||
? item?.ProductIdentifierDtls.filter(
|
||||
(item1) =>
|
||||
item1.IMEI1 !== '' ||
|
||||
item1.IMEI2 !== ''
|
||||
)?.map((item2) => {
|
||||
const imei1 =
|
||||
item2.IMEI1 || '';
|
||||
const imei2 =
|
||||
item2.IMEI2 || '';
|
||||
return (
|
||||
|
||||
{/* Brand */}
|
||||
{item?.BrandName && <div>{item.BrandName}</div>}
|
||||
|
||||
{/* Identifiers */}
|
||||
{item?.ProductIdentifierDtls?.map((id, index) => (
|
||||
<div key={index}>
|
||||
|
||||
{/* Serial Number */}
|
||||
{id?.SerialNumber && <div>{id.SerialNumber}</div>}
|
||||
|
||||
{/* IMEI */}
|
||||
{(id?.IMEI1 || id?.IMEI2) && (
|
||||
<div>
|
||||
{[imei1, imei2]
|
||||
.filter(Boolean)
|
||||
.join(',')}
|
||||
{[id.IMEI1, id.IMEI2].filter(Boolean).join(",")}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
: ''}
|
||||
)}
|
||||
|
||||
{/* Description */}
|
||||
{(id?.SerialNumber || id?.IMEI1 || id?.IMEI2) && id?.Description && (
|
||||
<div>{id.Description}</div>
|
||||
)}
|
||||
|
||||
</div>
|
||||
))}
|
||||
</td>
|
||||
)
|
||||
)}
|
||||
{GlobaldummyData
|
||||
? GlobalHsnCode && (
|
||||
|
|
@ -2058,44 +1994,20 @@ const PrintA4Style11 = ({
|
|||
</div>
|
||||
</div>
|
||||
{isEditedBill && lastTransaction && (
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
marginTop: '2px',
|
||||
paddingTop: '2px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
borderTop: '1px dashed #000',
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
width: '100%', marginTop: '2px',
|
||||
paddingTop: '2px', display: 'flex', justifyContent: 'center', alignItems: 'flex-start',
|
||||
flexDirection: 'column', borderTop: '1px dashed #000'
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
width: '100%',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
color: '#000',
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Bill Gross Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(
|
||||
lastTransaction?.BeforeAdjustment ||
|
||||
0
|
||||
).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600, }}>Bill Gross Amount</span>
|
||||
<strong>{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -2103,47 +2015,21 @@ const PrintA4Style11 = ({
|
|||
justifyContent: 'space-between',
|
||||
fontWeight: 600,
|
||||
color:
|
||||
lastTransaction?.AdjustmentType ===
|
||||
'REFUND'
|
||||
lastTransaction?.AdjustmentType === 'REFUND'
|
||||
? '#000'
|
||||
: '#000',
|
||||
}}
|
||||
>
|
||||
<span>{'Adjustment Amount'}</span>
|
||||
<span>
|
||||
{lastTransaction?.AdjustmentType ===
|
||||
'REFUND'
|
||||
? '-'
|
||||
: '+'}
|
||||
{Math.abs(
|
||||
(lastTransaction?.BeforeAdjustment ??
|
||||
0) -
|
||||
(lastTransaction?.AfterAdjustment ??
|
||||
0)
|
||||
).toFixed(2)}
|
||||
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
|
||||
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '4px',
|
||||
}}
|
||||
>
|
||||
<span
|
||||
style={{
|
||||
color: '#000',
|
||||
fontWeight: 600,
|
||||
}}
|
||||
>
|
||||
Net Bill Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(
|
||||
lastTransaction?.AfterAdjustment ||
|
||||
0
|
||||
).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '4px' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>Net Bill Amount</span>
|
||||
<strong>{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -2664,7 +2550,7 @@ const PrintA4Style11 = ({
|
|||
)}
|
||||
</div>
|
||||
|
||||
{PaymentStatusSuccess?.length > 1 && !isEditedBill && (
|
||||
{(PaymentStatusSuccess?.length > 1 && !isEditedBill) && (
|
||||
<>
|
||||
{/* <p>Split Payment:</p> */}
|
||||
{Object.keys(aggregatedPayments).map((paymentType) => (
|
||||
|
|
@ -2762,38 +2648,20 @@ const PrintA4Style11 = ({
|
|||
</div>
|
||||
</div>
|
||||
{isEditedBill && lastTransaction && (
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
marginTop: '2px',
|
||||
paddingTop: '2px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
borderTop: '1px dashed #000',
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
width: '100%', marginTop: '2px',
|
||||
paddingTop: '2px', display: 'flex', justifyContent: 'center', alignItems: 'flex-start',
|
||||
flexDirection: 'column', borderTop: '1px dashed #000'
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
width: '100%',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>
|
||||
Bill Gross Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(lastTransaction?.BeforeAdjustment || 0).toFixed(
|
||||
2
|
||||
)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600, }}>Bill Gross Amount</span>
|
||||
<strong>{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -2808,30 +2676,14 @@ const PrintA4Style11 = ({
|
|||
>
|
||||
<span>{'Adjustment Amount'}</span>
|
||||
<span>
|
||||
{lastTransaction?.AdjustmentType === 'REFUND'
|
||||
? '-'
|
||||
: '+'}
|
||||
{Math.abs(
|
||||
(lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)
|
||||
).toFixed(2)}
|
||||
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
|
||||
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '4px',
|
||||
}}
|
||||
>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>
|
||||
Net Bill Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(lastTransaction?.AfterAdjustment || 0).toFixed(
|
||||
2
|
||||
)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '4px' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>Net Bill Amount</span>
|
||||
<strong>{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -3363,36 +3215,20 @@ const PrintA4Style11 = ({
|
|||
</div>
|
||||
</div>
|
||||
{isEditedBill && lastTransaction && (
|
||||
<div
|
||||
style={{
|
||||
width: '100%',
|
||||
marginTop: '2px',
|
||||
paddingTop: '2px',
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
flexDirection: 'column',
|
||||
borderTop: '1px dashed #000',
|
||||
}}
|
||||
>
|
||||
<div style={{
|
||||
width: '100%', marginTop: '2px',
|
||||
paddingTop: '2px', display: 'flex', justifyContent: 'center', alignItems: 'flex-start',
|
||||
flexDirection: 'column', borderTop: '1px dashed #000'
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
width: '100%',
|
||||
width: '100%'
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
}}
|
||||
>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>
|
||||
Bill Gross Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600, }}>Bill Gross Amount</span>
|
||||
<strong>{(lastTransaction?.BeforeAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -3407,28 +3243,14 @@ const PrintA4Style11 = ({
|
|||
>
|
||||
<span>{'Adjustment Amount'}</span>
|
||||
<span>
|
||||
{lastTransaction?.AdjustmentType === 'REFUND'
|
||||
? '-'
|
||||
: '+'}
|
||||
{Math.abs(
|
||||
(lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)
|
||||
).toFixed(2)}
|
||||
{lastTransaction?.AdjustmentType === 'REFUND' ? '-' : '+'}
|
||||
{Math.abs((lastTransaction?.BeforeAdjustment ?? 0) -
|
||||
(lastTransaction?.AfterAdjustment ?? 0)).toFixed(2)}
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
marginTop: '4px',
|
||||
}}
|
||||
>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>
|
||||
Net Bill Amount
|
||||
</span>
|
||||
<strong>
|
||||
{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}
|
||||
</strong>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', marginTop: '4px' }}>
|
||||
<span style={{ color: '#000', fontWeight: 600 }}>Net Bill Amount</span>
|
||||
<strong>{(lastTransaction?.AfterAdjustment || 0).toFixed(2)}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue