From 8cc17afdeb3ce8681e0de8a9eaf3db2e69c21a04 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 19 Apr 2024 15:10:48 +1000 Subject: [PATCH] Remove reactivate button after action --- app/Helpers/Invoice/InvoiceSum.php | 11 +++++++---- app/Http/Controllers/ClientController.php | 6 ++++++ app/Services/Invoice/AddGatewayFee.php | 5 ----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/app/Helpers/Invoice/InvoiceSum.php b/app/Helpers/Invoice/InvoiceSum.php index 3b82b601218c..b05a7b9c8ea6 100644 --- a/app/Helpers/Invoice/InvoiceSum.php +++ b/app/Helpers/Invoice/InvoiceSum.php @@ -227,12 +227,15 @@ class InvoiceSum public function getRecurringInvoice() { - $this->invoice->amount = $this->formatValue($this->getTotal(), $this->precision); - $this->invoice->total_taxes = $this->getTotalTaxes(); - $this->invoice->balance = $this->formatValue($this->getTotal(), $this->precision); - + // $this->invoice->amount = $this->formatValue($this->getTotal(), $this->precision); + // $this->invoice->total_taxes = $this->getTotalTaxes(); + + $this->setCalculatedAttributes(); + $this->invoice->balance = $this->invoice->amount; $this->invoice->saveQuietly(); + // $this->invoice->saveQuietly(); + return $this->invoice; } diff --git a/app/Http/Controllers/ClientController.php b/app/Http/Controllers/ClientController.php index 582d205a9150..e9e733191d5e 100644 --- a/app/Http/Controllers/ClientController.php +++ b/app/Http/Controllers/ClientController.php @@ -401,6 +401,12 @@ class ClientController extends BaseController } $bounce_id = $resolved_bounce_id; + + $record = $log->log; + $record['ID'] = ''; + $log->log = $record; + $log->save(); + } $postmark = new PostmarkClient(config('services.postmark.token')); diff --git a/app/Services/Invoice/AddGatewayFee.php b/app/Services/Invoice/AddGatewayFee.php index 7d05946ed74d..b95dd6841e90 100644 --- a/app/Services/Invoice/AddGatewayFee.php +++ b/app/Services/Invoice/AddGatewayFee.php @@ -95,11 +95,6 @@ class AddGatewayFee extends AbstractService if (floatval($new_balance) - floatval($balance) != 0) { $adjustment = $new_balance - $balance; - // $this->invoice - // ->client - // ->service() - // ->updateBalance($adjustment); - $this->invoice ->ledger() ->updateInvoiceBalance($adjustment, 'Adjustment for adding gateway fee');