Format excel date cells as date for import/export
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user