Cost center
This commit is contained in:
parent
b3cccd4ab5
commit
6d28fe12a5
@ -649,8 +649,10 @@ $('.tempClickEdit').click(function(){
|
||||
$(".addCost").submit(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
if(validate())
|
||||
{
|
||||
$('#content').loader('show');
|
||||
$.ajax({
|
||||
$.ajax({
|
||||
data:$('.addCost').serialize(),
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>CostCenter/addNewcost",
|
||||
@ -667,14 +669,38 @@ $.ajax({
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
alert("Error");
|
||||
|
||||
alert("Error");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
function validate()
|
||||
{
|
||||
if($("#txtSelectedDepartment").val().length < 1)
|
||||
{
|
||||
alert('Please Select Department');
|
||||
return false;
|
||||
}
|
||||
else if($("#txtRowCount").val().length < 1)
|
||||
{
|
||||
alert('Please Add Budget');
|
||||
return false;
|
||||
}
|
||||
else if($("option:selected", $("#ApprovedBy")).val() == '-1')
|
||||
{
|
||||
alert('Please Select Approver Names');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,3 +1,13 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('table').tableSort( {
|
||||
animation :'slide',
|
||||
speed:500
|
||||
} );
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
@ -30,9 +40,9 @@
|
||||
</form>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body table-responsive no-padding">
|
||||
<table class="table table-hover">
|
||||
<tr>
|
||||
<div class="box-body table-responsive no-padding" >
|
||||
<table id="datatable" class="table table-hover tableSorter" >
|
||||
<tr bgcolor="steelblue">
|
||||
<th>Cost Center ID</th>
|
||||
<th>Cost Name</th>
|
||||
<th>Description</th>
|
||||
@ -49,15 +59,15 @@
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $record->CostCentreID ?></td>
|
||||
<td><?php echo $record->CostName ?></td>
|
||||
<td><?php echo $record->Description ?></td>
|
||||
<td><?php echo $record->CreatedDate ?></td>
|
||||
<td><?php echo $record->code ?></td>
|
||||
<td><?php echo $record->CostCenterName ?></td>
|
||||
<td><?php echo $record->ApprovedBy ?></td>
|
||||
<td><?php echo $record->FirstName ?></td>
|
||||
|
||||
|
||||
<td>
|
||||
<a href="<?php echo base_url().'CostCenter/editOldcost/'.$record->CostCentreID; ?>"><i class="fa fa-pencil"></i> </a>
|
||||
<a href="<?php echo base_url().'CostCenter/viewcost/'.$record->CostCentreID; ?>"><i class="fa fa-eye"></i> </a>
|
||||
<a href="<?php echo base_url().'CostCenter/editOldcost/'.$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>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user