From 09e6875dd05f3133c2c815624ec8b34f480b8d9f Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Fri, 11 Aug 2017 16:23:09 +0530 Subject: [PATCH] mrir status display changes done --- application/models/mrir_model.php | 4 ++- .../views/EditservicePurchaseorder.php | 6 ++-- application/views/advancerequest.php | 31 ++++++++++++++++--- application/views/editCapitalPo.php | 13 +++++--- .../views/editRevenuepurchaseorder.php | 6 ++-- .../views/viewmaterialinspectionreport.php | 9 ++++-- 6 files changed, 50 insertions(+), 19 deletions(-) diff --git a/application/models/mrir_model.php b/application/models/mrir_model.php index fde322e3..e4fed057 100755 --- a/application/models/mrir_model.php +++ b/application/models/mrir_model.php @@ -77,7 +77,7 @@ function ViewDistributionList() function view_mrir() { $this->db->distinct(); - $this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,TMD.StoreInchargeID,TMD.QualityInchargeID,TMD.PlantInchargeID,TMD.UpdateBY,POM.PODate,POM.POType,POM.CreatedBy,ED.FirstName as UpdatedbyName,ED1.FirstName as CreatedByName'); + $this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,TMM.MRIRStatus,ST.StatusName,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,TMD.StoreInchargeID,TMD.QualityInchargeID,TMD.PlantInchargeID,TMD.UpdateBY,POM.PODate,POM.POType,POM.CreatedBy,ED.FirstName as UpdatedbyName,ED1.FirstName as CreatedByName'); $this->db->from ('T_MRIR_Master TMM'); $this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO=TMD.MRIRNO'); $this->db->join ('T_IGR_Master IGRM','TMM.IGRNO=IGRM.IGRNO'); @@ -87,6 +87,8 @@ function ViewDistributionList() $this->db->join ('T_Employee_Details ED','ED.EmpID = user.EmpID','left'); $this->db->join ('tbl_users user1','user1.userid = POM.CreatedBy','left'); $this->db->join ('T_Employee_Details ED1','ED1.EmpID = user1.EmpID','left'); + $this->db->join ('T_Status ST','ST.StatusCode = TMM.MRIRStatus'); + $this->db->order_by ('TMM.MRIRNO','desc'); $query = $this->db->get(); return $query->result(); diff --git a/application/views/EditservicePurchaseorder.php b/application/views/EditservicePurchaseorder.php index 3f146757..660df09d 100755 --- a/application/views/EditservicePurchaseorder.php +++ b/application/views/EditservicePurchaseorder.php @@ -54,11 +54,11 @@ if(!empty($POMaster)) $SupName = $Req->SupplierName; $Address = $Req->Address; $pdt = new DateTime($Req->PODate); - $PODate = $pdt->format('Y-m-d'); + $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); $DeliveryAddress =$Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; @@ -80,7 +80,7 @@ if(!empty($RequistionDetails)) { // $Reqon=$ReqDet->ReqDate; $Reqonn=new DateTime($ReqDet->ReqDate); - $Reqon=$Reqonn->format('Y-m-d'); + $Reqon=$Reqonn->format('d-m-Y'); $Requestedby=$ReqDet->Requestedby; $RequesterName=$ReqDet->FirstName; //$Status=$ReqDet->Status; diff --git a/application/views/advancerequest.php b/application/views/advancerequest.php index 29ff27e9..911cc578 100755 --- a/application/views/advancerequest.php +++ b/application/views/advancerequest.php @@ -112,7 +112,7 @@ $(function() {
'CostCenterCode','value' => set_value('CostCenterCode'),'id'=>'CostCenterCode' ,'class' => 'form-control num' ,'required' => 'true' , 'readonly'=>'true','style'=>'text-align:right;'); + $data = array('name' => 'CostCenterCode','value' => set_value('CostCenterCode'),'id'=>'CostCenterCode' ,'class' => 'form-control' ,'required' => 'true' , 'readonly'=>'true','style'=>'text-align:left;'); echo form_input($data); ?>
@@ -202,13 +202,34 @@ var PONUM=$('#PurchaseOrderNumber').val(); $('#PurchaseOrderType').val(obj.POType); var credt=obj.CreatedDate; - credt=credt.split(' ')[0] - $('#PoCreatedDate').val(credt); + credt=credt.split(' ')[0]; + + var splitDate = credt.split('-'); + if(splitDate.count == 0){ + return null; + } + + var year = splitDate[0]; + var month = splitDate[1]; + var day = splitDate[2]; + + var convertCredt= day + '-' + month + '-' + year; + + $('#PoCreatedDate').val(convertCredt); var reldt=obj.ReleasedOn; //console.log(reldt); reldt=reldt.split(' ')[0]; - - $('#ReleasedOn').val(reldt); + var splitDaterel = reldt.split('-'); + if(splitDaterel.count == 0){ + return null; + } + + var Ryear = splitDaterel[0]; + var Rmonth = splitDaterel[1]; + var Rday = splitDaterel[2]; + + var convertReldt= Rday + '-' + Rmonth + '-' + Ryear; + $('#ReleasedOn').val(convertReldt); $('#TotalOrderValue').val(obj.TotalOrderValue); $('#PaymenyTerms').val(obj.PaymentTerms); $('#Department').val(obj.DepartmentName); diff --git a/application/views/editCapitalPo.php b/application/views/editCapitalPo.php index 94999e4f..5078e5aa 100644 --- a/application/views/editCapitalPo.php +++ b/application/views/editCapitalPo.php @@ -94,12 +94,12 @@ if(!empty($POMaster)) $SupName = $Req->SupplierName; $Address = $Req->Address; $pdt = new DateTime($Req->PODate); - $PODate = $pdt->format('Y-m-d'); + $PODate = $pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); $DeliveryAddress =$Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; @@ -108,12 +108,15 @@ if(!empty($POMaster)) $PONO = $Req->PONO; $ServiceDescription = $Req->ServiceDescription; - $ExchangeRateOn=$Req->ExchangeRateCalculatedon; + $Exchangedt = new DateTime($Req->ExchangeRateCalculatedon); + $ExchangeRateOn=$Exchangedt->format('d-m-Y'); $PaymentTerms=$Req->PaymentTerms; $otherPayment = $Req->PaymentOtherDescription; - $UpdatedOn=$Req->UpdatedOn; + $Updateddt = new DateTime($Req->UpdatedOn); + $UpdatedOn=$Updateddt->format('d-m-Y'); + $CapitalRange=$Req->CapitalRange; $Import_DispatchDetails=$Req->Import_DispatchDetails; $Import_PlaceofOrgin=$Req->Import_PlaceofOrgin; @@ -2757,7 +2760,7 @@ $("#PaymentMethod").select2();   OK - +

