diff --git a/resources/views/approvals/partials/_expense-form.blade.php b/resources/views/approvals/partials/_expense-form.blade.php index e2619cb8..c3e7da45 100644 --- a/resources/views/approvals/partials/_expense-form.blade.php +++ b/resources/views/approvals/partials/_expense-form.blade.php @@ -370,9 +370,12 @@ function makeItem(data) { }, initAutoSelect() { - if (this.formData.expense_type === 'transfer' && !this.formData.selected_account) { + if (this.formData.expense_type === 'transfer' && !this.formData.selected_account && this.accounts.length > 0) { const primary = this.accounts.find(a => a.is_primary); - if (primary) this.selectAccount(primary); + this.selectAccount(primary || this.accounts[0]); + } + if (this.formData.expense_type === 'corporate_card' && !this.formData.selected_card && this.cards.length === 1) { + this.selectCard(this.cards[0]); } },