RBATCHCARD ISSUES FIXED
This commit is contained in:
parent
e701e2fb3f
commit
18447c0fb2
@ -22,49 +22,14 @@ background-color:#ada5d2 ;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
//color:red ! important;
|
||||
// foreach($records['childdata'] as $g)
|
||||
// {
|
||||
// print_r($g);
|
||||
// }
|
||||
// echo "************************";
|
||||
// print_r($records['masterdata']);
|
||||
// $products = array(-1=>'Select Product');
|
||||
// foreach($productsoutward as $rec)
|
||||
// {
|
||||
// $products[$rec->product_id] = $rec->product_name;
|
||||
// }
|
||||
|
||||
// $customers = array(-1=>'Select Customer');
|
||||
// foreach($customersoutward as $rec)
|
||||
// {
|
||||
// $customers[$rec->client_id] = $rec->client_name;
|
||||
// }
|
||||
|
||||
// //print_r($emplist);
|
||||
$approvedby = array(-1=>'Select Approver Name');
|
||||
foreach($emplist as $r)
|
||||
{
|
||||
$approvedby[$r->FirstName.' '.$r->LastName] = $r->FirstName.' '.$r->LastName.'-'.$r->shortName;
|
||||
}
|
||||
|
||||
// $machines = array(-1=>'Select Machine Name');
|
||||
// $trpbatchnos = array(-1=>'Select TRP Batch Card No');
|
||||
// $igrnos = array(-1=>'Select IGRNO');
|
||||
// $igrlinenos = array(-1=>'Select IGR Line Item');
|
||||
// foreach($igrno as $r)
|
||||
// {
|
||||
// $igrnos[$r->IGRNO] = $r->IGRNO;
|
||||
// }
|
||||
// foreach($machinelist as $r)
|
||||
// {
|
||||
// $machines[$r->Machine_id] = $r->Machine_id.'-'.$r->Machine_Name;
|
||||
// }
|
||||
|
||||
// foreach($trpbatchcardnos as $r)
|
||||
// {
|
||||
// $trpbatchnos[$r->dailyid] = $r->dailyid;
|
||||
// }
|
||||
|
||||
?>
|
||||
<style>
|
||||
@ -94,10 +59,7 @@ th{
|
||||
<div class="box-header">
|
||||
<!--<center><h3 class="box-title">-->
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<form action="<?php echo base_url() ?>monthlypay/monthlyListing" method="POST" id="searchList">
|
||||
|
||||
</form>
|
||||
|
||||
</div><!--</h3></center>-->
|
||||
|
||||
</div><!-- /.box-header -->
|
||||
@ -116,16 +78,12 @@ th{
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Grade</label>
|
||||
<input type="text" value="<?php echo $records['masterdata'][0]->client_name?>" class="form-control" readonly>
|
||||
<input type="text" value="<?php echo $records['masterdata'][0]->product_name.'-'.$records['masterdata'][0]->product_description?>" class="form-control" readonly>
|
||||
<input type="hidden" id="product" value="<?php echo $records['masterdata'][0]->productid?>" >
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="col-md-3">
|
||||
<label>Resin Batch Card No</label>
|
||||
<input type="text" id="batchno" name="batchno" class="form-control" >
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
<label>Batch Date</label>
|
||||
@ -171,11 +129,7 @@ th{
|
||||
|
||||
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-11 col-md-1" id="savebutton">
|
||||
<input type="button" id="submit" value = "Add Row" class="btn btn-primary" onclick="addNewRow();">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<table id="testreport" class="table table-bordered" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf;">
|
||||
@ -222,6 +176,11 @@ th{
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-11 col-md-1" id="savebutton">
|
||||
<input type="button" id="submit" value = "Add Row" class="btn btn-primary" onclick="addNewRow();">
|
||||
</div>
|
||||
</div>
|
||||
<p><b>Raw/Packing Material Consumption<b></p>
|
||||
<table id="finaltable" class="table table-bordered" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf;">
|
||||
@ -330,21 +289,15 @@ $(document).ready(function(){
|
||||
$("#chartarea").toggle("slow");
|
||||
});
|
||||
|
||||
// $('#batchdate').datepicker({
|
||||
// //minDate : 'year+16',
|
||||
// maxDate : 'now',
|
||||
// dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '0:+10'
|
||||
|
||||
// });
|
||||
var p = "<?php echo $records['masterdata'][0]->productid;?>";
|
||||
var c = "<?php echo $records['masterdata'][0]->customerid;?>";
|
||||
getAllSpec(p,c);
|
||||
|
||||
// $('#approvedby').select2();
|
||||
|
||||
|
||||
$('#approvedby').val('<?php echo $records['masterdata'][0]->approvedby?>');
|
||||
|
||||
//show_hide_column(13,false);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -451,13 +404,9 @@ if(p == -1 || c == -1)
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>quality/getAllSpecforReport",
|
||||
success:function(data) {
|
||||
// alert(data);
|
||||
|
||||
data = JSON.parse(data);
|
||||
//alert(data);
|
||||
// $('#testreport tbody').remove();
|
||||
// $('#testreport').append('<tbody id="specAppend"></tbody>');
|
||||
// $('#testreport2 tbody').remove();
|
||||
// $('#testreport2').append('<tbody id="specAppend2"></tbody>');
|
||||
|
||||
if(data != '')
|
||||
{
|
||||
htmlspecname = '';
|
||||
@ -499,42 +448,11 @@ if(p == -1 || c == -1)
|
||||
$("#spec").append(htmlspec);
|
||||
document.getElementById('firstrowheader').style.display = 'none';
|
||||
totalcells = $('#testreport').find('tr').eq(1).find('td');
|
||||
//console.log(totalcells);
|
||||
// var childdata = "<?php echo JSON_encode($records['childdata']);?>";
|
||||
// console.log(childdata['1']);
|
||||
|
||||
totalcells = totalcells.length;
|
||||
//alert('totalcellsbefore'+totalcells);
|
||||
totalcells+=2;
|
||||
//alert('totalcells'+totalcells);
|
||||
// index +=1;
|
||||
// htmlbody = '';
|
||||
// //var i = 0;
|
||||
// for(i=1;i<=totalcells;i++)
|
||||
// {
|
||||
// if(i == 1)
|
||||
// {
|
||||
// htmlbody+='<tr id='+index+'><td>'+index+'</td>';
|
||||
// //alert('1');
|
||||
// }
|
||||
// else if( i == 2)
|
||||
// {
|
||||
// htmlbody+='<td class="edit" id="time'+index+'" contenteditable="true" onblur="timeCheck(this.id,this.textContent)"></td>';
|
||||
// //alert('not 1');
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //var temp = index;
|
||||
// //console.log(allspecs[temp]);
|
||||
// var temp = index+''+allspecs[i-3];
|
||||
// htmlbody+='<td class="edit" id="'+temp+'" contenteditable="true" onkeypress="return keyValidate(event);" onblur="masterCalculationCheck(this.id,this.textContent)"></td>';
|
||||
// //temp++;
|
||||
// }
|
||||
// //alert('inside for loop'+i);
|
||||
// }
|
||||
// htmlbody+='</tr>'
|
||||
// $("#testreport tbody").append(htmlbody);
|
||||
//overallrows++;
|
||||
// $("#testreport2 tbody").append(htmlmaster2);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -563,8 +481,12 @@ function addNewRow()
|
||||
}
|
||||
|
||||
index = overallrows + 1
|
||||
if(index > 50)
|
||||
{
|
||||
alert('You have reached 50 Entries, No More...!');
|
||||
return false;
|
||||
}
|
||||
|
||||
//var htmlrow = '<tr id='+index+'><td contenteditable="true" class="edit" id="time'+index+'">';
|
||||
var htmlrow = '';
|
||||
for(i=1;i<=totalcells;i++)
|
||||
{
|
||||
@ -591,6 +513,10 @@ function addNewRow()
|
||||
htmlrow+='</tr>'
|
||||
$("#testreport tbody").append(htmlrow);
|
||||
overallrows++;
|
||||
var ide = '#time'+index;
|
||||
window.setTimeout(function() {
|
||||
$(ide).focus();
|
||||
}, 0);
|
||||
|
||||
}
|
||||
|
||||
@ -646,13 +572,15 @@ function timeCheck(id,val)
|
||||
|
||||
function masterCalculationCheck(id,val)
|
||||
{
|
||||
//alert(id+'-'+val);
|
||||
//console.log(id+'-'+val);
|
||||
var totalsandqty = 0;
|
||||
var totalhexqty = 0;
|
||||
var totalresinqty = 0;
|
||||
var totalcsqty = 0;
|
||||
var ide = id.substr(1);
|
||||
//alert(ide);
|
||||
|
||||
var ide2 = id.substr(2);
|
||||
console.log(ide+'-'+ide2);
|
||||
//For Total Sand Calculation
|
||||
if(ide == 'sand')
|
||||
{
|
||||
@ -674,6 +602,27 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('sandtotal').textContent = parseFloat(totalsandqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'sand')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalsandqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('sandtotal'))
|
||||
{
|
||||
document.getElementById('sandtotal').textContent = parseFloat(totalsandqty);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//FOr total Hexamine Calculaiton
|
||||
|
||||
@ -697,6 +646,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('hextotal').textContent = parseFloat(totalhexqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'hexamine')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalhexqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('hextotal'))
|
||||
{
|
||||
document.getElementById('hextotal').textContent = parseFloat(totalhexqty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -722,6 +691,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('resintotal').textContent = parseFloat(totalresinqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'resin')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalresinqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('resintotal'))
|
||||
{
|
||||
document.getElementById('resintotal').textContent = parseFloat(totalresinqty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//FOr total Hexamine Calculaiton
|
||||
@ -746,6 +735,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('cstotal').textContent = parseFloat(totalcsqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'cs')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalcsqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('cstotal'))
|
||||
{
|
||||
document.getElementById('cstotal').textContent = parseFloat(totalcsqty);
|
||||
}
|
||||
}
|
||||
|
||||
if(val == '')
|
||||
{
|
||||
@ -759,7 +768,6 @@ function masterCalculationCheck(id,val)
|
||||
|
||||
|
||||
|
||||
|
||||
function getAllData()
|
||||
{
|
||||
|
||||
@ -794,16 +802,21 @@ function masterCalculationCheck(id,val)
|
||||
alert('Please Enter All Master Details..!');
|
||||
return false;
|
||||
}
|
||||
var f = 0;
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
if(document.getElementById('time'+1).textContent == '')
|
||||
if(document.getElementById('time'+i).textContent == '')
|
||||
{
|
||||
alert('Please Enter Time for All Entry..! ');
|
||||
return false;
|
||||
f++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// alert('F value'+f);
|
||||
if(f != 0)
|
||||
{
|
||||
alert('Please Enter Time for All Entry..! ');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -361,7 +361,8 @@ $(function() {
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
|
||||
<!-- INPROCESS MODULE-->
|
||||
|
||||
<!-- INPROCESS MODULE-->
|
||||
<?php if(empty($DepAccesslist)){?>
|
||||
<?php if($DEPCode == QUALITY){?>
|
||||
|
||||
@ -388,6 +389,7 @@ $(function() {
|
||||
<span>New Nissan In Process Inspection</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@ -547,7 +549,90 @@ $(function() {
|
||||
|
||||
|
||||
<!-- BATCH CARD MODULE-->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- RESIN BATCH CARD MODULE-->
|
||||
<?php if(empty($DepAccesslist)){?>
|
||||
<?php if($DEPCode == PRODUCTION){?>
|
||||
|
||||
<li class="treeview">
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-credit-card"></i> Resin Batch card<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php// if(empty($DepAccesslist)){?>
|
||||
<?php //if($DEPCode == PRODUCTION){?>
|
||||
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>resinbatchcardlisting">
|
||||
<i class="fa fa-cubes"></i>
|
||||
<span>Resin Batchcard List</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>addNewResinbatchcard">
|
||||
<i class="fa fa-cube"></i>
|
||||
<span>Add New Batch Card</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php }?>
|
||||
|
||||
|
||||
|
||||
<?php }
|
||||
else{ $check = 0;?>
|
||||
|
||||
<?php foreach($DepAccesslist as $dep){?>
|
||||
|
||||
<?php $assd=$dep->AssDep;
|
||||
|
||||
if($assd == PRODUCTION || $DEPCode == PRODUCTION ){ $check =1;?>
|
||||
<li class="treeview">
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-credit-card"></i> Resin Batch card<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu2">
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>resinbatchcardlisting">
|
||||
<i class="fa fa-cubes"></i>
|
||||
<span>Resin Batchcard List</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>addNewResinbatchcard">
|
||||
<i class="fa fa-cube"></i>
|
||||
<span>Add New Batch Card</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<?php } if($check == 1){break;} }?>
|
||||
|
||||
|
||||
<?php }?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- RESIN BATCH CARD MODULE-->
|
||||
|
||||
<!-- <?php print_r($DepAccesslist)?> -->
|
||||
<?php if(empty($DepAccesslist)){ ?>
|
||||
<?php if($DEPCode == FINANCE || $DEPCode == SALES || $DEPCode == HR || $DEPCode == SYSTEM_ADMIN || $DEPCode == ADMIN && $DEPCode != SECURITY){?>
|
||||
@ -1090,29 +1175,7 @@ $(function() {
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-money"></i>Banking<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu3">
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankingview">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Bank Statement Upload</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankingstatement">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Bank Statements</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</li>
|
||||
<?php }?>
|
||||
<?php }
|
||||
else{?>
|
||||
@ -1155,16 +1218,6 @@ $(function() {
|
||||
<span>Receipt and Payment</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<span id="menu" data-toggle="dropdown" ><i class="fa fa-money"></i>Banking<span class="caret"></span></span>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="menu3">
|
||||
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankingview">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
@ -1177,6 +1230,52 @@ $(function() {
|
||||
<span>Bank Statements</span>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Debitstatement">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Amount Paid</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankamountpaid">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Depit Reports</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Receipt">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Receipt</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Payment">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Payment</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Invoice">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Invoice</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankamountreceived">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>Credit Reports</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>Bankcash">
|
||||
<i class="fa fa-credit-card"></i>
|
||||
<span>addincexp</span>
|
||||
</a>
|
||||
</li>-->
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<?php }?>
|
||||
<?php if($check ==1){break;}}}?>
|
||||
|
||||
@ -1227,7 +1326,7 @@ $(function() {
|
||||
|
||||
<?php }?>
|
||||
|
||||
<?php //if($DEPCode == QUALITY){?>
|
||||
<?php if($DEPCode == QUALITY){?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>quality">
|
||||
<i class="fa fa-list-alt"></i>
|
||||
@ -1247,7 +1346,7 @@ $(function() {
|
||||
<span>Inward Material Test Report</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php //}?>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<!-- <li class="treeview">
|
||||
@ -1317,7 +1416,7 @@ $(function() {
|
||||
<span>View Material Inspection Report</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php if($DEPCode == QUALITY){?>
|
||||
<?php //if($DEPCode == QUALITY){?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>quality">
|
||||
<i class="fa fa-list-alt"></i>
|
||||
@ -1330,7 +1429,7 @@ $(function() {
|
||||
<span>Product Test Report</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php// } ?>
|
||||
<li class="treeview">
|
||||
<a href="<?php echo base_url(); ?>qualityreportlistinward">
|
||||
<i class="fa fa-hand-o-down"></i>
|
||||
|
||||
@ -27,7 +27,7 @@ background-color:#ada5d2 ;
|
||||
$products = array(-1=>'Select Product');
|
||||
foreach($productsoutward as $rec)
|
||||
{
|
||||
$products[$rec->product_id] = $rec->product_name;
|
||||
$products[$rec->product_id] = $rec->product_name.'-'.$rec->product_description;
|
||||
}
|
||||
|
||||
$customers = array(-1=>'Select Customer');
|
||||
@ -159,11 +159,7 @@ th{
|
||||
|
||||
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-11 col-md-1" id="savebutton">
|
||||
<input type="button" id="submit" value = "Add Row" class="btn btn-primary" onclick="addNewRow();">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/>
|
||||
<table id="testreport" class="table table-bordered" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf;">
|
||||
@ -180,6 +176,11 @@ th{
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-offset-11 col-md-1" id="savebutton">
|
||||
<input type="button" id="submit" value = "Add Row" class="btn btn-primary" onclick="addNewRow();">
|
||||
</div>
|
||||
</div>
|
||||
<p><b>Raw/Packing Material Consumption<b></p>
|
||||
<table id="finaltable" class="table table-bordered" style="background-color:#fff;font-size:12px;text-align:center;">
|
||||
<thead style="background-color:#ddf;">
|
||||
@ -192,7 +193,7 @@ th{
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -519,7 +520,12 @@ function addNewRow()
|
||||
}
|
||||
|
||||
index++;
|
||||
|
||||
if(index > 50)
|
||||
{
|
||||
alert('You have reached 50 Entries, No More...!');
|
||||
return false;
|
||||
}
|
||||
console.log(index);
|
||||
//var htmlrow = '<tr id='+index+'><td contenteditable="true" class="edit" id="time'+index+'">';
|
||||
var htmlrow = '';
|
||||
for(i=1;i<=totalcells;i++)
|
||||
@ -547,6 +553,10 @@ function addNewRow()
|
||||
htmlrow+='</tr>'
|
||||
$("#testreport tbody").append(htmlrow);
|
||||
overallrows++;
|
||||
var ide = '#time'+index;
|
||||
window.setTimeout(function() {
|
||||
$(ide).focus();
|
||||
}, 0);
|
||||
|
||||
}
|
||||
|
||||
@ -602,13 +612,15 @@ function timeCheck(id,val)
|
||||
|
||||
function masterCalculationCheck(id,val)
|
||||
{
|
||||
//alert(id+'-'+val);
|
||||
//console.log(id+'-'+val);
|
||||
var totalsandqty = 0;
|
||||
var totalhexqty = 0;
|
||||
var totalresinqty = 0;
|
||||
var totalcsqty = 0;
|
||||
var ide = id.substr(1);
|
||||
//alert(ide);
|
||||
|
||||
var ide2 = id.substr(2);
|
||||
console.log(ide+'-'+ide2);
|
||||
//For Total Sand Calculation
|
||||
if(ide == 'sand')
|
||||
{
|
||||
@ -630,6 +642,27 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('sandtotal').textContent = parseFloat(totalsandqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'sand')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalsandqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('sandtotal'))
|
||||
{
|
||||
document.getElementById('sandtotal').textContent = parseFloat(totalsandqty);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//FOr total Hexamine Calculaiton
|
||||
|
||||
@ -653,6 +686,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('hextotal').textContent = parseFloat(totalhexqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'hexamine')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalhexqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('hextotal'))
|
||||
{
|
||||
document.getElementById('hextotal').textContent = parseFloat(totalhexqty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -678,6 +731,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('resintotal').textContent = parseFloat(totalresinqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'resin')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalresinqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('resintotal'))
|
||||
{
|
||||
document.getElementById('resintotal').textContent = parseFloat(totalresinqty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//FOr total Hexamine Calculaiton
|
||||
@ -702,6 +775,26 @@ function masterCalculationCheck(id,val)
|
||||
document.getElementById('cstotal').textContent = parseFloat(totalcsqty);
|
||||
}
|
||||
}
|
||||
else if(ide2 == 'cs')
|
||||
{
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
var tid = i+''+ide2;
|
||||
if(document.getElementById(tid))
|
||||
{
|
||||
var currentvalue = document.getElementById(tid).textContent;
|
||||
if(isNaN(currentvalue) || currentvalue == '')
|
||||
{
|
||||
currentvalue = 0.00;
|
||||
}
|
||||
totalcsqty +=parseFloat(currentvalue);
|
||||
}
|
||||
}
|
||||
if(document.getElementById('cstotal'))
|
||||
{
|
||||
document.getElementById('cstotal').textContent = parseFloat(totalcsqty);
|
||||
}
|
||||
}
|
||||
|
||||
if(val == '')
|
||||
{
|
||||
@ -748,15 +841,24 @@ function masterCalculationCheck(id,val)
|
||||
alert('Please Enter All Master Details..!');
|
||||
return false;
|
||||
}
|
||||
var f = 0;
|
||||
for(i=1;i<=overallrows;i++)
|
||||
{
|
||||
if(document.getElementById('time'+1).textContent == '')
|
||||
if(document.getElementById('time'+i).textContent == '')
|
||||
{
|
||||
alert('Please Enter Time for All Entry..! ');
|
||||
return false;
|
||||
|
||||
f++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// console.log('F value'+f);
|
||||
if(f != 0)
|
||||
{
|
||||
alert('Please Enter Time for All Entry..! ');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<div class="box-tools">
|
||||
<!-- <form action="<?php echo base_url() ?>assetListing" method="POST" id="searchList">-->
|
||||
<div class="col-md-3">
|
||||
<a href=" <?php echo base_url().'resinbatchcard';?> " type="button" class="btn btn-primary">Add New</a>
|
||||
<a href=" <?php echo base_url().'resinbatchcard/addNewResinBatchCard';?> " type="button" class="btn btn-primary">Add New</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user