diff --git a/application/views/editRevenuepurchaseorder.php b/application/views/editRevenuepurchaseorder.php index 5b4442b7..b8bbb6ad 100644 --- a/application/views/editRevenuepurchaseorder.php +++ b/application/views/editRevenuepurchaseorder.php @@ -74,12 +74,12 @@ if(!empty($POMaster)) $Address = $Req->Address; $Pdt = new DateTime($Req->PODate); - $PODate = $Pdt->format('Y-m-d'); + $PODate = $Pdt->format('d-m-Y'); $DeliverOption = $Req->DeliveryOption; $DeliverSchedule = $Req->DeliverySchedule; $Ddt = new DateTime($Req->DeliveryDate); - $Deliverydt = $Ddt->format('Y-m-d'); + $Deliverydt = $Ddt->format('d-m-Y'); $DeliveryAddress =$Req->DeliveryAddress; $PONOStatus = $Req->StatusCode; @@ -100,7 +100,7 @@ if(!empty($RequistionDetails)) foreach ($RequistionDetails as $ReqDet) { $Reqonn=new DateTime($ReqDet->ReqDate); - $Reqon=$Reqonn->format('Y-m-d'); + $Reqon=$Reqonn->format('d-m-Y'); // $Pdt = new DateTime($Req->PODate); // $PODate = $Pdt->format('Y-m-d'); diff --git a/application/views/viewmaterialinspectionreport.php b/application/views/viewmaterialinspectionreport.php index ee043f39..7ff84f43 100755 --- a/application/views/viewmaterialinspectionreport.php +++ b/application/views/viewmaterialinspectionreport.php @@ -34,6 +34,7 @@ Invoice Date Vehicle No Courier No + MRIR Status Updated By Action @@ -63,11 +64,15 @@ echo $date->format('d/m/Y'); ?> VehicleNo ?> CourierNo ?> + StatusName ?> UpdatedbyName ?> + MRIRStatus== MRIR_CREATED){ ?>     - - + +     +