diff --git a/application/config/routes.php b/application/config/routes.php index c0e5d593..aaba354d 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -204,6 +204,7 @@ $route['ViewIncomeExpense'] = "cashbook/incomeExpenseList"; $route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; $route['addIncomeExpense'] = "cashbook/addIncomeExpense"; $route['qualityreportlist'] = "quality/reportList"; +$route['qualityreportlistinward'] = "quality/reportListInward"; //<-------------Store page-----------------> $route['Stock'] = "storestatus/storeavailability"; $route['UpdatePOStatus'] = "servicepurchaseorder/UpdateServicePOStatus"; diff --git a/application/controllers/quality.php b/application/controllers/quality.php index da667498..6a2c8744 100644 --- a/application/controllers/quality.php +++ b/application/controllers/quality.php @@ -30,6 +30,7 @@ class quality extends BaseController $data['products'] = $this->quality_model->getAllprodcuts(); $data['customers'] = $this->quality_model->getAllcustomers(); $data['existspec'] = $this->quality_model->getAllspec(); + $data['existspecinward'] = $this->quality_model->getAllspecInward(); $this->global['pageTitle'] = 'Siddharth : Quality Master'; $this->loadViews("qualitymasterlistview", $this->global, $data , NULL); @@ -40,14 +41,27 @@ class quality extends BaseController { $data['records'] = $this->quality_model->getTestMasterforList(); - $this->global['pageTitle'] = 'Siddharth : Quality Master'; + $this->global['pageTitle'] = 'Siddharth : Prodcut Report List '; $this->loadViews("reportmasterlist", $this->global, $data , NULL); } + public function reportListInward() + { + $data['records'] = $this->quality_model->getTestMasterforListInward(); + + $this->global['pageTitle'] = 'Siddharth : Report List Inward'; + $this->loadViews("reportmasterlist_inward", $this->global, $data , NULL); + } + + + function addNewPage() { - $data['products'] = $this->quality_model->getAllprodcuts(); - $data['customers'] = $this->quality_model->getAllcustomers(); + $data['productsoutward'] = $this->quality_model->getAllprodcuts(); + $data['customersoutward'] = $this->quality_model->getAllcustomers(); + + $data['productsinward'] = $this->quality_model->getAllprodcutsInward(); + $data['customersinward'] = $this->quality_model->getAllcustomersInward(); $this->global['pageTitle'] = 'Siddharth : Quality Master'; @@ -59,6 +73,9 @@ class quality extends BaseController $product = $this->input->post('param2'); $customer = $this->input->post('param3'); $jsondata = $this->input->post('param1'); + $type = $this->input->post('param4'); + //echo $customer;exit(); + $createdby = $this->session->userdata ( 'userId' ); $phpdata = json_decode($jsondata); $total = 0; @@ -78,14 +95,14 @@ class quality extends BaseController if($isExist[0]->count == 0) { - $tostore = array('customer_id'=>$customer,'product_id'=>$product,'testtype'=>$name,'uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'created_by'=>$createdby); + $tostore = array('customer_id'=>$customer,'product_id'=>$product,'testtype'=>$name,'uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'type'=>$type,'created_by'=>$createdby); $res = $this->quality_model->addSpecMast($tostore); //echo 'i'.$res; } else if($isExist[0]->count == 1) { - $tostore = array('uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'updated_by'=>$createdby); + $tostore = array('uom'=>$uom,'min'=>$min,'max'=>$max,'temp'=>$temp,'type'=>$type,'updated_by'=>$createdby); $res = $this->quality_model->updateSpecMast($tostore,$product,$customer,$name); //echo 'u'.$res; } @@ -143,17 +160,39 @@ class quality extends BaseController } + function viewIndInwardReport() + { + $reportid = $this->uri->segment(3); + + $data['reportdata'] = $this->quality_model->getIndividualInwardReportData($reportid); + $this->global['pageTitle'] = 'Siddharth : View Individual Report'; + $this->loadViews("viewindInwardreport", $this->global, $data, NULL); + + } + function printReportPDF() { - + $type = ''; + $html = ''; + $filename = ''; + if($this->input->post('type')) + { + $type = $this->input->post('type'); + } $reportid = $this->input->post('rid'); - $data['reportdata'] = $this->quality_model->getIndividualReportData($reportid); - - $filename = 'PRE DESPATCH INSPECTION REPORT'.$reportid; - - $html = $this->load->View("viewindreportpdf",$data,true); + if($type != 'INWARD' or $type == ''){ + $data['reportdata'] = $this->quality_model->getIndividualReportData($reportid); + $filename = 'PRE DESPATCH INSPECTION REPORT'.$reportid; + $html = $this->load->View("viewindreportpdf",$data,true); + } + else if($type == 'INWARD') + { + $data['reportdata'] = $this->quality_model->getIndividualInwardReportData($reportid); + $filename = 'INWARD MATERIAL INSPECTION REPORT'.$reportid; + $html = $this->load->View("viewindinwardreportpdf",$data,true); + } require APPPATH . '/third_party/mpdf/mpdf.php'; $mpdf=new mPDF('utf-8','A4-P',7,10,10, 10, 10, 24, 4, 6); $mpdf->SetDisplayMode('fullpage'); @@ -170,7 +209,7 @@ class quality extends BaseController { $productid = $this->input->post('param1'); $customerid = $this->input->post('param2'); - //echo 'from cn'.$productid.'-'.$customerid; + //echo 'from cn'.$productid.'-'.$customerid;exit(); $res = $this->quality_model->getSpecifications($productid,$customerid); echo json_encode($res); } @@ -275,6 +314,140 @@ class quality extends BaseController } + + + function saveInwardTestReportData() + { + + date_default_timezone_get('Asia/Kolkata'); + $testjson = $this->input->post('param1'); + $loijson = $this->input->post('param2'); + $afsjson = $this->input->post('param3'); + + $igrno = $this->input->post('param4'); + $igrlineitemno = $this->input->post('param5'); + $chart = $this->input->post('param7'); + $report_date = $this->input->post('param8'); + $report_date = date_format(date_create($report_date),'Y-m-d'); + + $approver = $this->input->post('param6'); + + $testphpdata = json_decode($testjson,true); + $loiphpdata = json_decode($loijson,true); + + $afsphpdata = json_decode($afsjson,true); + //print_r($afsphpdata);die(); + $createdon = date('Y-m-d H:i:s'); + $createby = $this->session->userdata ( 'userId' ); + + $masterreportdata = array('igrno'=>$igrno,'igrlineitemno'=>$igrlineitemno,'batchdate'=>$report_date,'createdby'=>$createby,'createdon'=>$createdon,'approvedby'=>$approver,'chartdata'=>$chart); + $MASTERID = $this->quality_model->saveMasterTestData($masterreportdata); + + + + // $descrition = ''; + // $min = ''; + // $max = ''; + // $uom = ''; + // $act1 = ''; + // $act2 = ''; + // $act3 = ''; + // $average = ''; + // $results = ''; + // $remarks1 = ''; + foreach($testphpdata as $data) + { + //print_r($data);die(); + $descrition = $data['Description']; + $min = $data['SpecificationMin']; + $max = $data['SpecificationMax']; + $uom = $data['SpecificationUOM']; + $act1 = $data['ACT X1']; + $act2 = $data['ACT X2']; + $act3 = $data['ACT X3']; + $average = $data['Average']; + $results = $data['Results']; + $remarks1 = $data['Remarks']; + $testreportdata = array('testreport_id'=>$MASTERID,'description'=>$descrition,'min'=>$min,'max'=>$max,'UOM'=>$uom,'act1'=>$act1,'act2'=>$act2,'act3'=>$act3,'average'=>$average,'result'=>$results,'remarks'=>$remarks1); + $reportid = $this->quality_model->saveTestReportData($testreportdata); + } + + + // $start = ''; + // $end = ''; + // $temp = ''; + // $w1 = ''; + // $w2 = ''; + // $w3 = ''; + // $loip = ''; + // $remark = ''; + foreach($loiphpdata as $loi) + { + $start = $loi['Heating Timestart']; + $end = $loi['Heating Timeend']; + $temp = $loi['Temp *c']; + $w1 = $loi['Crucible Weight w1(g)']; + $w2 = $loi['Before Heatingw2(g)']; + $w3 = $loi['After Heatingw3(g)']; + $loip = $loi['L.O.I %']; + $remark = $loi['Remarks']; + //echo $loip; + //echo $remark;die(); + $loitabledata = array('testreport_id'=>$MASTERID,'start_time'=>$start,'end_time'=>$end,'temp'=>$temp,'w1'=>$w1,'w2'=>$w2,'w3'=>$w3,'loi_percentage'=>$loip,'remarks'=>$remark); + $loiid = $this->quality_model->saveTestReportLOIData($loitabledata); + + } + + $count =0; + foreach($afsphpdata as $afs) + { + $count++; + if($count != 12){ + $ssize = $afs['Sieve Size µm']; + $mesh_size = $afs['Mesh Size']; + $sandweight = $afs['Sand Weight']; + $Percentage = $afs['Percentage']; + $Multiplier = $afs['Multiplier']; + $Product = $afs['Product']; + $afstabledata = array('testreport_id'=>$MASTERID,'sieve_size'=>$ssize,'mesh_size'=>$mesh_size,'sandweight'=>$sandweight,'percentage'=>$Percentage,'multiplier'=>$Multiplier,'product'=>$Product); + $afsid = $this->quality_model->saveTestReportAFSData($afstabledata); + } + } + + echo "Report Data Saved Successfully!"; + + + } + + + function addNewInward_Report() + { + $data['records'] = $this->quality_model->getIGRNOforReport(); + $data['emplist'] = $this->quality_model->getEmplistforReport(); + $this->global['pageTitle'] = 'Siddharth : Inward Inspection'; + $this->loadViews("inward_report_create", $this->global,$data,NULL); + + } + + + function getIGRLineItemNo() + { + $igrno = $this->input->post('param1'); + $data['igrdetails'] = $this->quality_model->getIGRLineItemNo($igrno); + //print_r($data['igrdetails']); + echo json_encode($data['igrdetails']); + + } + + + function getIGRDetails() + { + $igrno = $this->input->post('param1'); + $igrlineitemno = $this->input->post('param2'); + $data['igrdetails'] = $this->quality_model->getIGRDataforReport($igrno,$igrlineitemno); + //print_r($data['igrdetails']); + echo json_encode($data['igrdetails']); + } function pageNotFound() { diff --git a/application/models/quality_model.php b/application/models/quality_model.php index 7482470f..f776ec62 100644 --- a/application/models/quality_model.php +++ b/application/models/quality_model.php @@ -18,6 +18,15 @@ class Quality_model extends CI_Model return $result->result(); } + function getAllprodcutsInward() + { + $this->db->select('MaterialCode,MaterialName'); + $this->db->from('T_MaterialMaster'); + $this->db->like('T_MaterialMaster.Category','raw material'); + $result = $this->db->get(); + return $result->result(); + } + function getAllcustomers() { $this->db->select('client_id,client_name'); @@ -26,6 +35,15 @@ class Quality_model extends CI_Model return $result->result(); } + function getAllcustomersInward() + { + $this->db->select('SupplierID,SupplierName'); + $this->db->from('T_SupplierDetailsN'); + $this->db->where('IsActive',1); + $result = $this->db->get(); + return $result->result(); + } + function checkExist($product,$customer,$name) { $this->db->select('count(*) as count'); @@ -69,6 +87,16 @@ class Quality_model extends CI_Model $result = $this->db->get(); return $result->result(); } + function getAllspecInward() + { + $this->db->select('T_Prodcut_Specification_Master.*,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,count(*) as count'); + $this->db->from('T_Prodcut_Specification_Master'); + $this->db->join('T_MaterialMaster','T_Prodcut_Specification_Master.product_id=T_MaterialMaster.MaterialCode'); + $this->db->join('T_SupplierDetailsN','T_Prodcut_Specification_Master.customer_id=T_SupplierDetailsN.SupplierID'); + $this->db->group_by('product_id,customer_id'); + $result = $this->db->get(); + return $result->result(); + } function getIndividualSpec($prodcutid,$customerid) @@ -80,6 +108,20 @@ class Quality_model extends CI_Model $this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid); $this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid); $result = $this->db->get(); + //print_r($result->result()); + if(empty($result->result())) + { + + $this->db->select('T_Prodcut_Specification_Master.*,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName as product_name,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName as client_name'); + $this->db->from('T_Prodcut_Specification_Master'); + $this->db->join('T_MaterialMaster','T_Prodcut_Specification_Master.product_id=T_MaterialMaster.MaterialCode'); + $this->db->join('T_SupplierDetailsN','T_Prodcut_Specification_Master.customer_id=T_SupplierDetailsN.SupplierID'); + $this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid); + $this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid); + $result = $this->db->get(); + + } + //exit(); return $result->result(); } @@ -111,10 +153,16 @@ class Quality_model extends CI_Model function getSpecifications($productid,$customerid) { - $this->db->where('product_id',$productid); - $this->db->where('customer_id',$customerid); - $res = $this->db->get('T_Prodcut_Specification_Master'); + //echo 'from model'.$productid.'-'.$customerid; + // $this->db->where('product_id',$productid); + // $this->db->where('customer_id',$customerid); + // $res = $this->db->get('T_Prodcut_Specification_Master'); + $sql = "Select * from T_Prodcut_Specification_Master where product_id = ? and customer_id = ?"; + $res = $this->db->query($sql,array($productid,$customerid)); + // print_r($this->db->last_query()); return $res->result(); + //print_r($res->result()); + } function getEmplistforReport() @@ -210,6 +258,52 @@ class Quality_model extends CI_Model } + function getIndividualInwardReportData($reportid) + { + + $this->db->select('T_Test_Report_Master.chartdata,T_Test_Report_Master.batchdate,T_Test_Report_Master.testreport_id,T_IGR_Master.IGRNO,T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_IGR_Details.IGRItemNo,T_IGR_Details.QuantityAsPerInvoice,T_MaterialMaster.MaterialCode,T_MaterialMaster.Materialname,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_Test_Report_Master.approvedby,T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName'); + $this->db->from('T_Test_Report_Master'); + $this->db->join('T_IGR_Master','T_Test_Report_Master.igrno=T_IGR_Master.IGRNO'); + $this->db->join('T_IGR_Details','T_Test_Report_Master.igrlineitemno=T_IGR_Details.IGRItemNo'); + $this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO'); + $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode'); + $this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID'); + $this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid'); + $this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID'); + $this->db->where('T_Test_Report_Master.testreport_id',$reportid); + + + $res = $this->db->get(); + $reportdata['master'] = $res->result(); + + $this->db->select('T_Test_Report.*'); + $this->db->from('T_Test_Report'); + $this->db->where('testreport_id',$reportid); + $res1 = $this->db->get(); + $reportdata['masterreport'] = $res1->result(); + + $this->db->select('T_Test_Report_LOI.*'); + $this->db->from('T_Test_Report_LOI'); + $this->db->where('testreport_id',$reportid); + $res1 = $this->db->get(); + $reportdata['masterreportloi'] = $res1->result(); + + $this->db->select('T_Test_Report_AFS.*'); + $this->db->from('T_Test_Report_AFS'); + $this->db->where('testreport_id',$reportid); + $res1 = $this->db->get(); + $reportdata['masterreportafs'] = $res1->result(); + + $this->db->select('T_Company_Details.CompanyName,T_Company_Details.Address,T_Company_Details.ProfilePic'); + $this->db->from('T_Company_Details'); + //$this->db->where('testreport_id',$reportid); + $res1 = $this->db->get(); + $reportdata['company'] = $res1->result(); + + return $reportdata; + + } + function getTestMasterforList() { $this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description'); @@ -218,9 +312,96 @@ class Quality_model extends CI_Model $this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id'); $this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id'); $this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id'); + //$this->db->where('T_Test_Report_Master.invoiceid','!=0'); $res = $this->db->get(); return $res->result(); } + + function getTestMasterforListInward() + { + // $this->db->select('T_Test_Report_Master.testreport_id,T_Test_Report_Master.igrno,T_Test_Report_Master.igrlineitemno,T_Test_Report_Master.batchdate,ip_clients.client_id,ip_clients.client_name,ip_products.product_id,ip_products.product_name,ip_products.product_description'); + // $this->db->from('T_Test_Report_Master'); + // $this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_number'); + // $this->db->join('ip_clients','ip_invoices.client_id=ip_clients.client_id'); + // $this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id'); + // $this->db->join('ip_products','ip_products.product_id=ip_invoice_items.item_product_id'); + // $res = $this->db->get(); + // return $res->result(); + + $this->db->select('T_Test_Report_Master.batchdate,T_Test_Report_Master.testreport_id,T_IGR_Master.IGRNO,T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_IGR_Details.IGRItemNo,T_IGR_Details.QuantityAsPerInvoice,T_MaterialMaster.MaterialCode,T_MaterialMaster.Materialname,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_Test_Report_Master.approvedby,T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName'); + $this->db->from('T_Test_Report_Master'); + $this->db->join('T_IGR_Master','T_Test_Report_Master.igrno=T_IGR_Master.IGRNO'); + $this->db->join('T_IGR_Details','T_Test_Report_Master.igrlineitemno=T_IGR_Details.IGRItemNo'); + $this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO'); + $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode'); + $this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID'); + $this->db->join('tbl_users','T_Test_Report_Master.createdby=tbl_users.userid'); + $this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID'); + $this->db->order_by('testreport_id','desc'); + $res = $this->db->get(); + return $res->result(); + } + + function getIGRNOforReport() + { + // $this->db->distinct(); + // $this->db->select('IGRNO'); + // $this->db->from('T_IGR_Details'); + // $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode'); + // $this->db->like('T_MaterialMaster.Category','raw material'); + + $sql = 'select distinct IGRNO from T_IGR_Details + join T_MaterialMaster on T_IGR_Details.MaterialCode = T_MaterialMaster.MaterialCode + where T_MaterialMaster.Category like "%Raw Material%" order by IGRNO desc'; + $result = $this->db->query($sql); + return $result->result(); + } + + function getIGRLineItemNo($igrno) + { + // $this->db->select('IGRItemNo'); + // $this->db->from('T_IGR_Details'); + // $this->db->where('IGRNO',$igrno); + + $sql = 'select IGRItemNo from T_IGR_Details + join T_MaterialMaster on T_IGR_Details.MaterialCode = T_MaterialMaster.MaterialCode + where IGRNO = ? and T_MaterialMaster.Category like "%Raw Material%"'; + + $result = $this->db->query($sql,array($igrno)); + return $result->result(); + + + } + + + + function getIGRDataforReport($igrno,$igrlineitemno) + { + //echo $igrno.'-'.$igrlineitemno;die(); + // $this->db->select('T_IGR_Master.DeliveryChellanOrInvoiceNo,T_IGR_Master.DeliveryChellanDate,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_MaterialMaster.MaterialCode,T_MaterialMaster.MaterialName,T_IGR_Details.QuantityAsPerInvoice'); + // $this->db->from('T_IGR_Master'); + // $this->db->join('T_IGR_Details','T_IGR_Master.IGRNO=T_IGR_Details.IGRNO'); + // $this->db->join('T_MaterialMaster','T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode'); + // $this->db->join('T_PurchaseOrder_Master','T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO'); + // $this->db->join('T_SupplierDetailsN','T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID'); + + // $this->db->where('T_IGR_Details.IGRNO',$igrno); + // $this->db->where('T_IGR_Details.IGRItemNo',$igrlineitemno); + // $this->db->order_by('T_IGR_Master.IGRNO'); + // $res = $this->db->get(); + // return $res->result(); + + $sql = 'select T_IGR_Master.DeliveryChellanOrInvoiceNo, date_format(T_IGR_Master.DeliveryChellanDate,"%d-%m-%Y") as DeliveryChellanDate,T_SupplierDetailsN.SupplierID,T_SupplierDetailsN.SupplierName,T_MaterialMaster.MaterialCode, + T_MaterialMaster.MaterialName,T_IGR_Details.QuantityAsPerInvoice + from T_IGR_Master + join T_IGR_Details on T_IGR_Master.IGRNO=T_IGR_Details.IGRNO + join T_MaterialMaster on T_IGR_Details.MaterialCode=T_MaterialMaster.MaterialCode + join T_PurchaseOrder_Master on T_IGR_Master.PONO=T_PurchaseOrder_Master.PONO + join T_SupplierDetailsN on T_PurchaseOrder_Master.SupplierID=T_SupplierDetailsN.SupplierID + where T_IGR_Master.IGRNO = ? and T_IGR_Details.IGRItemNo = ?'; + $res = $this->db->query($sql,array($igrno,$igrlineitemno)); + return $res->result(); + } } ?> \ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index 2b274d4c..7828ab0e 100755 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -581,6 +581,13 @@ $(function() { Product Test Report + +
  • + + + Inward Material Test Report + +
  • +.edit{ + +background-color:#eeffcc ! important; + +} + +'Select IGR No'); +foreach($records as $rec) +{ + $igrnos[$rec->IGRNO] = $rec->IGRNO; +} +$igrlinenos = array(-1=>'Select IGR LineItem No'); +//print_r($emplist); +$approvedby = array(-1=>'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} + +?> + + + +
    + +
    +

    +
    Inward Inspection Report Screen
    +

    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + +
    +
    + +
    + + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    + + +
    + + + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + + +
    + +
    + + +
    + + + +
    +
    + + + + + + + + + + + + + + +
    SNODescriptionSpecification
    Min
    Specification
    Max
    Specification
    UOM
    ACT X1ACT X2ACT X3AverageResultsRemarks
    +

     

    +
    + +
    + +
    L.O.I Details
    + +
    +
    + + + + + + + + + + + + + +
    SNO
    Heating Time

    start
    Heating Time

    end
    Temp *c
    Crucible Weight

    w1(g)
    Before Heating

    w2(g)
    After Heating

    w3(g)
    L.O.I %Remarks
    +
    + + +
    + +
    AFS Details
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    NOSieve Size µmMesh SizeSand WeightPercentageMultiplierProduct
    1 170010 0.000.0050.0000
    2 85020 0.000.00100.0000
    3 60030 0.000.00200.0000
    4 42540 0.000.00300.0000
    5 30050 0.000.00400.0000
    6 21270 0.000.00500.0000
    7 150100 0.000.00700.0000
    8 106140 0.000.001000.0000
    9 75200 0.000.001400.0000
    10 53300 0.000.002000.0000
    11 panpan 0.000.003000.0000
      Total  0.000.00 0.0000
    +
    + +
    + +
    AFS CHART
    + +
    +
    +
    +
    + Your browser does not support the HTML5 canvas tag.
    + +
    +
    + + + + + +
     
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
     
    +
    +
     
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/application/views/qualitymaster.php b/application/views/qualitymaster.php index 624983c0..6ee7a4ec 100644 --- a/application/views/qualitymaster.php +++ b/application/views/qualitymaster.php @@ -11,16 +11,29 @@ th{ $products2=array(-1=>'Select Products'); -foreach($products as $product) +foreach($productsoutward as $product) { $products2[$product->product_id] =$product->product_id.'-'.$product->product_name.'-'.$product->product_description; } $customers2 = array(-1 => 'Select Customer'); -foreach($customers as $customer) +foreach($customersoutward as $customer) { $customers2[$customer->client_id] = $customer->client_name; } + +$productsinward1=array(-1=>'Select Products'); + +foreach($productsinward as $product) +{ + $productsinward1[$product->MaterialCode] =$product->MaterialCode.'-'.$product->MaterialName; +} + +$customersinward1 = array(-1 => 'Select Customer'); +foreach($customersinward as $customer) +{ + $customersinward1[$customer->SupplierID] = $customer->SupplierName; +} ?> @@ -52,12 +65,46 @@ foreach($customers as $customer)
    -
    +
    + 'newsletter', + // 'id' => 'newsletter', + // 'value' => 'accept', + // 'checked' => TRUE, + // 'style' => 'margin:10px' + // ); + + // echo form_checkbox($data); + + ?> +   OutWard + +
    +
    +   InWard +
    + +
    +
    +
    +
    +
    + +
    @@ -182,19 +229,65 @@ foreach($customers as $customer) + + + + + + + + + \ No newline at end of file diff --git a/application/views/viewindinwardreportpdf.php b/application/views/viewindinwardreportpdf.php new file mode 100644 index 00000000..8eb98b12 --- /dev/null +++ b/application/views/viewindinwardreportpdf.php @@ -0,0 +1,188 @@ + +chartdata; + $reportid = $m->testreport_id; + $invoiceno = $m->DeliveryChellanOrInvoiceNo; + $invoicedate = $m->DeliveryChellanDate; + $customername = $m->SupplierName; + $product_description = $m->Materialname; + $igrno = $m->IGRNO; + $igrlineitemno = $m->IGRItemNo; + $qty = $m->QuantityAsPerInvoice; + $batchdate = $m->batchdate; + $inspector = $m->FirstName.' '.$m->LastName; + $approvedby = $m->approvedby; +} +} + +$cname = ''; +$caddress = ''; +$pic = ''; +if(!empty($reportdata['company'])){ +foreach($reportdata['company'] as $c) + { + $cname = $c->CompanyName; + $caddress = $c->Address; + $pic = $c->ProfilePic; + } +} +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    INWARD MATERIAL INSPECTION REPORT

    no image
    SUPPLIER NAMEIGRNO
    IGRItemNo
    MATERIAL NAMEINVOICE NO
    INVOICE DATE
    QTY kgsBATCH DATE
    + +
    + + + + + + + + +
    S.NODESCRIPTIONSPECIFICATIONACT Average Results Remarks
    X1 X2 X3
    MinMaxUOM
    description;?>min == 0 || $master->min == '') { echo "-"; } else { echo $master->min;} ?> max == 0 || $master->max == '') { echo '-'; } else { echo $master->max; }?> UOM;?>act1)){ echo $master->act1; }else {echo '0.00';}?>act2)){ echo $master->act2; } else {echo '0.00';}?> act3)){ echo $master->act3; } else {echo '0.00';}?> average;?> result;?> remarks;?>
    + +

    L.O.I DETAILS

    + + + + + + + + +
    S.NOHEATING TIMETEMPCRUCIBLE WEIGHTBEFORE HEATING WEIGHTAFTER HEATING WEIGHT L.O.I (%)Remarks
    START TIME - END TIME*C W1(g) W2(g) W3(g)
    start_time.'~'.$loi->end_time;?>temp;?> w1;?> w2;?> w3;?> loi_percentage;?> remarks;?>
    + +

    AFS DETAILS

    + + + + + + sandweight; + $totalproduct = $totalproduct + $afs->product; + } + ?> + + +
    S.NO Sieve Size µm Mesh Size SAND WEIGHT Percantage Multiplier Product
    sieve_size?> mesh_size?>sandweight;?>percentage?>multiplier?>product;?>
      Total   
    +
    +
    + +
    NO
    + +
    +
    +

    + + + + + + +
    INSPECTOR NAME :                                                      APPROVED BY :
     
     
    Signature 
    + +