From eedde57b9caff20e1e7d25b43fcb8785e23b3e11 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Sun, 27 Jun 2021 14:47:48 +0530 Subject: Fixed DisplayItem and now really big decimal numbers don't show up --- src/components/Display/DisplayItem.tsx | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/components/Display/DisplayItem.tsx (limited to 'src/components/Display/DisplayItem.tsx') diff --git a/src/components/Display/DisplayItem.tsx b/src/components/Display/DisplayItem.tsx new file mode 100644 index 0000000..448460b --- /dev/null +++ b/src/components/Display/DisplayItem.tsx @@ -0,0 +1,67 @@ +/* + * OpenBills - Self hosted browser app to generate and keep track of simple invoices + * Version - 0 + * Licensed under the MIT license - https://opensource.org/licenses/MIT + * + * Copyright (c) 2021 Vidhu Kant Sharma +*/ + +import React from "react"; +import { Item } from "./../../interfaces"; +import "./Display.scss"; + +interface Props { + defGSTValue: number + itemNumber: number + item: Item +} + +const DisplayItem: React.FC = (props) => { + const itemNumber = props.itemNumber; + const item = props.item; + + return ( + + {itemNumber} + {item.Model} + + + {item.Description} + + + {item.HSN} + {item.Quantity} + {item.UnitPrice} + + + + {item.DiscountValue} + ({item.Discount}%) + + + + + + {item.TotalGSTValue} + ({item.TotalGST}%) + + + + + {(item.TotalValue + (item.TotalGSTValue - item.DiscountValue)).toFixed(2)} + + + ); +} + +export default DisplayItem; -- cgit v1.2.3