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:
commit
aa35911195
@ -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,
|
||||
];
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user