214 lines
6.2 KiB
PHP
Executable File
214 lines
6.2 KiB
PHP
Executable File
<style>
|
|
.num {
|
|
text-align :right;
|
|
}
|
|
</style>
|
|
|
|
<div class="content-wrapper">
|
|
<?php
|
|
/* $attributes = array('class' => 'form-label-left RequisitionList ','name' => 'RequisitionList','id' => 'RequisitionList','method' => 'post','role' => 'form' );
|
|
|
|
echo form_open($this->config->base_url().'purchaseorderform/purchaseorder',$attributes); */?>
|
|
|
|
<section class="content">
|
|
<center><b><h2>Siddharth Industries - Stock Details </h2></b></center>
|
|
<div class="container-fluid">
|
|
<div align="right">
|
|
<!-- Trigger the modal with a button to add Item-->
|
|
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#AddItemModel">Add Item</button>
|
|
</div>
|
|
<!-- Start of Modal -->
|
|
<div id="AddItemModel" class="modal fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<center><h4>Add Item </h4></center>
|
|
</div>
|
|
<div align="left">
|
|
|
|
<div class="col-md-6">
|
|
<label>Material Code</label>
|
|
<div >
|
|
<?php
|
|
$options = array("0"=>'Material Code');
|
|
//print_r( $options);
|
|
|
|
if(!empty($MaterialList))
|
|
{
|
|
|
|
foreach ($MaterialList as $MID):
|
|
|
|
|
|
$options[$MID->MaterialCode] = $MID->MaterialCode.' '.' - '.' '.$MID->MaterialName;
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('AddMaterialCode', $options,set_value('AddMaterialCode'),'id="AddMaterialCode"' ,'class="form-control"');
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<label>Description</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AddDescription','value' => set_value('AddDescription'),'id'=>'AddDescription', 'class' => 'form-control','readonly' => 'true' );
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>UOM</label>
|
|
<div>
|
|
<?php
|
|
$data = array('name' => 'AddUOM','value' => set_value('AddUOM'),'id'=>'AddUOM', 'class' => 'form-control','readonly' => 'true' );
|
|
echo form_input($data);
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Available Stock</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AddAvailableStock','value' => set_value('AddAvailableStock'),'id'=>'AddAvailableStock', 'class' => 'form-control num' ,'onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Stock Availablity</label>
|
|
<div >
|
|
<?php
|
|
$options = array("0"=>'Selct Stock Availablity');
|
|
//print_r( $options);
|
|
|
|
if(!empty($StockAvail))
|
|
{
|
|
|
|
foreach ($MaterialList as $MID):
|
|
|
|
|
|
$options[$MID->StockAvail] = $MID->StockAvail.' '.' - '.' '.$MID->StockAvail;
|
|
|
|
endforeach;
|
|
}
|
|
|
|
echo form_dropdown('StockAvail', $options,set_value('StockAvail'),'id="StockAvail"' ,'class="form-control num"');
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label>Remarks</label>
|
|
<div class="form-group">
|
|
<?php
|
|
$data = array('name' => 'AddRemarks','value' => set_value('AddRemarks'),'id'=>'AddRemarks', 'class' => 'form-control');
|
|
echo form_input($data);
|
|
?>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<a class="btn btn-info font EditItem" ID="EditItem" ><i class="fa fa-plus"></i> <span class="bold">Add</span></a>
|
|
<a class="btn btn-info" data-dismiss="modal" value="Cancel">cancel</a>
|
|
</div>
|
|
</div></div>
|
|
</div>
|
|
<!-- End of Model -->
|
|
<table id="storestatuslisting" class="table table-bordered table-hover editableTable" style="font-size:12px;">
|
|
|
|
|
|
<div class="modal fade" role="dialog">
|
|
|
|
<thead style="background-color:#fff">
|
|
<tr>
|
|
<th>SNo.</th>
|
|
<th>Material Code</th>
|
|
<th>Material Name</th>
|
|
<th>UOM</th>
|
|
<th>Available Stock</th>
|
|
<th>Stock Availablity</th>
|
|
<th>Updated On</th>
|
|
<th>Remarks</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php if(!empty($Stock))
|
|
{
|
|
$index = 0;
|
|
foreach($Stock as $record)
|
|
{
|
|
$index = $index + 1;
|
|
?>
|
|
|
|
<tr id="<?php echo $index ; ?>">
|
|
<td align="left"><?php echo $index ; ?></td>
|
|
<td align="left"><?php echo $record->MaterialCode ; ?></td>
|
|
<td align="left"><?php echo $record->MaterialName ; ?></td>
|
|
<td align="left"><?php echo $record->UOM ; ?></td>
|
|
<td align="right"><input type="text" name="<?php echo 'AvalQuantity'.$index ?>" id="<?php echo 'AvalQuantity'.$index ?>" value="<?php echo $record->Quantity ; ?>" onkeypress="return isNumberKey(event);" />
|
|
|
|
</td>
|
|
|
|
<td align="left"><?php $St = 'In Stock'; if($record->Status == 1 ) {
|
|
$St = 'Out of Stock';
|
|
} echo $St ; ?></td>
|
|
<td align="right"><?php
|
|
|
|
$dt = new DateTime($record->updatedOn );
|
|
$updatedOn = $dt->format('d-m-y');
|
|
echo $updatedOn ; ?></td>
|
|
<td><input type="text" name="<?php echo 'Remarks'.$index ?>" id="<?php echo 'Remarks'.$index ?>" value="<?php echo $record->Remarks ; ?>" />
|
|
|
|
</td>
|
|
</tr>
|
|
<?php }
|
|
?>
|
|
|
|
<?php
|
|
}?>
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
<div align="right" style="padding-right:10px">
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<script>
|
|
function isNumberKey(evt)
|
|
{
|
|
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
|
if (charCode != 46 && charCode > 31
|
|
&& (charCode < 48 || charCode > 57))
|
|
return false;
|
|
|
|
return true;
|
|
}
|
|
$(function () {
|
|
|
|
$('#storestatuslisting').DataTable({
|
|
"paging": true,
|
|
"lengthChange": true,
|
|
"searching": true,
|
|
"ordering": true,
|
|
"info": true,
|
|
"autoWidth": false
|
|
});
|
|
});
|
|
</script>
|