aboutsummaryrefslogtreecommitdiff
path: root/src/components/tables/invoice-item-table.js
diff options
context:
space:
mode:
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>