capital po available budget issues fixed
This commit is contained in:
parent
806925a5da
commit
ccfebbf7c3
@ -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>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user