capital po available budget issues fixed
This commit is contained in:
parent
806925a5da
commit
ccfebbf7c3
@ -166,10 +166,31 @@ if(!empty($POMaster))
|
|||||||
}
|
}
|
||||||
|
|
||||||
//echo $CapitalRange;
|
//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))
|
if(!empty($AvlBudAmt))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$AvlAmount = number_format($AvlCapitalBudAmt+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', '');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
|
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4455,3 +4476,4 @@ function calculateFreight(isEdit)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -161,15 +161,39 @@ if(!empty($POMaster))
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!empty($POItem) && $CapitalRange=='1')
|
||||||
|
|
||||||
if(!empty($AvlBudAmt))
|
|
||||||
{
|
{
|
||||||
|
|
||||||
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
|
$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+$currentPoBasicAmt-$currentPoDiscountedAmt, 2, '.', '');
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$AvlAmount = number_format($AvlCapitalBudAmt+$ExitTotalOrderValue, 2, '.', '');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
<style>
|
||||||
@ -7115,3 +7139,4 @@ function updateDiscountValuesChange(totAmt,disType,disAmt){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user