resinbatchprintbtnadded
This commit is contained in:
parent
00666a78e4
commit
c3707be70c
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -65,6 +65,20 @@ th{
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<div class="box-tools">
|
||||
<div class="row">
|
||||
<!-- <div class="col-md-3" id="savebutton">
|
||||
<input type="button" id="submit" target="_blank" value = "Print" class="btn btn-primary" onclick="PrintFunction();">
|
||||
</div> -->
|
||||
|
||||
<div class="col-md-3" id="savebutton">
|
||||
<input type="button" id="submit" target="_blank" value = "Print" class="btn btn-primary" onclick="PrintFunction();">
|
||||
<!-- <a href="<?php echo base_url()?>resinbatchcard/viewIndReport/<?php echo $data->resinbatch_id ?>"><?php echo $data->resinbatch_id?></a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
@ -72,13 +86,19 @@ th{
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>Customer</label>
|
||||
<input type="text" value="<?php echo $records['masterdata'][0]->client_name?>" class="form-control" readonly>
|
||||
|
||||
<form id="printPDF">
|
||||
<input type="hidden" id="MASTERID" value="<?php echo $records['masterdata'][0]->resinbatch_id?>" >
|
||||
</form>
|
||||
<!-- <input type="hidden" id="MASTERID" value="<?php echo $records['masterdata'][0]->resinbatch_id?>" > -->
|
||||
<input type="hidden" id="customer" value="<?php echo $records['masterdata'][0]->customerid?>" >
|
||||
</div>
|
||||
|
||||
@ -1061,7 +1081,14 @@ console.log(listopsforstore+'-'+oldops);
|
||||
|
||||
|
||||
|
||||
|
||||
function PrintFunction()
|
||||
{
|
||||
|
||||
|
||||
$('#printPDF').attr('action', '<?php echo base_url()?>resinbatchcard/printResinBatchReport/<?php echo $records['masterdata'][0]->resinbatch_id; ?>');
|
||||
$('#printPDF').attr('method', 'post');
|
||||
$('#printPDF').submit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
1067
application/views/viewresinbatchpdf.php
Normal file
1067
application/views/viewresinbatchpdf.php
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user