diff --git a/application/views/createPOfromRequistion.php b/application/views/createPOfromRequistion.php
index 2966aeca..cc685f93 100644
--- a/application/views/createPOfromRequistion.php
+++ b/application/views/createPOfromRequistion.php
@@ -167,15 +167,9 @@
- 'Select Cost Center');
- //print_r( $options);
-
-
-
- echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class="form-control"');
-
- ?>
+ 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);?>
@@ -241,7 +235,11 @@
Requistion Type |
Requested By |
Requested Date |
-
Status |
+
Tot. No. Of Line Items |
+
Po Created Line Items |
+
Partial PO Created Line Items |
+
New Line Items |
+
Status |
Department |
Designation |
@@ -264,6 +262,9 @@
$RequestedDate = $dt->format('d-m-Y');
echo $RequestedDate;
?>
+
1 |
+
2 |
+
3 |
StatusName; ?> |
DepartmentName; ?> |
Designation; ?> |
@@ -505,8 +506,8 @@ $("#myModal").on("shown.bs.modal", function(e) {
$("#ReqBy").val(json.Requist[0]['FirstName']);
$("#RequistionDate").val(json.Requist[0]['ReqDate']);
$("#Desigination").val(json.Requist[0]['Designation']);
- $("#CostCenter").empty();
- $("#CostCenter").append(json.Cost);
+ $("#CostCenter").val(json.Requist[0]['CostCenterCode']);
+ $("#AvlBudgetAmount").val(json.AvilBudAmount);
$("#tbleAppend").empty();
$("#tbleAppend").append(json.Items);
@@ -516,51 +517,7 @@ $("#myModal").on("shown.bs.modal", function(e) {
});
});
-$('#CostCenter').change(function() {
-
- var id = $('#CostCenter').val();
- $("#AvlBudgetAmount").val('');
- var ReqType = $('#ReqType').val();
- if(id != '-1')
- {
- $('#content').loader('show');
- $.ajax({
- data:{id:id},
- type:"POST",
- url:"servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType,
- success:function(data) {
- if(data)
- {
- $('#content').loader('hide');
- $("#AvlBudgetAmount").val(data);
- if(parseFloat($("#AvlBudgetAmount").val()) <= 0)
- {
- $('#AlertImg').removeAttr("style");
-
- }
- else
- {
- $('#AlertImg').attr("style","display:none;");
-
- }
- }
- else
- {
- $('#content').loader('hide');
- alert("Error");
- }
- }
-
- });
-
- }
- else
- {
- alert('Please select the Employee details');
- return false;
- }
-
-});
+
function Validate()
{
var ReqNo = $('#txtReqNo').val();
diff --git a/application/views/editrequisitionform.php b/application/views/editrequisitionform.php
index 0aeb8a5d..59e660a9 100644
--- a/application/views/editrequisitionform.php
+++ b/application/views/editrequisitionform.php
@@ -7,6 +7,7 @@
$Designation ='';
$DepartmentName = '';
$Status = '';
+ $CostCenterCode = '';
if(!empty($ReqDetails))
@@ -19,7 +20,8 @@ if(!empty($ReqDetails))
$FirstName =$Req->FirstName;
$Designation =$Req->Designation;
$DepartmentName = $Req->DepartmentName;
- $Status = $Req->Status;
+ $Status = $Req->Status;
+ $CostCenterCode = $Req->CostCenterCode;
}
}
@@ -98,7 +100,7 @@ if(!empty($ReqDetails))
'Select Cost Center Name');
+ $Costs = array($CostCenterCode=>$CostCenterCode);
//print_r( $options);
if(!empty($CostCenter))
@@ -377,7 +379,36 @@ $(function() {
//Initialize Select2 Elements
$(".select2").select2();
-
+ var id = '';
+ var ReqType = '';
+ $.ajax({
+ data:{id:id},
+ type:"POST",
+ url:"servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType,
+ success:function(data) {
+ if(data)
+ {
+ $('#content').loader('hide');
+ $("#AvlBudgetAmount").val(data);
+
+ if(parseFloat($("#AvlBudgetAmount").val()) <= 0)
+ {
+ $('#AlertImg').removeAttr("style");
+ }
+ else
+ {
+ $('#AlertImg').attr("style","display:none;");
+ }
+ }
+ else
+ {
+ $('#content').loader('hide');
+ alert("Error");
+ }
+ }
+
+ });
+
$('#CostCenter').change(function() {
@@ -395,7 +426,7 @@ $('#CostCenter').change(function() {
if(data)
{
$('#content').loader('hide');
- $("#AvlBudgetAmount").val(data);
+ $("#AvlBudgetAmount").val(number_format(data,2));
if(parseFloat($("#AvlBudgetAmount").val()) <= 0)
{
@@ -718,12 +749,12 @@ $('.addClick').click(function(){
var quantity = $("#Quantity").val();
$('#drpMaterial option[value='+materialCode+']').remove();
-
$('#Description').val('');
$('#UOM').val('');
$('#Quantity').val('');
index = parseInt(index)+1;
+
var template = jQuery("#tempList").html();
@@ -805,11 +836,11 @@ $('.EditClick').click(function(){
});
$(function () {
$('#Items').DataTable({
- "paging": false,
+ "paging": true,
"lengthChange": true,
- "searching": false,
- "ordering": false,
- // "info": true,
+ "searching": true,
+ "ordering": true,
+ "info": true,
"autoWidth": true
});
diff --git a/application/views/requisitionform.php b/application/views/requisitionform.php
index 66be6a6f..beb98390 100644
--- a/application/views/requisitionform.php
+++ b/application/views/requisitionform.php
@@ -326,8 +326,6 @@ $(function() {
//Initialize Select2 Elements
$(".select2").select2();
-
-
$('#CostCenter').change(function() {
var id = $('#CostCenter').val();
@@ -386,7 +384,9 @@ $('#CostCenter').change(function() {
$("#Description").val('');
$("#UOM").val('');
$('#CostCenter').val("-1");
- removeHiddenRows($('#Items').find('tr').length);
+
+ removeHiddenRows($('#Items').find('tr').length);
+ $('#tempAppend').empty();
var id = $('#RequestType').val();
if(id != '-1')
@@ -476,8 +476,10 @@ var userid = '';
function removeHiddenRows(rowcount)
{
var step;
- //alert(rowcount);
-for (step = 1; step < rowcount-2; step++) {
+ alert(rowcount);
+ if(rowcount > 2)
+ {
+for (step = 1; step < rowcount ; step++) {
var td = document.getElementById(step);
td.parentNode.removeChild(td);
$("#MaterialCode"+step).remove();
@@ -485,7 +487,8 @@ for (step = 1; step < rowcount-2; step++) {
$("#UOM"+step).remove();
$("#Quantity"+step).remove();
index = '1';
- userid = '';
+ userid = '';
+}
}
}
function Save()
@@ -500,6 +503,7 @@ function Save()
$('#Deliverydt').focus();
return false;
}
+
else
{
$('#content').loader('show');
@@ -547,7 +551,12 @@ function validate()
alert('Please Add Line Item');
return false;
}
- else
+ else if(isExceed == 1)
+ {
+ alert('You dont have Budget and You cant Raise New Requisition');
+ return false;
+ }
+ else
{
return true;
}
@@ -759,7 +768,7 @@ $('.EditClick').click(function(){
"lengthChange": true,
"searching": false,
"ordering": false,
- // "info": true,
+ "info": false,
"autoWidth": true
});
diff --git a/application/views/requisitionlistapproval.php b/application/views/requisitionlistapproval.php
index 50740821..81a0bc79 100644
--- a/application/views/requisitionlistapproval.php
+++ b/application/views/requisitionlistapproval.php
@@ -145,12 +145,11 @@
'Select Cost Center');
- //print_r( $options);
-
-
+
+ $data = array('name' => 'CostCenter','value' => set_value('CostCenter'),'id'=>'CostCenter', 'class' => 'form-control' ,'readonly' => 'true');
+ echo form_input($data);
- echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class="form-control"');
+
?>
@@ -167,7 +166,7 @@
-
+
@@ -204,12 +203,12 @@
-
+
-
+
| Requisition Number |
@@ -232,8 +231,11 @@
?>
| ReqNo ?> |
- Requestedby ?> |
- CreatedDate ?> |
+ FirstName ?> |
+ CreatedDate);
+ $CreatedDate = $Cdt->format('d-m-Y');
+ echo $CreatedDate;
+ ?> |
StatusName ?> |
Status) == REQ_PENDING_APPROVAL)
{
@@ -281,46 +283,7 @@
\ No newline at end of file