'Newscreenaddedandissuefixed'
This commit is contained in:
parent
80f0db1210
commit
d39912b4d4
@ -17,7 +17,7 @@ $Address="";
|
||||
$CreatedBy="";
|
||||
$ServiceDescription="";
|
||||
$RowCount = 0;
|
||||
|
||||
$MRIRStatus = '';
|
||||
if(!empty($MRIRDetails))
|
||||
{
|
||||
|
||||
@ -48,7 +48,7 @@ if(!empty($MRIRDetails))
|
||||
$Address=$MRIR->Address;
|
||||
//$CreatedBy=$MRIR->CreatedBy;
|
||||
$ServiceDescription=$MRIR->ServiceDescription;
|
||||
|
||||
$MRIRStatus = $MRIR->MRIRStatus;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -96,7 +96,7 @@ if(!empty($MRIRDetails))
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="MRIRNO">MRIR Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -106,11 +106,11 @@ if(!empty($MRIRDetails))
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="MRIRDate">MRIR Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'MRIRDate','value' => set_value('MRIRDate',$mrirdate),'id'=>'MRIRDate', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
$data = array('name' => 'MRIRDate','value' => set_value('MRIRDate',$mrirdate),'id'=>'MRIRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
@ -128,7 +128,7 @@ if(!empty($MRIRDetails))
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="IGRNO">IGR Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -138,18 +138,18 @@ if(!empty($MRIRDetails))
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="IGRDate">IGR Date</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'IGRDate','value' => set_value('IGRDate',$igrdate),'id'=>'IGRDate', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
$data = array('name' => 'IGRDate','value' => set_value('IGRDate',$igrdate),'id'=>'IGRDate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="IGRRasiedbyName">IGR Rasied By</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
@ -163,8 +163,8 @@ if(!empty($MRIRDetails))
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<label for="PONO">Purchase Order Number</label>
|
||||
<div class="col-md-2">
|
||||
<label for="PONO">PO Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'PONO','value' => set_value('PONO',$PONO),'id'=>'PONO', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
@ -172,16 +172,16 @@ if(!empty($MRIRDetails))
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label for="PODate">Purchase Order Date</label>
|
||||
<div class="col-md-2">
|
||||
<label for="PODate">PO Date</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$podate),'id'=>'PODate', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
$data = array('name' => 'PODate','value' => set_value('PODate',$podate),'id'=>'PODate', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-2">
|
||||
<label for="PORasiedbyName">PO Raised By</label>
|
||||
<div class="from-group">
|
||||
<?php
|
||||
@ -197,7 +197,7 @@ if(!empty($MRIRDetails))
|
||||
<label for="DeliveryChellanOrInvoiceNo">Delivery Challan / Invoice Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -206,7 +206,7 @@ if(!empty($MRIRDetails))
|
||||
<label for="DeliveryChellanDate">Delivery Challan / Invoice Date </label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('type'=>'date','name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control','readonly' => 'true');
|
||||
$data = array('name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -228,7 +228,7 @@ if(!empty($MRIRDetails))
|
||||
<label for="VehicleNo">Vehicle Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true','align' => 'left');
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control', 'readonly' => 'true','align' => 'left');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -237,7 +237,7 @@ if(!empty($MRIRDetails))
|
||||
<label for="CourierNo">Courier Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true');
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -335,9 +335,15 @@ if(!empty($MRIRDetails))
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
<div class="col-md-1 col-md-offset-10">
|
||||
<?php if($MRIRStatus == MRIR_CREATED)
|
||||
{ ?>
|
||||
<a class="btn btn-primary" type="submit" onclick="updatemrir()">Update MRIR</a>
|
||||
<?php } else {?>
|
||||
<a class="btn btn-primary" onclick="Redirect()">OK</a>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="RowCount" id="RowCount " value="<?php echo $RowCount ?>" />
|
||||
<input type="hidden" name="status" id="status" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -347,7 +353,10 @@ if(!empty($MRIRDetails))
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function Redirect()
|
||||
{
|
||||
window.location ="ViewMRIR";
|
||||
}
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
@ -368,27 +377,35 @@ function setaccept(rowId)
|
||||
{
|
||||
//alert(rowId);
|
||||
var accept = parseFloat($('#AcceptQuantity'+rowId).val());
|
||||
//alert(accept);
|
||||
if(accept !='')
|
||||
{
|
||||
$('#status').val('<?php echo MRIR_APPROVED?>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#status').val('<?php echo MRIR_REJECTED?>');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function setreject(rowId)
|
||||
{
|
||||
//alert(rowId);
|
||||
|
||||
var reject = parseFloat($('#RejectQuantity'+rowId).val());
|
||||
//alert(reject);
|
||||
|
||||
}
|
||||
|
||||
function setremark(rowId)
|
||||
{ //alert(rowId);
|
||||
{
|
||||
var remark = ($('#Remark'+rowId).val());
|
||||
//alert(remark);
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function updatemrir()
|
||||
{
|
||||
//$('#content').loader('show');
|
||||
$('#content').loader('show');
|
||||
//alert("update function worked ");
|
||||
$.ajax({
|
||||
data:$('.MRIR').serialize(),
|
||||
@ -399,10 +416,9 @@ function updatemrir()
|
||||
success:function(data){
|
||||
//alert("success function worked ");
|
||||
if(data){
|
||||
//$('#content').loader('hide');
|
||||
//alert("if function")
|
||||
//alert(data);
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
window.location ="ViewMRIR";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -27,9 +27,10 @@ if(!empty($IGRDetails))
|
||||
$CourierNo= $IGR->CourierNo;
|
||||
$DeliveryChellanOrInvoiceNo=$IGR->DeliveryChellanOrInvoiceNo;
|
||||
$SupplierName=$IGR->SupplierName;
|
||||
$DeliveryChellanDate=$IGR->DeliveryChellanDate;
|
||||
$dc_date = strtotime( $DeliveryChellanDate );
|
||||
$dcdate = date( 'd/m/Y', $dc_date );
|
||||
//$DeliveryChellanDate=$IGR->DeliveryChellanDate;
|
||||
|
||||
$dc_date = new DateTime( $IGR->DeliveryChellanDate );
|
||||
$dcdate = $dc_date->format('d/m/Y');;
|
||||
$Address=$IGR->Address;
|
||||
$PORasiedbyName=$IGR->FirstName;
|
||||
$PODate=$IGR->PODate;
|
||||
@ -44,6 +45,7 @@ if(!empty($IGRDetails))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<script>
|
||||
|
||||
@ -152,7 +154,7 @@ if(!empty($IGRDetails))
|
||||
<div class="form-group">
|
||||
<?php
|
||||
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control num' ,'readonly' => 'true');
|
||||
$data = array('name' => 'DeliveryChellanOrInvoiceNo','value' => set_value('DeliveryChellanOrInvoiceNo',$DeliveryChellanOrInvoiceNo),'id'=>'DeliveryChellanOrInvoiceNo', 'class' => 'form-control' ,'readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -160,7 +162,7 @@ if(!empty($IGRDetails))
|
||||
<div class="col-md-4">
|
||||
<label for="DeliveryChellanDate">Delivery Challan / Invoice Date </label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('type'=>'date','name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
$data = array('name' => 'DeliveryChellanDate','value' => set_value('DeliveryChellanDate',$dcdate),'id'=>'DeliveryChellanDate', 'class' => 'form-control num','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -180,7 +182,7 @@ if(!empty($IGRDetails))
|
||||
<label for="VehicleNo">Vehicle Number</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true','align' => 'left');
|
||||
$data = array('name' => 'VehicleNo','value' => set_value('VehicleNo',$VehicleNo),'id'=>'VehicleNo', 'class' => 'form-control' ,'readonly' => 'true','align' => 'left');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -188,7 +190,7 @@ if(!empty($IGRDetails))
|
||||
<div class="col-md-4">
|
||||
<label for="CourierNo">Courier Number</label>
|
||||
<div class="form-group"><?php
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control num', 'required'=>'true' ,'readonly' => 'true');
|
||||
$data = array('name' => 'CourierNo','value' => set_value('CourierNo',$CourierNo),'id'=>'CourierNo', 'class' => 'form-control','readonly' => 'true');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -277,6 +279,7 @@ if(!empty($IGRDetails))
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="content"></div>
|
||||
<div class="col-md-1 col-md-offset-11">
|
||||
<a class="btn btn-primary" type="submit" onclick="savemrir()">Generate MRIR</a>
|
||||
<input type="hidden" name="RowCount" id="RowCount " value="<?php echo $RowCount ?>" />
|
||||
@ -293,12 +296,12 @@ if(!empty($IGRDetails))
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
"paging": false,
|
||||
"lengthChange": false,
|
||||
"searching": false,
|
||||
"ordering": false,
|
||||
"info": false,
|
||||
"autoWidth": false
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
@ -326,7 +329,7 @@ function setremark(rowId)
|
||||
function savemrir()
|
||||
{
|
||||
//alert("save function worked ");
|
||||
//$("#content").load('show');
|
||||
$("#content").load('show');
|
||||
|
||||
$.ajax({
|
||||
data:$('.MRIR').serialize(),
|
||||
@ -334,13 +337,13 @@ function setremark(rowId)
|
||||
url:"<?php echo base_url() ?>MRIRcontroller/stored_db",
|
||||
|
||||
success:function(data) {
|
||||
//alert(data);
|
||||
|
||||
|
||||
if(data){
|
||||
//$("#content").load('hide');
|
||||
$("#content").load('hide');
|
||||
alert(data);
|
||||
//alert("MRIR value generated");
|
||||
//window.location ="<?php echo base_url() ?> ";
|
||||
|
||||
window.location ="viewmaterialinspectionreport";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
text-align :right;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<?php
|
||||
/* $attributes = array('class' => 'form-label-left RequisitionList ','name' => 'RequisitionList','id' => 'RequisitionList','method' => 'post','role' => 'form' );
|
||||
$attributes = array('class' => 'form-label-left StoreStock ','name' => 'StoreStock','id' => 'StoreStock','method' => 'post','role' => 'form' );
|
||||
|
||||
echo form_open($this->config->base_url().'purchaseorderform/purchaseorder',$attributes); */?>
|
||||
echo form_open($this->config->base_url().'purchaseorderform/purchaseorder',$attributes); ?>
|
||||
|
||||
<section class="content">
|
||||
<center><b><h2>Siddharth Industries - Stock Details </h2></b></center>
|
||||
@ -45,10 +45,10 @@
|
||||
$options[$MID->MaterialCode] = $MID->MaterialCode.' '.' - '.' '.$MID->MaterialName;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
}
|
||||
|
||||
echo form_dropdown('AddMaterialCode', $options,set_value('AddMaterialCode'),'id="AddMaterialCode"' ,'class="form-control"');
|
||||
|
||||
|
||||
echo form_dropdown('MaterialCode', $options,set_value('MaterialCode'),'id="MaterialCode"' ,'class = "form-control select2"');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,7 +57,7 @@
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AddDescription','value' => set_value('AddDescription'),'id'=>'AddDescription', 'class' => 'form-control','readonly' => 'true' );
|
||||
$data = array('name' => 'Description','value' => set_value('Description'),'id'=>'Description', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -66,7 +66,7 @@
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'AddUOM','value' => set_value('AddUOM'),'id'=>'AddUOM', 'class' => 'form-control','readonly' => 'true' );
|
||||
$data = array('name' => 'UOM','value' => set_value('UOM'),'id'=>'UOM', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
|
||||
@ -85,21 +85,21 @@
|
||||
<label>Stock Availablity</label>
|
||||
<div >
|
||||
<?php
|
||||
$options = array("0"=>'Selct Stock Availablity');
|
||||
$options = array();
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($StockAvail))
|
||||
if(!empty($StockStatus))
|
||||
{
|
||||
|
||||
foreach ($MaterialList as $MID):
|
||||
foreach ($StockStatus as $MID):
|
||||
|
||||
|
||||
$options[$MID->StockAvail] = $MID->StockAvail.' '.' - '.' '.$MID->StockAvail;
|
||||
$options[$MID->ConfigValue] = $MID->ConfigValue;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('StockAvail', $options,set_value('StockAvail'),'id="StockAvail"' ,'class="form-control num"');
|
||||
echo form_dropdown('StockAvail', $options,set_value('StockAvail'),'id="StockAvail"' ,'class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
@ -108,7 +108,7 @@
|
||||
<label>Remarks</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'AddRemarks','value' => set_value('AddRemarks'),'id'=>'AddRemarks', 'class' => 'form-control');
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -117,8 +117,115 @@
|
||||
</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>
|
||||
<a class="btn btn-info font EditItem" onclick="AddStock();" ID="AddItem" ><i class="fa fa-plus" ></i> <span class="bold">Add</span></a>
|
||||
<a class="btn btn-info" data-dismiss="modal" onclick="cancel();" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
<!-- End of Model -->
|
||||
<!-- Start of Modal -->
|
||||
<div id="EditItemModel" 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>Edit Stock 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;
|
||||
}
|
||||
|
||||
$data = array('name' => 'EditMaterialCode','value' => set_value('EditMaterialCode'),'id'=>'EditMaterialCode', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<label>Description</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditDescription','value' => set_value('EditDescription'),'id'=>'EditDescription', 'class' => 'form-control','readonly' => 'true' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>UOM</label>
|
||||
<div>
|
||||
<?php
|
||||
$data = array('name' => 'EditUOM','value' => set_value('EditUOM'),'id'=>'EditUOM', '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' => 'EditAvailableStock','value' => set_value('EditAvailableStock'),'id'=>'EditAvailableStock', '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();
|
||||
//print_r( $options);
|
||||
|
||||
if(!empty($StockStatus))
|
||||
{
|
||||
|
||||
foreach ($StockStatus as $MID):
|
||||
|
||||
|
||||
$options[$MID->ConfigValue] = $MID->ConfigValue;
|
||||
|
||||
endforeach;
|
||||
}
|
||||
|
||||
echo form_dropdown('EditStockAvail', $options,set_value('EditStockAvail'),'id="EditStockAvail"' ,'class="form-control"');
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label>Remarks</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'EditRemarks','value' => set_value('EditRemarks'),'id'=>'EditRemarks', 'class' => 'form-control');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-info font EditItem" onclick="EditStock();" ID="EditItem" ><i class="fa fa-plus" ></i> <span class="bold">Edit</span></a>
|
||||
<a class="btn btn-info" data-dismiss="modal" onclick="cancel();" value="Cancel">cancel</a>
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
@ -151,10 +258,11 @@
|
||||
|
||||
<tr id="<?php echo $index ; ?>">
|
||||
<td align="left"><?php echo $index ; ?></td>
|
||||
<td align="left"><?php echo $record->MaterialCode ; ?></td>
|
||||
|
||||
<td align="left"><a data-toggle="modal" data-target="#EditItemModel" data-id="<%=index%>" data-userid="<?php echo $index ?>" > <u><?php echo $record->MaterialCode ?></u></a></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 align="right"><?php echo $record->Quantity ; ?>
|
||||
|
||||
</td>
|
||||
|
||||
@ -166,7 +274,7 @@
|
||||
$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><?php echo $record->Remarks ; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@ -187,9 +295,50 @@ $updatedOn = $dt->format('d-m-y');
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="content"></div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
|
||||
//Initialize Select2 Elements
|
||||
$(".select2").select2();
|
||||
$('#MaterialCode').change(function() {
|
||||
|
||||
var id = $('#MaterialCode').val();
|
||||
|
||||
$("#Description").val('');
|
||||
$("#UOM").val('');
|
||||
if(id != '-1')
|
||||
{
|
||||
$('#content').loader('show');
|
||||
|
||||
$.ajax({
|
||||
data:{id:id},
|
||||
dataType: 'json',
|
||||
type:"POST",
|
||||
url:"<?php echo base_url();?>requisitionform/getMaterialDetails",
|
||||
success:function(json) {
|
||||
$('#content').loader('hide');
|
||||
|
||||
$("#Description").val(json.MatDetail[0]['MaterialName']);
|
||||
$("#UOM").val(json.MatDetail[0]['UOM']);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please select the MaterialCode');
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function isNumberKey(evt)
|
||||
{
|
||||
@ -200,6 +349,147 @@ $updatedOn = $dt->format('d-m-y');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$("#EditItemModel").on("shown.bs.modal", function(e) {
|
||||
var rowid = $(e.relatedTarget).data('userid');
|
||||
var tr= document.getElementById(rowid);
|
||||
var cellval = tr.cells;
|
||||
$('#EditMaterialCode').val(cellval[1].innerText);
|
||||
$('#EditDescription').val(cellval[2].innerText);
|
||||
$('#EditUOM').val(cellval[3].innerText);
|
||||
$('#EditAvailableStock').val(cellval[4].innerText);
|
||||
if(cellval[5].innerText == 'In Stock')
|
||||
{
|
||||
$('#EditStockAvail').val('YES');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#EditStockAvail').val('NO');
|
||||
}
|
||||
|
||||
$('#EditRemarks').val(cellval[7].innerText);
|
||||
|
||||
});
|
||||
function AddStock()
|
||||
{
|
||||
id= $('#MaterialCode').val();
|
||||
if(validate())
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.StoreStock').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>storestatus/AddStock",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
$('#MaterialCode option[value='+id+']').remove();
|
||||
clearLineitemData();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function EditStock()
|
||||
{
|
||||
|
||||
if(Editvalidate())
|
||||
{
|
||||
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
data:$('.StoreStock').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>storestatus/UpdateStock",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
window.location = "Stock";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function Editvalidate()
|
||||
{
|
||||
if($("#EditAvailableStock").val().length < 1)
|
||||
{
|
||||
alert('Please Add Available Stock');
|
||||
$("#EditAvailableStock").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function cancel()
|
||||
{
|
||||
window.location = "Stock";
|
||||
}
|
||||
function clearLineitemData()
|
||||
{
|
||||
$('#MaterialCode').val('');
|
||||
$('#Description').val('');
|
||||
$('#UOM').val('');
|
||||
$('#StockAvail').val('');
|
||||
$('#AddAvailableStock').val('');
|
||||
$('#Remarks').val('');
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if($("option:selected", $("#MaterialCode")).val() == '-1')
|
||||
{
|
||||
alert('Please Select MaterialCode Names');
|
||||
$("#MaterialCode").focus();
|
||||
return false;
|
||||
}
|
||||
else if($("option:selected", $("#StockAvail")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Stock Availablity');
|
||||
$("#StockAvail").focus();
|
||||
return false;
|
||||
}
|
||||
else if($("#AddAvailableStock").val().length < 1)
|
||||
{
|
||||
alert('Please Add Available Stock');
|
||||
$("#AddAvailableStock").focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#storestatuslisting').DataTable({
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
<td><?php echo $d->CourierNo ?></td>
|
||||
<td><?php echo $d->UpdatedbyName ?></td>
|
||||
<td>
|
||||
<a href="<?php echo base_url().'MRIRcontroller/editmaterialinspectionreport?MRIRNO='.$d->MRIRNO; ?>"><button style="font-size:12px" id="generated" name="generated">Edit MRIR <i class="fa fa-pencil"></i></button></a></td>
|
||||
<a href="<?php echo base_url().'EditMRIR?MRIRNO='.$d->MRIRNO; ?>"><button style="font-size:12px" id="generated" name="generated">Edit MRIR <i class="fa fa-pencil"></i></button></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
}} ?>
|
||||
@ -82,7 +82,7 @@
|
||||
<script>
|
||||
<!-- script for table , It works under the datatable plugin-->
|
||||
$(function () {
|
||||
$('#Inwardgateregistertable').DataTable({
|
||||
$('#MRIRtable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
|
||||
@ -1,13 +1,5 @@
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// For table
|
||||
(function(l,q){var e=function(b,c){b.extend(!0,c.defaults,{dom:"<'row'<'col-sm-9'l><'col-sm-3'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-9'i><'col-sm-3'p>>",renderer:"bootstrap"});b.extend(c.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});c.ext.renderer.pageButton.bootstrap=function(g,e,r,s,i,m){var t=new c.Api(g),u=g.oClasses,j=g.oLanguage.oPaginate,d,f,n=0,p=function(c,e){var k,h,o,a,l=function(a){a.preventDefault();
|
||||
b(a.currentTarget).hasClass("disabled")||t.page(a.data.action).draw(!1)};k=0;for(h=e.length;k<h;k++)if(a=e[k],b.isArray(a))p(c,a);else{f=d="";switch(a){case "ellipsis":d="…";f="disabled";break;case "first":d=j.sFirst;f=a+(0<i?"":" disabled");break;case "previous":d=j.sPrevious;f=a+(0<i?"":" disabled");break;case "next":d=j.sNext;f=a+(i<m-1?"":" disabled");break;case "last":d=j.sLast;f=a+(i<m-1?"":" disabled");break;default:d=a+1,f=i===a?"active":""}d&&(o=b("<li>",{"class":u.sPageButton+" "+
|
||||
f,id:0===r&&"string"===typeof a?g.sTableId+"_"+a:null}).append(b("<a>",{href:"#","aria-controls":g.sTableId,"data-dt-idx":n,tabindex:g.iTabIndex}).html(d)).appendTo(c),g.oApi._fnBindAction(o,{action:a},l),n++)}},h;try{h=b(q.activeElement).data("dt-idx")}catch(l){}p(b(e).empty().html('<ul class="pagination"/>').children("ul"),s);h&&b(e).find("[data-dt-idx="+h+"]").focus()};c.TableTools&&(b.extend(!0,c.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},
|
||||
collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,c.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}))};"function"===typeof define&&define.amd?define(["jquery","datatables"],e):"object"===typeof exports?e(require("jquery"),require("datatables")):jQuery&&e(jQuery,jQuery.fn.dataTable)})(window,document);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.modal
|
||||
@ -36,12 +28,14 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<th>IGR NO</th>
|
||||
<th>MRIR NO</th>
|
||||
<th>PONO</th>
|
||||
<th>Department</th>
|
||||
<th>PO Type</th>
|
||||
<th>Material Code</th>
|
||||
<th>Material Name</th>
|
||||
<th>UOM</th>
|
||||
<th>Ordered Qty</th>
|
||||
<th>Received Quantity</th>
|
||||
<th>Accepted Quantity</th>
|
||||
<th>Rejected Quantity</th>
|
||||
<th>Status of MRIR</th>
|
||||
<th>Remarks</th>
|
||||
<th>Quality Incharge</th>
|
||||
@ -51,10 +45,10 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
if(!empty($mrirdatas2))
|
||||
if(!empty($Billing))
|
||||
{
|
||||
$Index=0;
|
||||
foreach($mrirdatas2 as $d)
|
||||
foreach($Billing as $d)
|
||||
{
|
||||
$Index= $Index+1;
|
||||
?>
|
||||
@ -65,14 +59,16 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<td><a data-toggle="modal" data-target="#materialreport" data-userid="<?php echo $d->MRIRNO ?>" data-id="<%=Index%>" data-dismiss="modal" ><?php echo $d->MRIRNO ?> </a></td>
|
||||
|
||||
<td><?php echo $d->PONO ?></td>
|
||||
<td></td><!-- Department --->
|
||||
<td></td><!-- Material Code --->
|
||||
<td></td><!-- Material Name --->
|
||||
<td></td><!-- UOM --->
|
||||
<td></td><!-- Received Quantity --->
|
||||
<td></td><!--Accepted Quantity --->
|
||||
<td></td><!-- Status of MRIR --->
|
||||
<td></td><!-- Remarks --->
|
||||
<td><?php echo $d->POType ?></td><!-- Department --->
|
||||
<td><?php echo $d->MaterialCode ?></td><!-- Material Code --->
|
||||
<td><?php echo $d->MaterialName ?></td><!-- Material Name --->
|
||||
<td><?php echo $d->UOM ?></td><!-- UOM --->
|
||||
<td><?php echo $d->Quantity ?></td><!-- UOM --->
|
||||
<td><?php echo $d->QuantityAsPerInvoice ?></td><!-- Received Quantity --->
|
||||
<td><?php echo $d->QuantityAccepted ?></td><!--Accepted Quantity --->
|
||||
<td><?php echo $d->QuantityRejected ?></td><!-- Status of MRIR --->
|
||||
<td><?php echo $d->StatusName ?></td><!-- Remarks --->
|
||||
<td><?php echo $d->Remarks ?></td><!-- Remarks --->
|
||||
<td><?php echo $d->QualityInchargeID ?></td>
|
||||
<td><?php echo $d->StoreInchargeID ?></td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user