Skip to content

Commit

Permalink
Rouand the freight cost, and the previous allocated amount to the req…
Browse files Browse the repository at this point in the history
…uired decimal places.

See: http://www.weberp.org/forum/showthread.php?tid=8385&pid=16020#pid16020

Files changed in commit:
Credit_Invoice.php
On branch master
  • Loading branch information
timschofield committed Jan 28, 2020
1 parent 31811be commit e1082b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Credit_Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,12 +538,14 @@

/*Do some rounding */

$_SESSION['CreditItems' . $identifier]->FreightCost = round($_SESSION['CreditItems' . $identifier]->FreightCost, $_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces);
$_SESSION['CreditItems' . $identifier]->total = round($_SESSION['CreditItems' . $identifier]->total, $_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces);
$TaxTotal = round($TaxTotal, $_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces);

$Allocate_amount = 0;
$Settled = 0;
$SettledInvoice = 0;
$MyRow[0] = round($MyRow[0], $_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces);
if ($MyRow[0] > 0) { /*the invoice is not already fully allocated */

if ($MyRow[0] > ($_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal)) {
Expand Down

0 comments on commit e1082b7

Please sign in to comment.