mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
Fix: Connect with preferred account with Sale Receipt
This commit is contained in:
@@ -79,6 +79,7 @@ function ReceiptForm({
|
|||||||
// #withSettings
|
// #withSettings
|
||||||
receiptNextNumber,
|
receiptNextNumber,
|
||||||
receiptNumberPrefix,
|
receiptNumberPrefix,
|
||||||
|
preferredDepositAccount,
|
||||||
|
|
||||||
//#own Props
|
//#own Props
|
||||||
receiptId,
|
receiptId,
|
||||||
@@ -88,7 +89,7 @@ function ReceiptForm({
|
|||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
const [submitPayload, setSubmitPayload ] = useState({});
|
const [submitPayload, setSubmitPayload] = useState({});
|
||||||
const isNewMode = !receiptId;
|
const isNewMode = !receiptId;
|
||||||
|
|
||||||
const receiptNumber = receiptNumberPrefix
|
const receiptNumber = receiptNumberPrefix
|
||||||
@@ -130,6 +131,7 @@ function ReceiptForm({
|
|||||||
: {
|
: {
|
||||||
...defaultInitialValues,
|
...defaultInitialValues,
|
||||||
receipt_number: receiptNumber,
|
receipt_number: receiptNumber,
|
||||||
|
deposit_account_id: parseInt(preferredDepositAccount),
|
||||||
entries: orderingLinesIndexes(defaultInitialValues.entries),
|
entries: orderingLinesIndexes(defaultInitialValues.entries),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -264,5 +266,6 @@ export default compose(
|
|||||||
withSettings(({ receiptSettings }) => ({
|
withSettings(({ receiptSettings }) => ({
|
||||||
receiptNextNumber: receiptSettings?.nextNumber,
|
receiptNextNumber: receiptSettings?.nextNumber,
|
||||||
receiptNumberPrefix: receiptSettings?.numberPrefix,
|
receiptNumberPrefix: receiptSettings?.numberPrefix,
|
||||||
|
preferredDepositAccount: receiptSettings?.preferredDepositAccount,
|
||||||
})),
|
})),
|
||||||
)(ReceiptForm);
|
)(ReceiptForm);
|
||||||
|
|||||||
Reference in New Issue
Block a user