[Weberp-svn] SF.net SVN: weberp:[8075] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-09-03 21:46:22
|
Revision: 8075 http://weberp.svn.sourceforge.net/weberp/?rev=8075&view=rev Author: tim_schofield Date: 2011-09-03 21:46:14 +0000 (Sat, 03 Sep 2011) Log Message: ----------- Correctly show the locale number formats Modified Paths: -------------- trunk/SupplierInquiry.php trunk/includes/footer.inc Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2011-09-03 21:46:03 UTC (rev 8074) +++ trunk/SupplierInquiry.php 2011-09-03 21:46:14 UTC (rev 8075) @@ -144,11 +144,11 @@ <th>' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> </tr>'; -echo '<tr> <td class="number">' . number_format($SupplierRecord['balance'],2) . '</td> - <td class="number">' . number_format(($SupplierRecord['balance'] - $SupplierRecord['due']),2) . '</td> - <td class="number">' . number_format(($SupplierRecord['due']-$SupplierRecord['overdue1']),2) . '</td> - <td class="number">' . number_format(($SupplierRecord['overdue1']-$SupplierRecord['overdue2']) ,2) . '</td> - <td class="number">' . number_format($SupplierRecord['overdue2'],2) . '</td> +echo '<tr> <td class="number">' . currency_number_format($SupplierRecord['balance'],$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['balance'] - $SupplierRecord['due']),$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['due']-$SupplierRecord['overdue1']),$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format(($SupplierRecord['overdue1']-$SupplierRecord['overdue2']) ,$SupplierRecord['currcode']) . '</td> + <td class="number">' . currency_number_format($SupplierRecord['overdue2'],$SupplierRecord['currcode']) . '</td> </tr></table>'; echo '<br /><div class="centre"><form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; @@ -168,16 +168,19 @@ supptrans.trandate, supptrans.suppreference, supptrans.rate, + suppliers.currcode, (supptrans.ovamount + supptrans.ovgst) AS totalamount, supptrans.alloc AS allocated, supptrans.hold, supptrans.settled, supptrans.transtext, supptrans.supplierno - FROM supptrans, - systypes - WHERE supptrans.type = systypes.typeid - AND supptrans.supplierno = '" . $SupplierID . "' + FROM supptrans + LEFT JOIN systypes + ON supptrans.type = systypes.typeid + LEFT JOIN suppliers + ON suppliers.supplierid=supptrans.supplierno + WHERE supptrans.supplierno = '" . $SupplierID . "' AND supptrans.trandate >= '" . $DateAfterCriteria . "' ORDER BY supptrans.trandate"; @@ -246,9 +249,9 @@ <td>' . $myrow['typename'] . '</td> <td>' . $myrow['suppreference'] . '</td> <td>' . ConvertSQLDate($myrow['trandate']) . '</td> - <td class="number">' . number_format($myrow['totalamount'],2) .'</td> - <td class="number">' . number_format($myrow['allocated'],2) . '</td> - <td class="number">' . number_format($myrow['totalamount']-$myrow['allocated'],2) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount'],$myrow['currcode']) .'</td> + <td class="number">' . currency_number_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']) . '</td> <td align="left">' . $myrow['transtext'] . '</td> <td><a target="_blank" href="' . $rootpath . '/GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['transno'] .'">' . _('View GL Postings') . '</a></td> <td><a href="' . $rootpath . '/PaymentAllocations.php?SuppID=' . $myrow['supplierno'] . '&InvID=' . $myrow['suppreference'] .'">' . _('View Payments') . '</a></td></tr>'; @@ -257,9 +260,9 @@ <td>' . $myrow['typename'] . '</td> <td>' . $myrow['suppreference'] . '</td> <td>' . ConvertSQLDate($myrow['trandate']) . '</td> - <td class="number">' . number_format($myrow['totalamount'],2) . '</td> - <td class="number">' .number_format($myrow['allocated'],2) . '</td> - <td class="number">' . number_format($myrow['totalamount'] - $myrow['allocated'],2) .'</td> + <td class="number">' . currency_number_format($myrow['totalamount'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['allocated'],$myrow['currcode']) . '</td> + <td class="number">' . currency_number_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']) .'</td> <td align="left">' . $myrow['transtext'] . '</td>'; $authsql="SELECT offhold FROM purchorderauth @@ -297,9 +300,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount'] - $myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount'] - $myrow['allocated'],$myrow['currcode']), $myrow['transtext']); } else { @@ -318,9 +321,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), $myrow['transtext'], $_SERVER['PHP_SELF'], $myrow['type'], @@ -348,16 +351,16 @@ <td align=left>%s</td> <td><a href="%s/SupplierAllocations.php?AllocTrans=%s">' . _('View Allocations') . '</a></td> - <td><a TARGET="_blank" href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . + <td><a target="_blank" href="%s/GLTransInquiry.php?TypeID=%s&TransNo=%s">' . _('View GL Postings') . '</a></td> </tr>', $myrow['transno'], $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format($myrow['totalamount']-$myrow['allocated'],$myrow['currcode']), $myrow['transtext'], $rootpath, $myrow['id'], @@ -381,9 +384,9 @@ $myrow['typename'], $myrow['suppreference'], ConvertSQLDate($myrow['trandate']), - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount'] - $myrow['allocated'],2), + currency_number_format($myrow['totalamount'],$myrow['currcode']), + currency_number_format($myrow['allocated'],$myrow['currcode']), + currency_number_format(($myrow['totalamount'] - $myrow['allocated']),$myrow['currcode']), $myrow['transtext'], $rootpath, $myrow['id']); Modified: trunk/includes/footer.inc =================================================================== --- trunk/includes/footer.inc 2011-09-03 21:46:03 UTC (rev 8074) +++ trunk/includes/footer.inc 2011-09-03 21:46:14 UTC (rev 8075) @@ -5,7 +5,7 @@ if (!isset($DefaultClock)) { include('config.php'); } - echo '<p class="number">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</p>'; + echo '<p style="text-align: right">'.(strftime('%A')).', '.(date($_SESSION['DefaultDateFormat']).' | '.(strftime(($DefaultClock==12) ? '%I:%M %p' : '%H:%M'))).'</p>'; echo '<table width="100%" id="footer">'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |