Cost center
This commit is contained in:
parent
7660cd9d23
commit
bb44f1ea5a
@ -66,8 +66,8 @@ speed:500
|
|||||||
|
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<a href="<?php echo base_url().'CostCenter/editOldcost/'.$record->code; ?>"><i class="fa fa-pencil"></i> </a>
|
<a href="<?php echo base_url().'CostCenter/editOldcost?CostCode='.$record->code; ?>"><i class="fa fa-pencil"></i> </a>
|
||||||
<a href="<?php echo base_url().'CostCenter/viewcost/'.$record->code; ?>"><i class="fa fa-eye"></i> </a>
|
<a href="<?php echo base_url().'CostCenter/viewcost?CostCode='.$record->code; ?>"><i class="fa fa-eye"></i> </a>
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -1,3 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$CostCenterCode = '';
|
||||||
|
$CostCenterName = '';
|
||||||
|
$ApprovedBy = '';
|
||||||
|
$FirstName ='';
|
||||||
|
$Designation ='';
|
||||||
|
|
||||||
|
|
||||||
|
if(!empty($CostMaster))
|
||||||
|
{
|
||||||
|
foreach ($CostMaster as $Cost)
|
||||||
|
{
|
||||||
|
|
||||||
|
$CostCenterCode = $Cost->CostCenterCode;
|
||||||
|
|
||||||
|
$CostCenterName = $Cost->CostCenterName;
|
||||||
|
$ApprovedBy = $Cost->ApprovedBy;
|
||||||
|
//echo $ApprovedBy;
|
||||||
|
$FirstName =$Cost->FirstName;
|
||||||
|
$Designation =$Cost->Designation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(function() {
|
$(function() {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
@ -70,7 +98,7 @@ $(function() {
|
|||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'CostCode','value' => set_value('CostCode'),'id'=>'CostCode', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'5' );
|
$data = array('name' => 'CostCode','value' => set_value( 'CostCode',$CostCenterCode ),'id'=>'CostCode', 'class' => 'form-control' ,'readonly' => 'true' );
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -83,7 +111,7 @@ $(function() {
|
|||||||
<label for="Description">Cost Center Name:</label><font color="Red">*</font>
|
<label for="Description">Cost Center Name:</label><font color="Red">*</font>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
$data = array('name' => 'CostName','value' => set_value('CostName'),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
$data = array('name' => 'CostName','value' => set_value('CostName',$CostCenterName),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
||||||
echo form_input($data);
|
echo form_input($data);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -126,8 +154,16 @@ $(function() {
|
|||||||
<b> </b>
|
<b> </b>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$option["0"] = 'Selected Department';
|
$options["0"] = 'Selected Department';
|
||||||
echo form_multiselect('selectDistriList[]', $option,set_value('selectDistriList[]'),'id="selectDistriList"','size="10"');
|
if(!empty($CostDepts))
|
||||||
|
{
|
||||||
|
foreach ($CostDepts as $SID):
|
||||||
|
|
||||||
|
$options[$SID->DEPCode] = $SID->DEPCode.' '.' - '.' '.$SID->DepartmentName;
|
||||||
|
|
||||||
|
endforeach;
|
||||||
|
}
|
||||||
|
echo form_multiselect('selectDistriList[]', $options,set_value('selectDistriList[]'),'id="selectDistriList"','size="10"');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
@ -140,20 +176,20 @@ $(function() {
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$options = array("-1"=>'Select Approver');
|
$option[$ApprovedBy] = $ApprovedBy . " - " . $FirstName . " - " . $Designation;
|
||||||
//print_r( $options);
|
|
||||||
|
|
||||||
if(!empty($Approver))
|
if(!empty($Approver))
|
||||||
{
|
{
|
||||||
foreach ($Approver as $SID):
|
foreach ($Approver as $SID):
|
||||||
|
|
||||||
|
|
||||||
$options[$SID->EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation;
|
$option[$SID->EmpID] = $SID->EmpID . " - " . $SID->FirstName . " - " . $SID->Designation;
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo form_dropdown('ApprovedBy',$options,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?>
|
echo form_dropdown('ApprovedBy',$option,set_value('ApprovedBy'),'id="ApprovedBy"', 'class = "form-control "'); ?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -272,7 +308,7 @@ $(function() {
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table id="BudgetTable" class="table table-striped responsive-utilities jambo_table" style="display:none;">
|
<table id="BudgetTable" class="table table-striped responsive-utilities jambo_table" >
|
||||||
<thead style="background-color: #CFCFCF;">
|
<thead style="background-color: #CFCFCF;">
|
||||||
|
|
||||||
<th>Budget Type</th>
|
<th>Budget Type</th>
|
||||||
@ -282,6 +318,33 @@ $(function() {
|
|||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="tempAppend">
|
<tbody id="tempAppend">
|
||||||
|
<?php
|
||||||
|
$index = 0;
|
||||||
|
if(!empty($CostBudget))
|
||||||
|
{
|
||||||
|
foreach($CostBudget as $record)
|
||||||
|
{
|
||||||
|
$index =$index + 1;
|
||||||
|
?>
|
||||||
|
<tr id="<?php echo $index ?>">
|
||||||
|
|
||||||
|
<td align="left"><?php echo $record->BudgetType ?></td>
|
||||||
|
|
||||||
|
<td align="left"><?php echo $record->BudgetYear ?></td>
|
||||||
|
|
||||||
|
<td align="left"><?php echo $record->BudgetAmount ?></td>
|
||||||
|
|
||||||
|
<td align="left"><?php echo $record->Remarks ?></td>
|
||||||
|
<td>
|
||||||
|
<a data-target='#Edit' data-id="<?php echo $index ?>" data-userid="<?php echo $index ?>" data-toggle="modal" href="#Edit"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the <?php echo $record->BudgetType ?> Budget details"></i> </a>
|
||||||
|
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user