svtechrequirement
This commit is contained in:
parent
51144c9767
commit
c4da1d59e3
|
|
@ -561,7 +561,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
PrintType: item.PrintType,
|
PrintType: item.PrintType,
|
||||||
PrintHdrName: item.PrintHdrName,
|
PrintHdrName: item.PrintHdrName,
|
||||||
PrintDocLabel: item.PrintDocLabel,
|
PrintDocLabel: item.PrintDocLabel,
|
||||||
PrintTotalLabel:item.PrintTotalLabel,
|
PrintTotalLabel: item.PrintTotalLabel,
|
||||||
// legacy fields are filled from the array so older code still works
|
// legacy fields are filled from the array so older code still works
|
||||||
PrintHdrColor:
|
PrintHdrColor:
|
||||||
item.PrintHdrColor ||
|
item.PrintHdrColor ||
|
||||||
|
|
@ -726,7 +726,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
dispatch(changeBillName(PrintHdrName));
|
dispatch(changeBillName(PrintHdrName));
|
||||||
dispatch(changeBillNolabel(PrintDocLabel));
|
dispatch(changeBillNolabel(PrintDocLabel));
|
||||||
dispatch(changetotallabel(PrintTotalLabel));
|
dispatch(changetotallabel(PrintTotalLabel));
|
||||||
|
|
||||||
// derive color objects; prefer the legacy fields but fall back to the PrintColors array
|
// derive color objects; prefer the legacy fields but fall back to the PrintColors array
|
||||||
const hdr = getColor(PrintColors, 'headerColor');
|
const hdr = getColor(PrintColors, 'headerColor');
|
||||||
const tblHdr = getColor(PrintColors, 'tableHeaderColor');
|
const tblHdr = getColor(PrintColors, 'tableHeaderColor');
|
||||||
|
|
@ -1059,7 +1059,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
PageSize: PageSize,
|
PageSize: PageSize,
|
||||||
PrintHdrName: BillName,
|
PrintHdrName: BillName,
|
||||||
PrintDocLabel: BillNolabel,
|
PrintDocLabel: BillNolabel,
|
||||||
PrintTotalLabel:totalLabel,
|
PrintTotalLabel: totalLabel,
|
||||||
PrintType: PrintType ? 'S' : 'C',
|
PrintType: PrintType ? 'S' : 'C',
|
||||||
PrintTypeId: segmentValue,
|
PrintTypeId: segmentValue,
|
||||||
// Header color (background) and font
|
// Header color (background) and font
|
||||||
|
|
@ -1140,7 +1140,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const onfinish = async (values) => {
|
const onfinish = async (values) => {
|
||||||
|
|
||||||
if (!templateEdit && sizeOptionData?.length == 0) {
|
if (!templateEdit && sizeOptionData?.length == 0) {
|
||||||
setMessageType('error');
|
setMessageType('error');
|
||||||
setMessageData('Please Setup the Screen');
|
setMessageData('Please Setup the Screen');
|
||||||
|
|
@ -1207,7 +1207,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}),
|
...(item?.PrintHdrName ? { PrintHdrName: item.PrintHdrName } : {}),
|
||||||
...(item?.PrintDocLabel ? { PrintDocLabel: item.PrintDocLabel } : {}),
|
...(item?.PrintDocLabel ? { PrintDocLabel: item.PrintDocLabel } : {}),
|
||||||
...(item?.PrintTotalLabel ? { PrintTotalLabel: item.PrintTotalLabel } : {}),
|
...(item?.PrintTotalLabel ? { PrintTotalLabel: item.PrintTotalLabel } : {}),
|
||||||
|
|
||||||
...(item?.Signature ? { Signature: item?.Signature } : {}),
|
...(item?.Signature ? { Signature: item?.Signature } : {}),
|
||||||
PrintType: item?.PrintType,
|
PrintType: item?.PrintType,
|
||||||
})
|
})
|
||||||
|
|
@ -1661,6 +1661,7 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
''
|
''
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Checkbox.Group
|
<Checkbox.Group
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|
@ -1670,7 +1671,15 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
>
|
>
|
||||||
<Row>
|
<Row>
|
||||||
{sizeCheckList
|
{sizeCheckList
|
||||||
?.filter((item) => item.ConfigName)
|
?.filter((item) => {
|
||||||
|
if (item.ConfigName?.toLowerCase?.() === 'rate with tax') {
|
||||||
|
const rateConfigId = sizeCheckList?.find(
|
||||||
|
(opt) => opt.ConfigName?.toLowerCase?.() === 'rate'
|
||||||
|
)?.ConfigId;
|
||||||
|
return selectedSizeCheckedValues?.includes(rateConfigId);
|
||||||
|
}
|
||||||
|
return Boolean(item.ConfigName);
|
||||||
|
})
|
||||||
?.map((value, key) => (
|
?.map((value, key) => (
|
||||||
<Checkbox
|
<Checkbox
|
||||||
style={{ padding: '12px' }}
|
style={{ padding: '12px' }}
|
||||||
|
|
@ -1700,22 +1709,22 @@ const SelectionComponent = forwardRef((props, ref) => {
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div style={{ marginTop: '1rem' }}>
|
<div style={{ marginTop: '1rem' }}>
|
||||||
<Title level={5} style={{ marginBottom: 12 }}>
|
<Title level={5} style={{ marginBottom: 12 }}>
|
||||||
BillName
|
BillName
|
||||||
</Title>
|
</Title>
|
||||||
<InputField
|
<InputField
|
||||||
isOnChange={BillName}
|
isOnChange={BillName}
|
||||||
label={<label>Bill Name</label>}
|
label={<label>Bill Name</label>}
|
||||||
value={BillName}
|
value={BillName}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setBillName(e.target.value);
|
setBillName(e.target.value);
|
||||||
dispatch(changeBillName(e.target.value));
|
dispatch(changeBillName(e.target.value));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{isbillnoLabel &&
|
{isbillnoLabel &&
|
||||||
<div style={{ marginTop: '1rem' }}>
|
<div style={{ marginTop: '1rem' }}>
|
||||||
<Title level={5} style={{ marginBottom: 12 }}>
|
<Title level={5} style={{ marginBottom: 12 }}>
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,9 @@ const TaxInvoice = ({
|
||||||
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 FieldDetails = useSelector(GloabalFieldDetails);
|
const FieldDetails = useSelector(GloabalFieldDetails);
|
||||||
console.log(FieldDetails,"FieldDetails")
|
console.log(FieldDetails, "FieldDetails")
|
||||||
const Discount = FieldDetails?.['Discount'];
|
const Discount = FieldDetails?.['Discount'];
|
||||||
|
const rate_with_tax = FieldDetails?.['Rate with Tax'];
|
||||||
console.log(Discount, "Discount")
|
console.log(Discount, "Discount")
|
||||||
// Function to convert number to words
|
// Function to convert number to words
|
||||||
const numberToWords = (num) => {
|
const numberToWords = (num) => {
|
||||||
|
|
@ -984,7 +985,7 @@ const TaxInvoice = ({
|
||||||
>
|
>
|
||||||
{Number(
|
{Number(
|
||||||
table2Data?.OrderType !== 'E'
|
table2Data?.OrderType !== 'E'
|
||||||
? item.Rate - (item?.SinglePc === 'Y' ? (item?.TaxAmt / item?.SalesQty) : item.ProdTaxAmt)
|
? rate_with_tax ? item.Rate : item.Rate - (item?.SinglePc === 'Y' ? (item?.TaxAmt / item?.SalesQty) : item.ProdTaxAmt)
|
||||||
: item.Rate || 0
|
: item.Rate || 0
|
||||||
).toLocaleString('en-IN', {
|
).toLocaleString('en-IN', {
|
||||||
minimumFractionDigits: 2,
|
minimumFractionDigits: 2,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue