Available budget amount issue sorted out
This commit is contained in:
parent
615fc5c928
commit
37292c3b12
@ -12,7 +12,7 @@
|
|||||||
$serviceSchedule='';
|
$serviceSchedule='';
|
||||||
$servicePeriod='';
|
$servicePeriod='';
|
||||||
$noOfService='';
|
$noOfService='';
|
||||||
|
$strReqPOType = '';
|
||||||
if(!empty($ReqDetails))
|
if(!empty($ReqDetails))
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -33,7 +33,11 @@ if(!empty($ReqDetails))
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!empty($ReqPOType))
|
||||||
|
{
|
||||||
|
|
||||||
|
$strReqPOType = $ReqPOType;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
@ -513,11 +517,23 @@ $(function() {
|
|||||||
$(".select2").select2();
|
$(".select2").select2();
|
||||||
|
|
||||||
var id = '<?php echo $CostCenterCode?>';
|
var id = '<?php echo $CostCenterCode?>';
|
||||||
var ReqType = '<?php echo $ReqType?>';
|
var ReqType = '<?php echo $strReqPOType?>';
|
||||||
|
|
||||||
|
var urlval = '';
|
||||||
|
if(ReqType == '<?php echo IMPORT?>')
|
||||||
|
{
|
||||||
|
urlval="<?php echo base_url() ?>servicepurchaseorder/GetAvailableImportBudgetAmount?ReqType="+ReqType;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
urlval ="<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType,
|
url:urlval,
|
||||||
success:function(data) {
|
success:function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
@ -547,14 +563,24 @@ $('#CostCenter').change(function() {
|
|||||||
|
|
||||||
var id = $('#CostCenter').val();
|
var id = $('#CostCenter').val();
|
||||||
$("#AvlBudgetAmount").val('');
|
$("#AvlBudgetAmount").val('');
|
||||||
var ReqType = $('#RequestType').val();
|
var ReqType = '<?php echo $strReqPOType?>';
|
||||||
|
var urlval = '';
|
||||||
|
if(ReqType == '<?php echo IMPORT?>')
|
||||||
|
{
|
||||||
|
urlval="<?php echo base_url() ?>servicepurchaseorder/GetAvailableImportBudgetAmount?ReqType="+ReqType;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
urlval ="<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType;
|
||||||
|
}
|
||||||
|
|
||||||
if(id != '-1')
|
if(id != '-1')
|
||||||
{
|
{
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType,
|
url:urlval,
|
||||||
success:function(data) {
|
success:function(data) {
|
||||||
if(data)
|
if(data)
|
||||||
{
|
{
|
||||||
@ -587,44 +613,7 @@ $('#CostCenter').change(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
$('#RequestType').change(function()
|
|
||||||
{
|
|
||||||
|
|
||||||
$('#txtRowCount').val('');
|
|
||||||
$('#txtDeletedRow').val('');
|
|
||||||
$("#Description").val('');
|
|
||||||
$("#UOM").val('');
|
|
||||||
removeHiddenRows($('#Items').find('tr').length);
|
|
||||||
var id = $('#RequestType').val();
|
|
||||||
|
|
||||||
if(id != '-1')
|
|
||||||
{
|
|
||||||
$('#content').loader('show');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
data:{id:id},
|
|
||||||
dataType: 'json',
|
|
||||||
type:"POST",
|
|
||||||
url:"<?php echo base_url();?>requisitionform/getMaterialCode",
|
|
||||||
success:function(json) {
|
|
||||||
$('#content').loader('hide');
|
|
||||||
|
|
||||||
$("#drpMaterial").empty();
|
|
||||||
$("#drpMaterial").append(json.Material);
|
|
||||||
// $("#Description").val(json.MaterialName);
|
|
||||||
//$("#UOM").val(json.UOM);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
//$('#content').loader('hide');
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
alert('Please select the RequestType');
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#drpMaterial').change(function() {
|
$('#drpMaterial').change(function() {
|
||||||
|
|
||||||
|
|||||||
@ -17,64 +17,10 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-3">
|
|
||||||
<label>Requisition Status</label>
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<select class="form-control required" id="RequisitionStatus" name="RequisitionStatus" >
|
|
||||||
<option value="-1" >Select Status</option>
|
|
||||||
<?php
|
|
||||||
if(!empty($Status))
|
|
||||||
{
|
|
||||||
foreach ($Status as $DEP)
|
|
||||||
{
|
|
||||||
$StatusCode = $DEP->StatusCode;
|
|
||||||
|
|
||||||
if ($_POST['RequisitionStatus'] == $StatusCode)
|
|
||||||
{
|
|
||||||
|
|
||||||
echo "<option value=\"".$StatusCode."\" selected=\"selected\">".$StatusCode.' - '. $DEP->StatusName."</option>";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "<option value=\"".$StatusCode."\">".$StatusCode.' - '. $DEP->StatusName ."</option>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3">
|
|
||||||
<div class="form-group">
|
|
||||||
<label>Date range:</label>
|
|
||||||
|
|
||||||
<div class="input-group">
|
|
||||||
<div class="input-group-addon">
|
|
||||||
<i class="fa fa-calendar"></i>
|
|
||||||
</div>
|
|
||||||
<input type="text" class="form-control pull-right" id="SearchDate" value="<?php echo isset($_POST['SearchDate']) ? $_POST['SearchDate'] : '' ?>" name="SearchDate">
|
|
||||||
</div>
|
|
||||||
<!-- /.input group -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
|
||||||
<label> </label>
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="hidden" name="FromDate" id="FromDate" />
|
|
||||||
<input type="hidden" name="ToDate" id="ToDate" />
|
|
||||||
<input type="submit" value="submit" class="btn btn-primary" >
|
|
||||||
<!-- <input type="Reset" class="btn btn-primary" >
|
|
||||||
|
|
||||||
<!-- <button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<!--<a class="btn btn-info" onclick="Search()" >Search</a> -->
|
|
||||||
<a class="btn btn-primary" onclick="Reset()" >Clear</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -238,7 +184,7 @@
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<td contenteditable="true"><input type="text" id="Remarks<?php echo $index ?>" name="Remarks<?php echo $index ?>"class="form-control" maxlength="100"></td>
|
<td contenteditable="true"><input type="text" id="Remarks<?php echo $index ?>" name="Remarks<?php echo $index ?>"class="form-control" maxlength="100"></td>
|
||||||
<td data-name="sel" id="Action<?php echo $index ?>" onchange="saveToDatabase(this,'question','<?php echo $record->ReqNo ; ?>','<?php echo $index ; ?>')">
|
<td data-name="sel" contenteditable="true" id="Action<?php echo $index ?>" onchange="saveToDatabase(this,'question','<?php echo $record->ReqNo ; ?>','<?php echo $index ; ?>')">
|
||||||
<select name="status<?php echo $index ?>" id="status<?php echo $index ?>">
|
<select name="status<?php echo $index ?>" id="status<?php echo $index ?>">
|
||||||
<option value="1">Select Action</option>
|
<option value="1">Select Action</option>
|
||||||
<option value="2">Approve</option>
|
<option value="2">Approve</option>
|
||||||
@ -435,6 +381,7 @@ $(function () {
|
|||||||
"paging": true,
|
"paging": true,
|
||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
|
"aaSorting": [[ 0, "desc" ]],
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true
|
"autoWidth": true
|
||||||
|
|||||||
@ -140,6 +140,7 @@ span.highlight {
|
|||||||
"lengthChange": true,
|
"lengthChange": true,
|
||||||
"searching": true,
|
"searching": true,
|
||||||
"ordering": true,
|
"ordering": true,
|
||||||
|
"aaSorting": [[ 0, "desc" ]],
|
||||||
"info": true,
|
"info": true,
|
||||||
"autoWidth": true
|
"autoWidth": true
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user