From b9c1716aefd3b526c6d9c8449db03009ec0ac341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Sat, 13 Aug 2022 02:10:30 +0300 Subject: [PATCH] set the exact date time if not given --- app/Jobs/Banking/CreateBankingDocumentTransaction.php | 2 +- app/Jobs/Banking/UpdateBankingDocumentTransaction.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Banking/CreateBankingDocumentTransaction.php b/app/Jobs/Banking/CreateBankingDocumentTransaction.php index 94e14d530..f80959aef 100644 --- a/app/Jobs/Banking/CreateBankingDocumentTransaction.php +++ b/app/Jobs/Banking/CreateBankingDocumentTransaction.php @@ -68,7 +68,7 @@ class CreateBankingDocumentTransaction extends Job implements ShouldCreate $this->request['company_id'] = $this->model->company_id; $this->request['currency_code'] = isset($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code; - $this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->format('Y-m-d'); + $this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->toDateTimeString(); $this->request['currency_rate'] = config('money.' . $currency_code . '.rate'); $this->request['account_id'] = isset($this->request['account_id']) ? $this->request['account_id'] : setting('default.account'); $this->request['document_id'] = isset($this->request['document_id']) ? $this->request['document_id'] : $this->model->id; diff --git a/app/Jobs/Banking/UpdateBankingDocumentTransaction.php b/app/Jobs/Banking/UpdateBankingDocumentTransaction.php index 1c96c8eb2..3f89aa972 100644 --- a/app/Jobs/Banking/UpdateBankingDocumentTransaction.php +++ b/app/Jobs/Banking/UpdateBankingDocumentTransaction.php @@ -67,7 +67,7 @@ class UpdateBankingDocumentTransaction extends Job implements ShouldUpdate $this->request['company_id'] = $this->model->company_id; $this->request['currency_code'] = isset($this->request['currency_code']) ? $this->request['currency_code'] : $this->model->currency_code; - $this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->format('Y-m-d'); + $this->request['paid_at'] = isset($this->request['paid_at']) ? $this->request['paid_at'] : Date::now()->toDateTimeString(); $this->request['currency_rate'] = config('money.' . $currency_code . '.rate'); $this->request['account_id'] = isset($this->request['account_id']) ? $this->request['account_id'] : setting('default.account'); $this->request['document_id'] = isset($this->request['document_id']) ? $this->request['document_id'] : $this->model->id;