diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 20:46:57 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-10-16 20:46:57 +0530 |
commit | e9a121ab7b924f189959a936743fcf70cb99f7ae (patch) | |
tree | b0632461948a599980a1e1006bb90a9a22e05a7e /src/views | |
parent | b1b874ba771d8dc78d6b17c320ca9993b25d93a1 (diff) |
added 'Invoice Headers' component (incomplete)
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/invoice/new.js | 12 |
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} |