CONFIG DETAILS AND PAYSLIP ISSUES FIXED
This commit is contained in:
parent
2df80dfb76
commit
a61cede326
@ -64,7 +64,7 @@ public function index()
|
||||
|
||||
function addNewconfig()
|
||||
{
|
||||
$Configid = $this->input->post('Configid');
|
||||
// $Configid = $this->input->post('Configid');
|
||||
$ConfigName = $this->input->post('configurationname');
|
||||
$Rowcount = $this->input->post('txtRowCount');
|
||||
$Comments = $this->input->post('Comments');
|
||||
@ -80,14 +80,19 @@ public function index()
|
||||
$IsActive = '0';
|
||||
}
|
||||
|
||||
$config = array('Config_ID'=>$Configid,'ConfigName'=>$ConfigName, 'Comments'=>$Comments);
|
||||
//$config = array('Config_ID'=>$Configid,'ConfigName'=>$ConfigName, 'Comments'=>$Comments);
|
||||
$config = array('ConfigName'=>$ConfigName, 'Comments'=>$Comments);
|
||||
$result = $this->configmodel->addconfigmaster($config);
|
||||
//print_r($result);
|
||||
|
||||
//echo $id;die();
|
||||
if(count($config)>0)
|
||||
{
|
||||
$id=$result[0]['Config_ID'];
|
||||
for($i=1;$i<=$Rowcount;$i++)
|
||||
{
|
||||
$ConfigValue = $this->input->post('ConfigValue'.$i);
|
||||
$configvalue = array('Config_ID'=>$Configid,'ConfigValue'=>$ConfigValue);
|
||||
$configvalue = array('Config_ID'=>$id,'ConfigValue'=>$ConfigValue);
|
||||
$result = $this->configmodel->addconfigdetails($configvalue);
|
||||
|
||||
}}//if closed
|
||||
|
||||
@ -38,7 +38,10 @@ function addconfigmaster($config)
|
||||
|
||||
$this->db->trans_complete();
|
||||
|
||||
return $insert_id;
|
||||
//return $insert_id;
|
||||
$sql='SELECT MAX(Config_ID) as Config_ID FROM T_ConfigMaster';
|
||||
$res = $this->db->query($sql);
|
||||
return $res->result_array();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -65,25 +65,25 @@ $(function() {
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<!-- <div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Configuration ID</label>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid'),'id'=>'Configid', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid'),'id'=>'Configid', 'class' => 'form-control' );
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div> -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Configuration Name</label>
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'configurationname','value' => set_value('configurationname'),'id'=>'configurationname', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'configurationname','value' => set_value('configurationname'),'id'=>'configurationname', 'class' => 'form-control' ,'required' => 'true','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -91,12 +91,12 @@ $(function() {
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>Comments</label>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Comments','value' => set_value('Comments'),'id'=>'Comments', 'class' => 'form-control' ,'required' => 'true');
|
||||
$data = array('name' => 'Comments','value' => set_value('Comments'),'id'=>'Comments', 'class' => 'form-control' ,'required' => 'true','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -15,6 +15,32 @@ $("#due_started").datepicker({
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
window.onload = function(){
|
||||
loanReset();
|
||||
function loanReset(){
|
||||
//alert("hi");
|
||||
var loan=$("#Loan_Amount").val();//document.getElementById('Loan_Amount').value;
|
||||
var paid=$("#Paid_Amount").val();//document.getElementById('Paid_Amount').value;
|
||||
if(loan !=0){
|
||||
if (loan == paid)
|
||||
{
|
||||
//alert("loan reset");
|
||||
$("#Loan_Amount").val(0.00);
|
||||
$("#Paid_Amount").val(0.00);
|
||||
$("#monthly_due").val(0.00);
|
||||
$("#no_of_due").val(0);
|
||||
$("#remaining_due").val(0);
|
||||
$("#paid_due").val(0);
|
||||
|
||||
}else
|
||||
{
|
||||
//alert("loan pending");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<?php
|
||||
@ -199,7 +225,7 @@ if(!empty($emppay))
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<span for="OT_Rate">OT_Rate</span><font color="Red">*</font>
|
||||
<input type="text" class="form-control required" id="OT_Rate" name="OT_Rate" value="<?php echo $OT_Rate; ?>" pattern="([0-9]{1,2}([.][0-9]{1,2})?" title="Minimum 1 digit,Maximum 4 Digit">
|
||||
<input type="text" class="form-control required" id="OT_Rate" name="OT_Rate" value="<?php echo $OT_Rate; ?>" pattern="([0-9]{1,2}([.][0-9]{1,2})?)" title="Minimum 1 digit,Maximum 4 Digit">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -303,8 +329,8 @@ if(!empty($emppay))
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due;?>">
|
||||
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due;?>">
|
||||
<input type="text" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due;?>">
|
||||
<input type="text" id="paid_due" name="paid_due" value="<?php echo $Paid_Due;?>">
|
||||
</div>
|
||||
|
||||
|
||||
@ -471,9 +497,13 @@ function duecalculation()
|
||||
document.getElementById('no_of_due').value=Math.ceil(totaldue);
|
||||
var noofdues=document.getElementById('no_of_due').value;
|
||||
$('#remaining_due').val(noofdues);
|
||||
$("#paid_due").val(0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
</script>
|
||||
@ -1,3 +1,10 @@
|
||||
<script>
|
||||
//window.onload=al();
|
||||
function al()
|
||||
{
|
||||
alert($('#Configid').val());
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
$Configid = '';
|
||||
@ -86,7 +93,7 @@ if(!empty($master))
|
||||
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid',$Configid),'id'=>'Configid', 'class' => 'form-control' ,'required' => 'true','readonly'=>'true');
|
||||
$data = array('name' => 'Configid','value' => set_value('Configid',$Configid),'id'=>'Configid', 'class' => 'form-control' ,'required' => 'true','readonly'=>'true','onclick'=>'al();');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -99,7 +106,7 @@ if(!empty($master))
|
||||
<label for="Description">Configuration Name</label><font color="Red">*</font>
|
||||
<div class="form-group" >
|
||||
<?php
|
||||
$data = array('name' => 'ConfigName','value' => set_value('ConfigName',$ConfigName),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
||||
$data = array('name' => 'ConfigName','value' => set_value('ConfigName',$ConfigName),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','maxlength'=>'20');//'style'=>'text-transform:uppercase;'
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -110,7 +117,7 @@ if(!empty($master))
|
||||
<label for="Description">Comments</label><font color="Red">*</font>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks',$Comments),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','style'=>'text-transform:uppercase;','maxlength'=>'20');
|
||||
$data = array('name' => 'Remarks','value' => set_value('Remarks',$Comments),'id'=>'CostName', 'class' => 'form-control' ,'required' => 'true','maxlength'=>'20');
|
||||
echo form_input($data);
|
||||
?>
|
||||
</div>
|
||||
@ -136,7 +143,7 @@ if(!empty($master))
|
||||
<thead style="background-color: #CFCFCF;">
|
||||
|
||||
<th>S.NO</th>
|
||||
<th>Config ID</th>
|
||||
|
||||
<th>Config Value</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
@ -156,7 +163,7 @@ if(!empty($master))
|
||||
<input type="hidden" name ="configVal<?php echo $index?>" id="configVal<?php echo $index?>" value="<?php echo $con->ConfigValue?>">
|
||||
|
||||
|
||||
<tr><td><?php echo $index;?></td><td><?php echo $con->Config_ID;?></td><td><?php echo $con->ConfigValue;?></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 Budget details"></i> </a></td></tr>
|
||||
<tr><td><?php echo $index;?></td><td><?php echo $con->ConfigValue;?></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 Budget details"></i> </a></td></tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@ -306,8 +313,10 @@ $("#Edit").on("shown.bs.modal", function(e) {
|
||||
userid = $(e.relatedTarget).data('userid');
|
||||
//alert(userid);
|
||||
$('#key').val($('#configtable tr:eq('+ userid +') td:eq(0)').text());
|
||||
$('#Config_ID').val($('#configtable tr:eq('+ userid +') td:eq(1)').text());
|
||||
$('#ConfigValue').val($('#configtable tr:eq('+ userid +') td:eq(2)').text());
|
||||
//$('#Config_ID').val($('#configtable tr:eq('+ userid +') td:eq(2)').text());
|
||||
//alert($('#Configid').val());
|
||||
$('#Config_ID').val($('#Configid').val());
|
||||
$('#ConfigValue').val($('#configtable tr:eq('+ userid +') td:eq(1)').text());
|
||||
|
||||
});
|
||||
|
||||
@ -336,8 +345,8 @@ $('.tempClickEdit').click(function()
|
||||
var ConfigValue = $("#ConfigValue").val();
|
||||
//alert(ConfigValue);
|
||||
$('#configVal'+userid).val(ConfigValue);
|
||||
$('#configtable tr:eq('+ userid +') td:eq(1)').text(ConfigID);
|
||||
$('#configtable tr:eq('+ userid +') td:eq(2)').text(ConfigValue);
|
||||
// $('#configtable tr:eq('+ userid +') td:eq(1)').text(ConfigID);
|
||||
$('#configtable tr:eq('+ userid +') td:eq(1)').text(ConfigValue);
|
||||
//$('#configtable tr:eq('+ userid +') td:eq(3)').text(BudRemarks);
|
||||
|
||||
$('#Config_ID'+userid).val(ConfigID);
|
||||
|
||||
@ -518,7 +518,7 @@ $(function() {
|
||||
|
||||
var id = '<?php echo $CostCenterCode?>';
|
||||
var ReqType = '<?php echo $strReqPOType?>';
|
||||
alert(ReqType);
|
||||
|
||||
var urlval = '';
|
||||
|
||||
urlval ="<?php echo base_url() ?>servicepurchaseorder/AvilBudgetAmount?ReqType="+ReqType;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user