aboutsummaryrefslogtreecommitdiff
path: root/src/components/tables/invoice-item-table.js
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-10-13 14:28:29 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-10-13 14:28:29 +0530
commit097a393b2bf170d69ba1cef16c5e70f204e2fe65 (patch)
tree91254e3de332506be13cff7bea74cca170fe3efc /src/components/tables/invoice-item-table.js
parent300a4eb39ccea56da416d83400cddc97118e1649 (diff)
added an invoice summary component
Diffstat (limited to 'src/components/tables/invoice-item-table.js')
-rw-r--r--src/components/tables/invoice-item-table.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/tables/invoice-item-table.js b/src/components/tables/invoice-item-table.js
index 12ee52e..fb91af3 100644
--- a/src/components/tables/invoice-item-table.js
+++ b/src/components/tables/invoice-item-table.js
@@ -16,7 +16,7 @@
*/
import './scss/table.scss';
-import { deleteItem, getDiscountValue, getGSTValue, getAmount } from './../../classes/item';
+import { getDiscountValue, getGSTValue, getAmount } from './../../classes/item';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faPencil, faTrashCan } from '@fortawesome/free-solid-svg-icons'
@@ -97,10 +97,10 @@ const ItemTable = ({items, setItems, isInterstate, sum}) => {
<td className={sum.UnitPrice > 0 ? "" : "empty"}>{sum.UnitPrice}</td>
<td className={sum.Discount > 0 ? "" : "empty"}>{sum.Discount}</td>
{isInterstate
- ? <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST}</td>
+ ? <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST || 0}</td>
: <>
- <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST / 2}</td>
- <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST / 2}</td>
+ <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST / 2 || 0}</td>
+ <td className={sum.GST > 0 ? "" : "empty"}>{sum.GST / 2 || 0}</td>
</>
}
<td className={"empty"}></td>