QA CHANGES and PAYROLLCHANGES

This commit is contained in:
velz2020 2017-12-05 19:36:24 +05:30
parent 2f87aa9cc2
commit fb20db3df4
11 changed files with 109 additions and 75 deletions

View File

@ -162,7 +162,7 @@ class quality extends BaseController
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html);
$mpdf->Output("".$filename.'.pdf','I',$php);
$mpdf->Output($filename.'.pdf','I');
}

View File

@ -13,10 +13,11 @@ class monthlypay_model extends CI_Model
function monthlyListing($current="")
{
//echo $current;
$this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Payroll.Key');
$this->db->select('T_Monthly_Pay_Inputs.*,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Payroll.Key,T_Loan_Master.Loan_ID');
$this->db->from('T_Monthly_Pay_Inputs');
$this->db->join('T_Employee_Details','T_Monthly_Pay_Inputs.EmpID=T_Employee_Details.EmpID');
$this->db->join('T_Payroll','T_Monthly_Pay_Inputs.EmpID=T_Payroll.EmpID','left');
$this->db->join('T_Loan_Master','T_Monthly_Pay_Inputs.EmpID=T_Loan_Master.EmpID','left');
$this->db->where('Month_Year',$current);
$query = $this->db->get();
@ -47,9 +48,10 @@ class monthlypay_model extends CI_Model
//echo $current;
$current = date_create($current);
$current = date_format($current,'Y-m-d');
$sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays from T_Emp_Pay_Data
$sql = "select T_Emp_Pay_Data.EmpID,T_Employee_Details.FirstName,T_Employee_Details.LastName,T_Employee_Details.DateofJoining,T_Attendance.Days_Worked as Days_worked,T_Attendance.Absent as LOP_Days,T_Attendance.Paid_Leave as Paid_leave,T_Attendance.Total_OTHrs as OT_Hrs_Worked,T_Attendance.NoofDays,T_Loan_Master.Loan_ID from T_Emp_Pay_Data
left join T_Employee_Details on T_Employee_Details.EmpID = T_Emp_Pay_Data.EmpID
left join T_Attendance on T_Emp_Pay_Data.EmpID = T_Attendance.EmpID
left join T_Loan_Master on T_Emp_Pay_Data.EmpID = T_Loan_Master.EmpID and T_Loan_Master.is_Active = 1
where T_Employee_Details.DateofJoining <= CURRENT_DATE
and month(T_Attendance.Month_Year) = month(?)";

View File

@ -12,7 +12,7 @@ class Quality_model extends CI_Model
function getAllprodcuts()
{
$this->db->select('product_id,product_name');
$this->db->select('product_id,product_name,product_description');
$this->db->from('ip_products');
$result = $this->db->get();
return $result->result();
@ -61,7 +61,7 @@ class Quality_model extends CI_Model
function getAllspec()
{
$this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_clients.client_name,count(*) as count');
$this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_products.product_description,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');
@ -73,7 +73,7 @@ class Quality_model extends CI_Model
function getIndividualSpec($prodcutid,$customerid)
{
$this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_clients.client_name');
$this->db->select('T_Prodcut_Specification_Master.*,ip_products.product_name,ip_products.product_description,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');
@ -97,7 +97,7 @@ class Quality_model extends CI_Model
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->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_products.product_description,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');
@ -162,7 +162,7 @@ class Quality_model extends CI_Model
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->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,ip_products.product_description,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');
@ -211,7 +211,7 @@ class Quality_model extends CI_Model
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->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');
$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');

View File

@ -1,7 +1,7 @@
<?php
// print_r($month);
// print_r($month);
// echo "-------------";
// print_r($fresh);
//print_r($fresh);
$sample = array_merge($month,$fresh);
?>
@ -188,7 +188,7 @@ $('html').bind('keypress', function(e)
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?></td>
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?></td>
<td <?php if(empty($record->Key)){echo "contenteditable='false';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?></td>
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?></td>
<td <?php if(empty($record->Key) && !empty($record->Loan_ID)){ echo "contenteditable='true'; style='background-color:#ffcccc;text-align:right' title='Loan Pending'"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Loan_Recovered)){if(is_numeric($record->Loan_Recovered)){echo number_format($record->Loan_Recovered,2,'.','');}else {echo $record->Loan_Recovered;}}else{echo number_format(0.00,2,'.','');} ?></td>
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?></td>
<td <?php if(empty($record->Key)){echo "contenteditable='true';"; } ?> <?php if(!empty($record->Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"<?php } else{?>style="text-align:right;"<?php }?> ><?php if(!empty($record->Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?></td>
@ -248,7 +248,7 @@ $('html').bind('keypress', function(e)
//alert(JSON.stringify(alldata));
alldata=JSON.stringify(alldata)
var month = $('#monthyear').val();
$('#content').loader('hide');
$('.content').loader('show');
$.ajax({
data:{param1:alldata,param2:month},
//dataType:"json",
@ -257,7 +257,7 @@ $('html').bind('keypress', function(e)
success:function(data) {
if(data)
{
$('#content').loader('hide');
$('.content').loader('hide');
alert(data);
//console.log(data);
@ -367,19 +367,44 @@ $('html').bind('keypress', function(e)
var Other_Deductions = val.Other_Deductions;
if(Other_Deductions == null){ Other_Deductions = "0.00";}
//alert(val.EmpID +"-"+val.FirstName+"-"+val.LastName);
trHTML += '<tr>' +
'<td style="text-align:right;">' + (i) + '</td>' +
'<td style="text-align:right;">' + val.EmpID + '</td>' +
'<td>' + val.FirstName+" "+ val.LastName + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + Days_Worked + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + LOP_Days + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + Paid_leave + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + OT_Hrs_Worked + '</td>' +
'<td contenteditable="true" style="text-align:right;">' + Loan_Recovered + '</td>' +
'<td contenteditable="true" style="text-align:right;">' + Incentives + '</td>' +
'<td contenteditable="true" style="text-align:right;">' + Other_Deductions+ '</td>' +
'</tr>';
if(val.Key)
{
trHTML += '<tr>' +
'<td style="text-align:right;">' + (i) + '</td>' +
'<td style="text-align:right;">' + val.EmpID + '</td>' +
'<td>' + val.FirstName+" "+ val.LastName + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + Days_Worked + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + LOP_Days + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + Paid_leave + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + OT_Hrs_Worked + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + Loan_Recovered + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + Incentives + '</td>' +
'<td contenteditable="false" title="Payslip Calculated" style="text-align:right;color:blue;">' + Other_Deductions+ '</td>' +
'</tr>';
}
else
{
trHTML += '<tr>' +
'<td style="text-align:right;">' + (i) + '</td>' +
'<td style="text-align:right;">' + val.EmpID + '</td>' +
'<td>' + val.FirstName+" "+ val.LastName + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + Days_Worked + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + LOP_Days + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + Paid_leave + '</td>' +
'<td contenteditable="false" style="text-align:right;">' + OT_Hrs_Worked + '</td>' ;
if(val.Loan_ID){
trHTML += '<td contenteditable="true" title="Loan Pending" style="background-color:#ffcccc;text-align:right;">' + Loan_Recovered + '</td>';
}
else{
trHTML += '<td contenteditable="false" style="text-align:right;">' + Loan_Recovered + '</td>';
}
trHTML += '<td contenteditable="true" style="text-align:right;">' + Incentives + '</td>' +
'<td contenteditable="true" style="text-align:right;">' + Other_Deductions+ '</td>' +
'</tr>';
}
}

View File

@ -90,15 +90,12 @@ $(function() {
{
if(result != 1)
{
$('#content').loader('hide');
$.ajax({
data:{payon:payon,employee:employee},
type:"POST",
url:"<?php echo base_url();?>payslip/callsp",
success:function(result){
$('#content').loader('hide');
}
});
}

View File

@ -13,7 +13,7 @@ $products2=array(-1=>'Select Products');
foreach($products as $product)
{
$products2[$product->product_id] = $product->product_name;
$products2[$product->product_id] =$product->product_id.'-'.$product->product_name.'-'.$product->product_description;
}
$customers2 = array(-1 => 'Select Customer');
@ -141,8 +141,8 @@ foreach($customers as $customer)
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="addNewRow" onclick="addNewRow();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<button class="btn btn-primary" ID="addNewRow" onclick="addNewRow();" style="margin-top:-10px;">OK</button>
<button class="btn btn-primary" data-dismiss="modal" style="margin-top: -10px;" value="Cancel">Cancel</button>
</div>
</div>
@ -278,11 +278,12 @@ $("#specmodel").on("shown.bs.modal", function(e) {
alert('Please Select Product and Customer.');
}
else{
var rowid = rowid;
var d='';
var Row = $('#testspecifications').find('tr').eq(rowid).find('td');
$.each(Row,function(index,value){
if(index == 1 ){
if(index == 0 ){
d = value.textContent
}
@ -301,7 +302,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
}
});
tr.parentNode.removeChild(tr);
rowid.parentNode.removeChild(tr);
}
}
</script>

View File

@ -71,7 +71,7 @@
//print_r($data);echo "</br></br>";
?>
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->product_name?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->count?></td></tr>
<tr> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->product_name.'-'.$data->product_description?></a></td> <td><a href="<?php echo base_url()?>quality/viewSpec/<?php echo $data->product_id.'/'.$data->customer_id ?>"><?php echo $data->client_name?></a></td> <td><?php echo $data->count?></td></tr>
<?php
}
}

View File

@ -178,7 +178,7 @@ th{
<div class="col-md-12">
<div class="col-md-3"><b> CHART </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="chartbutton"></i></div>
<div class="col-md-3"><b>AFS CHART </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="chartbutton"></i></div>
</div>
<div id="chartarea">
@ -293,7 +293,7 @@ $(document).ready(function(){
$('#invoicedate').val(d);
$('#customername').val(value['client_id']+'-'+value['client_name']);
$('#customerid').val(value['client_id']);
$('#productname').val(value['item_product_id']+'-'+value['product_name']);
$('#productname').val(value['item_product_id']+'-'+value['product_name']+'-'+value['product_description']);
$('#productid').val(value['item_product_id']);
$('#qty').val(value['item_quantity']);
var batchno = 0;
@ -401,6 +401,13 @@ $(document).ready(function(){
function calculateMaster(id)
{
var SW12 = document.getElementById('12sw').textContent;
if(SW12 != 100)
{
alert('AFS Details Sans Weight Total Should be 100..!');
return false;
}
if($('#invoiceno').val() == -1)
{
alert('Select Invoice No');
@ -483,7 +490,7 @@ function calculateMaster(id)
}
else
{
res = '-';
res = 'NG';
}
}
else if($.isNumeric(min) && !($.isNumeric(max)))
@ -495,7 +502,7 @@ function calculateMaster(id)
}
else
{
res = '-';
res = 'NG';
}
}
else if(!$.isNumeric(min) && $.isNumeric(max))
@ -506,7 +513,7 @@ function calculateMaster(id)
}
else
{
res = '-';
res = 'NG';
}
}
var curresultid = i+'result';
@ -574,7 +581,7 @@ function calculateMaster(id)
if($('#invoiceno').val() == -1 || $('#reportdate').val() == '')
{
alert('Select Invoice No and Report Date');
alert('Select Invoice No and Batch Date');
return false;
}
@ -834,9 +841,9 @@ ctx.stroke();
ctx.closePath();
ctx.beginPath();
ctx.font = "10px Arial";
ctx.font = "bold 12px Arial";
ctx.fillStyle = "black";
ctx.fillText("Sand Weight",(canvaswidth/2),(canvasheight-2));
ctx.fillText("Sieve size µm ",(canvaswidth/2),(canvasheight-2));
ctx.closePath();
var xaxislabelwidth = (canvaswidth/12);

View File

@ -11,7 +11,7 @@ $pid='';
$cid='';
foreach($specifications as $s)
{
$pname = $s->product_name;
$pname = $s->product_description;
$cname = $s->client_name;
$pid = $s->product_id;
$cid = $s->customer_id;
@ -88,7 +88,7 @@ foreach($specifications as $s)
{
$index++;
?>
<tr id="<?php echo $index;?>"> <td><?php echo $data->testtype?></td> <td contenteditable="true"><?php echo $data->uom?></td> <td contenteditable="true" style="text-align:right;"><?php echo $data->min?></td> <td contenteditable="true" style="text-align:right;"><?php echo $data->max?></td> <td contenteditable="true" style="text-align:right;"><?php if(!empty($data->temp)){ echo $data->temp; } else { echo "-"; }?></td> <td style="text-align:center;"><a href='#' onclick = "DeleteRow(this.id);"> <span class="glyphicon glyphicon-trash"></span></td> </tr>
<tr id="<?php echo $index;?>"> <td><?php echo $data->testtype?></td> <td contenteditable="true"><?php echo $data->uom?></td> <td contenteditable="true" style="text-align:right;"><?php echo $data->min?></td> <td contenteditable="true" style="text-align:right;"><?php echo $data->max?></td> <td contenteditable="true" style="text-align:right;"><?php if(!empty($data->temp)){ echo $data->temp; } else { echo "-"; }?></td> <td style="text-align:center;"><a href='#' onclick = "DeleteRow(this.parentNode.parentNode.id);"> <span class="glyphicon glyphicon-trash"></span></td> </tr>
<?php
}
}
@ -142,8 +142,8 @@ foreach($specifications as $s)
</div>
<div class="modal-footer">
<a class="btn btn-primary" ID="addNewRow" onclick="addNewRow();" style="margin-top: -24px;">&nbsp;&nbsp;<span class="bold">Ok</span></a>
<a class="btn btn-primary" data-dismiss="modal" style="margin-top: -24px;" value="Cancel">Cancel</a>
<button class="btn btn-primary" ID="addNewRow" onclick="addNewRow();" style="margin-top: -10px;">OK</button>
<button class="btn btn-primary" data-dismiss="modal" style="margin-top: -10px;" value="Cancel">Cancel</button>
</div>
</div>
@ -270,7 +270,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
}
function DeleteRow(rowid)
function DeleteRow(r)
{
var product = $('#product').val();
var customer = $('#customer').val();
@ -279,12 +279,14 @@ $("#specmodel").on("shown.bs.modal", function(e) {
alert('Please Select Product and Customer.');
}
else{
var rowid = r;
alert(rowid);
var d='';
var Row = $('#testspecifications').find('tr').eq(rowid).find('td');
console.log(Row);
$.each(Row,function(index,value){
if(index == 1 ){
if(index == 0 ){
d = value.textContent
}
@ -303,7 +305,7 @@ $("#specmodel").on("shown.bs.modal", function(e) {
}
});
tr.parentNode.removeChild(tr);
r.parentNode.removeChild(tr);
}
}
</script>

View File

@ -11,7 +11,7 @@ $reportid = '';
$invoiceno = '';
$invoicedate = '';
$customername = '';
$product_name = '';
$product_description = '';
$batchno = '';
$qty = '';
$batchdate = '';
@ -23,7 +23,7 @@ foreach($reportdata['master'] as $m)
$invoiceno = $m->invoiceid;
$invoicedate = $m->invoice_date_created;
$customername = $m->client_id.'-'.$m->client_name;
$product_name = $m->product_id.'-'.$m->product_name;
$product_description = $m->product_id.'-'.$m->product_description;
$batchno = $m->invoice_custom_fieldvalue;
$qty = $m->item_quantity;
$batchdate = $m->batchdate;
@ -55,7 +55,7 @@ th{
<!--<center><h3 class="box-title">-->
<div class="box-tools">
<div class="col-md-3" id="savebutton">
<input type="button" id="submit" value = "Print" class="btn btn-primary" onclick="PrintFunction();">
<input type="button" id="submit" target="_blank" value = "Print" class="btn btn-primary" onclick="PrintFunction();">
</div>
<form id="printPDF">
</div><!--</h3></center>-->
@ -85,7 +85,7 @@ th{
<div class="col-md-3">
<label>Product Name</label>
<input type="text" id="productname" name="productname" value="<?php echo $product_name;?>" class="form-control" readonly>
<input type="text" id="productname" name="productname" value="<?php echo $product_description;?>" class="form-control" readonly>
</div>
@ -210,7 +210,7 @@ th{
<div class="col-md-12">
<div class="col-md-3"><b> CHART </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="chartbutton"></i></div>
<div class="col-md-3"><b>AFS CHART </b></div> <div class="col-md-1 col-md-offset-8 text-right"><i class="fa fa-expand" id="chartbutton"></i></div>
</div>
<div id="chartarea">

View File

@ -6,7 +6,7 @@ $reportid = '';
$invoiceno = '';
$invoicedate = '';
$customername = '';
$product_name = '';
$product_description = '';
$batchno = '';
$qty = '';
$batchdate = '';
@ -19,8 +19,8 @@ foreach($reportdata['master'] as $m)
$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;
$customername = $m->client_name;
$product_description = $m->product_description;
$batchno = $m->invoice_custom_fieldvalue;
$qty = $m->item_quantity;
$batchdate = $m->batchdate;
@ -47,23 +47,24 @@ td{
height:17px;
}
table{
table{
width:100%;
}
font-size:10px;
}
</style>
<html>
<body>
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
<table style="border-collapse:collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr><td colspan="6" style="text-align:center;"><h2>PRE DISPATCH INSPECTION REPORT - <?php echo $reportid;?></h2></td></tr>
<tr><td colspan="6" style="text-align:center;"><h2>PRE DISPATCH INSPECTION REPORT</h2></td></tr>
<tr><td rowspan="5" style="text-align:center;width:20%"><img src="<?php echo base_url().'uploads/images/'.$pic;?>" alt="no image"/></td>
<td rowspan="5" style="text-align:center;"><b><?php echo $cname;?></b><br><?php echo $caddress;?></td>
<td style="text-align:center;width:10%">CUSTOMER NAME</td>
<td colspan="3"style="text-align:center;width:20%"><b><?php echo $customername;?></b></td>
<td style="text-align:center;width:30%">CUSTOMER NAME</td>
<td colspan="6"style="text-align:center;width:100%"><b><?php echo $customername;?></b></td>
</tr>
<tr><td style="text-align:center;width:10%">MATERIAL NAME</td><td style="text-align:center;width:20%"><b><?php echo $product_name;?><b></td><td style="text-align:center;width:20%">INVOICE NO</td><td style="text-align:center;width:10%"><b><?php echo $invoiceno;?></b></td></tr>
<tr><td rowspan="3">Qty</td> <td rowspan="3"> <b><?php echo $qty;?> kgs</b></td> <td>INVOICEDATE</td><td><b><?php echo date_format(date_create($invoicedate),'d-m-Y');?></b></td></tr>
<tr><td style="text-align:center;width:10%">MATERIAL NAME</td><td style="text-align:center;width:20%"><b><?php echo $product_description;?><b></td><td style="text-align:center;width:20%">INVOICE NO</td><td style="text-align:center;width:10%"><b><?php echo $invoiceno;?></b></td></tr>
<tr><td rowspan="3">Qty</td> <td rowspan="3"> <b><?php echo $qty;?> kgs</b></td> <td>INVOICE DATE</td><td><b><?php echo date_format(date_create($invoicedate),'d-m-Y');?></b></td></tr>
<tr><td>Batch NO</td><td><b><?php echo $batchno;?></b></td></tr>
<tr><td>BATCH DATE</td><td><b><?php echo date_format(date_create($batchdate),'d-m-Y');?></b></td></tr>
</tbody>
@ -71,7 +72,7 @@ table{
<br>
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr><th rowspan="3">SNO</th><th rowspan="3" >DESCRIPTION</th><th rowspan="2" colspan="3">SPECIFICATION</th><th colspan="3" >ACT</th> <th rowspan="3">Average</th> <th rowspan="3">Results</th> <th rowspan="3">Remarks</th> </tr> <tr><th rowspan="2">X1</th> <th rowspan="2">X2</th> <th rowspan="2">X3</th></tr> <tr><th>Min</th><th>Max</th><th>UOM</th></tr>
<tr><th rowspan="3">S.NO</th><th rowspan="3" width="160">DESCRIPTION</th><th rowspan="2" colspan="3" width="110">SPECIFICATION</th><th colspan="3" width="170">ACT</th> <th rowspan="3" width="50">Average</th> <th rowspan="3" width="50">Results</th> <th rowspan="3">Remarks</th> </tr> <tr><th rowspan="2">X1</th> <th rowspan="2">X2</th> <th rowspan="2">X3</th></tr><tr><th>Min</th><th>Max</th><th width="46">UOM</th></tr>
<?php
$index = 0;
@ -90,7 +91,7 @@ $index = 0;
<h3>L.O.I DETAILS</h3>
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr><th rowspan="2">SNO</th><th>HEATING TIME</th><th>TEMP</th><th>CRUCIBLE WEIGHT</th><th>BEFORE HEATING WEIGHT</th><th>AFTER HEATING WEIGHT</th> <th rowspan="2">L.O.I (%)</th><th rowspan="2">Remarks</th> </tr>
<tr><th rowspan="2">S.NO</th><th width="160">HEATING TIME</th><th width="110">TEMP</th><th width="115">CRUCIBLE WEIGHT</th><th>BEFORE HEATING WEIGHT</th><th>AFTER HEATING WEIGHT</th> <th rowspan="2">L.O.I (%)</th><th rowspan="2">Remarks</th> </tr>
<tr><th>START TIME - END TIME</th><th>*C</th> <th>W1(g)</th> <th>W2(g)</th> <th>W3(g)</th></tr>
<?php
$indexx = 0;
@ -108,7 +109,7 @@ $index = 0;
<h3>AFS DETAILS</h3>
<table style="border-collapse: collapse;border-left-style:hidden;" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr> <th>S.NO</th> <th>Sieve Size µm </th> <th>SAND WEIGHT</th> <th>Percantage</th> <th>Multiplier</th> <th>Product</th></tr>
<tr > <th height="20">S.NO</th> <th width="160">Sieve Size µm </th> <th width="110">SAND WEIGHT</th> <th width="220">Percantage</th> <th width="110">Multiplier</th> <th width="90">Product</th></tr>
<?php
$ind = 0;
$total_sandweight = 0;
@ -134,9 +135,8 @@ $index = 0;
</div>
<hr>
<br><br>
<table>
<tr><td>INSPECTOR NAME</td><td><?php echo $inspector;?></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>APPROVED BY</td><td><?php echo $approvedby;?></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<table >
<tr><td>INSPECTOR NAME :<?php echo $inspector;?></td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>APPROVED BY :<?php echo $approvedby;?></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>