mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix bug unmapped invoice
This commit is contained in:
@@ -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'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class ImportStatementReceiptsController
|
||||
foreach ($excelRows as $row) {
|
||||
$row['mapped_result_reference'] = null;
|
||||
$row['mapped_status'] = 'failed';
|
||||
$row['date'] = $this->changeExcelDate($row['doc_date']);
|
||||
$row['date'] = date('Y-m-d', strtotime($row['doc_date']));
|
||||
|
||||
$returnReference = $this->mappingExchange($row);
|
||||
if ($returnReference) {
|
||||
@@ -104,11 +104,4 @@ class ImportStatementReceiptsController
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user