This commit is contained in:
venbatechnologies@gmail.com 2017-08-04 11:37:47 +05:30
parent bd7033a9cc
commit 8094987c82
3 changed files with 14 additions and 8 deletions

View File

@ -53,7 +53,9 @@ class MRIRcontroller extends BaseController
$this->global['pageTitle'] = 'Siddharth : MRIR Pdf '; $this->global['pageTitle'] = 'Siddharth : MRIR Pdf ';
$data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation(); $data['CompanyDetails'] = $this->purchaseorder_model->getCompanyInformation();
//print_r($data['CompanyDetails']); //print_r($data['CompanyDetails']);
$data['MRIRDetails'] = $this->purchaseorder_model->edit_mrir($MrirNo); $data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
//$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);
//print_r($data['MRIRDetails']); //print_r($data['MRIRDetails']);
$this->load->View("Mrirprintpdf",$data, NULL); $this->load->View("Mrirprintpdf",$data, NULL);
@ -139,6 +141,7 @@ public function viewmMaterialDistributionList()
$MrirNo = $_GET['MRIRNO']; $MrirNo = $_GET['MRIRNO'];
$data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);//get_MRIR_Values($MrirNo); $data['MRIRDetails'] = $this->mrir_model->edit_mrir($MrirNo);//get_MRIR_Values($MrirNo);
//print_r($data['MRIRDetails']);
$this->global['pageTitle'] = 'Siddharth : Edit Material Inspection Report'; $this->global['pageTitle'] = 'Siddharth : Edit Material Inspection Report';
@ -257,8 +260,8 @@ public function viewmMaterialDistributionList()
$remark=$this->input->post('Remarks1'.$i); $remark=$this->input->post('Remarks1'.$i);
echo $remark; //echo $remark;
die(); //die();
$updateby=$this->session->userdata('userId'); $updateby=$this->session->userdata('userId');
$date = new DateTime('now',new DateTimeZone('Asia/Kolkata')); $date = new DateTime('now',new DateTimeZone('Asia/Kolkata'));
$updateon = $date->format('Y-m-d H:i:s'); $updateon = $date->format('Y-m-d H:i:s');

View File

@ -129,12 +129,13 @@ function ViewDistributionList()
function edit_mrir($MrirNo) function edit_mrir($MrirNo)
{ {
$this->db->distinct(); $this->db->distinct();
$this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,TMM.Createdon,TMD.MRIRItemNo,TMD.ActualQuantityReceived,TMD.QuantityAccepted,TMD.QuantityRejected,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,IGRM.CreatedDate,IGRD.QuantityAsPerInvoice,SUPP.SupplierName,SUPP.Address,POMR.PODate,POMR.DeliveryDate,POMR.ServiceDescription,TMD.MaterialCode,MM.MaterialName,MM.UOM,POLT.Quantity,POLT.ReceivedQuantity,ED.FirstName as PORasiedbyName,ED1.FirstName as MRIRRasiedbyName, ED2.FirstName as IGRRasiedbyName,TMM.MRIRStatus'); $this->db->select('TMM.MRIRNO,TMM.PONO,TMM.IGRNO,TMM.Createdon as MRIRCreatedon,TMD.MRIRItemNo,TMD.ActualQuantityReceived,TMD.QuantityAccepted,TMD.QuantityRejected,IGRM.DeliveryChellanOrInvoiceNo,IGRM.DeliveryChellanDate,IGRM.VehicleNo,IGRM.CourierNo,IGRM.CreatedDate as IGRCreated,IGRD.QuantityAsPerInvoice,SUPP.SupplierName,SUPP.Address,POMR.PODate,POMR.DeliveryDate,POMR.ServiceDescription,TMD.MaterialCode,MM.MaterialName,MM.UOM,POLT.Quantity,POLT.ReceivedQuantity,ED.FirstName as PORasiedbyName,ED1.FirstName as MRIRRasiedbyName, ED2.FirstName as IGRRasiedbyName,TMM.MRIRStatus,POLT.CostCenterCode,COST.CostCenterName,IGRD.Remarks');
$this->db->from ('T_MRIR_Master TMM'); $this->db->from ('T_MRIR_Master TMM');
$this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO');//to get IGRNO,PONO,MRIRNO,mrirdate, $this->db->join ('T_MRIR_Details TMD','TMM.MRIRNO = TMD.MRIRNO');//to get IGRNO,PONO,MRIRNO,mrirdate,
$this->db->join ('T_IGR_Master IGRM', 'IGRM.IGRNO = TMM.IGRNO');//to get actualquantity,deliverydate,Invoicedate,vechileno,courierno,igrdate, $this->db->join ('T_IGR_Master IGRM', 'IGRM.IGRNO = TMM.IGRNO');//to get actualquantity,deliverydate,Invoicedate,vechileno,courierno,igrdate,
$this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO = POMR.PONO');//to get podate,deliverydate,servicedescription $this->db->join ('T_PurchaseOrder_Master POMR ','IGRM.PONO = POMR.PONO');//to get podate,deliverydate,servicedescription
$this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO');//to get receivedquantity,quantity $this->db->join ('T_PurchaseOrder_LineItem POLT','IGRM.PONO=POLT.PONO');//to get receivedquantity,quantity
$this->db->join('T_CostCenter_Master COST','POLT.CostCenterCode=COST.CostCenterCode');
$this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO = IGRM.IGRNO');//to get invoicequantity $this->db->join ('T_IGR_Details IGRD','IGRD.IGRNO = IGRM.IGRNO');//to get invoicequantity
$this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode'); $this->db->join ('T_MaterialMaster MM','TMD.MaterialCode = MM.MaterialCode');
$this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID = SUPP.SupplierID');//to get suppliername,supplieraddress $this->db->join ('T_SupplierDetailsN SUPP','POMR.SupplierID = SUPP.SupplierID');//to get suppliername,supplieraddress

View File

@ -39,6 +39,8 @@
$dt3=''; $dt3='';
$dt4=''; $dt4='';
$MRIRNO=''; $MRIRNO='';
$MRIRCreatedon='';
$Remarks='';
if(!empty($MRIRDetails)) if(!empty($MRIRDetails))
{ {
@ -46,7 +48,7 @@
{ {
$IGRNO=$MRIR->IGRNO; $IGRNO=$MRIR->IGRNO;
$IGRRAISEDBY=$MRIR->IGRRasiedbyName; $IGRRAISEDBY=$MRIR->IGRRasiedbyName;
$dt1=new DateTime($MRIR->Createdon,new DateTimeZone('Asia/Kolkata')); $dt1=new DateTime($MRIR->IGRCreated,new DateTimeZone('Asia/Kolkata'));
$IGRCREATEDON=$dt1->format('d-m-y'); $IGRCREATEDON=$dt1->format('d-m-y');
$PONO=$MRIR->PONO; $PONO=$MRIR->PONO;
$dt=new DateTime($MRIR->PODate, new DateTimeZone('Asia/Kolkata')); $dt=new DateTime($MRIR->PODate, new DateTimeZone('Asia/Kolkata'));