mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix(webapp): Disable tax rates from item entries editor table on services do not support tax rates
This commit is contained in:
@@ -32,6 +32,15 @@ export const defaultReceiptEntry = {
|
||||
amount: '',
|
||||
};
|
||||
|
||||
const defaultReceiptEntryReq = {
|
||||
index: 0,
|
||||
item_id: '',
|
||||
rate: '',
|
||||
discount: '',
|
||||
quantity: '',
|
||||
description: '',
|
||||
};
|
||||
|
||||
export const defaultReceipt = {
|
||||
customer_id: '',
|
||||
deposit_account_id: '',
|
||||
@@ -140,7 +149,9 @@ export const transformFormValuesToRequest = (values) => {
|
||||
...(values.receipt_number_manually && {
|
||||
receipt_number: values.receipt_number,
|
||||
}),
|
||||
entries: entries.map((entry) => ({ ...omit(entry, ['amount']) })),
|
||||
entries: entries.map((entry) => ({
|
||||
...transformToForm(entry, defaultReceiptEntryReq),
|
||||
})),
|
||||
closed: false,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user