diff --git a/app/Models/Client.php b/app/Models/Client.php index 28727d9f3673..da37ade5773b 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -153,7 +153,7 @@ class Client extends BaseModel implements HasLocalePreference public function gateway_tokens() { - return $this->hasMany(ClientGatewayToken::class); + return $this->hasMany(ClientGatewayToken::class)->orderBy('is_default', 'ASC'); } public function expenses() diff --git a/app/Services/Invoice/AutoBillInvoice.php b/app/Services/Invoice/AutoBillInvoice.php index 4fe87c4ec4e0..37467098e17a 100644 --- a/app/Services/Invoice/AutoBillInvoice.php +++ b/app/Services/Invoice/AutoBillInvoice.php @@ -189,8 +189,8 @@ class AutoBillInvoice extends AbstractService ->adjustCreditBalance($amount * -1) ->save(); - $this->invoice->ledger() - ->updateInvoiceBalance($amount * -1, "Invoice {$this->invoice->number} payment using Credit {$current_credit->number}") + $this->invoice->ledger() //09-03-2022 + // ->updateInvoiceBalance($amount * -1, "Invoice {$this->invoice->number} payment using Credit {$current_credit->number}") ->updateCreditBalance($amount * -1, "Credit {$current_credit->number} used to pay down Invoice {$this->invoice->number}") ->save();