mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
feat(Sales & Purchases ): add currency code in edit mode.
This commit is contained in:
@@ -67,7 +67,7 @@ function ReceiptForm({
|
||||
const initialValues = useMemo(
|
||||
() => ({
|
||||
...(!isEmpty(receipt)
|
||||
? { ...transformToEditForm(receipt), currency_code: base_currency }
|
||||
? { ...transformToEditForm(receipt) }
|
||||
: {
|
||||
...defaultReceipt,
|
||||
...(receiptAutoIncrement && {
|
||||
|
||||
@@ -107,7 +107,6 @@ function ReceiptFormHeader({
|
||||
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);
|
||||
}}
|
||||
|
||||
@@ -39,7 +39,8 @@ export const defaultReceipt = {
|
||||
closed: '',
|
||||
branch_id: '',
|
||||
warehouse_id: '',
|
||||
exchange_rate: '',
|
||||
exchange_rate: 1,
|
||||
currency_code: '',
|
||||
entries: [...repeatValue(defaultReceiptEntry, MIN_LINES_NUMBER)],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user