AMEND BUDGET AND PAYROLL
This commit is contained in:
parent
f7933a6338
commit
198cc4099a
@ -489,9 +489,9 @@ function getEmployee()
|
|||||||
$LOPDays = $sheet->getCell('B'.$x)->getValue();
|
$LOPDays = $sheet->getCell('B'.$x)->getValue();
|
||||||
$OTHoursWorked =$sheet->getCell('C'.$x)->getValue();
|
$OTHoursWorked =$sheet->getCell('C'.$x)->getValue();
|
||||||
$loanRecovered=$sheet->getCell('D'.$x)->getValue();
|
$loanRecovered=$sheet->getCell('D'.$x)->getValue();
|
||||||
$loanBalance=$sheet->getCell('E'.$x)->getValue();
|
//$loanBalance=$sheet->getCell('E'.$x)->getValue();
|
||||||
$Incentive =$sheet->getCell('F'.$x)->getValue();
|
$Incentive =$sheet->getCell('E'.$x)->getValue();
|
||||||
$Other_Deductions =$sheet->getCell('G'.$x)->getValue();
|
$Other_Deductions =$sheet->getCell('F'.$x)->getValue();
|
||||||
|
|
||||||
if( $EmpId != '')
|
if( $EmpId != '')
|
||||||
{
|
{
|
||||||
@ -502,7 +502,7 @@ function getEmployee()
|
|||||||
if($EmpId == $e->EmpID){
|
if($EmpId == $e->EmpID){
|
||||||
|
|
||||||
|
|
||||||
$FileData = array('Month_Year'=>$PayOn,'EmpID'=>$EmpId,'LOP_Days'=>$LOPDays,'OT_Hrs_Worked'=>$OTHoursWorked,'Loan_Recovered'=>$loanRecovered,'Loan_Balance'=>$loanBalance,'Incentives'=>$Incentive,'Other_Deductions'=>$Other_Deductions,'Created_By'=>$createdby,'Created_Time'=>date("Y-m-d h:i:sa"));
|
$FileData = array('Month_Year'=>$PayOn,'EmpID'=>$EmpId,'LOP_Days'=>$LOPDays,'OT_Hrs_Worked'=>$OTHoursWorked,'Loan_Recovered'=>$loanRecovered,'Incentives'=>$Incentive,'Other_Deductions'=>$Other_Deductions,'Created_By'=>$createdby,'Created_Time'=>date("Y-m-d h:i:sa"));
|
||||||
$result = $this->payroll_model->UploadFileData2($FileData);
|
$result = $this->payroll_model->UploadFileData2($FileData);
|
||||||
$success++;
|
$success++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -244,7 +244,7 @@ $("#due_started").datepicker({
|
|||||||
|
|
||||||
|
|
||||||
<span for="Pay_Data_ID">Loan Amount</span>
|
<span for="Pay_Data_ID">Loan Amount</span>
|
||||||
<input type="text" class="form-control" id="Loan_Amount" name="Loan_Amount" value="" pattern="[0-9]{1,6}" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
<input type="text" value="0" class="form-control" id="Loan_Amount" name="Loan_Amount" value="" pattern="[0-9]{1,6}" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -266,7 +266,7 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">Monthly Due(s):</span>
|
<span for="Basic_Pay">Monthly Due(s):</span>
|
||||||
<input type="text" class="form-control requried" id="monthly_due" name="monthly_due" value="" pattern="[0-9]{1,6}" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
<input type="text" value="0" class="form-control requried" id="monthly_due" name="monthly_due" value="" pattern="[0-9]{1,6}" title="Minimum 4 digit,Maximum 6 Digit" onchange="duecalculation();">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -282,7 +282,7 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">No Of Due(s):</span>
|
<span for="Basic_Pay">No Of Due(s):</span>
|
||||||
<input type="text" class="form-control requried" id="no_of_due" name="no_of_due" value="" pattern="[0-9]{1,2}" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
<input type="text" value="0" class="form-control requried" id="no_of_due" name="no_of_due" value="" pattern="[0-9]{1,2}" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -290,11 +290,11 @@ $("#due_started").datepicker({
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<span for="Basic_Pay">Paid Amount:</span>
|
<span for="Basic_Pay">Paid Amount:</span>
|
||||||
<input type="text" class="form-control requried" id="Paid_Amount" name="Paid_Amount" value="0" pattern="[0-9]{1,2}" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
<input type="text" value="0" class="form-control requried" id="Paid_Amount" name="Paid_Amount" value="0" pattern="[0-9]{1,2}" title="Minimum 1 digit,Maximum 2 Digit" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" id="remaining_due" name="remaining_due">
|
<input type="text" id="remaining_due" name="remaining_due" value="0">
|
||||||
<input type="text" id="paid_due" name="paid_due" value="0">
|
<input type="text" id="paid_due" name="paid_due" value="0">
|
||||||
</div>
|
</div>
|
||||||
<div class="box-footer" style="text-align:right">
|
<div class="box-footer" style="text-align:right">
|
||||||
|
|||||||
@ -131,6 +131,13 @@ if(!empty($POMaster))
|
|||||||
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
$Import_DispatchDetails=$Req->Import_DispatchDetails;
|
||||||
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
$Import_PlaceofOrgin=$Req->Import_PlaceofOrgin;
|
||||||
$CapitalRange=$Req->CapitalRange;
|
$CapitalRange=$Req->CapitalRange;
|
||||||
|
if($CapitalRange=='0'){
|
||||||
|
$ExitExchangeRate=$Req->ExchangeRate;
|
||||||
|
$ExitTotalOrderValue=number_format($Req->TotalOrderValue*$ExitExchangeRate, 2, '.', '');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$ExitTotalOrderValue=$Req->TotalOrderValue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -140,7 +147,7 @@ if(!empty($POMaster))
|
|||||||
if(!empty($AvlBudAmt))
|
if(!empty($AvlBudAmt))
|
||||||
{
|
{
|
||||||
|
|
||||||
$AvlAmount = $AvlCapitalBudAmt;
|
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -303,8 +303,8 @@ if(!empty($emppay))
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
RD<input type="text" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due;?>">
|
<input type="hidden" id="remaining_due" name="remaining_due" value="<?php echo $Remaining_Due;?>">
|
||||||
PD<input type="text" id="paid_due" name="paid_due" value="<?php echo $Paid_Due;?>">
|
<input type="hidden" id="paid_due" name="paid_due" value="<?php echo $Paid_Due;?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1775,7 +1775,9 @@ var userid = '';
|
|||||||
|
|
||||||
|
|
||||||
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
$("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
||||||
|
var AvlBudAmt = '<?php echo $AvlAmount?>';
|
||||||
|
|
||||||
|
AvlBudAmt = '<?php echo number_format($AvlAmount+$totBasicAmt-$totDiscountAmt, 2, '.', '') ?>';
|
||||||
userid = $(e.relatedTarget).data('userid');
|
userid = $(e.relatedTarget).data('userid');
|
||||||
$('#isEdit').val(1);
|
$('#isEdit').val(1);
|
||||||
//alert(userid);
|
//alert(userid);
|
||||||
@ -1786,7 +1788,7 @@ $("#EDITREVENUE").on("shown.bs.modal", function(e) {
|
|||||||
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
||||||
$('#EditdeptName').val($('#departmentName'+userid).val());
|
$('#EditdeptName').val($('#departmentName'+userid).val());
|
||||||
$("#EditCostCenter").val($('#costCode'+userid).val());
|
$("#EditCostCenter").val($('#costCode'+userid).val());
|
||||||
$('#EditAvlBudAmt').val($('#AvlAmount'+userid).val());
|
$('#EditAvlBudAmt').val(AvlBudAmt);
|
||||||
|
|
||||||
$('#EditMaterialCode').val($('#materialCode'+userid).val());
|
$('#EditMaterialCode').val($('#materialCode'+userid).val());
|
||||||
$('#EditItemName').val($('#materialName'+userid).val());
|
$('#EditItemName').val($('#materialName'+userid).val());
|
||||||
@ -2209,7 +2211,8 @@ tinyMCE.triggerSave();
|
|||||||
var splinstr = $('#txtSpcialInstruction').val();
|
var splinstr = $('#txtSpcialInstruction').val();
|
||||||
$('#SpcialInstruction').val(splinstr);
|
$('#SpcialInstruction').val(splinstr);
|
||||||
$('#txtDeliveryAddress').val(deladd);
|
$('#txtDeliveryAddress').val(deladd);
|
||||||
|
var AvlBudAmt = '<?php echo number_format($AvlAmount+$totBasicAmt-$totDiscountAmt, 2, '.', '') ?>';
|
||||||
|
var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val();
|
||||||
//alert('Before Validate IF condition');
|
//alert('Before Validate IF condition');
|
||||||
if(validate())
|
if(validate())
|
||||||
{
|
{
|
||||||
@ -2222,11 +2225,11 @@ $('#txtDeliveryAddress').val(deladd);
|
|||||||
$('#Deliverydt').focus();
|
$('#Deliverydt').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(validateBudgetExceedLimit())
|
else if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
{
|
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//alert('final else for store data');
|
//alert('final else for store data');
|
||||||
|
|||||||
@ -1355,7 +1355,9 @@ var userid = '';
|
|||||||
|
|
||||||
|
|
||||||
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
$("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
||||||
|
var AvlBudAmt = '<?php echo $AvlAmount?>';
|
||||||
|
|
||||||
|
AvlBudAmt = '<?php echo number_format($AvlAmount+$TotalBasicAmount, 2, '.', '') ?>';
|
||||||
userid = $(e.relatedTarget).data('userid');
|
userid = $(e.relatedTarget).data('userid');
|
||||||
|
|
||||||
var tr= document.getElementById(userid);
|
var tr= document.getElementById(userid);
|
||||||
@ -1365,7 +1367,7 @@ $("#EDITSERVICE").on("shown.bs.modal", function(e) {
|
|||||||
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
$('#EditReqNo').val($('#Reqnumber'+userid).val());
|
||||||
$('#EditdeptName').val($('#departmentName'+userid).val());
|
$('#EditdeptName').val($('#departmentName'+userid).val());
|
||||||
$("#EditCostCenter").val($('#costCode'+userid).val());
|
$("#EditCostCenter").val($('#costCode'+userid).val());
|
||||||
$('#EditAvlBudAmt').val($('#AvilBudget'+userid).val());
|
$('#EditAvlBudAmt').val(AvlBudAmt);
|
||||||
$('#EdittxtSpcialInstruction').val($('#servicematerialdescription'+userid).val());
|
$('#EdittxtSpcialInstruction').val($('#servicematerialdescription'+userid).val());
|
||||||
$('#EditItemName').val($('#materialName'+userid).val());
|
$('#EditItemName').val($('#materialName'+userid).val());
|
||||||
$('#EditUOM').val($('#uom'+userid).val());
|
$('#EditUOM').val($('#uom'+userid).val());
|
||||||
@ -1879,10 +1881,17 @@ $('#txtStatus').val(stat);
|
|||||||
|
|
||||||
//$('#SpcialInstruction').val(splinstr);
|
//$('#SpcialInstruction').val(splinstr);
|
||||||
$('#txtDeliveryAddress').val(deladd);
|
$('#txtDeliveryAddress').val(deladd);
|
||||||
|
AvlBudAmt = '<?php echo number_format($AvlAmount+$TotalBasicAmount, 2, '.', '') ?>';
|
||||||
|
var txtTotalOrderValueSummary = $('#txtTotalOrderValueSummary').val();
|
||||||
|
|
||||||
if(validate())
|
if(validate())
|
||||||
{
|
{
|
||||||
//alert('inside if');
|
if(parseInt(AvlBudAmt) < parseInt(txtTotalOrderValueSummary)) {
|
||||||
|
alert('Total Order Amount is exceeding the Budget Limit.Please adjust the product value.');
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
$('#content').loader('show');
|
$('#content').loader('show');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data:$('.ServicePO').serialize(),
|
data:$('.ServicePO').serialize(),
|
||||||
@ -1910,6 +1919,7 @@ $('#txtDeliveryAddress').val(deladd);
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user