diff --git a/application/controllers/quality.php b/application/controllers/quality.php index d9bd049b..da667498 100644 --- a/application/controllers/quality.php +++ b/application/controllers/quality.php @@ -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'); } diff --git a/application/models/monthlypay_model.php b/application/models/monthlypay_model.php index cec87f4d..c1ddac4c 100755 --- a/application/models/monthlypay_model.php +++ b/application/models/monthlypay_model.php @@ -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(?)"; diff --git a/application/models/quality_model.php b/application/models/quality_model.php index 4a241781..49a9f712 100644 --- a/application/models/quality_model.php +++ b/application/models/quality_model.php @@ -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'); diff --git a/application/views/monthlypayinputs.php b/application/views/monthlypayinputs.php index 7d460971..a9cae10b 100755 --- a/application/views/monthlypayinputs.php +++ b/application/views/monthlypayinputs.php @@ -1,7 +1,7 @@ @@ -188,7 +188,7 @@ $('html').bind('keypress', function(e) Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >LOP_Days)){echo $record->LOP_Days;}else{echo "0.00";}?> Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Paid_leave)){echo number_format($record->Paid_leave,2,'.','');}else { echo number_format(0.00,2,'.','');} ?> Key)){echo "contenteditable='false';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >OT_Hrs_Worked)){echo $record->OT_Hrs_Worked;}else { echo number_format(0.00,2,'.','');} ?> - Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >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,'.','');} ?> + Key) && !empty($record->Loan_ID)){ echo "contenteditable='true'; style='background-color:#ffcccc;text-align:right' title='Loan Pending'"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >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,'.','');} ?> Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Incentives)){echo $record->Incentives;}else{ echo number_format(0.00,2,'.','');;} ?> Key)){echo "contenteditable='true';"; } ?> Key)){?> title="Payslip Calculated" style="text-align:right;color:blue;"style="text-align:right;" >Other_Deductions)){echo $record->Other_Deductions; }else{ echo number_format(0.00,2,'.','');;} ?> @@ -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 += '' + - '' + (i) + '' + - '' + val.EmpID + '' + - '' + val.FirstName+" "+ val.LastName + '' + - '' + Days_Worked + '' + - '' + LOP_Days + '' + - '' + Paid_leave + '' + - '' + OT_Hrs_Worked + '' + - '' + Loan_Recovered + '' + - '' + Incentives + '' + - '' + Other_Deductions+ '' + - ''; + if(val.Key) + { + + trHTML += '' + + '' + (i) + '' + + '' + val.EmpID + '' + + '' + val.FirstName+" "+ val.LastName + '' + + '' + Days_Worked + '' + + '' + LOP_Days + '' + + '' + Paid_leave + '' + + '' + OT_Hrs_Worked + '' + + '' + Loan_Recovered + '' + + '' + Incentives + '' + + '' + Other_Deductions+ '' + + ''; + } + else + { + trHTML += '' + + '' + (i) + '' + + '' + val.EmpID + '' + + '' + val.FirstName+" "+ val.LastName + '' + + '' + Days_Worked + '' + + '' + LOP_Days + '' + + '' + Paid_leave + '' + + '' + OT_Hrs_Worked + '' ; + if(val.Loan_ID){ + trHTML += '' + Loan_Recovered + ''; + } + else{ + trHTML += '' + Loan_Recovered + ''; + } + trHTML += '' + Incentives + '' + + '' + Other_Deductions+ '' + + ''; + + } + } diff --git a/application/views/payslipgenerate.php b/application/views/payslipgenerate.php index 9bce7815..2436cece 100755 --- a/application/views/payslipgenerate.php +++ b/application/views/payslipgenerate.php @@ -90,15 +90,12 @@ $(function() { { if(result != 1) { - - $('#content').loader('hide'); $.ajax({ data:{payon:payon,employee:employee}, type:"POST", url:"payslip/callsp", success:function(result){ - - + $('#content').loader('hide'); } }); } diff --git a/application/views/qualitymaster.php b/application/views/qualitymaster.php index 3746168a..d72bba0f 100644 --- a/application/views/qualitymaster.php +++ b/application/views/qualitymaster.php @@ -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) @@ -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); } } diff --git a/application/views/qualitymasterlistview.php b/application/views/qualitymasterlistview.php index a3eefcfc..3223c295 100644 --- a/application/views/qualitymasterlistview.php +++ b/application/views/qualitymasterlistview.php @@ -71,7 +71,7 @@ //print_r($data);echo "

"; ?> - product_name?> client_name?> count?> + product_name.'-'.$data->product_description?> client_name?> count?> -
CHART
+
AFS CHART
@@ -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); diff --git a/application/views/viewIndSpec.php b/application/views/viewIndSpec.php index 89173760..6d89f149 100644 --- a/application/views/viewIndSpec.php +++ b/application/views/viewIndSpec.php @@ -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++; ?> - testtype?> uom?> min?> max?> temp)){ echo $data->temp; } else { echo "-"; }?> + testtype?> uom?> min?> max?> temp)){ echo $data->temp; } else { echo "-"; }?>
@@ -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); } } diff --git a/application/views/viewindreport.php b/application/views/viewindreport.php index c4c7b28e..72c9f767 100644 --- a/application/views/viewindreport.php +++ b/application/views/viewindreport.php @@ -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{
- +
@@ -85,7 +85,7 @@ th{
- +
@@ -210,7 +210,7 @@ th{
-
CHART
+
AFS CHART
diff --git a/application/views/viewindreportpdf.php b/application/views/viewindreportpdf.php index 60c924a9..d94c4a44 100644 --- a/application/views/viewindreportpdf.php +++ b/application/views/viewindreportpdf.php @@ -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; +} - +
- + - - + + + - - + + @@ -71,7 +72,7 @@ table{

PRE DISPATCH INSPECTION REPORT -

PRE DISPATCH INSPECTION REPORT

no image
CUSTOMER NAMECUSTOMER NAME
MATERIAL NAMEINVOICE NO
Qty kgs INVOICEDATE
MATERIAL NAMEINVOICE NO
Qty kgs INVOICE DATE
Batch NO
BATCH DATE
- +L.O.I DETAILS
SNODESCRIPTIONSPECIFICATIONACT Average Results Remarks
X1 X2 X3
MinMaxUOM
S.NODESCRIPTIONSPECIFICATIONACT Average Results Remarks
X1 X2 X3
MinMaxUOM
- +AFS DETAILS
SNOHEATING TIMETEMPCRUCIBLE WEIGHTBEFORE HEATING WEIGHTAFTER HEATING WEIGHT L.O.I (%)Remarks
S.NOHEATING TIMETEMPCRUCIBLE WEIGHTBEFORE HEATING WEIGHTAFTER HEATING WEIGHT L.O.I (%)Remarks
START TIME - END TIME*C W1(g) W2(g) W3(g)
- +


-
S.NO Sieve Size µm SAND WEIGHT Percantage Multiplier Product
S.NO Sieve Size µm SAND WEIGHT Percantage Multiplier Product
- - +
INSPECTOR NAME                                                      APPROVED BY
 
+
INSPECTOR NAME :                                                      APPROVED BY :