fix(invoice): foreign customer.

This commit is contained in:
elforjani13
2022-02-17 19:07:58 +02:00
parent 29ab6ee09e
commit cd663d99b7
3 changed files with 20 additions and 8 deletions

View File

@@ -5,17 +5,23 @@ import 'style/pages/SaleInvoice/PageForm.scss';
import InvoiceForm from './InvoiceForm';
import { InvoiceFormProvider } from './InvoiceFormProvider';
import withCurrentOrganization from 'containers/Organization/withCurrentOrganization';
import { compose } from 'utils';
/**
* Invoice form page.
*/
export default function InvoiceFormPage() {
function InvoiceFormPage({
// #withCurrentOrganization
organization: { base_currency },
}) {
const { id } = useParams();
const idAsInteger = parseInt(id, 10);
return (
<InvoiceFormProvider invoiceId={idAsInteger}>
<InvoiceFormProvider invoiceId={idAsInteger} baseCurrency={base_currency}>
<InvoiceForm />
</InvoiceFormProvider>
);
}
export default compose(withCurrentOrganization())(InvoiceFormPage);