From de6dd71394944028a02ebacfc4a516eb65a52d06 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Sat, 27 Jul 2024 09:38:50 +0000 Subject: [PATCH] FIX_TareWeightDate in IGR : ps --- app/Controllers/Inwardgateregister.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/Controllers/Inwardgateregister.php b/app/Controllers/Inwardgateregister.php index 6ebc72d9..fe55e59a 100755 --- a/app/Controllers/Inwardgateregister.php +++ b/app/Controllers/Inwardgateregister.php @@ -439,13 +439,10 @@ class Inwardgateregister extends BaseController // var_dump($grossWeightDate); // var_dump($tareWeightDate); - if (is_string($grossWeightDate) && is_string($tareWeightDate)) { - $GrossWeightDate = date('Y-m-d H:i:s', strtotime($grossWeightDate)); - $TareWeightDate = date('Y-m-d H:i:s', strtotime($tareWeightDate)); - } else { - $GrossWeightDate = null; - $TareWeightDate = null; - } + $GrossWeightDate = !empty($grossWeightDate) && is_string($grossWeightDate) ? date('Y-m-d H:i:s', strtotime($grossWeightDate)) : null; + $TareWeightDate = !empty($tareWeightDate) && is_string($tareWeightDate) ? date('Y-m-d H:i:s', strtotime($tareWeightDate)) : null; + log_message('error', "TareWeightDate" . $TareWeightDate); + if (strlen($QuantityAsPerInvoice) > 0 && $QuantityAsPerInvoice != '0') { $Remarks = $this->request->getPost('txtRemarks' . $i); $ItemStatus = '';