svtechrequirement

This commit is contained in:
Tamilselvan 2026-03-19 19:09:28 +05:30
parent 51144c9767
commit c4da1d59e3
2 changed files with 34 additions and 24 deletions

View File

@ -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 ||
@ -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
@ -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' }}

View File

@ -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,