From 3b2118a7b92748f2cdad266152ddf81010287f04 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Mon, 26 Apr 2021 20:03:02 +0530 Subject: modified the colorscheme now it looks pog --- src/components/Display/SummaryDisplay.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/components/Display/SummaryDisplay.js') diff --git a/src/components/Display/SummaryDisplay.js b/src/components/Display/SummaryDisplay.js index d823713..2515df8 100644 --- a/src/components/Display/SummaryDisplay.js +++ b/src/components/Display/SummaryDisplay.js @@ -36,12 +36,12 @@ const getFullSummary = (items) => { const totalRoundedOff = Math.abs(totalPriceAfterTax - Math.round(totalPriceAfterTax)); return ( { - "TotalRawPrice": totalRawPrice.toFixed(2), - "TotalDiscountPrice": totalDiscount.toFixed(2), - "TotalPriceAfterDiscount": (totalRawPrice - totalDiscount).toFixed(2), - "TotalTaxAmount": totalTax.toFixed(2), - "TotalPriceAfterTax": totalPriceAfterTax.toFixed(2), - "RoundedOff": totalRoundedOff.toFixed(2), + "TotalRawPrice": parseFloat(totalRawPrice.toFixed(2)), + "TotalDiscountPrice": parseFloat(totalDiscount.toFixed(2)), + "TotalPriceAfterDiscount": parseFloat((totalRawPrice - totalDiscount).toFixed(2)), + "TotalTaxAmount": parseFloat(totalTax.toFixed(2)), + "TotalPriceAfterTax": parseFloat(totalPriceAfterTax.toFixed(2)), + "RoundedOff": parseFloat(totalRoundedOff.toFixed(2)), "TotalPrice": Math.round(totalPriceAfterTax) } ); @@ -76,7 +76,7 @@ const SummaryDisplay = (props) => { {summary.TotalRawPrice} - {true &&// summary.TotalDiscountPrice !== 0 && + {summary.TotalDiscountPrice !== 0.00 && After Discount {summary.TotalPriceAfterDiscount} @@ -90,14 +90,14 @@ const SummaryDisplay = (props) => { (+{summary.TotalTaxAmount}) - {true && //summary.RoundedOff !== 0 && + {summary.RoundedOff !== 0.00 && Rounded Off {summary.RoundedOff} } - + Grand Total {summary.TotalPrice} -- cgit v1.2.3