From bb331d9c61a0e38cbbfc891204819557327e1ca0 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Sun, 18 Apr 2021 10:04:28 +0530 Subject: Added HSN support --- src/components/Display/Display.css | 5 +++-- src/components/Display/Display.scss | 3 ++- src/components/Display/DisplayItem.js | 1 + src/components/Display/ItemsDisplay.js | 3 ++- src/components/Display/SummaryDisplay.js | 13 +++++++++++-- 5 files changed, 19 insertions(+), 6 deletions(-) (limited to 'src/components/Display') diff --git a/src/components/Display/Display.css b/src/components/Display/Display.css index 74aa31e..bbec236 100644 --- a/src/components/Display/Display.css +++ b/src/components/Display/Display.css @@ -39,5 +39,6 @@ $defShadow: 0px 0px 4px #232627; .ItemsDisplay .leftAlign { text-align: left; } -.SummaryDisplayTR { - color: #FF79C6; } +.SummaryDisplayTR td { + color: #FF79C6; + font-size: 1.7rem; } diff --git a/src/components/Display/Display.scss b/src/components/Display/Display.scss index ec6cc65..34a30f4 100644 --- a/src/components/Display/Display.scss +++ b/src/components/Display/Display.scss @@ -35,8 +35,9 @@ text-align: left; } -.SummaryDisplayTR { +.SummaryDisplayTR td { color: $altFG; + font-size: 1.7rem; } diff --git a/src/components/Display/DisplayItem.js b/src/components/Display/DisplayItem.js index 849bfc5..472ae47 100644 --- a/src/components/Display/DisplayItem.js +++ b/src/components/Display/DisplayItem.js @@ -13,6 +13,7 @@ const DisplayItem = (props) => { {item.Quantity} {item.Discount} {item.GST} + {item.HSN} {item.Price} ); diff --git a/src/components/Display/ItemsDisplay.js b/src/components/Display/ItemsDisplay.js index 599dd8e..bdf1a40 100644 --- a/src/components/Display/ItemsDisplay.js +++ b/src/components/Display/ItemsDisplay.js @@ -1,7 +1,7 @@ import React from "react"; import "./Display.css"; import DisplayItem from "./DisplayItem"; -import SummaryDisplayTR from "./SummaryDisplay"; +import {SummaryDisplayTR} from "./SummaryDisplay"; const ItemsDisplay = (props) => { const items = props.items; @@ -18,6 +18,7 @@ const ItemsDisplay = (props) => { Quantity(NOS) Discount(%) GST(%) + HSN Price diff --git a/src/components/Display/SummaryDisplay.js b/src/components/Display/SummaryDisplay.js index ebc382c..1110358 100644 --- a/src/components/Display/SummaryDisplay.js +++ b/src/components/Display/SummaryDisplay.js @@ -18,7 +18,7 @@ const getSummary = (items) => { ); } -const SummaryDisplayTR = (props) => { +export const SummaryDisplayTR = (props) => { const summary = getSummary(props.items); return ( @@ -29,9 +29,18 @@ const SummaryDisplayTR = (props) => { {summary.TotalQuantity} + {summary.TotalRawPrice} ); } -export default SummaryDisplayTR; +const SummaryDisplay = (props) => { + const summary = getSummary(props.items); + + return ( +

Total: {summary.TotalRawPrice}

+ ); +} + +export default SummaryDisplay; -- cgit v1.2.3