272 lines
7.3 KiB
PHP
Executable File
272 lines
7.3 KiB
PHP
Executable File
<style type="text/css">
|
|
[contenteditable=true]:empty:before{
|
|
content: attr(placeholder);
|
|
display: block; /* For Firefox */
|
|
|
|
}
|
|
</style>
|
|
|
|
<style type="text/css">
|
|
.select2
|
|
{
|
|
width: 100% ! important;
|
|
}
|
|
.num{
|
|
text-align:right;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
|
|
$("#DEPTFN").select2();
|
|
|
|
var MaxDate = '<?php echo $MaxPoDate;?>';
|
|
var d = new Date(MaxDate);
|
|
var t='<?php echo $CurrentDate;?>';
|
|
var m=new Date(t);
|
|
|
|
$("#fromDate").datepicker({
|
|
minDate : d,
|
|
//maxDate : 'now',
|
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#toDate").datepicker({
|
|
minDate : d,
|
|
//maxDate : 'now',
|
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,yearRange: '-100:+0'
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<!-- dsfdgfhggh -->
|
|
|
|
|
|
<div class="content-wrapper">
|
|
<section class="content" style="font-size: 12px;">
|
|
<div id="content"></div>
|
|
|
|
<div class="box">
|
|
<div class="box-header">
|
|
<center><h3 class="box-title"> Finished Product Batch Card History</h3></center>
|
|
</div>
|
|
<!-- /.box-header -->
|
|
<div class="box-body">
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div id="content"></div>
|
|
|
|
<div class="row">
|
|
|
|
<?php
|
|
$attributes = array('class' => 'form-label-left final_product ','name' => 'final_product','id' => 'final_product');
|
|
|
|
echo form_open(base_url().'/batchcard/Final+Product/',$attributes);
|
|
?>
|
|
|
|
<div class="col-md-12">
|
|
<div class="col-md-3">
|
|
|
|
<label>Final Product</label>
|
|
|
|
<?php
|
|
|
|
$options2= array("0"=>'Select Material');
|
|
|
|
if(!empty($inv_final_product))
|
|
{
|
|
foreach ($inv_final_product as $SID):
|
|
|
|
|
|
$options2[$SID->product_id] = $SID->product_id.' '.' - '.' '.$SID->product_name.' '.' ('.' '.$SID->product_description.')';
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('DEPTFN', $options2,set_value('DEPTFN',$SupId),'id="DEPTFN"' ,'required="true"' ,'class="form-control select2');
|
|
|
|
?>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3">
|
|
<label>From Date</label>
|
|
<div class="input-group">
|
|
<?php
|
|
$data = array('name' => 'fromDate','value' => set_value('fromDate',$CurrentDate),'id'=>'fromDate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="col-md-3">
|
|
<label>To Date</label>
|
|
<div class="input-group">
|
|
<?php
|
|
$data = array('name' => 'toDate','value' => set_value('toDate',$CurrentDate),'id'=>'toDate', 'class' => 'form-control' ,'required' => 'true', 'onkeypress'=>'return false;');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-3">
|
|
<label id="labl" style="visibility:hidden">ef</label>
|
|
<div lass="input-group">
|
|
<a class="btn btn-success Save" ID="Save" onclick="GetDetail()" > <span class="bold">Go</span></a>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
<div>
|
|
 
|
|
 
|
|
</div>
|
|
|
|
<div class="col-md-12" >
|
|
|
|
<div class="col-md-offset-8">
|
|
|
|
<!-- <a class="btn btn-success Save" ID="Save" onclick="GetDetail()" > <span class="bold">Get Details</span></a> -->
|
|
|
|
|
|
<!-- <a class="btn btn-success Save" ID="Save" onclick="GetDetail()" > <span class="bold">Go</span></a> -->
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table table-striped table-condensed no-margin" id="tab">
|
|
<thead>
|
|
<tr>
|
|
<th>Invoice No/Final Product ID</th>
|
|
<th>Product Code</th>
|
|
<th>Product Name</th>
|
|
<th>Price</th>
|
|
<th>Quantity</th>
|
|
<th>Type</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody id="table_value">
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
//document.getElementById("labl").style.display = 'none';
|
|
|
|
function GetDetail()
|
|
{
|
|
|
|
// alert()
|
|
var from_date = $('#fromDate').val();
|
|
var fdate = from_date.split("-").reverse().join("-");
|
|
var to_date = $('#toDate').val();
|
|
var tdate = to_date.split("-").reverse().join("-");
|
|
var product = $('#DEPTFN').val();
|
|
|
|
if(fdate !='' && product!= '' && tdate != '')
|
|
{
|
|
$.ajax(
|
|
{
|
|
|
|
data:{productid:product,from_date:fdate,to_date:tdate},
|
|
dataType:'json',
|
|
type:"POST",
|
|
url:"<?php echo base_url() ?>batchcard/getFinishedProduct",
|
|
success:function(data)
|
|
{
|
|
|
|
|
|
//if(data){
|
|
var tble='';
|
|
$.each(data,function (i,item)
|
|
{
|
|
i=i+1;
|
|
var datatype = '';
|
|
var idno = '';
|
|
|
|
|
|
if(item.TransactionType == 'Inward')
|
|
{
|
|
datatype = "Final Product";
|
|
idno = "FP"+item.RefID;
|
|
}
|
|
|
|
else
|
|
{
|
|
datatype = "Invoice";
|
|
idno = item.RefID;
|
|
}
|
|
|
|
tble +='<tr class="amount">'+
|
|
'<td>'+idno+'</td>'+
|
|
'<td>'+item.ProductCode+'</td>'+
|
|
'<td>'+item.product_name+'-'+item.product_description+'</td>'+
|
|
'<td>'+item.Price+'</td>'+
|
|
'<td>'+item.Quantity+'</td>'+
|
|
'<td>'+item.TransactionType+'</td>'+
|
|
'</tr>';
|
|
|
|
});
|
|
|
|
if(tble=='')
|
|
{
|
|
alert('No Records Found !!')
|
|
}
|
|
|
|
else
|
|
{
|
|
|
|
$("#table_value").html(tble);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
}
|
|
else
|
|
{
|
|
alert('Please Select All The Values');
|
|
|
|
}
|
|
|
|
}
|
|
</script>
|