ria/app/Views/statusofservicepurchaseorder.php
2024-09-11 08:54:25 +05:30

203 lines
4.6 KiB
PHP
Executable File

<script>
$(document).ready(function(){
$("#PONO").select2();
});
</script>
<div class="content-wrapper" style="min-height:435px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Status Of Service Purchase Order</center>
</h1>
</section>
<section class="content"><br/>
<?php
$attributes = array('class' => 'form-label-left Status ','name' => 'Status','id' => 'Status');
echo form_open(base_url().'servicepurchaseorder/UpdateServiceStatus',$attributes); ?>
<div class="row" style="padding-bottom:1%">
<div id="content" > </div>
<div class="col-md-12">
<div class="col-md-3">
<?php
/* $attributes = array('class' => 'form-label-left ','name' => 'IGR','id' => ''); */
/* echo form_open(base_url().'/inwardgateregister/addNewigr/',$attributes); */?>
<label>Select Service Purchase Order NO </label>
<div>
<?php
$options = array("-1"=>'Purchase Order No');
if(!empty($PO))
{
//print_r($PO_NO);
foreach ($PO as $SI):
$options[$SI->PONO] = $SI->PONO ;
// $PONO = $SI->PONO;
endforeach;
}
echo form_dropdown('PONO', $options,set_value('PONO'),'id="PONO"' ,'class="form-control select2"' , 'required="true"');
?>
</div>
</div>
<div class="col-md-3">
<label>Work Status</label>
<div>
<?php
$options = array();
if(!empty($WorkStatus))
{
//print_r($PO_NO);
foreach ($WorkStatus as $SI):
$options[$SI->StatusCode] = $SI->StatusName ;
endforeach;
}
echo form_dropdown('WorkStatus', $options,set_value('WorkStatus'),'id="WorkStatus"' ,'class="form-control"' , 'required="true"');
?>
</div>
</div>
<div class="col-md-3">
<label>Remarks</label>
<div>
<?php
$data = array('name' => 'Remarks','value' => set_value('Remarks'),'id'=>'Remarks', 'class' => 'form-control' );
echo form_input($data);
?>
</div>
</div>
<div class="col-md-2" align="right"><br/>
<input type="submit" value="Submit" class="btn btn-success">
</div>
</div>
<div class="row">
<div class="col-md-12" style="padding:1% 2%;">
<table id="StatusTable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
<thead>
<tr>
<!-- <th>S.NO</th> -->
<th>Req No</th>
<th>Req By</th>
<th>Req Date</th>
<th>Supplier Name</th>
<th>Item Code</th>
<th>Description</th>
<th>UOM</th>
<th>Ordered Quantity</th>
<th>Rate</th>
<th>Work Status</th>
</tr>
</thead>
<tbody id="tblAppend">
</tbody>
</table>
<input type="hidden" name="txtRowCount" id="txtRowCount" />
</div>
</div>
<script src="https://cdn.datatables.net/plug-ins/1.10.16/sorting/datetime-moment.js"></script>
<script>
$(function () {
$.fn.dataTable.moment( 'DD-MM-YYYY' );
$('#Inwardgateregistertable').DataTable({
"paging": true,
"lengthChange": true,
"searching": true,
"ordering": true,
"aaSorting": [[ 2, "desc" ]],
"info": true,
"autoWidth": true
});
$('#PONO').change(function() {
$("#tblAppend").empty();
var id = $('#PONO').val();
if(id != '-1')
{
$('#content').loader('show');
$.ajax({
data:{id:id},
type:"POST",
url:"<?php echo base_url() ?>servicepurchaseorder/getPODetails",
success:function(data) {
$('#content').loader('hide');
$("#tblAppend").empty();
$('#tblAppend').append(data);
}
});
}
else
{
alert('Please Select the Purchase Order Number to change the status');
}
});
});
</script>
</section>
</div>