From: <dai...@us...> - 2015-04-19 07:15:06
|
Revision: 7266 http://sourceforge.net/p/web-erp/reponame/7266 Author: daintree Date: 2015-04-19 07:14:59 +0000 (Sun, 19 Apr 2015) Log Message: ----------- SelectSupplier - total supplier spend was incorrect only looked at supplier transactions excluding invoices? Now takes invoice net of debit notes Modified Paths: -------------- trunk/SelectSupplier.php Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2015-04-19 05:32:06 UTC (rev 7265) +++ trunk/SelectSupplier.php 2015-04-19 07:14:59 UTC (rev 7266) @@ -371,7 +371,7 @@ $DataResult = DB_query($sql, $ErrMsg); $myrow = DB_fetch_array($DataResult); // Select some more data about the supplier - $SQL = "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' AND (type == '20' OR type='21')"; + $SQL = "SELECT SUM(ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' AND (type == '20' OR type='21')"; $Total1Result = DB_query($SQL); $row = DB_fetch_array($Total1Result); echo '<br />'; |