Revision: 7320
http://sourceforge.net/p/web-erp/reponame/7320
Author: tehonu
Date: 2015-06-13 03:43:34 +0000 (Sat, 13 Jun 2015)
Log Message:
-----------
Use of company decimal numbers instead of fixed decimal numbers
Modified Paths:
--------------
trunk/Z_CheckGLTransBalance.php
Modified: trunk/Z_CheckGLTransBalance.php
===================================================================
--- trunk/Z_CheckGLTransBalance.php 2015-06-11 09:49:54 UTC (rev 7319)
+++ trunk/Z_CheckGLTransBalance.php 2015-06-13 03:43:34 UTC (rev 7320)
@@ -17,18 +17,19 @@
echo $Header;
$sql = "SELECT gltrans.type,
- systypes.typename,
- gltrans.typeno,
- periodno,
- SUM(amount) AS nettot
- FROM gltrans,
- systypes
- WHERE gltrans.type = systypes.typeid
- GROUP BY gltrans.type,
- systypes.typename,
- typeno,
- periodno
- HAVING ABS(SUM(amount))>0.01";
+ systypes.typename,
+ gltrans.typeno,
+ periodno,
+ SUM(amount) AS nettot
+ FROM gltrans,
+ systypes
+ WHERE gltrans.type = systypes.typeid
+ GROUP BY gltrans.type,
+ systypes.typename,
+ typeno,
+ periodno
+ HAVING ABS(SUM(amount))>= " . 1/pow(10,$_SESSION['CompanyRecord']['decimalplaces']) . "
+ ORDER BY gltrans.counterindex";
$OutOfWackResult = DB_query($sql);
@@ -47,7 +48,7 @@
<td><a href="' . $RootPath . '/GLTransInquiry.php?TypeID=' . $OutOfWackRow['type'] . '&TransNo=' . $OutOfWackRow['typeno'] . '">' . $OutOfWackRow['typename'] . '</a></td>
<td class="number">' . $OutOfWackRow['typeno'] . '</td>
<td class="number">' . $OutOfWackRow['periodno'] . '</td>
- <td class="number">' . locale_number_format($OutOfWackRow['nettot'],3) . '</td>
+ <td class="number">' . locale_number_format($OutOfWackRow['nettot'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td>
</tr>';
}
|