1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #6968 from turbo124/v5-develop

Fixes for client payment failures
This commit is contained in:
David Bomba 2021-11-14 15:35:48 +11:00 committed by GitHub
commit aa35911195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -118,8 +118,8 @@ class ClientPaymentFailureObject
'logo' => $this->company->present()->logo(),
'settings' => $this->client->getMergedSettings(),
'whitelabel' => $this->company->account->isPaid() ? true : false,
'view_link' => $html_variables['$payment_link'],
'button' => $html_variables['$payment_button'],
'url' => $this->invoices->first()->invitations->first()->getPaymentLink(),
'button' => 'texts.pay_now',
'additional_info' => false,
'company' => $this->company,
];

View File

@ -34,6 +34,9 @@ class UpdateBalance extends AbstractService
if ($this->invoice->is_deleted) {
return $this->invoice;
}
nlog("invoice id = {$this->invoice->id}");
nlog("invoice balance = {$this->invoice->balance}");
nlog("invoice adjustment = {$this->balance_adjustment}");
$this->invoice->balance += floatval($this->balance_adjustment);
@ -41,6 +44,8 @@ class UpdateBalance extends AbstractService
$this->invoice->status_id = Invoice::STATUS_PAID;
}
nlog("final balance = {$this->invoice->balance}");
return $this->invoice;
}
}