mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat(Sales & Purchases ): add currency code in edit mode.
This commit is contained in:
@@ -67,7 +67,7 @@ function InvoiceForm({
|
||||
const initialValues = useMemo(
|
||||
() => ({
|
||||
...(!isEmpty(invoice)
|
||||
? { ...transformToEditForm(invoice), currency_code: base_currency }
|
||||
? { ...transformToEditForm(invoice) }
|
||||
: {
|
||||
...defaultInvoice,
|
||||
...(invoiceIncrementMode && {
|
||||
|
||||
@@ -115,7 +115,6 @@ function InvoiceFormHeaderFields({
|
||||
defaultSelectText={<T id={'select_customer_account'} />}
|
||||
onContactSelected={(customer) => {
|
||||
form.setFieldValue('customer_id', customer.id);
|
||||
form.setFieldValue('exchange_rate', '');
|
||||
form.setFieldValue('currency_code', customer?.currency_code);
|
||||
setSelectCustomer(customer);
|
||||
}}
|
||||
|
||||
@@ -44,7 +44,8 @@ export const defaultInvoice = {
|
||||
reference_no: '',
|
||||
invoice_message: '',
|
||||
terms_conditions: '',
|
||||
exchange_rate: '',
|
||||
exchange_rate: 1,
|
||||
currency_code: '',
|
||||
branch_id: '',
|
||||
warehouse_id: '',
|
||||
entries: [...repeatValue(defaultInvoiceEntry, MIN_LINES_NUMBER)],
|
||||
|
||||
Reference in New Issue
Block a user