From c3707be70c20cd09c8fbfeadd01694528201a1a3 Mon Sep 17 00:00:00 2001 From: venbatechnologies Date: Mon, 16 Apr 2018 11:31:56 +0530 Subject: [PATCH] resinbatchprintbtnadded --- application/controllers/resinbatchcard.php | 46 + application/views/editresinbatchcard.php | 29 +- application/views/viewresinbatchpdf.php | 1067 ++++++++++++++++++++ 3 files changed, 1141 insertions(+), 1 deletion(-) create mode 100644 application/views/viewresinbatchpdf.php diff --git a/application/controllers/resinbatchcard.php b/application/controllers/resinbatchcard.php index 0f08200c..fa436d72 100644 --- a/application/controllers/resinbatchcard.php +++ b/application/controllers/resinbatchcard.php @@ -371,6 +371,52 @@ class resinbatchcard extends BaseController $this->loadViews("editresinbatchcard", $this->global, $data , NULL); } + + //this function used to edit resinbatch card pdf + + + function printResinBatchReport() + { + + + + + $rbcid = $this->uri->segment(3); + $data['records'] = $this->quality_model->getResinBatchCardDetails($rbcid); + //print_r( $data['records']); + + $productid= $data['records']['masterdata'][0]->productid; + $customerid = $data['records']['masterdata'][0]->customerid; + $ttype = 'RESINBATCHCARD'; + // echo $productid1; + // echo $customerid1; + $data['recordsheader'] = $this->quality_model->getSpecifications($productid,$customerid,$ttype); + //print_r($data['recordsheader']); + $data['existspec'] = $this->quality_model->getAllspec(); // values max 15 pdf include + $data['existoperatorslist'] = $this->quality_model->getExistOperatorsListforReport($rbcid); + // print_r( $data['existspec']); + + + // $filename = 'Siddharth :ResinBatchCard'.$rbcid; + + $data['reportdata']['masterreport'] = $temparray; + $data['timearray'] = $time; + $data['emplist'] = $this->quality_model->getEmplistforReport(); + + $this->global['pageTitle'] = 'Siddharth :ResinBatchCardPDF'; + $html = $this->load->View("viewresinbatchpdf",$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->SetTitle('Siddharth :ResinBatchCard'.$rbcid); + $mpdf->list_indent_first_level = 1; + $mpdf->setAutoTopMargin = 'stretch'; + $mpdf->setAutoBottomMargin = 'stretch'; + $mpdf->WriteHTML($html); + //$mpdf->SetJS('print();'); + $mpdf->Output($filename.'.pdf','I'); + } + } ?> diff --git a/application/views/editresinbatchcard.php b/application/views/editresinbatchcard.php index ad87abd6..1b988e77 100644 --- a/application/views/editresinbatchcard.php +++ b/application/views/editresinbatchcard.php @@ -65,6 +65,20 @@ th{
+
+
+ + +
+ + +
+
+ +
@@ -72,13 +86,19 @@ th{
+ +
+ +
+
+
@@ -1061,7 +1081,14 @@ console.log(listopsforstore+'-'+oldops); - + function PrintFunction() +{ + + + $('#printPDF').attr('action', 'resinbatchcard/printResinBatchReport/resinbatch_id; ?>'); + $('#printPDF').attr('method', 'post'); + $('#printPDF').submit(); +} diff --git a/application/views/viewresinbatchpdf.php b/application/views/viewresinbatchpdf.php new file mode 100644 index 00000000..022f599b --- /dev/null +++ b/application/views/viewresinbatchpdf.php @@ -0,0 +1,1067 @@ + + + + + + +
+ +
+ + +
+
+
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

RESIN BATCH CARD REPORT

B No : trpbatchcardno;?>Date:batchdate),'d-m-Y');?>Shift:plantname?>SAND: igrno;?>RESIN:resinname?>
OperatorEmpID.">".$ex->EmpID.'-'.$ex->FirstName.'-'.$ex->LastName.""; + } + ?>Customer:client_name?>Grade:product_name.'-'.$records['masterdata'][0]->product_description?>Machine Name:machinecode;?>
+
+
+ +
+ +
+ + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $value) + { + //print_r($value); + ?> + + + $v) + { + if($key == 0){ + ?> + + + + + + + + + + + + +
ParticularsTimetesttype;?>
SNOUnituom;?>
Specmin.'-'.$headervalue->max;?>
+
+ +

Raw/Packing Material Consumption

+ + + + + + + + + + + + +
ParticularsSandResinHexamineCSCatalyst50 Bags1 ton BagProduction Loss
Lump
Finished Prodcut
PCS
UnitKgsKgsKgsKgsKgsKgsNosKgsKgs
Qtysandtotal;?>resintotal;?>hextotal;?>cstotal;?>catalysttotal;?>bags50total;?>ton1bagstotal;?>producitonloss;?>finishedproduct;?>
+ + + + + + +
+ + +
+ + + + + + + + + +
 
+
+ + + + +

Remarks:

remarks; ?>

+
+
+ + + + + + +
Operator + :session->userdata ( 'name' );?>                                                      Production In charge:approvedby; ?>
 
 
+ + + + + + + +
+ +
+
+
+
+ + + + + + + + + + \ No newline at end of file