diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx index 51b1605..9e6d8ae 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/BSBillingEditQuantity/BSBillingEditQuantity.jsx @@ -3156,10 +3156,10 @@ const BSBillingEditQuantity = (props) => { const updatedProduct = { ...editedProduct, OrderQty: fixedQty, - OrderRate: newPrice > 0 ? newPrice : editedProduct?.OrderRate, + OrderRate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate, ...calculateTaxAmounts({ qty: qty, - rate: newPrice > 0 ? newPrice : editedProduct?.OrderRate, + rate: editedPrice > 0 ? editedPrice : editedProduct?.OrderRate, taxPercentage: editedProduct?.TaxPercentage, type: editedProduct?.Type, product: editedProduct, @@ -3167,7 +3167,7 @@ const BSBillingEditQuantity = (props) => { PackageDtl: PackageDtl, // ✅ FIXED: Proper conditional property assignment ...(offerApply && { - Offer: qty * (newPrice > 0 ? newPrice : editedProduct?.OrderRate), + Offer: qty * (editedPrice > 0 ? editedPrice : editedProduct?.OrderRate), }), ...( !offerApply && itemDiscountPrice > 0 @@ -3291,7 +3291,9 @@ const BSBillingEditQuantity = (props) => { isOfferApply = false, }) => { const { OfferType = null, OfferPrice = 0 } = product; - const totalAmount = qty * rate; + + let totalAmount = qty * rate; + totalAmount = totalAmount - (itemDiscountPrice || 0); const taxAmount = ( (totalAmount * taxPercentage) / (100 + taxPercentage) @@ -3307,7 +3309,7 @@ const BSBillingEditQuantity = (props) => { return { TotalAmt: type === 'C' && OfferPrice > 0 - ? totalAmount - (offerValue || 0) + ? totalAmount - (offerValue || 0) : totalAmount, TaxAmt: parseFloat(taxAmount), WithoutTaxRate: parseFloat(withoutTaxRate), diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx index 7c2505c..785f47e 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/A4Standard.jsx @@ -1556,8 +1556,8 @@ const InvoiceTemplate = ({ }} > {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx index e2b84b3..fda0440 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintA4Style11.jsx @@ -510,9 +510,10 @@ const PrintA4Style11 = ({ table2Data?.OrderId, table2Data?.FYStatus )} - {SalesModePref?.SettingValue == 'Y' &&
+ {SalesModePref?.SettingValue == 'Y' &&
{' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} +
} {GlobaldummyData && '685'}
@@ -963,8 +964,8 @@ const PrintA4Style11 = ({ : Amount == true && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -2022,8 +2023,8 @@ const PrintA4Style11 = ({ : Amount == true && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx index b6e00c3..6c0d041 100644 --- a/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/A4/PrintStyleA5.jsx @@ -935,8 +935,8 @@ const PrintA5Style11 = ({ : Amount == true && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1910,8 +1910,8 @@ const PrintA5Style11 = ({ : Amount == true && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx index b925b6d..6a3cbae 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle1.jsx @@ -1013,8 +1013,8 @@ const PrintStyle1 = ({ : Amount == true && ( {item?.Type !== "C" - ? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0) - : item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)} + ? item?.TotalAmt - (item?.OfferAmt ?? 0) + : item?.TotalAmt - (item?.OfferValue ?? 0)} )} @@ -1251,8 +1251,8 @@ const PrintStyle1 = ({ : Amount == true && ( {item?.Type !== "C" - ? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0) - : item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)} + ? item?.TotalAmt - (item?.OfferAmt ?? 0) + : item?.TotalAmt - (item?.OfferValue ?? 0)} )} @@ -4276,8 +4276,8 @@ const PrintStyle1 = ({ {item?.Type !== "C" - ? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0) - : item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)} + ? item?.TotalAmt - (item?.OfferAmt ?? 0) + : item?.TotalAmt - (item?.OfferValue ?? 0)} )} @@ -4495,8 +4495,8 @@ const PrintStyle1 = ({ : Amount === true && ( {item?.Type !== "C" - ? item?.TotalAmt - (item?.OfferAmt ?? item?.DiscountAmt ?? 0) - : item?.TotalAmt - (item?.OfferValue ?? item?.DiscountAmt ?? 0)} + ? item?.TotalAmt - (item?.OfferAmt ?? 0) + : item?.TotalAmt - (item?.OfferValue ?? 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx index c730ac3..517df0e 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle10.jsx @@ -927,8 +927,8 @@ const PrintStyle10 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1223,8 +1223,8 @@ const PrintStyle10 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3538,8 +3538,8 @@ const PrintStyle10 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3795,8 +3795,8 @@ const PrintStyle10 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx index 9880abb..91f4201 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle11.jsx @@ -563,10 +563,11 @@ const PrintStyle11 = ({ table2Data?.FYStatus )} - {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
} )} {!estimatePrintHeader && table2Data?.OrderType === 'E' && estimateTitle && ( @@ -911,8 +912,8 @@ const PrintStyle11 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1182,8 +1183,8 @@ const PrintStyle11 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3547,8 +3548,8 @@ const PrintStyle11 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3786,8 +3787,8 @@ const PrintStyle11 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx index 36a7fe1..69d2ad1 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle12.jsx @@ -1081,8 +1081,8 @@ const Printstyle12 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1300,8 +1300,8 @@ const Printstyle12 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3746,8 +3746,8 @@ const Printstyle12 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3953,8 +3953,8 @@ const Printstyle12 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx index 6078389..89a80c6 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle2.jsx @@ -948,9 +948,9 @@ const Printstyle2 = ({ style={{ textAlign: 'right' }} > {' '} - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} + {item?.Type !== 'C' + ? (item?.OfferAmt || item?.DiscountAmt || 0) + : (item?.OfferValue || item?.DiscountAmt || 0)} )} {GlobaldummyData @@ -1256,9 +1256,9 @@ const Printstyle2 = ({ style={{ textAlign: 'right' }} > {' '} - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} + {item?.Type !== 'C' + ? (item?.OfferAmt || item?.DiscountAmt || 0) + : (item?.OfferValue || item?.DiscountAmt || 0)} )} {GlobaldummyData @@ -3837,9 +3837,9 @@ const Printstyle2 = ({ style={{ textAlign: 'right' }} > {' '} - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} + {item?.Type !== 'C' + ? (item?.OfferAmt || item?.DiscountAmt || 0) + : (item?.OfferValue || item?.DiscountAmt || 0)} )} {GlobaldummyData diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx index 7ce5a5e..2bd5174 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle3.jsx @@ -206,7 +206,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan if (hasMappedOffer) { - const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type !== 'C' ? (item?.OfferAmt || item?.DiscountAmt || 0) : (item?.OfferValue || item?.DiscountAmt || 0)), 0); + const productTotal = productsData?.reduce((acc, item) => acc + (item?.Type !== 'C' ? (item?.OfferAmt || 0) : (item?.OfferValue || 0)), 0); TotalOfferAmount += productTotal; } else { const Combothere = productsData?.filter(item => item?.Type == "C") @@ -435,7 +435,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan } {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)} {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
- {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
} ))} @@ -481,7 +481,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan ? (item?.OfferAmt || item?.DiscountAmt || 0) : (item?.OfferValue || item?.DiscountAmt || 0)}} {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)} - {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
} + {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
} ))} @@ -1313,11 +1313,11 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan
BILL NO :{GlobaldummyData ? '51' : table2Data?.OrderId && extractLastNumberOrderId(table2Data?.OrderId, table2Data?.FYStatus)}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} -
} +
}
{GlobaldummyData ? formattedDate : Date1}
@@ -1416,7 +1416,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan ? (item?.OfferAmt || item?.DiscountAmt || 0) : (item?.OfferValue || item?.DiscountAmt || 0)}} {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)} - {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
} + {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
} ))} @@ -1463,7 +1463,7 @@ const PrintStyle3 = ({ index, totalQuantityFilter, Date1, CashierName, totalQuan : (item?.OfferValue || item?.DiscountAmt || 0)} } {GlobaldummyData ? GlobalTax &&
{item?.ProdTaxPercentage || 0}
: (Tax == true && table2Data?.OrderType !== 'E') && (
{item?.ProdTaxPercentage || 0}
)} - {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)}
} + {GlobaldummyData ? GlobalAmount &&
{item?.TotalAmt}
: Amount &&
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || 0) : item?.TotalAmt - (item?.OfferValue || 0)}
} ))} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx index 41a31f4..a7e5778 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle4.jsx @@ -567,12 +567,11 @@ const Printstyle4 = ({ >
Dt: {GlobaldummyData ? formattedDate : Date1} - {SalesModePref?.SettingValue == 'Y' && ( -
- {' '} - Name : {table2Data?.SalesMode == 'R' ? 'RT' : 'WS'}{' '} -
- )} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
@@ -946,9 +945,9 @@ const Printstyle4 = ({ {item?.Type !== 'C' ? (item?.TotalAmt || 0) - - (item?.OfferAmt || item?.DiscountAmt || 0) + (item?.OfferAmt || 0) : (item?.TotalAmt || 0) - - (item?.OfferValue || item?.DiscountAmt || 0)} + (item?.OfferValue || 0)} )} @@ -1249,8 +1248,8 @@ const Printstyle4 = ({ {' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3748,8 +3747,8 @@ const Printstyle4 = ({ {' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -4045,8 +4044,8 @@ const Printstyle4 = ({ {' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx index 8564b68..b6424ae 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle5.jsx @@ -556,10 +556,11 @@ const PrintStyle5 = ({ > {' '}
{GlobaldummyData ? formattedDate : Date1} - {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
{' '}
@@ -990,8 +991,8 @@ const PrintStyle5 = ({ > {' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)}
)}
@@ -1313,8 +1314,8 @@ const PrintStyle5 = ({ > {' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3304,8 +3305,8 @@ const PrintStyle5 = ({
{' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)}
)} @@ -3595,8 +3596,8 @@ const PrintStyle5 = ({
{' '} {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)}
)} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx index 7178191..6c0fed0 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle6.jsx @@ -592,10 +592,11 @@ const Printstyle6 = ({ table2Data?.FYStatus )} - {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
{Date1}

@@ -1013,7 +1014,7 @@ const Printstyle6 = ({ > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1400,7 +1401,7 @@ const Printstyle6 = ({ > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3830,7 +3831,7 @@ const Printstyle6 = ({ > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -4149,7 +4150,7 @@ const Printstyle6 = ({ > {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx index 53385fe..14620ab 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle7.jsx @@ -605,10 +605,11 @@ const PrintStyle7 = ({ table2Data?.FYStatus )} - {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
{item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1157,7 +1158,7 @@ const PrintStyle7 = ({ {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3376,7 +3377,7 @@ const PrintStyle7 = ({ {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3615,7 +3616,7 @@ const PrintStyle7 = ({ {item?.Type !== 'C' ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx index 90d6e07..b48a079 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle8.jsx @@ -599,7 +599,7 @@ const Printstyle8 = ({
{SalesModePref?.SettingValue == 'Y' &&
{' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '}
}
{GlobaldummyData ? formattedDate : Date1} @@ -997,8 +997,8 @@ const Printstyle8 = ({ }} > {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1364,8 +1364,8 @@ const Printstyle8 = ({ }} > {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3738,8 +3738,8 @@ const Printstyle8 = ({ }} > {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -4015,8 +4015,8 @@ const Printstyle8 = ({ }} > {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx index 681f255..469482c 100644 --- a/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx +++ b/src/Pages/BookingScreen/PrintTemplates/ThermalPrinter/PrintStyle9.jsx @@ -602,10 +602,11 @@ const PrintStyle9 = ({ table2Data?.FYStatus )}
- {SalesModePref?.SettingValue == 'Y' &&
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
{' '} {GlobaldummyData ? formattedDate : Date1}{' '} @@ -950,8 +951,8 @@ const PrintStyle9 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -1221,8 +1222,8 @@ const PrintStyle9 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3626,8 +3627,8 @@ const PrintStyle9 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} @@ -3861,8 +3862,8 @@ const PrintStyle9 = ({ : Amount && ( {item?.Type !== 'C' - ? item?.TotalAmt - (item?.OfferAmt || item?.DiscountAmt || 0) - : item?.TotalAmt - (item?.OfferValue || item?.DiscountAmt || 0)} + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} )} diff --git a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx index a512b66..fe11585 100644 --- a/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx +++ b/src/Pages/paymentpdfPage/PaymentPdfBooking.jsx @@ -95,6 +95,12 @@ const PaymentPdfBooking = ({ console.log(printerTemplateStyle, "printerTemplateStyle") const appPreferences = useSelector(ApplicationPreferences); const SettingData = useSelector(PreferenceData); + const Retailshortname = SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => setting?.SettingIdName?.toLowerCase() === 'retailshortname' + ); + const Wholesaleshortname = SettingData?.[0]?.SettingDtlDetails?.find( + (setting) => setting?.SettingIdName?.toLowerCase() === 'wholesaleshortname' + ); const estimatePrintHeader = SettingData?.[0]?.SettingDtlDetails?.find( (setting) => @@ -483,11 +489,11 @@ const PaymentPdfBooking = ({ table2Data?.FYStatus )}
- {SalesModePref?.SettingValue == 'Y' && -
- {' '} - Name : {table2Data?.SalesMode == "R" ? "RT" : "WS"}{' '} -
} + {SalesModePref?.SettingValue == 'Y' &&
+ {' '} + Name : {table2Data?.SalesMode == "R" ? Retailshortname?.Comments : Wholesaleshortname?.Comments}{' '} + +
}
Date:{Date1}
{TakeawayData?.length > 0 && ( @@ -586,9 +592,9 @@ const PaymentPdfBooking = ({ {item?.Rate} {TakeawayTotalOfferAmt > 0 && ( - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} + {item?.Type !== 'C' + ? (item?.OfferAmt || item?.DiscountAmt || 0) + : (item?.OfferValue || item?.DiscountAmt || 0)} )} {table2Data?.OrderType !== 'E' ? ( @@ -606,9 +612,9 @@ const PaymentPdfBooking = ({ (accumulator, currentValue) => accumulator + currentValue, 0, ) +item?.TotalAmt:item?.TotalAmt} */} - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} + {item?.Type !== 'C' + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} ); @@ -669,9 +675,9 @@ const PaymentPdfBooking = ({ {item?.Rate} {DineinTotalOfferAmt > 0 && ( - {item?.Type != 'C' - ? item?.OfferAmt || 0 - : item?.OfferValue || 0} + {item?.Type !== 'C' + ? (item?.OfferAmt || item?.DiscountAmt || 0) + : (item?.OfferValue || item?.DiscountAmt || 0)} )} {table2Data?.OrderType !== 'E' ? ( @@ -689,9 +695,9 @@ const PaymentPdfBooking = ({ (accumulator, currentValue) => accumulator + currentValue, 0, ) +item?.TotalAmt:item?.TotalAmt} */} - {item?.Type != 'C' - ? item?.TotalAmt - item?.OfferAmt || 0 - : item?.TotalAmt - item?.OfferValue || 0} + {item?.Type !== 'C' + ? item?.TotalAmt - (item?.OfferAmt || 0) + : item?.TotalAmt - (item?.OfferValue || 0)} );