[Weberp-svn] SF.net SVN: weberp:[8268] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-10-08 19:57:52
|
Revision: 8268 http://weberp.svn.sourceforge.net/weberp/?rev=8268&view=rev Author: tim_schofield Date: 2011-10-08 19:57:46 +0000 (Sat, 08 Oct 2011) Log Message: ----------- Show numbers in correct formatting for the users locale Modified Paths: -------------- trunk/CustomerInquiry.php trunk/CustomerReceipt.php Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2011-10-08 19:57:34 UTC (rev 8267) +++ trunk/CustomerInquiry.php 2011-10-08 19:57:46 UTC (rev 8268) @@ -37,6 +37,7 @@ currencies.currency, paymentterms.terms, debtorsmaster.creditlimit, + debtorsmaster.currcode, holdreasons.dissallowinvoices, holdreasons.reasondescription, SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount @@ -122,7 +123,7 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $CustomerRecord['name'] . ' - (' . _('All amounts stated in') . ' ' . $CustomerRecord['currency'] . ')<br /><br />' . _('Terms') . ' : ' . $CustomerRecord['terms'] . '<br />' . _('Credit Limit') . - ': ' . number_format($CustomerRecord['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . '</p>'; + ': ' . locale_money_format($CustomerRecord['creditlimit'],$CustomerRecord['currcode']) . ' ' . _('Credit Status') . ': ' . $CustomerRecord['reasondescription'] . '</p>'; if ($CustomerRecord['dissallowinvoices']!=0){ echo '<br /><font color="red" size="4"><b>' . _('ACCOUNT ON HOLD') . '</font></b><br />'; @@ -136,11 +137,11 @@ <th width="20%">' . $_SESSION['PastDueDays1'] . '-' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th> <th width="20%">' . _('Over') . ' ' . $_SESSION['PastDueDays2'] . ' ' . _('Days Overdue') . '</th></tr>'; -echo '<tr><td class="number">' . number_format($CustomerRecord['balance'],2) . '</td> - <td class="number">' . number_format(($CustomerRecord['balance'] - $CustomerRecord['due']),2) . '</td> - <td class="number">' . number_format(($CustomerRecord['due']-$CustomerRecord['overdue1']),2) . '</td> - <td class="number">' . number_format(($CustomerRecord['overdue1']-$CustomerRecord['overdue2']) ,2) . '</td> - <td class="number">' . number_format($CustomerRecord['overdue2'],2) . '</td> +echo '<tr><td class="number">' . locale_money_format($CustomerRecord['balance'],$CustomerRecord['currcode']) . '</td> + <td class="number">' . locale_money_format(($CustomerRecord['balance'] - $CustomerRecord['due']),$CustomerRecord['currcode']) . '</td> + <td class="number">' . locale_money_format(($CustomerRecord['due']-$CustomerRecord['overdue1']),$CustomerRecord['currcode']) . '</td> + <td class="number">' . locale_money_format(($CustomerRecord['overdue1']-$CustomerRecord['overdue2']) ,$CustomerRecord['currcode']) . '</td> + <td class="number">' . locale_money_format($CustomerRecord['overdue2'],$CustomerRecord['currcode']) . '</td> </tr> </table>'; @@ -263,9 +264,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), //$CreditInvoiceFormatString parameters $rootpath, $myrow['transno'], @@ -296,9 +297,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), //CreditInvoiceFormatString parameters $rootpath, $myrow['transno'], @@ -329,9 +330,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), //$PreviewInvoiceFormatString parameters $rootpath, $myrow['transno'], @@ -358,9 +359,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), //$PreviewCreditFormatString parameters $rootpath, $myrow['transno'], @@ -390,9 +391,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), //$PreviewCreditFormatString parameters $rootpath, $myrow['transno'], @@ -424,9 +425,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), $rootpath, $myrow['id'], $rootpath, @@ -443,9 +444,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), $rootpath, $myrow['id']); } @@ -462,9 +463,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), $rootpath, $myrow['type'], $myrow['transno']); @@ -477,9 +478,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2)); + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode'])); } } else { //If security token 8 in the allowed page security tokens then assumed ok for GL trans inquiries @@ -493,9 +494,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2), + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode']), $rootpath, $myrow['type'], $myrow['transno']); @@ -508,9 +509,9 @@ $myrow['reference'], $myrow['invtext'], $myrow['order_'], - number_format($myrow['totalamount'],2), - number_format($myrow['allocated'],2), - number_format($myrow['totalamount']-$myrow['allocated'],2)); + locale_money_format($myrow['totalamount'],$CustomerRecord['currcode']), + locale_money_format($myrow['allocated'],$CustomerRecord['currcode']), + locale_money_format($myrow['totalamount']-$myrow['allocated'],$CustomerRecord['currcode'])); } } Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-10-08 19:57:34 UTC (rev 8267) +++ trunk/CustomerReceipt.php 2011-10-08 19:57:46 UTC (rev 8268) @@ -1061,7 +1061,7 @@ } printf('<td><font size="1"> - <input tabindex="'.number_format(12+$j).'" type="submit" name="Select" value="%s" /></font></td> + <input type="submit" name="Select" value="%s" /></font></td> <td>%s</td></tr>', $myrow['debtorno'], $myrow['name']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |