feat: Assign default pdf template automatically

This commit is contained in:
Ahmed Bouhuolia
2024-10-03 16:36:44 +02:00
parent b23112bc92
commit 3c7e22be43
21 changed files with 332 additions and 38 deletions

View File

@@ -90,7 +90,7 @@ function PaymentReceiveForm({
}),
deposit_account_id: defaultTo(preferredDepositAccount, ''),
currency_code: base_currency,
pdf_template_id: paymentReceivedState.defaultTemplateId,
pdf_template_id: paymentReceivedState?.defaultTemplateId,
}),
};
// Handle form submit.

View File

@@ -137,7 +137,8 @@ function PaymentReceiveFormProvider({ query, paymentReceiveId, ...props }) {
isPaymentLoading ||
isAccountsLoading ||
isCustomersLoading ||
isBrandingTemplatesLoading;
isBrandingTemplatesLoading ||
isPaymentReceivedStateLoading;
return (
<DashboardInsider loading={isLoading} name={'payment-receive-form'}>