From: <ex...@us...> - 2015-08-27 08:26:05
|
Revision: 7345 http://sourceforge.net/p/web-erp/reponame/7345 Author: exsonqu Date: 2015-08-27 08:26:02 +0000 (Thu, 27 Aug 2015) Log Message: ----------- 27/08/15 Exson: Fixed the allocation status of involved invoice and credit notes in Credit_Invoice.php. Modified Paths: -------------- trunk/Credit_Invoice.php Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2015-08-19 15:02:21 UTC (rev 7344) +++ trunk/Credit_Invoice.php 2015-08-27 08:26:02 UTC (rev 7345) @@ -567,11 +567,12 @@ $SettledInvoice=0; if($myrow[0]>0) { /*the invoice is not already fully allocated */ - if($myrow[0] >($_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal)) { + if($myrow[0] > ($_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal)) { $Allocate_amount = $_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal; + $SettledInvoice = 0; $Settled = 1; - } else if($myrow[0] >($_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal)) { + } else if($myrow[0] < ($_SESSION['CreditItems' . $identifier]->total + $_SESSION['CreditItems' . $identifier]->FreightCost + $TaxTotal)) { /*the balance left to allocate is less than the credit note value */ $Allocate_amount = $myrow[0]; $SettledInvoice = 1; |