aboutsummaryrefslogtreecommitdiff
path: root/src/views/invoice
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/invoice')
-rw-r--r--src/views/invoice/new.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/views/invoice/new.js b/src/views/invoice/new.js
index cacf8d3..717a772 100644
--- a/src/views/invoice/new.js
+++ b/src/views/invoice/new.js
@@ -24,6 +24,7 @@ import InvoiceSummary from '../../components/tables/invoice-summary';
import HeadersEditor from '../../components/editors/invoice-headers-editor';
import { InvoiceClient } from '../../classes/client';
+import { Transport, Transporter } from '../../classes/invoice';
import { calcSum, currency } from '../../classes/item';
import { useState, useEffect } from 'react';
@@ -43,6 +44,9 @@ const NewInvoicePage = () => {
Quantity: currency(0)
});
+ const [transporter, setTransporter] = useState(new Transporter());
+ const [transport, setTransport] = useState(new Transport());
+
useEffect(() => setShippingAddressId(-1), [client]);
useEffect(() => setSum(calcSum(items)), [items]);
@@ -63,11 +67,9 @@ const NewInvoicePage = () => {
isInterstate={isInterstate}
sum={sum} />
<div className={"two-col"}>
- <div>
- <HeadersEditor
- roundOff={roundOffTotal}
- setRoundOff={setRoundOffTotal} />
- </div>
+ <HeadersEditor
+ roundOff={roundOffTotal}
+ setRoundOff={setRoundOffTotal} />
<div>
<InvoiceSummary
sum={sum}