diff --git a/application/views/addCostCenter.php b/application/views/addCostCenter.php index f0f8acc2..cb35f408 100644 --- a/application/views/addCostCenter.php +++ b/application/views/addCostCenter.php @@ -30,7 +30,17 @@ $(function() { //$('#selectDistriList').multiSelect(); }); - +
diff --git a/application/views/editOldcost.php b/application/views/editOldcost.php index 821f1d4f..58f1a5d4 100644 --- a/application/views/editOldcost.php +++ b/application/views/editOldcost.php @@ -5,7 +5,7 @@ $ApprovedBy = ''; $FirstName =''; $Designation =''; - + $BudYr = ''; if(!empty($CostMaster)) { @@ -18,7 +18,8 @@ if(!empty($CostMaster)) $ApprovedBy = $Cost->ApprovedBy; //echo $ApprovedBy; $FirstName =$Cost->FirstName; - $Designation =$Cost->Designation; + $Designation =$Cost->Designation; + $BudYr = $Cost->BudYear;; } } @@ -50,15 +51,61 @@ $(function() { minDate : new Date(year-SIAStartYear,1,1), maxDate :new Date(year+3,1,1), dateFormat: 'yy', changeYear: true, - + }); - //$('#selectDistriList').multiSelect(); + $('#drpBudget').change(function() { + + var id = $('#drpBudget').val(); + var code = $('#CostCode').val(); + if(id != '-1') + { + $('#content').loader('show'); + + $.ajax({ + //data:{id:id}, + dataType: 'json', + type:"POST", + url:"CostCenter/GetBudgetForYear?BudYear="+id+"&CostCode="+code, + success:function(json) { + //alert('success'); + //alert(json); + //alert(json.BudYear); + $("#tempAppend").empty(); + $('#tempAppend').append(json.Html); + $("#Addbudget").empty(); + $("#Addbudget").append(json.BudYear); + //$("#Addbudget").append(json.BudYear); + $('#content').loader('hide'); + //$("#Employee").append(result); + } + + }); + //$('#content').loader('hide'); + } + else + { + alert('Please select the PayOn'); + return false; + } + +}); }); +
@@ -85,20 +132,20 @@ $(function() { 'form-label-left addCost ','name' => 'addCost','id' => 'addCost'); + $attributes = array('class' => 'form-label-left EditCost ','name' => 'EditCost','id' => 'EditCost'); echo form_open($this->config->base_url().'addNewcost/',$attributes); ?>
-
+
*
'CostCode','value' => set_value( 'CostCode',$CostCenterCode ),'id'=>'CostCode', 'class' => 'form-control' ,'readonly' => 'true' ); + $data = array('name' => 'CostCode','value' => set_value( 'CostCode',$CostCenterCode ),'id'=>'c', 'class' => 'form-control' ,'readonly' => 'true' ); echo form_input($data); ?>
@@ -106,7 +153,7 @@ $(function() {
-
+
*
@@ -117,6 +164,52 @@ $(function() {
+
Budget Year:* + +
+ BudgetYear] = $record->BudgetYear ; + } + } + + echo form_dropdown('drpBudget',$Budget,set_value('drpBudget'),'id="drpBudget"', 'class = "form-control "'); ?> + + + +
+
Approved By:* + +
+ EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation; + + endforeach; + } + + echo form_dropdown('ApprovedBy',$Approved ,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?> + + + +
@@ -126,19 +219,18 @@ $(function() {
'Select Department'); + $opt = array("0"=>'Select Department'); //print_r( $options); - if(!empty($Department)) + if(!empty($DeptList)) { - foreach ($Department as $SID): - + foreach ($DeptList as $SID): - $options[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName; + $opt[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName; endforeach; } - echo form_multiselect('distriList', $options,set_value('distriList'),'id="distriList"' ,'class="form-control required"','required="true"'); + echo form_multiselect('distriList', $opt,set_value('distriList'),'id="distriList"' ,'class="form-control required"','required="true"'); ?>
@@ -168,45 +260,23 @@ $(function() { ?>
-
- -
- * - -
- EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation; - - endforeach; - } - - echo form_dropdown('ApprovedBy',$option,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?> - - -
-
+
+
IsApproved
-
+

-
-   Add Budget - - +
+ +
@@ -329,9 +398,13 @@ $(function() { BudgetType ?> - + + + + + BudgetYear ?> - + BudgetAmount ?> Remarks ?> @@ -344,7 +417,9 @@ $(function() { + @@ -444,8 +519,7 @@ $(function() {
@@ -490,12 +564,10 @@ $(function() {