capital po available budget issues fixed

This commit is contained in:
gandhimathi 2017-10-04 15:20:50 +05:30
parent 806925a5da
commit ccfebbf7c3
2 changed files with 50 additions and 3 deletions

View File

@ -166,12 +166,33 @@ if(!empty($POMaster))
}
//echo $CapitalRange;
if(!empty($POItem) && $CapitalRange=='1')
{
$currentPoBasicAmt=0;
$currentPoDiscountedAmt=0;
foreach ($POItem as $getTotalAmt)
{
$currentPoBasicAmt=$currentPoBasicAmt+($getTotalAmt->Rate * $getTotalAmt->Quantity);
$currentPoDiscountedAmt=$currentPoDiscountedAmt+$getTotalAmt->Afterdiscountval;
}
if(!empty($AvlBudAmt))
{
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
$AvlAmount = number_format($AvlCapitalBudAmt+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', '');
}
}
else {
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
}
?>
<style>
@ -4455,3 +4476,4 @@ function calculateFreight(isEdit)
</script>

View File

@ -161,16 +161,40 @@ if(!empty($POMaster))
}
if(!empty($POItem) && $CapitalRange=='1')
{
$currentPoBasicAmt=0;
$currentPoDiscountedAmt=0;
foreach ($POItem as $getTotalAmt)
{
$currentPoBasicAmt=$currentPoBasicAmt+($getTotalAmt->Rate * $getTotalAmt->Quantity);
$currentPoDiscountedAmt=$currentPoDiscountedAmt+$getTotalAmt->Afterdiscountval;
}
if(!empty($AvlBudAmt))
{
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
$AvlAmount = number_format($AvlCapitalBudAmt+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', '');
}
}
else {
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
}
?>
<style>
.modal
@ -7115,3 +7139,4 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){