From e54525658b7321c969ac7498935c5095c9cca390 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 15 Jun 2023 16:29:40 +1000 Subject: [PATCH] Minor fixes for timezone --- app/Http/Requests/Payment/StorePaymentRequest.php | 2 +- app/Services/Invoice/MarkPaid.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Requests/Payment/StorePaymentRequest.php b/app/Http/Requests/Payment/StorePaymentRequest.php index 9fd353d39323..b178717caa1e 100644 --- a/app/Http/Requests/Payment/StorePaymentRequest.php +++ b/app/Http/Requests/Payment/StorePaymentRequest.php @@ -88,7 +88,7 @@ class StorePaymentRequest extends Request // $input['is_manual'] = true; if (! isset($input['date'])) { - $input['date'] = now()->addSeconds(auth()->user()->company->timezone()->utc_offset)->format('Y-m-d'); + $input['date'] = now()->addSeconds(auth()->user()->company()->timezone()->utc_offset)->format('Y-m-d'); } $this->replace($input); diff --git a/app/Services/Invoice/MarkPaid.php b/app/Services/Invoice/MarkPaid.php index 333c84eb1524..a056da4b6038 100644 --- a/app/Services/Invoice/MarkPaid.php +++ b/app/Services/Invoice/MarkPaid.php @@ -71,7 +71,6 @@ class MarkPaid extends AbstractService $payment->is_manual = true; if ($this->invoice->company->timezone()) { - nlog($this->invoice->company->timezone()->utc_offset); $payment->date = now()->addSeconds($this->invoice->company->timezone()->utc_offset)->format('Y-m-d'); }