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