Format excel date cells as date for import/export

This commit is contained in:
Burak Çakırel
2020-10-08 15:22:13 +03:00
parent b76269e785
commit 691e7877f2
9 changed files with 7 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ use App\Models\Banking\Transaction;
use App\Models\Banking\Transfer as Model;
use App\Models\Setting\Category;
use App\Traits\Currencies;
use App\Utilities\Date;
use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
class Transfers extends Import
{
@@ -21,6 +23,7 @@ class Transfers extends Import
{
$row = parent::map($row);
$row['transferred_at'] = Date::parse(ExcelDate::excelToDateTimeObject($row['transferred_at']))->format('Y-m-d');
$row['from_account_id'] = $this->getFromAccountId($row);
$row['to_account_id'] = $this->getToAccountId($row);
$row['expense_transaction_id'] = $this->getExpenseTransactionId($row);