fix bug unmapped invoice

This commit is contained in:
Steve Ng
2023-11-04 10:45:41 +08:00
parent fe46d72891
commit b3a6a9cdcc
3 changed files with 20 additions and 17 deletions
@@ -55,7 +55,7 @@ class ImportStatementInvoiceController
foreach ($excelRows as $row) {
$row['mapped_result_reference'] = null;
$row['mapped_status'] = 'failed';
$row['date'] = $this->changeExcelDate($row['date']);
$row['date'] = date('Y-m-d', strtotime($row['date']));
// Shipping Info
// TOPUP -> map with transaction.bill_no
@@ -162,11 +162,4 @@ class ImportStatementInvoiceController
}
return false;
}
public function changeExcelDate($date)
{
$unixTime = (($date - 25569) * 86400);
$date = new DateTime("@$unixTime");
return $date->format('Y-m-d'); // Change the format to 'Y-m-d'
}
}