Service status update
This commit is contained in:
parent
a5bd067d57
commit
37c934ae1e
@ -19,92 +19,65 @@
|
|||||||
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
|
<table id="example1" class="table table-bordered table-hover editableTable" style="font-size:12px;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr bgcolor="LightSlateGray ">
|
<tr bgcolor="LightSlateGray ">
|
||||||
<th>#</th>
|
<th>SNO#</th>
|
||||||
<th>PONO#</th>
|
<th>PONO#</th>
|
||||||
|
<th>SupplierName</th>
|
||||||
<th>Material Code</th>
|
<th>Material Code</th>
|
||||||
<th>Material Name</th>
|
<th>Material Name</th>
|
||||||
<th>UOM</th>
|
<th>UOM</th>
|
||||||
|
<th>Quantity</th>
|
||||||
<th>Order Value</th>
|
<th>Order Value</th>
|
||||||
<th>Cost Center Name</th>
|
<th>Cost Center Name</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>Raised By</th>
|
<th>PO Raised By</th>
|
||||||
<th>Department</th>
|
<th>Department</th>
|
||||||
<th>PO Date</th>
|
<th>PO Date</th>
|
||||||
<th>Work Status</th>
|
|
||||||
<th>Remarks</th>
|
<th>Remarks</th>
|
||||||
<!--<th>Action</th>-->
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
|
||||||
<td>1</td>
|
|
||||||
<td><a href="#">P0001</a></td>
|
|
||||||
<td>A100</td>
|
|
||||||
<td>Iron</td>
|
|
||||||
<td>Kg</td>
|
|
||||||
<td>1000</td>
|
|
||||||
<td>C001</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>Rajasekar</td>
|
|
||||||
<td>Finance</td>
|
|
||||||
<td>18-7-2017</td>
|
|
||||||
<td ><select name="selectId">
|
|
||||||
<option value="-1" >Select Option</option>
|
|
||||||
<option value="1">In Progress</option>
|
|
||||||
<option value="2">Complete</option>
|
|
||||||
</select></td>
|
|
||||||
<td contenteditable="true"><?php
|
|
||||||
$data = array('name' => '','value' => set_value(''),'id'=>'POType', 'class' => 'form-control');
|
|
||||||
echo form_input($data);
|
|
||||||
?></td>
|
|
||||||
|
|
||||||
<!--<td><i class="fa fa-eye"></i></td>-->
|
<?php $SNo = 0;
|
||||||
</tr>
|
|
||||||
<tr>
|
if(!empty($Billing))
|
||||||
<td>2</td>
|
|
||||||
<td><a href="#">P0002</a></td>
|
{
|
||||||
<td>A1001</td>
|
|
||||||
<td>Iron</td>
|
foreach($Billing as $record)
|
||||||
<td>Kg</td>
|
{
|
||||||
<td>1000</td>
|
$SNo =$SNo + 1;
|
||||||
<td>C002</td>
|
//print_r($MRIRDetails);
|
||||||
<td>No</td>
|
|
||||||
<td>Rajasekar</td>
|
|
||||||
<td>Finance</td>
|
?>
|
||||||
<td>18-7-2017</td>
|
<tr>
|
||||||
<td><select name="selectId">
|
<td><?php echo $SNo?></td>
|
||||||
<option value="-1" >Select Option</option>
|
<td><a data-toggle="tooltip" href="<?php echo base_url().'purchaseorder/CreatePOPrint?PONO='.$record->PONO.'&ReqType='.SERVICE ?>" target="new"><?php echo $record->PONO?></a></td>
|
||||||
<option value="1">In Progress</option>
|
<td><?php echo $record->SupplierName?></td>
|
||||||
<option value="2">Complete</option>
|
<td><?php echo $record->MaterialCode?></td>
|
||||||
</select></td>
|
<td><?php echo $record->MaterialName?></td>
|
||||||
<td contenteditable="true"><?php
|
<td><?php echo $record->UOM?></td>
|
||||||
$data = array('name' => 'POType','value' => set_value('POType'),'id'=>'POType', 'class' => 'form-control');
|
<td><?php echo $record->Quantity?></td>
|
||||||
echo form_input($data);
|
<td><?php echo $record->TotalValue?></td>
|
||||||
?></td>
|
<td><?php echo $record->CostCenterName?></td>
|
||||||
<!--<td><i class="fa fa-eye"></i></td>-->
|
<td><?php echo $record->ServiceMaterialDescription?></td>
|
||||||
</tr><tr>
|
<td><?php echo $record->FirstName?></td>
|
||||||
<td>3</td>
|
<td><?php echo $record->DepartmentName?></td>
|
||||||
<td><a href="#">P0003</a></td>
|
<td><?php
|
||||||
<td>A1002</td>
|
$rdate = new dateTime($record->PODate);
|
||||||
<td>Iron</td>
|
$ReqDate = $rdate->format('d-m-Y');
|
||||||
<td>Kg</td>
|
echo $ReqDate ?></td>
|
||||||
<td>1000</td>
|
<td><?php echo $record->ServiceWorkStatusRemarks ?></td>
|
||||||
<td>C003</td>
|
|
||||||
<td>No</td>
|
|
||||||
<td>Rajasekar</td>
|
</tr>
|
||||||
<td>Finance</td>
|
<?php
|
||||||
<td>18-7-2017</td>
|
|
||||||
<td><select name="selectId">
|
|
||||||
<option value="-1" >Select Option</option>
|
}
|
||||||
<option value="1">In Progress</option>
|
}
|
||||||
<option value="2">Complete</option>
|
?>
|
||||||
</select></td>
|
|
||||||
<td contenteditable="true"><?php
|
|
||||||
$data = array('name' => '','value' => set_value('POType'),'id'=>'POType', 'class' => 'form-control');
|
|
||||||
echo form_input($data);
|
|
||||||
?></td>
|
|
||||||
<!--<td><i class="fa fa-eye"></i></td>-->
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
$("#PONO").select2();
|
$("#PONO").select2();
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
@ -18,6 +18,11 @@
|
|||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
<section class="content"><br/>
|
<section class="content"><br/>
|
||||||
|
<?php
|
||||||
|
$attributes = array('class' => 'form-label-left Status ','name' => 'Status','id' => 'Status');
|
||||||
|
|
||||||
|
echo form_open($this->config->base_url().'servicepurchaseorder/UpdateServiceStatus',$attributes); ?>
|
||||||
|
|
||||||
<div class="row" style="padding-bottom:1%">
|
<div class="row" style="padding-bottom:1%">
|
||||||
<div id="content" > </div>
|
<div id="content" > </div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -26,19 +31,18 @@
|
|||||||
/* $attributes = array('class' => 'form-label-left ','name' => 'IGR','id' => ''); */
|
/* $attributes = array('class' => 'form-label-left ','name' => 'IGR','id' => ''); */
|
||||||
|
|
||||||
/* echo form_open($this->config->base_url().'/inwardgateregister/addNewigr/',$attributes); */?>
|
/* echo form_open($this->config->base_url().'/inwardgateregister/addNewigr/',$attributes); */?>
|
||||||
<label>Select Purchase Order NO </label>
|
<label>Select Service Purchase Order NO </label>
|
||||||
<div>
|
<div>
|
||||||
<?php
|
<?php
|
||||||
$options = array("-1"=>'Purchase Order No');
|
$options = array("-1"=>'Purchase Order No');
|
||||||
|
|
||||||
if(!empty($PO_NO))
|
if(!empty($PO))
|
||||||
{
|
{
|
||||||
//print_r($PO_NO);
|
//print_r($PO_NO);
|
||||||
foreach ($PO_NO as $SI):
|
foreach ($PO as $SI):
|
||||||
|
|
||||||
$options[$SI->PONO] = $SI->PONO .'-'. $SI->SupplierName ;
|
|
||||||
$PONO = $SI->PONO;
|
|
||||||
|
|
||||||
|
$options[$SI->PONO] = $SI->PONO ;
|
||||||
|
// $PONO = $SI->PONO;
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|
||||||
@ -50,6 +54,49 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</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-1 col-md-offset-10">
|
||||||
|
|
||||||
|
<input type="submit" class="btn btn-primary">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -61,38 +108,26 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<table id="Inwardgateregistertable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
|
<table id="StatusTable" class="table table-bordered table-hover editabletable IGR_Line" style="background-color:#fff;font-size:12px;">
|
||||||
<thead style="background-color:#ddf">
|
<thead style="background-color:#ddf">
|
||||||
<tr>
|
<tr>
|
||||||
<th>S.NO</th>
|
<th>S.NO</th>
|
||||||
|
<th>ReqNo</th>
|
||||||
|
<th>Reqedby</th>
|
||||||
|
<th>ReqDate</th>
|
||||||
|
<th>SupplierName</th>
|
||||||
<th>Item Code</th>
|
<th>Item Code</th>
|
||||||
<th>Material</th>
|
<th>Description</th>
|
||||||
<th>UOM</th>
|
<th>UOM</th>
|
||||||
<th>Ordered Quantity</th>
|
<th>Ordered Quantity</th>
|
||||||
<th>Accepted Quantity</th>
|
<th>Rate</th>
|
||||||
<th>Status</th>
|
|
||||||
<th>Remarks</th>
|
<th>Work Status</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody id="tblAppend">
|
||||||
<tr>
|
|
||||||
<td>1</td>
|
|
||||||
<td><a href="#">P0001</a></td>
|
|
||||||
<td>Iron</td>
|
|
||||||
<td>Kg</td>
|
|
||||||
<td>1000</td>
|
|
||||||
<td>800</td>
|
|
||||||
<td><select name="selectId">
|
|
||||||
<option value="-1">Select Option</option>
|
|
||||||
<option value="1">In Progress</option>
|
|
||||||
<option value="2">Complete</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
<td contenteditable="true"><?php
|
|
||||||
$data = array('name' => '','value' => set_value(''),'id'=>'', 'class' => 'form-control');
|
|
||||||
echo form_input($data);
|
|
||||||
?></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
|
|
||||||
@ -101,12 +136,123 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 col-md-offset-10">
|
|
||||||
|
|
||||||
|
|
||||||
<a class="btn btn-primary" onclick="Save();">Submit</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#PONO').change(function() {
|
||||||
|
$("#tblAppend").empty();
|
||||||
|
|
||||||
|
var id = $('#PONO').val();
|
||||||
|
|
||||||
|
if(id != '-1')
|
||||||
|
{
|
||||||
|
|
||||||
|
$('#content').loader('show');
|
||||||
|
var y = <?php echo json_encode($PO, JSON_PRETTY_PRINT) ?>;
|
||||||
|
|
||||||
|
$.each(y, function(idx, obj) {
|
||||||
|
|
||||||
|
if(id == obj.PONO)
|
||||||
|
{
|
||||||
|
//alert(obj.ServiceWorkStatus);
|
||||||
|
// $('#WorkStatus').val(obj.ServiceWorkStatus);
|
||||||
|
// $("#WorkStatus").append( $('<option></option>').val(obj.ServiceWorkStatus).html(obj.ServiceWorkStatus));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:id},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url() ?>servicepurchaseorder/getPODetails",
|
||||||
|
success:function(data) {
|
||||||
|
$('#content').loader('hide');
|
||||||
|
|
||||||
|
|
||||||
|
$("#tblAppend").empty();
|
||||||
|
|
||||||
|
|
||||||
|
$('#tblAppend').append(data);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
/*var rowcount =document.getElementById('StatusTable').rows.length;
|
||||||
|
for(i=1;i<=rowcount;i++)
|
||||||
|
{
|
||||||
|
alert($('#Status1').val());
|
||||||
|
// var tr= document.getElementById(i);
|
||||||
|
// cells = tr.getElementsByTagName('td');
|
||||||
|
// var Statusval = cells[0].innerHTML;
|
||||||
|
$('<input>').attr({
|
||||||
|
type: 'hidden',
|
||||||
|
id: 'hidStatus'+i,
|
||||||
|
name: 'hidStatus'+i,
|
||||||
|
value: $('#Status'+i).val()
|
||||||
|
}).appendTo('form');
|
||||||
|
|
||||||
|
$('<input>').attr({
|
||||||
|
type: 'hidden',
|
||||||
|
id: 'hidRemarks'+i,
|
||||||
|
name: 'hidRemarks'+i,
|
||||||
|
value: $('#Remark'+i).val()
|
||||||
|
}).appendTo('form');
|
||||||
|
} //alert(rowcount);*/
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert('Please Select the Purchase Order Number to Create IGR');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function saveToDatabase(Index) {
|
||||||
|
var id = $('#Remarks'+Index).val();
|
||||||
|
var Status = $('#Status'+Index).val();
|
||||||
|
var strMsg = 'Do you want to Approve the Requisition?';
|
||||||
|
var answer = confirm(strMsg);
|
||||||
|
var Selectedvalue = [];
|
||||||
|
Selectedvalue[0]= id;
|
||||||
|
Selectedvalue[1]= Status;
|
||||||
|
Selectedvalue[2]= PONO;
|
||||||
|
if (answer)
|
||||||
|
{
|
||||||
|
$('#content').loader('show');
|
||||||
|
$.ajax({
|
||||||
|
data:{id:id},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url() ?>requisitionform/ApproveRequest?Status="+StatusCode+"&ReqNo="+ReqId,
|
||||||
|
success:function(data) {
|
||||||
|
if(data)
|
||||||
|
{
|
||||||
|
$('#content').loader('hide');
|
||||||
|
alert(data);
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert("Error");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user