@ -35,7 +35,7 @@
< div class = "modal fade" id = "mdlAddIncome" >
< div class = "modal fade" id = "mdlAddIncome" >
< div class = "modal-dialog" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-content" >
< form action = " <? = url_to ( 'payroll/ add compben') ?> " method = "post" >
< form action = " <? = url_to ( 'payroll/ save compben') ?> " method = "post" >
< div class = "modal-header" >
< div class = "modal-header" >
< h4 class = "modal-title" > New Employee Income< / h4 >
< h4 class = "modal-title" > New Employee Income< / h4 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
@ -69,6 +69,11 @@
< input class = "form-check-input" type = "radio" id = "rdoInPercentageAmount" name = "amount_type" value = "perc" >
< input class = "form-check-input" type = "radio" id = "rdoInPercentageAmount" name = "amount_type" value = "perc" >
< label for = "rdoInPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< label for = "rdoInPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< / div >
< / div >
< div class = "form-check" >
< input class = "form-check-input" type = "radio" id = "rdoInDaysBasedAmount" name = "amount_type" value = "daysbased" >
< label for = "rdoInDaysBasedAmount" class = "form-check-label" > Daily based amount.< / label >
< p class = "text-muted" > < small > < i > Your amount entered multiplied by number of days< / i > < / small > < / p >
< / div >
< / div >
< / div >
< div class = "form-group" >
< div class = "form-group" >
< label for = "txtInAmount" > Amount< / label >
< label for = "txtInAmount" > Amount< / label >
@ -104,7 +109,7 @@
< div class = "modal fade" id = "mdlAddDeduction" >
< div class = "modal fade" id = "mdlAddDeduction" >
< div class = "modal-dialog" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-content" >
< form action = " <? = url_to ( 'payroll/ add compben') ?> " method = "post" >
< form action = " <? = url_to ( 'payroll/ save compben') ?> " method = "post" >
< div class = "modal-header" >
< div class = "modal-header" >
< h4 class = "modal-title" > New Employee Deduction< / h4 >
< h4 class = "modal-title" > New Employee Deduction< / h4 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
@ -138,6 +143,11 @@
< input class = "form-check-input" type = "radio" id = "rdoDedPercentageAmount" name = "amount_type" value = "perc" >
< input class = "form-check-input" type = "radio" id = "rdoDedPercentageAmount" name = "amount_type" value = "perc" >
< label for = "rdoDedPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< label for = "rdoDedPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< / div >
< / div >
< div class = "form-check" >
< input class = "form-check-input" type = "radio" id = "rdoDedDaysBasedAmount" name = "amount_type" value = "daysbased" >
< label for = "rdoDedDaysBasedAmount" class = "form-check-label" > Daily based amount.< / label >
< p class = "text-muted" > < small > < i > Your amount entered multiplied by number of days< / i > < / small > < / p >
< / div >
< / div >
< / div >
< div class = "form-group" >
< div class = "form-group" >
< label for = "txtDedAmount" > Amount< / label >
< label for = "txtDedAmount" > Amount< / label >
@ -173,7 +183,7 @@
< div class = "modal fade" id = "mdlEditIncome" >
< div class = "modal fade" id = "mdlEditIncome" >
< div class = "modal-dialog" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-content" >
< form action = " <? = url_to ( 'payroll/ add compben') ?> " method = "post" >
< form action = " <? = url_to ( 'payroll/ save compben') ?> " method = "post" >
< div class = "modal-header bg-warning" >
< div class = "modal-header bg-warning" >
< h4 class = "modal-title" > Edit Employee Income< / h4 >
< h4 class = "modal-title" > Edit Employee Income< / h4 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
@ -189,8 +199,8 @@
< div class = "col-12" >
< div class = "col-12" >
< div class = "form-group" >
< div class = "form-group" >
< div class = "form-group" >
< div class = "form-group" >
< label for = "txtEditIn In DedName"> Income Name< / label >
< label for = "txtEditIn DedName"> Income Name< / label >
< input class = "form-control" type = "text" readonly id = "txtEditIn In DedName" name = "inded_name" >
< input class = "form-control" type = "text" readonly id = "txtEditIn DedName" name = "inded_name" >
< / div >
< / div >
< input type = "hidden" id = "txtEditInEmpPayIndedId" name = "emppayinded_id" > <!-- Primary Key -->
< input type = "hidden" id = "txtEditInEmpPayIndedId" name = "emppayinded_id" > <!-- Primary Key -->
< input type = "hidden" name = "emppay_id" value = " <? = $selectedEmployee -> emppay_id ?> " >
< input type = "hidden" name = "emppay_id" value = " <? = $selectedEmployee -> emppay_id ?> " >
@ -207,6 +217,11 @@
< input class = "form-check-input" type = "radio" id = "rdoEditInPercentageAmount" name = "amount_type" value = "perc" >
< input class = "form-check-input" type = "radio" id = "rdoEditInPercentageAmount" name = "amount_type" value = "perc" >
< label for = "rdoEditInPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< label for = "rdoEditInPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< / div >
< / div >
< div class = "form-check" >
< input class = "form-check-input" type = "radio" id = "rdoEditInDaysBasedAmount" name = "amount_type" value = "daysbased" >
< label for = "rdoEditInDaysBasedAmount" class = "form-check-label" > Daily based amount.< / label >
< p class = "text-muted" > < small > < i > Your amount entered multiplied by number of days< / i > < / small > < / p >
< / div >
< / div >
< / div >
< div class = "form-group" >
< div class = "form-group" >
< label for = "txtEditInAmount" > Amount< / label >
< label for = "txtEditInAmount" > Amount< / label >
@ -242,7 +257,7 @@
< div class = "modal fade" id = "mdlEditDeduction" >
< div class = "modal fade" id = "mdlEditDeduction" >
< div class = "modal-dialog" >
< div class = "modal-dialog" >
< div class = "modal-content" >
< div class = "modal-content" >
< form action = " <? = url_to ( 'payroll/ add compben') ?> " method = "post" >
< form action = " <? = url_to ( 'payroll/ save compben') ?> " method = "post" >
< div class = "modal-header bg-warning" >
< div class = "modal-header bg-warning" >
< h4 class = "modal-title" > Edit Employee Deduction< / h4 >
< h4 class = "modal-title" > Edit Employee Deduction< / h4 >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" >
@ -276,6 +291,11 @@
< input class = "form-check-input" type = "radio" id = "rdoEditDedPercentageAmount" name = "amount_type" value = "perc" >
< input class = "form-check-input" type = "radio" id = "rdoEditDedPercentageAmount" name = "amount_type" value = "perc" >
< label for = "rdoEditDedPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< label for = "rdoEditDedPercentageAmount" class = "form-check-label" > Amount is in percentage.< / label >
< / div >
< / div >
< div class = "form-check" >
< input class = "form-check-input" type = "radio" id = "rdoEditDedDaysBasedAmount" name = "amount_type" value = "daysbased" >
< label for = "rdoEditDedDaysBasedAmount" class = "form-check-label" > Daily based amount.< / label >
< p class = "text-muted" > < small > < i > Your amount entered multiplied by number of days< / i > < / small > < / p >
< / div >
< / div >
< / div >
< div class = "form-group" >
< div class = "form-group" >
< label for = "txtEditDedAmount" > Amount< / label >
< label for = "txtEditDedAmount" > Amount< / label >
@ -519,14 +539,17 @@ $(document).ready(function() {
function editIncome(element) {
function editIncome(element) {
$('#txtEditInIn DedName').val($(element).data('inded_name'));
$('#txtEditInDedName').val($(element).data('inded_name'));
$('#txtEditInEmpPayIndedId').val($(element).data('emppayinded_id'));
$('#txtEditInEmpPayIndedId').val($(element).data('emppayinded_id'));
//$('#emppay_id').val($(element).data('emppay_id'));
//$('#emppay_id').val($(element).data('emppay_id'));
//$('#payschedule_id').val($(element).data('payschedule_id'));
//$('#payschedule_id').val($(element).data('payschedule_id'));
$('#txtEditInInDedId').val($(element).data('inded_id'));
$('#txtEditInInDedId').val($(element).data('inded_id'));
$("[name='amount_type'][value='" + ($(element).data('is_fixed_amt') ? 'fixed' : 'perc') + "']").prop('checked', true);
$("[name='amount_type'][value='" + ($(element).data('is_fixed_amt') ? 'fixed' : ($(element).data('is_percent_amt') ? 'perc' : 'daysbased')) + "']").prop('checked', true);
//$("[name='amount_type'][value='" + ($(element).data('is_fixed_amt') ? 'fixed' : 'perc') + "']").prop('checked', true);
$('#txtEditInAmount').val($(element).data('amount'));
$('#txtEditInAmount').val($(element).data('amount'));
$('#chkEditInIsOverride').val($(element).data('is_override'));
$('#chkEditInIsOverride').prop('checked', $(element).data('is_override'));
$('#mdlEditIncome').modal('show');
$('#mdlEditIncome').modal('show');
}
}
@ -536,10 +559,12 @@ function editDeduction(element) {
$('#txtEditDedInDedName').val($(element).data('inded_name'));
$('#txtEditDedInDedName').val($(element).data('inded_name'));
$('#txtEditDedEmpPayIndedId').val($(element).data('emppayinded_id'));
$('#txtEditDedEmpPayIndedId').val($(element).data('emppayinded_id'));
$('#txtEditDedInDedId').val($(element).data('inded_id'));
$('#txtEditDedInDedId').val($(element).data('inded_id'));
$("[name='amount_type'][value='" + ($(element).data('is_fixed_amt') ? 'fixed' : 'perc') + "']").prop('checked', true);
$('#txtEditDedAmount').val($(element).data('amount'));
$('#chkEditDedIsOverride').val($(element).data('is_override'));
$('[name="amount_type"][value="' + ($(element).data('is_fixed_amt') ? 'fixed' : ($(element).data('is_percent_amt') ? 'perc' : 'daysbased')) + '"]').prop('checked', true);
//$("[name='amount_type'][value='" + ($(element).data('is_fixed_amt') ? 'fixed' : 'perc') + "']").prop('checked', true);
$('#txtEditDedAmount').val($(element).data('amount'));
$('#chkEditDedIsOverride').prop('checked', $(element).data('is_override'));
$('#mdlEditDeduction').modal('show');
$('#mdlEditDeduction').modal('show');
}
}