From 4febdd7780d2c9424b70ba0ebeba321a6f1cd6c0 Mon Sep 17 00:00:00 2001 From: velz2020 Date: Fri, 1 Dec 2017 20:56:24 +0530 Subject: [PATCH] NEW MODULE QA --- application/config/routes.php | 2 +- application/controllers/quality.php | 287 ++++++ application/models/quality_model.php | 225 +++++ application/views/includes/header.php | 12 + application/views/qualitymaster.php | 313 +++++++ application/views/qualitymasterlistview.php | 293 ++++++ application/views/qualityreport.php | 955 ++++++++++++++++++++ application/views/reportmasterlist.php | 95 ++ application/views/viewIndSpec.php | 315 +++++++ application/views/viewindreport.php | 473 ++++++++++ application/views/viewindreportpdf.php | 146 +++ 11 files changed, 3115 insertions(+), 1 deletion(-) create mode 100644 application/controllers/quality.php create mode 100644 application/models/quality_model.php create mode 100644 application/views/qualitymaster.php create mode 100644 application/views/qualitymasterlistview.php create mode 100644 application/views/qualityreport.php create mode 100644 application/views/reportmasterlist.php create mode 100644 application/views/viewIndSpec.php create mode 100644 application/views/viewindreport.php create mode 100644 application/views/viewindreportpdf.php diff --git a/application/config/routes.php b/application/config/routes.php index a55f2d2d..25136cb7 100755 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -203,7 +203,7 @@ $route['Distribution'] = "MRIRcontroller/viewmMaterialDistributionList"; $route['ViewIncomeExpense'] = "cashbook/incomeExpenseList"; $route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad"; $route['addIncomeExpense'] = "cashbook/addIncomeExpense"; - +$route['qualityreportlist'] = "quality/reportList"; //<-------------Store page-----------------> $route['Stock'] = "storestatus/storeavailability"; $route['UpdatePOStatus'] = "servicepurchaseorder/UpdateServicePOStatus"; diff --git a/application/controllers/quality.php b/application/controllers/quality.php new file mode 100644 index 00000000..d9bd049b --- /dev/null +++ b/application/controllers/quality.php @@ -0,0 +1,287 @@ +load->model('quality_model'); + $this->load->library('form_validation'); + //$this->load->library('dompdf_gen'); + $this->isLoggedIn(); + } + /** + * This function used to load the first screen of the user + */ + public function index() + { + $data['products'] = $this->quality_model->getAllprodcuts(); + $data['customers'] = $this->quality_model->getAllcustomers(); + $data['existspec'] = $this->quality_model->getAllspec(); + $this->global['pageTitle'] = 'Siddharth : Quality Master'; + + $this->loadViews("qualitymasterlistview", $this->global, $data , NULL); + } + + + public function reportList() + { + $data['records'] = $this->quality_model->getTestMasterforList(); + + $this->global['pageTitle'] = 'Siddharth : Quality Master'; + $this->loadViews("reportmasterlist", $this->global, $data , NULL); + } + + function addNewPage() + { + $data['products'] = $this->quality_model->getAllprodcuts(); + $data['customers'] = $this->quality_model->getAllcustomers(); + + $this->global['pageTitle'] = 'Siddharth : Quality Master'; + + $this->loadViews("qualitymaster", $this->global, $data , NULL); + } + + function saveSpectficationData() + { + $product = $this->input->post('param2'); + $customer = $this->input->post('param3'); + $jsondata = $this->input->post('param1'); + $createdby = $this->session->userdata ( 'userId' ); + $phpdata = json_decode($jsondata); + $total = 0; + // echo $product .'-'. $customer; + // print_r($phpdata);die(); + + foreach($phpdata as $data) + { + $name = $data->Name; + $name = strtoupper($name); + $uom = $data->UOM; + $min = $data->Min; + $max = $data->Max; + $temp = $data->Temp; + $isExist = $this->quality_model->checkExist($product,$customer,$name); + //echo $isExist[0]->count;die(); + 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); + $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); + $res = $this->quality_model->updateSpecMast($tostore,$product,$customer,$name); + //echo 'u'.$res; + } + + $total +=$res; + } + + echo $total.'- Specification Saved Successfully'; + } + + function deleteSpecification() + { + $spname = $this->input->post('param1'); + $product = $this->input->post('param2'); + $customer = $this->input->post('param3'); + $res = $this->quality_model->deleteSpecification($spname,$product,$customer); + if($res == 1) + { + echo "Deleted Successfully..!"; + } + else + { + echo "Something Went Wrong..!Try later"; + } + + } + + function report() + { + + $data['records'] = $this->quality_model->getDataforReport(); + $data['emplist'] = $this->quality_model->getEmplistforReport(); + $this->global['pageTitle'] = 'Siddharth : Inspection Report Screen'; + $this->loadViews("qualityreport", $this->global, $data, NULL); + } + + function viewSpec() + { + $prodcutid = $this->uri->segment(3); + $customerid =$this->uri->segment(4); + $data['specifications'] = $this->quality_model->getIndividualSpec($prodcutid,$customerid); + $this->global['pageTitle'] = 'Siddharth : View reports Lists'; + + $this->loadViews("viewIndSpec", $this->global, $data, NULL); + + } + + function viewIndReport() + { + $reportid = $this->uri->segment(3); + + $data['reportdata'] = $this->quality_model->getIndividualReportData($reportid); + $this->global['pageTitle'] = 'Siddharth : View Individual Report'; + $this->loadViews("viewindreport", $this->global, $data, NULL); + + } + + function printReportPDF() + { + + + $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); + 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'); + + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + $mpdf->Output("".$filename.'.pdf','I',$php); + + } + + function getAllSpecforReport() + { + $productid = $this->input->post('param1'); + $customerid = $this->input->post('param2'); + //echo 'from cn'.$productid.'-'.$customerid; + $res = $this->quality_model->getSpecifications($productid,$customerid); + echo json_encode($res); + } + + + function saveTestReportData() + { + + date_default_timezone_get('Asia/Kolkata'); + $testjson = $this->input->post('param1'); + $loijson = $this->input->post('param2'); + $afsjson = $this->input->post('param3'); + $invoiceno = $this->input->post('param4'); + $batchno = $this->input->post('param5'); + $chart = $this->input->post('param7'); + $batchno = date_format(date_create($batchno),'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('invoiceid'=>$invoiceno,'batchdate'=>$batchno,'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']; + $sandweight = $afs['Sand Weight']; + $Percentage = $afs['Percentage']; + $Multiplier = $afs['Multiplier']; + $Product = $afs['Product']; + $afstabledata = array('testreport_id'=>$MASTERID,'sieve_size'=>$ssize,'sandweight'=>$sandweight,'percentage'=>$Percentage,'multiplier'=>$Multiplier,'product'=>$Product); + $afsid = $this->quality_model->saveTestReportAFSData($afstabledata); + } + } + + echo "Report Data Saved Successfully!"; + + + } + + function pageNotFound() + { + $this->global['pageTitle'] = 'CodeInsect : 404 - Page Not Found'; + + $this->loadViews("404", $this->global, NULL, NULL); + } +} + +?> \ No newline at end of file diff --git a/application/models/quality_model.php b/application/models/quality_model.php new file mode 100644 index 00000000..4a241781 --- /dev/null +++ b/application/models/quality_model.php @@ -0,0 +1,225 @@ +db->select('invoice_id'); + $this->db->from('ip_invoices'); + $result = $this->db->get(); + return $result->result(); + } + + function getAllprodcuts() + { + $this->db->select('product_id,product_name'); + $this->db->from('ip_products'); + $result = $this->db->get(); + return $result->result(); + } + + function getAllcustomers() + { + $this->db->select('client_id,client_name'); + $this->db->from('ip_clients'); + $result = $this->db->get(); + return $result->result(); + } + + function checkExist($product,$customer,$name) + { + $this->db->select('count(*) as count'); + $this->db->from('T_Prodcut_Specification_Master'); + $this->db->where('product_id',$product); + $this->db->where('customer_id',$customer); + $this->db->where('testtype',$name); + $result = $this->db->get(); + return $result->result(); + } + + + function addSpecMast($data) + { + //print_r($data); + $this->db->insert('T_Prodcut_Specification_Master',$data); + $r = $this->db->affected_rows(); + return $r; + } + + function updateSpecMast($data,$product,$customer,$name) + { + //echo $product.$customer.$name; + //print_r($data); + $this->db->where('product_id',$product); + $this->db->where('customer_id',$customer); + $this->db->where('testtype',$name); + $this->db->update('T_Prodcut_Specification_Master',$data); + $r = $this->db->affected_rows(); + //echo $r;die(); + return $r; + } + + function getAllspec() + { + $this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_clients.client_name,count(*) as count'); + $this->db->from('T_Prodcut_Specification_Master'); + $this->db->join('ip_products','T_Prodcut_Specification_Master.product_id=ip_products.product_id'); + $this->db->join('ip_clients','T_Prodcut_Specification_Master.customer_id=ip_clients.client_id'); + $this->db->group_by('product_id,customer_id'); + $result = $this->db->get(); + return $result->result(); + } + + + function getIndividualSpec($prodcutid,$customerid) + { + $this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_clients.client_name'); + $this->db->from('T_Prodcut_Specification_Master'); + $this->db->join('ip_products','T_Prodcut_Specification_Master.product_id=ip_products.product_id'); + $this->db->join('ip_clients','T_Prodcut_Specification_Master.customer_id=ip_clients.client_id'); + $this->db->where('T_Prodcut_Specification_Master.product_id',$prodcutid); + $this->db->where('T_Prodcut_Specification_Master.customer_id',$customerid); + $result = $this->db->get(); + return $result->result(); + } + + + function deleteSpecification($spname,$product,$customer) + { + $this->db->where("testtype", $spname); + $this->db->where("product_id", $product); + $this->db->where("customer_id", $customer); + $this->db->delete('T_Prodcut_Specification_Master'); + $r = $this->db->affected_rows(); + return $r; + } + + + function getDataforReport() + { + $this->db->select('ip_invoices.invoice_id,ip_invoices.client_id,ip_invoice_custom.invoice_custom_fieldvalue,ip_clients.client_name,ip_invoices.invoice_date_created,ip_invoice_items.item_product_id,ip_products.product_name,ip_invoice_items.item_quantity'); + $this->db->from('ip_invoices'); + $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_invoice_items.item_product_id=ip_products.product_id'); + $this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62'); + $this->db->order_by('ip_invoices.invoice_id'); + $res = $this->db->get(); + return $res->result(); + } + + function getSpecifications($productid,$customerid) + { + $this->db->where('product_id',$productid); + $this->db->where('customer_id',$customerid); + $res = $this->db->get('T_Prodcut_Specification_Master'); + return $res->result(); + } + + function getEmplistforReport() + { + $this->db->select('T_Employee_Details.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.Departmentcode,T_DepartmentDetails.shortName,'); + $this->db->from('T_Employee_Details'); + $this->db->join('T_DepartmentDetails','T_Employee_Details.Departmentcode=T_DepartmentDetails.DEPCode'); + //$this->db->join('ip_invoice_items','ip_invoices.invoice_id=ip_invoice_items.invoice_id'); + //$this->db->join('ip_products','ip_invoice_items.item_product_id=ip_products.product_id'); + //$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62'); + $this->db->order_by('T_Employee_Details.EmpID'); + $res = $this->db->get(); + return $res->result(); + + } + + + function saveMasterTestData($masterreportdata) + { + $this->db->insert('T_Test_Report_Master',$masterreportdata); + $id = $this->db->insert_id(); + return $id; + } + + function saveTestReportData($testreportdata) + { + $this->db->insert('T_Test_Report',$testreportdata); + $row = $this->db->affected_rows(); + return $row; + } + + function saveTestReportAFSData($afstabledata) + { + $this->db->insert('T_Test_Report_AFS',$afstabledata); + $row = $this->db->affected_rows(); + return $row; + } + + function saveTestReportLOIData($loitabledata) + { + $this->db->insert('T_Test_Report_LOI',$loitabledata); + $row = $this->db->affected_rows(); + return $row; + } + + function getIndividualReportData($reportid) + { + + $this->db->select('T_Test_Report_Master.testreport_id,ip_invoices.invoice_date_created,T_Test_Report_Master.invoiceid,T_Test_Report_Master.batchdate,T_Test_Report_Master.chartdata,ip_clients.client_id,ip_clients.client_name,invoice_custom_fieldvalue,ip_products.product_id,ip_products.product_name,T_Employee_Details.FirstName,T_Employee_Details.LastName,ip_invoice_items.item_quantity,T_Test_Report_Master.approvedby'); + $this->db->from('T_Test_Report_Master'); + $this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_id'); + $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->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62'); + $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->join('T_Employee_Details','T_Test_Report_Master.EmpID=T_Employee_Details.EmpID'); + //$this->db->join('ip_invoice_custom','ip_invoices.invoice_id=ip_invoice_custom.invoice_id and invoice_custom_fieldid=62'); + $this->db->where('testreport_id',$reportid); + // $this->db->join('T_Test_Report','T_Test_Report_Master.testreport_id=T_Test_Report.testreport_id'); + // $this->db->join('T_Test_Report_loi','T_Test_Report_Master.testreport_id=T_Test_Report_loi.testreport_id'); + // $this->db->join('T_Test_Report_afs','T_Test_Report_Master.testreport_id=T_Test_Report_afs.testreport_id'); + + $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'); + $this->db->from('T_Test_Report_Master'); + $this->db->join('ip_invoices','T_Test_Report_Master.invoiceid=ip_invoices.invoice_id'); + $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(); + } +} +?> + \ No newline at end of file diff --git a/application/views/includes/header.php b/application/views/includes/header.php index 20dc236b..e15d9a46 100755 --- a/application/views/includes/header.php +++ b/application/views/includes/header.php @@ -551,6 +551,18 @@ $(function() { View Material Inspection Report +
  • + + + Product Test Specification Master + +
  • +
  • + + + Product Test Report + +
  • +th{ + text-align:center ! important; +} + +'Select Products'); + +foreach($products as $product) +{ + $products2[$product->product_id] = $product->product_name; +} + +$customers2 = array(-1 => 'Select Customer'); +foreach($customers as $customer) +{ + $customers2[$customer->client_id] = $customer->client_name; +} +?> + + +
    + +
    +

    +
    Product Test Specification Master Screen
    +

    +
    +
    + + +
    +
    +
    +
    + +
    + + + + +
    + +
    + + +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + +
    NameUOMMinMaxTempAction
    +

     

    +
    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/qualitymasterlistview.php b/application/views/qualitymasterlistview.php new file mode 100644 index 00000000..a3eefcfc --- /dev/null +++ b/application/views/qualitymasterlistview.php @@ -0,0 +1,293 @@ + + + +
    + +
    +

    +
    Product Test Specification List
    +

    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + Add New +
    + + +
    + +
    + + +
    + + +
    + + + + + + + + + + + + + +
    "; + ?> + + + +
    Product NameCompany NameTotal Specification
    product_name?> client_name?> count?>
    +

     

    +
    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/qualityreport.php b/application/views/qualityreport.php new file mode 100644 index 00000000..f71f5ed2 --- /dev/null +++ b/application/views/qualityreport.php @@ -0,0 +1,955 @@ + +'Select Invoice No'); +foreach($records as $rec) +{ + $invoicenos[$rec->invoice_id] = $rec->invoice_id; +} + +//print_r($emplist); +$approvedby = array(-1=>'Select Approver Name'); +foreach($emplist as $r) +{ + $approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName; +} + +?> + + + +
    + +
    +

    +
    Pre Dispatch 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 µmSand WeightPercentageMultiplierProduct
    1 1700 0.000.0050.0000
    2 850 0.000.00100.0000
    3 600 0.000.00200.0000
    4 425 0.000.00300.0000
    5 300 0.000.00400.0000
    6 212 0.000.00500.0000
    7 150 0.000.00700.0000
    8 106 0.000.001000.0000
    9 75 0.000.001400.0000
    10 53 0.000.002000.0000
    11 pan 0.000.003000.0000
      Total 0.000.00 0.0000
    +
    + +
    + +
    CHART
    + +
    +
    +
    +
    + Your browser does not support the HTML5 canvas tag.
    + +
    +
    + + + + + +
     
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
     
    +
    +
     
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/application/views/reportmasterlist.php b/application/views/reportmasterlist.php new file mode 100644 index 00000000..cb2533c8 --- /dev/null +++ b/application/views/reportmasterlist.php @@ -0,0 +1,95 @@ + + +
    + +
    +

    +
    Product Test Reports List
    +

    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + Add New +
    + + +
    + +
    + + +
    + + +
    + + + + + + + + + + + + + + + +
    "; + ?> + + + +
    Test Report IDInvoice IDBatch DateProduct NameCustomer Name
    testreport_id?> invoiceid?> batchdate),'d-m-Y');?>product_name;?>client_name;?>
    +

     

    +
    + +
    +
    + +
    +
    +
    +
    +
    diff --git a/application/views/viewIndSpec.php b/application/views/viewIndSpec.php new file mode 100644 index 00000000..89173760 --- /dev/null +++ b/application/views/viewIndSpec.php @@ -0,0 +1,315 @@ + +product_name; + $cname = $s->client_name; + $pid = $s->product_id; + $cid = $s->customer_id; + break; +} + +?> + + +
    + +
    +

    +
    Product Customer Test Specification Master Screen
    +

    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + +
    +
    + +
    + + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + + + +
    NameUOMMinMaxTempAction
    testtype?> uom?> min?> max?> temp)){ echo $data->temp; } else { echo "-"; }?>
    +

     

    +
    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/viewindreport.php b/application/views/viewindreport.php new file mode 100644 index 00000000..c4c7b28e --- /dev/null +++ b/application/views/viewindreport.php @@ -0,0 +1,473 @@ + +testreport_id; + $invoiceno = $m->invoiceid; + $invoicedate = $m->invoice_date_created; + $customername = $m->client_id.'-'.$m->client_name; + $product_name = $m->product_id.'-'.$m->product_name; + $batchno = $m->invoice_custom_fieldvalue; + $qty = $m->item_quantity; + $batchdate = $m->batchdate; + $inspector = $m->FirstName.' '.$m->LastName; + $approvedby = $m->approvedby; +} +?> + +
    + +
    +

    +
    Pre Dispatch Inspection Report - Test Report No:
    +

    +
    +
    + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    + + +
    + +
    +
    + + + +
    + +
    + + +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + + + +
    +
    + + + + + + + + + + + + + + + + +
    SNODescriptionSpecification
    Min
    Specification
    Max
    Specification
    UOM
    ACT X1ACT X2ACT X3AverageResultsRemarks
    description;?>min;?> 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
    + +
    +
    + + + + + + + + + + + + + + + +
    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
    start_time;?> end_time;?> temp;?> w1;?> w2;?> w3;?> loi_percentage;?> remarks;?>
    +
    + + +
    + +
    AFS Details
    + +
    +
    + + + + + + + + + + + + + sandweight; + $totalproduct = $totalproduct + $afs->product; + } + ?> + + + + +
    NOSieve Size µmSand WeightPercentageMultiplierProduct
    sieve_size?> sandweight;?>percentage?>multiplier?>product;?>
      Total  
    +
    + +
    + +
    CHART
    + +
    +
    +
    +
    + Your browser does not support the HTML5 canvas tag.
    + +
    +
    + + + + + +
     
    +
    + +
    + + + +
    + +
    + + + +
    + +
    + +
     
    +
    +
     
    +
    + +
    +
    + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/application/views/viewindreportpdf.php b/application/views/viewindreportpdf.php new file mode 100644 index 00000000..60c924a9 --- /dev/null +++ b/application/views/viewindreportpdf.php @@ -0,0 +1,146 @@ + +chartdata; + $reportid = $m->testreport_id; + $invoiceno = $m->invoiceid; + $invoicedate = $m->invoice_date_created; + $customername = $m->client_id.'-'.$m->client_name; + $product_name = $m->product_id.'-'.$m->product_name; + $batchno = $m->invoice_custom_fieldvalue; + $qty = $m->item_quantity; + $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; + } +} +?> + + + + + + + + + + + + + + + + +

    PRE DISPATCH INSPECTION REPORT -

    no image
    CUSTOMER NAME
    MATERIAL NAMEINVOICE NO
    Qty kgs INVOICEDATE
    Batch NO
    BATCH DATE
    +
    + + + + + + + + +
    SNODESCRIPTIONSPECIFICATIONACT 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

    + + + + + + + + +
    SNOHEATING 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 SAND WEIGHT Percantage Multiplier Product
    sieve_size?> sandweight;?>percentage?>multiplier?>product;?>
      Total  
    +
    +
    + +
    NO
    + +
    +
    +

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