@@ -73,7 +57,7 @@
endforeach;
}
- echo form_dropdown('EmpID', $options,set_value('EmpID'),'id="EmpID"' ,'class = "form-control select2"','required="true"');
+ echo form_dropdown('EmpID', $options,set_value('EmpID'),'id="EmpID"' ,'class = "form-control"','disabled="disabled"');
?>
@@ -84,7 +68,7 @@
'SupplierAddress','value' => set_value('SupplierAddress'),'id'=>'SupplierAddress', 'class' => 'form-control' ,'readonly' => 'true');
+ $data = array('name' => 'DeptName','value' => set_value('DeptName'),'id'=>'DeptName', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
@@ -93,7 +77,7 @@
'SupplierAddress','value' => set_value('SupplierAddress'),'id'=>'SupplierAddress', 'class' => 'form-control' ,'readonly' => 'true');
+ $data = array('name' => 'Designation','value' => set_value('Designation'),'id'=>'Designation', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
@@ -106,18 +90,17 @@
'Select Cost Center Name');
- //print_r( $options);
-
- if(!empty($CostCenter))
- {
- foreach ($CostCenter as $CID):
-
-
- $options[$CID->CostName] = $CID->CostName.' '.' - '.' '.$CID->Description;
+ //print_r( $options);
+
+ if(!empty($Cost))
+ {
+ foreach ($Cost as $SID):
+ // echo $SID->ConfigValue;
+ $Budget[$SID->CostCenterCode] = $SID->CostCenterCode;
- endforeach;
- }
-
+ endforeach;
+
+ }
echo form_dropdown('CostCenter', $options,set_value('CostCenter'),'id="CostCenter"' ,'class = "form-control"');
?>
@@ -128,7 +111,7 @@
'BudgetAmount','value' => set_value('BudgetAmount'),'id'=>'BudgetAmount', 'class' => 'form-control' ,'readonly' => 'true');
+ $data = array('name' => 'AvlBudgetAmount','value' => set_value('AvlBudgetAmount'),'id'=>'AvlBudgetAmount', 'class' => 'form-control' ,'readonly' => 'true');
echo form_input($data);
?>
@@ -140,10 +123,10 @@
-
+
-
+
Add Line Item
@@ -202,7 +185,7 @@
'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'required' => 'true');
+ $data = array('name' => 'Quantity','value' => set_value('Quantity'),'id'=>'Quantity', 'class' => 'form-control' ,'onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
echo form_input($data);
?>
@@ -210,19 +193,85 @@
+
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 'EditMaterialCode', 'value' => set_value('EditMaterialCode'),'id'=>'EditMaterialCode', 'class' => 'form-control','readonly'=>'true');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'EditDescription','value' => set_value('EditDescription'),'id'=>'EditDescription', 'class' => 'form-control','readonly' => 'true' );
+ echo form_input($data);
+ ?>
+
+
+
+
+
+ 'EditUOM','value' => set_value('EditUOM'),'id'=>'EditUOM', 'class' => 'form-control','readonly' => 'true' );
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+ 'EditQuantity','value' => set_value('EditQuantity'),'id'=>'EditQuantity', 'class' => 'form-control','onkeypress'=>'return isNumberKey(event)','maxlength'=>'20');
+ echo form_input($data);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
| SNo |
Material Code |
Material Name |
@@ -231,49 +280,20 @@
Action |
-
-
- | 1 |
- 001 |
- Waste Sand |
- Ton |
- 100 |
-
-
-
- |
-
-
- | 2 |
- 002 |
- Resin |
- Litre |
- 50 |
-
-
-
- |
-
-
- | 3 |
- 003 |
- Resin |
- Litre |
- 100 |
-
-
-
- |
-
-
+
+
+
-
-
-
+
+
+
Save
+
+
+
@@ -284,17 +304,421 @@
\ No newline at end of file
+
+$('#CostCenter').change(function() {
+
+ var id = $('#CostCenter').val();
+ $("#AvlBudgetAmount").val('');
+ var ReqType = $('#RequestType').val();
+ if(id != '-1')
+ {
+ $('#content').loader('show');
+
+ $.ajax({
+ data:{id:id},
+ dataType: 'json',
+ type:"POST",
+ url:"requisitionform/getAvailableBudAmount?ReqType="+ReqType,
+ success:function(json) {
+ $('#content').loader('hide');
+ $("#AvlBudgetAmount").val(json.Cost[0]['BudgetAmount']);
+
+ }
+
+ });
+
+ }
+ else
+ {
+ alert('Please select the Employee details');
+ return false;
+ }
+
+});
+ $('#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:"requisitionform/getMaterialCode",
+ success:function(json) {
+ $('#content').loader('hide');
+
+ $("#MaterialCode").empty();
+ $("#MaterialCode").append(json.Material);
+ // $("#Description").val(json.MaterialName);
+ //$("#UOM").val(json.UOM);
+ }
+
+ });
+ //$('#content').loader('hide');
+ }
+ else
+ {
+ alert('Please select the RequestType');
+ return false;
+ }
+
+});
+$('#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:"requisitionform/getMaterialDetails",
+ success:function(json) {
+ $('#content').loader('hide');
+ //alert(json.MatDetail);
+ $("#Description").val(json.MatDetail[0]['MaterialName']);
+ $("#UOM").val(json.MatDetail[0]['UOM']);
+ }
+
+ });
+ //$('#content').loader('hide');
+ }
+ else
+ {
+ alert('Please select the RequestType');
+ return false;
+ }
+
+});
+
+
+});
+
+
+
\ No newline at end of file
diff --git a/application/views/requisitionlisting.php b/application/views/requisitionlisting.php
index 63dbcc91..45796c3e 100644
--- a/application/views/requisitionlisting.php
+++ b/application/views/requisitionlisting.php
@@ -21,7 +21,7 @@ speed:500