Commit 72cee43a authored by Sarun Mungthanya's avatar Sarun Mungthanya
Browse files

issue format file

parent 163fe1c8
...@@ -269,8 +269,10 @@ class MasterFileController extends Controller ...@@ -269,8 +269,10 @@ class MasterFileController extends Controller
// $fieldValue = substr($text, $Y, $type); // $fieldValue = substr($text, $Y, $type);
$Y += $type; $Y += $type;
if ($fieldFormat['format'] === 'date') { if(isset($fieldFormat['format'])) {
$fieldValue = $this->convertDate($fieldValue); if ($fieldFormat['format'] === 'date') {
$fieldValue = $this->convertDate($fieldValue);
}
} }
$primaryKeyConditions[] = $primaryKey['FILD'] . " = '" . trim($fieldValue) . "'"; $primaryKeyConditions[] = $primaryKey['FILD'] . " = '" . trim($fieldValue) . "'";
...@@ -295,8 +297,10 @@ class MasterFileController extends Controller ...@@ -295,8 +297,10 @@ class MasterFileController extends Controller
$fieldValue = mb_substr($text, $X, $type, 'UTF-8'); $fieldValue = mb_substr($text, $X, $type, 'UTF-8');
// $fieldValue = substr($text, $Y, $type); // $fieldValue = substr($text, $Y, $type);
$X += $type; $X += $type;
if ($fieldFormat['format'] === 'date') { if(isset($fieldFormat['format'])) {
$fieldValue = $this->convertDate($fieldValue); if ($fieldFormat['format'] === 'date') {
$fieldValue = $this->convertDate($fieldValue);
}
} }
...@@ -343,8 +347,10 @@ class MasterFileController extends Controller ...@@ -343,8 +347,10 @@ class MasterFileController extends Controller
$fieldValue = mb_substr($text, $Z, $type); $fieldValue = mb_substr($text, $Z, $type);
$Z += $type; $Z += $type;
if ($fieldFormat['format'] === 'date') { if(isset($fieldFormat['format'])) {
$fieldValue = $this->convertDate($fieldValue); if ($fieldFormat['format'] === 'date') {
$fieldValue = $this->convertDate($fieldValue);
}
} }
if (!in_array($fieldFormat['FILD'], array_column($primaryKeys, 'FILD'))) { if (!in_array($fieldFormat['FILD'], array_column($primaryKeys, 'FILD'))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment