mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -79,6 +79,7 @@ function ReceiptForm({
|
||||
// #withSettings
|
||||
receiptNextNumber,
|
||||
receiptNumberPrefix,
|
||||
preferredDepositAccount,
|
||||
|
||||
//#own Props
|
||||
receiptId,
|
||||
@@ -88,7 +89,7 @@ function ReceiptForm({
|
||||
const { formatMessage } = useIntl();
|
||||
const history = useHistory();
|
||||
|
||||
const [submitPayload, setSubmitPayload ] = useState({});
|
||||
const [submitPayload, setSubmitPayload] = useState({});
|
||||
const isNewMode = !receiptId;
|
||||
|
||||
const receiptNumber = receiptNumberPrefix
|
||||
@@ -130,6 +131,7 @@ function ReceiptForm({
|
||||
: {
|
||||
...defaultInitialValues,
|
||||
receipt_number: receiptNumber,
|
||||
deposit_account_id: parseInt(preferredDepositAccount),
|
||||
entries: orderingLinesIndexes(defaultInitialValues.entries),
|
||||
}),
|
||||
}),
|
||||
@@ -264,5 +266,6 @@ export default compose(
|
||||
withSettings(({ receiptSettings }) => ({
|
||||
receiptNextNumber: receiptSettings?.nextNumber,
|
||||
receiptNumberPrefix: receiptSettings?.numberPrefix,
|
||||
preferredDepositAccount: receiptSettings?.preferredDepositAccount,
|
||||
})),
|
||||
)(ReceiptForm);
|
||||
|
||||
@@ -9,6 +9,7 @@ const Schema = Yup.object().shape({
|
||||
.required()
|
||||
.label(formatMessage({ id: 'receipt_date_' })),
|
||||
receipt_number: Yup.string()
|
||||
.nullable()
|
||||
.label(formatMessage({ id: 'receipt_no_' })),
|
||||
deposit_account_id: Yup.number()
|
||||
.required()
|
||||
@@ -48,7 +49,4 @@ const Schema = Yup.object().shape({
|
||||
const CreateReceiptFormSchema = Schema;
|
||||
const EditReceiptFormSchema = Schema;
|
||||
|
||||
export {
|
||||
CreateReceiptFormSchema,
|
||||
EditReceiptFormSchema
|
||||
};
|
||||
export { CreateReceiptFormSchema, EditReceiptFormSchema };
|
||||
|
||||
Reference in New Issue
Block a user