diff options
author | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-26 20:03:02 +0530 |
---|---|---|
committer | MikunoNaka <bokuwakanojogahoshii@yahoo.com> | 2021-04-26 20:03:02 +0530 |
commit | 3b2118a7b92748f2cdad266152ddf81010287f04 (patch) | |
tree | 61f50b13d83f84d5e884dbc817d6f3084cd6d0bc /src/components/Display/SummaryDisplay.js | |
parent | 7dbbfc0c2eac7000bf208ce068e887b4db14ea5f (diff) |
modified the colorscheme now it looks pog
Diffstat (limited to 'src/components/Display/SummaryDisplay.js')
-rw-r--r-- | src/components/Display/SummaryDisplay.js | 18 |
1 files changed, 9 insertions, 9 deletions
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) => { <td>{summary.TotalRawPrice}</td> </tr> - {true &&// summary.TotalDiscountPrice !== 0 && + {summary.TotalDiscountPrice !== 0.00 && <tr> <td>After Discount</td> <td>{summary.TotalPriceAfterDiscount}</td> @@ -90,14 +90,14 @@ const SummaryDisplay = (props) => { <td>(+{summary.TotalTaxAmount})</td> </tr> - {true && //summary.RoundedOff !== 0 && + {summary.RoundedOff !== 0.00 && <tr> <td>Rounded Off</td> <td>{summary.RoundedOff}</td> </tr> } - <tr> + <tr className={"grandTotal"}> <td>Grand Total</td> <td>{summary.TotalPrice}</td> </tr> |