From 586d86c6bf321f78a9ae5d79cb07a9a7a24ca922 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 17 Aug 2021 20:19:30 +1000 Subject: [PATCH 1/2] Removing logging --- app/Helpers/Invoice/InvoiceItemSum.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/Helpers/Invoice/InvoiceItemSum.php b/app/Helpers/Invoice/InvoiceItemSum.php index 2ed5543f71..a542c017c9 100644 --- a/app/Helpers/Invoice/InvoiceItemSum.php +++ b/app/Helpers/Invoice/InvoiceItemSum.php @@ -81,8 +81,6 @@ class InvoiceItemSum private function push() { - nlog($this->sub_total . " + ". $this->getLineTotal()); - $this->sub_total += $this->getLineTotal(); $this->line_items[] = $this->item; @@ -125,9 +123,6 @@ class InvoiceItemSum { $item_tax = 0; - // nlog(print_r($this->item,1)); - // nlog(print_r($this->invoice,1)); - $amount = $this->item->line_total - ($this->item->line_total * ($this->invoice->discount / 100)); $item_tax_rate1_total = $this->calcAmountLineTax($this->item->tax_rate1, $amount); From 0c39ec65e0a3ee70765c3884521720886dbdbb09 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 17 Aug 2021 20:49:31 +1000 Subject: [PATCH 2/2] Adjust updated_at for /refresh routes for is_large accounts --- app/Http/Controllers/BaseController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/BaseController.php b/app/Http/Controllers/BaseController.php index c3271cbfcd..60827d644e 100644 --- a/app/Http/Controllers/BaseController.php +++ b/app/Http/Controllers/BaseController.php @@ -202,6 +202,10 @@ class BaseController extends Controller $transformer = new $this->entity_transformer($this->serializer); $updated_at = request()->has('updated_at') ? request()->input('updated_at') : 0; + if ($user->getCompany()->is_large && $updated_at == 0){ + $updated_at = time(); + } + $updated_at = date('Y-m-d H:i:s', $updated_at); $query->with(