[Weberp-svn] SF.net SVN: weberp:[8133] trunk
Brought to you by:
sotandeka,
tim_schofield
From: <tim...@us...> - 2011-09-12 07:40:41
|
Revision: 8133 http://weberp.svn.sourceforge.net/weberp/?rev=8133&view=rev Author: tim_schofield Date: 2011-09-12 07:40:32 +0000 (Mon, 12 Sep 2011) Log Message: ----------- Replace function names with those used by Phil Modified Paths: -------------- trunk/Payments.php trunk/Prices.php trunk/Prices_Customer.php trunk/PrintCheque.php trunk/PrintCustOrder.php trunk/PrintCustOrder_generic.php trunk/PrintCustStatements.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php trunk/PrintSalesOrder_generic.php trunk/PurchData.php trunk/RecurringSalesOrders.php trunk/ReorderLevel.php trunk/ReprintGRN.php trunk/ReverseGRN.php trunk/SalesInquiry.php trunk/SelectCompletedOrder.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectRecurringSalesOrder.php trunk/SelectSalesOrder.php trunk/SelectSupplier.php trunk/ShipmentCosting.php trunk/Shipments.php trunk/SpecialOrder.php trunk/StockAdjustments.php trunk/StockCheck.php trunk/StockCostUpdate.php trunk/StockDispatch.php trunk/StockLocMovements.php trunk/StockLocStatus.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockQuantityByDate.php trunk/StockReorderLevel.php trunk/StockSerialItems.php trunk/StockStatus.php trunk/StockUsage.php trunk/SuppContractChgs.php trunk/SuppCreditGRNs.php trunk/SuppFixedAssetChgs.php trunk/SuppInvGRNs.php trunk/SuppPaymentRun.php trunk/SuppPriceList.php trunk/SuppShiptChgs.php trunk/SuppTransGLAnalysis.php trunk/SupplierAllocations.php trunk/SupplierBalsAtPeriodEnd.php trunk/SupplierCredit.php trunk/SupplierInquiry.php trunk/SupplierInvoice.php trunk/SupplierTenderCreate.php trunk/SupplierTenders.php trunk/SupplierTransInquiry.php trunk/Tax.php trunk/TopItems.php trunk/WorkOrderCosting.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/WorkOrderStatus.php trunk/Z_CheckAllocs.php trunk/Z_CheckDebtorsControl.php trunk/Z_CheckGLTransBalance.php trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/build/tests/SupplierTest.php trunk/includes/MiscFunctions.php Property Changed: ---------------- trunk/build/tests/SupplierTest.php Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/Payments.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -822,7 +822,7 @@ if ($_SESSION['PaymentDetail']->AccountCurrency!=$_SESSION['CompanyRecord']['currencydefault'] AND isset($_SESSION['PaymentDetail']->AccountCurrency)){ if (isset($SuggestedFunctionalExRate)){ - $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . currency_number_format($SuggestedFunctionalExRate,$_SESSION['PaymentDetail']->AccountCurrency) . '</b>'; + $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_money_format($SuggestedFunctionalExRate,$_SESSION['PaymentDetail']->AccountCurrency) . '</b>'; } else { $SuggestedFunctionalExRateText =''; } @@ -830,7 +830,7 @@ $_POST['FunctionalExRate'] = $SuggestedFunctionalExRate; } echo '<tr><td>' . _('Functional Exchange Rate') . ':</td> - <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" value="' . currency_number_format($_POST['FunctionalExRate'], $_SESSION['PaymentDetail']->AccountCurrency) . '" /></td> + <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" value="' . locale_money_format($_POST['FunctionalExRate'], $_SESSION['PaymentDetail']->AccountCurrency) . '" /></td> <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) AND the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail']->AccountCurrency . '</i></td></tr>'; } echo '<tr><td>' . _('Payment type') . ':</td> @@ -978,7 +978,7 @@ if (isset($_POST['GLAmount'])) { echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail']->Currency . '):</td> - <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" value="' . currency_number_format($_POST['GLAmount'], $_SESSION['PaymentDetail']->Currency) . '" /></td> + <td><input type="text" name="GLAmount" maxlength="12" size="12" class="number" value="' . locale_money_format($_POST['GLAmount'], $_SESSION['PaymentDetail']->Currency) . '" /></td> </tr>'; } else { echo '<tr><td>' . _('Amount') . ' (' . $_SESSION['PaymentDetail']->Currency . '):</td> @@ -1015,7 +1015,7 @@ } echo '<tr> <td align=left>' . $PaymentItem->cheque . '</td> - <td class="number">' . currency_number_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->Currency) . '</td> + <td class="number">' . locale_money_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->Currency) . '</td> <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> @@ -1023,7 +1023,7 @@ </tr>'; $PaymentTotal += $PaymentItem->Amount; } - echo '<tr><td></td><td class="number"><b>' . currency_number_format($PaymentTotal,$_SESSION['PaymentDetail']->Currency) . '</b></td><td colspan="3"></td></tr></table><br />'; + echo '<tr><td></td><td class="number"><b>' . locale_money_format($PaymentTotal,$_SESSION['PaymentDetail']->Currency) . '</b></td><td colspan="3"></td></tr></table><br />'; echo '<input type="submit" name="CommitBatch" value="' . _('Accept AND Process Payment') . '" />'; } @@ -1032,11 +1032,11 @@ the fields for entry of receipt amt and disc */ echo '<table class="selection"><tr><td>' . _('Amount of Payment') . ' ' . $_SESSION['PaymentDetail']->Currency . ':</td> - <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value="' . currency_number_format($_SESSION['PaymentDetail']->Amount, $_SESSION['PaymentDetail']->Currency) . '" /></td></tr>'; + <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value="' . locale_money_format($_SESSION['PaymentDetail']->Amount, $_SESSION['PaymentDetail']->Currency) . '" /></td></tr>'; if (isset($_SESSION['PaymentDetail']->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ echo '<tr><td>' . _('Amount of Discount') . ':</td> - <td><input class="number" type="text" name="Discount" maxlength="12" size="13" value="' . currency_number_format($_SESSION['PaymentDetail']->Discount, $_SESSION['PaymentDetail']->Currency) . '" /></td></tr>'; + <td><input class="number" type="text" name="Discount" maxlength="12" size="13" value="' . locale_money_format($_SESSION['PaymentDetail']->Discount, $_SESSION['PaymentDetail']->Currency) . '" /></td></tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail']->SuppName . '" />'; } else { echo '<input type="hidden" name="discount" value=0 />'; Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/Prices.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -259,9 +259,9 @@ echo '<td>'.$myrow['sales_type'].'</td> <td>'.$myrow['currency'].'</td> <td>'.$myrow['units'].'</td> - <td class="number">'.stock_number_format($myrow['conversionfactor'],4).'</td> + <td class="number">'.locale_number_format($myrow['conversionfactor'],4).'</td> <td class="number">'.$myrow['decimalplaces'].'</td> - <td class="number">'.currency_number_format($myrow['price'],$myrow['currabrev']).'</td> + <td class="number">'.locale_money_format($myrow['price'],$myrow['currabrev']).'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> </tr>'; @@ -269,9 +269,9 @@ echo '<td>'.$myrow['sales_type'].'</td> <td>'.$myrow['currency'].'</td> <td>'.$myrow['units'].'</td> - <td class="number">'.stock_number_format($myrow['conversionfactor']).'</td> + <td class="number">'.locale_number_format($myrow['conversionfactor']).'</td> <td class="number">'.$myrow['decimalplaces'].'</td> - <td class="number">'.currency_number_format($myrow['price'],$myrow['currabrev']).'</td> + <td class="number">'.locale_money_format($myrow['price'],$myrow['currabrev']).'</td> <td>'.ConvertSQLDate($myrow['startdate']).'</td> <td>'.$EndDateDisplay.'</td> </tr>'; @@ -397,7 +397,7 @@ echo '<tr><td>'. _('Decimal Places') . '<br />'._('to display').'</td>'; if(isset($_POST['DecimalPlaces'])) { - echo '<td><input type="text" class="number" name="DecimalPlaces" size="8" maxlength="8" value="' . stock_number_format($_POST['DecimalPlaces'],0) . '" />'; + echo '<td><input type="text" class="number" name="DecimalPlaces" size="8" maxlength="8" value="' . locale_number_format($_POST['DecimalPlaces'],0) . '" />'; } else { echo '<td><input type="text" class="number" name="DecimalPlaces" size="8" maxlength="8" value="0" />'; } @@ -406,9 +406,9 @@ echo '<tr><td>'. _('Conversion Factor') . '<br />'._('to stock units').'</td>'; if(isset($_POST['ConversionFactor'])) { - echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . stock_number_format($_POST['ConversionFactor'],4) . '" />'; + echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . locale_number_format($_POST['ConversionFactor'],4) . '" />'; } else { - echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . stock_number_format(1.0000,4) . '" />'; + echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . locale_number_format(1.0000,4) . '" />'; } echo '</td></tr>'; @@ -416,9 +416,9 @@ echo '<tr><td>'. _('Price') . ':</td>'; if(isset($_POST['Price'])) { - echo '<td><input type="text" class="number" name="Price" size="12" maxlength="11" value="' . currency_number_format($_POST['Price'],$_POST['CurrAbrev']) . '" />'; + echo '<td><input type="text" class="number" name="Price" size="12" maxlength="11" value="' . locale_money_format($_POST['Price'],$_POST['CurrAbrev']) . '" />'; } else { - echo '<td><input type="text" class="number" name="Price" size="12" maxlength="11" value="' . currency_number_format(0,$_POST['CurrAbrev']) . '" />'; + echo '<td><input type="text" class="number" name="Price" size="12" maxlength="11" value="' . locale_money_format(0,$_POST['CurrAbrev']) . '" />'; } echo '</td></tr>'; Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/Prices_Customer.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -115,9 +115,9 @@ $sql = "UPDATE prices SET typeabbrev='" . $SalesType . "', currabrev='" . $CurrCode . "', - price='" . $_POST['Price'] . "', + price='" . filter_currency_input($_POST['Price']) . "', units='" . $_POST['Units'] . "', - conversionfactor='" . $_POST['ConversionFactor'] . "', + conversionfactor='" . filter_number_input($_POST['ConversionFactor']) . "', decimalplaces='" . $_POST['DecimalPlaces'] . "', branchcode='" . $_POST['Branch'] . "', startdate='" . FormatDateForSQL($_POST['StartDate']) . "', @@ -149,9 +149,9 @@ '".$SalesType."', '".$CurrCode."', '" . $_SESSION['CustomerID'] . "', - '" . $_POST['Price'] . "', + '" . filter_currency_input($_POST['Price']) . "', '" . $_POST['Units'] . "', - '" . $_POST['ConversionFactor'] . "', + '" . filter_number_input($_POST['ConversionFactor']) . "', '" . $_POST['DecimalPlaces'] . "', '" . $_POST['Branch'] . "', '" . FormatDateForSQL($_POST['StartDate']) . "', @@ -243,9 +243,9 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr class="EvenTableRows"> - <td class="number">'.number_format($myrow['price'],2).'</td> + <td class="number">'.locale_money_format($myrow['price'],$CurrCode).'</td> <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> + <td class="number">'.locale_number_format($myrow['conversionfactor'],4).'</td> <td class="number">'.$myrow['decimalplaces'].'</td> <td class="date">'.ConvertSQLDate($myrow['startdate']).'</td> <td class="date">'.$EndDateDisplay.'</td> @@ -310,7 +310,7 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.number_format($myrow['price'],2).'</td> + <td class="number">'.locale_money_format($myrow['price'],$myrow['currcode']).'</td> <td>'.$Branch.'</td> <td>'.$myrow['units'].'</td> <td class="number">'.$myrow['conversionfactor'].'</td> @@ -396,6 +396,7 @@ $sql = "SELECT custbranch.branchcode, custbranch.brname, + debtorsmaster.currcode, currencies.currency FROM custbranch LEFT JOIN debtorsmaster @@ -410,6 +411,7 @@ echo '<td><select name="Branch">'; while ($myrow=DB_fetch_array($result)) { $CustomerCurrency=$myrow['currency']; + $CustomerCurrencyCode=$myrow['currcode']; if ($myrow['branchcode']==$_POST['branch']) { echo '<option selected="True" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { @@ -449,13 +451,13 @@ echo '<tr><td>'. _('Conversion Factor') . '<br />'._('to stock units').'</td>'; if(isset($_POST['ConversionFactor'])) { - echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . $_POST['ConversionFactor'] . '" /></td></tr>'; + echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . locale_number_format($_POST['ConversionFactor'],4) . '" /></td></tr>'; } else { - echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="1" /></td></tr>'; + echo '<td><input type="text" class="number" name="ConversionFactor" size="8" maxlength="8" value="' . locale_number_format(1,4) . '" /></td></tr>'; } echo '<tr><td>' . _('Price') . ':</td> - <td><input type="text" class="number" name="Price" size="11" maxlength="10" value="' . $_POST['Price'] . '" /></td> + <td><input type="text" class="number" name="Price" size="11" maxlength="10" value="' . locale_money_format($_POST['Price'], $CustomerCurrencyCode) . '" /></td> </tr></table>'; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCheque.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -36,7 +36,7 @@ $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-225,$YPos,100,$FontSize,$_SESSION['PaymentDetail']->DatePaid, 'left'); -$LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,75,$FontSize,currency_number_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); +$LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,75,$FontSize,locale_money_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); $YPos -= 1*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize,$_SESSION['PaymentDetail']->SuppName, 'left'); @@ -53,7 +53,7 @@ $YPos -= 2*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); -$LeftOvers = $pdf->addTextWrap(375,$YPos,100,$FontSize, currency_number_format($_SESSION['PaymentDetail']->Amount,$_SESSION['PaymentDetail']->Currency), 'right'); +$LeftOvers = $pdf->addTextWrap(375,$YPos,100,$FontSize, locale_money_format($_SESSION['PaymentDetail']->Amount,$_SESSION['PaymentDetail']->Currency), 'right'); @@ -70,7 +70,7 @@ $LeftOvers = $pdf->addTextWrap(25,$YPos,75,$FontSize,$_SESSION['PaymentDetail']->DatePaid, 'left'); $LeftOvers = $pdf->addTextWrap(100,$YPos,100,$FontSize,$_SESSION['PaymentDetail']->SupplierID, 'left'); $LeftOvers = $pdf->addTextWrap(250,$YPos,75,$FontSize,$_GET['ChequeNum'], 'left'); -$LeftOvers = $pdf->addTextWrap(350,$YPos,75,$FontSize,currency_number_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); +$LeftOvers = $pdf->addTextWrap(350,$YPos,75,$FontSize,locale_money_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); // remittance advice 2 $YPos -= 15*$line_height; @@ -84,7 +84,7 @@ $LeftOvers = $pdf->addTextWrap(25,$YPos,75,$FontSize,$_SESSION['PaymentDetail']->DatePaid, 'left'); $LeftOvers = $pdf->addTextWrap(100,$YPos,100,$FontSize,$_SESSION['PaymentDetail']->SupplierID, 'left'); $LeftOvers = $pdf->addTextWrap(250,$YPos,75,$FontSize,$_GET['ChequeNum'], 'left'); -$LeftOvers = $pdf->addTextWrap(350,$YPos,75,$FontSize,currency_number_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); +$LeftOvers = $pdf->addTextWrap(350,$YPos,75,$FontSize,locale_money_format(round($_SESSION['PaymentDetail']->Amount,$_SESSION['Currencies'][$_SESSION['PaymentDetail']->Currency]['DecimalPlaces']),$_SESSION['PaymentDetail']->Currency), 'left'); /* UldisN $pdfcode = $pdf->output(); $len = mb_strlen($pdfcode); Modified: trunk/PrintCustOrder.php =================================================================== --- trunk/PrintCustOrder.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCustOrder.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -163,9 +163,9 @@ while ($myrow2=DB_fetch_array($result)){ - $DisplayQty = stock_number_format($myrow2['quantity'],$myrow2['decimalplaces']); - $DisplayPrevDel = stock_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); - $DisplayQtySupplied = stock_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQtySupplied = locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap(13,$YPos,135,$FontSize,$myrow2['stkcode']); $LeftOvers = $pdf->addTextWrap(148,$YPos,239,$FontSize,$myrow2['description']); Modified: trunk/PrintCustOrder_generic.php =================================================================== --- trunk/PrintCustOrder_generic.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCustOrder_generic.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -145,9 +145,9 @@ $ListCount ++; - $DisplayQty = stock_number_format($myrow2['quantity'],$myrow2['decimalplaces']); - $DisplayPrevDel = stock_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); - $DisplayQtySupplied = stock_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQtySupplied = locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap($XPos,$YPos,127,$FontSize,$myrow2['stkcode']); $LeftOvers = $pdf->addTextWrap(147,$YPos,255,$FontSize,$myrow2['description']); Modified: trunk/PrintCustStatements.php =================================================================== --- trunk/PrintCustStatements.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCustStatements.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -167,8 +167,8 @@ while ($myrow=DB_fetch_array($SetldTrans)){ - $DisplayAlloc = currency_number_format($myrow['alloc'],$StmtHeader['currcode']); - $DisplayOutstanding = currency_number_format($myrow['ostdg'],$StmtHeader['currcode']); + $DisplayAlloc = locale_money_format($myrow['alloc'],$StmtHeader['currcode']); + $DisplayOutstanding = locale_money_format($myrow['ostdg'],$StmtHeader['currcode']); $FontSize=9; @@ -178,10 +178,10 @@ $FontSize=10; if ($myrow['total']>0){ - $DisplayTotal = currency_number_format($myrow['total'],$StmtHeader['currcode']); + $DisplayTotal = locale_money_format($myrow['total'],$StmtHeader['currcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,60,$FontSize,$DisplayTotal, 'right'); } else { - $DisplayTotal = currency_number_format(-$myrow['total'],$StmtHeader['currcode']); + $DisplayTotal = locale_money_format(-$myrow['total'],$StmtHeader['currcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,60,$FontSize,$DisplayTotal, 'right'); } $LeftOvers = $pdf->addTextWrap($Left_Margin+459,$YPos,60,$FontSize,$DisplayAlloc, 'right'); @@ -218,8 +218,8 @@ while ($myrow=DB_fetch_array($OstdgTrans)){ - $DisplayAlloc = currency_number_format($myrow['alloc'],$StmtHeader['currcode']); - $DisplayOutstanding = currency_number_format($myrow['ostdg'],$StmtHeader['currcode']); + $DisplayAlloc = locale_money_format($myrow['alloc'],$StmtHeader['currcode']); + $DisplayOutstanding = locale_money_format($myrow['ostdg'],$StmtHeader['currcode']); $FontSize=9; $LeftOvers = $pdf->addTextWrap($Left_Margin+1,$YPos,60,$FontSize,$myrow['typename'], 'left'); @@ -228,10 +228,10 @@ $FontSize=10; if ($myrow['total']>0){ - $DisplayTotal = currency_number_format($myrow['total'],$StmtHeader['currcode']); + $DisplayTotal = locale_money_format($myrow['total'],$StmtHeader['currcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+300,$YPos,55,$FontSize,$DisplayTotal, 'right'); } else { - $DisplayTotal = currency_number_format(-$myrow['total'],$StmtHeader['currcode']); + $DisplayTotal = locale_money_format(-$myrow['total'],$StmtHeader['currcode']); $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,55,$FontSize,$DisplayTotal, 'right'); } @@ -348,11 +348,11 @@ /*Now print out the footer and totals */ - $DisplayDue = currency_number_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],$StmtHeader['currcode']); - $DisplayCurrent = currency_number_format($AgedAnalysis['balance']-$AgedAnalysis['due'],$StmtHeader['currcode']); - $DisplayBalance = currency_number_format($AgedAnalysis['balance'],$StmtHeader['currcode']); - $DisplayOverdue1 = currency_number_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],$StmtHeader['currcode']); - $DisplayOverdue2 = currency_number_format($AgedAnalysis['overdue2'],$StmtHeader['currcode']); + $DisplayDue = locale_money_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],$StmtHeader['currcode']); + $DisplayCurrent = locale_money_format($AgedAnalysis['balance']-$AgedAnalysis['due'],$StmtHeader['currcode']); + $DisplayBalance = locale_money_format($AgedAnalysis['balance'],$StmtHeader['currcode']); + $DisplayOverdue1 = locale_money_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],$StmtHeader['currcode']); + $DisplayOverdue2 = locale_money_format($AgedAnalysis['overdue2'],$StmtHeader['currcode']); $pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+(4*$line_height),$Left_Margin,$Bottom_Margin+(4*$line_height)); @@ -382,7 +382,7 @@ if (mb_strlen($StmtHeader['lastpaiddate'])>1 and $StmtHeader['lastpaid']!=0){ $pdf->addText($Left_Margin+5, $Bottom_Margin+13, $FontSize, _('Last payment received').' ' . ConvertSQLDate($StmtHeader['lastpaiddate']) . - ' ' . _('Amount received was').' ' . currency_number_format($StmtHeader['lastpaid'],$StmtHeader['currcode'])); + ' ' . _('Amount received was').' ' . locale_money_format($StmtHeader['lastpaid'],$StmtHeader['currcode'])); } /*also show the total due in the remittance section */ Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCustTrans.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -249,16 +249,16 @@ if ($myrow2['discountpercent'] == 0) { $DisplayDiscount = ''; } else { - $DisplayDiscount = stock_number_format($myrow2['discountpercent'] * 100, 2) . '%'; + $DisplayDiscount = locale_number_format($myrow2['discountpercent'] * 100, 2) . '%'; $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']); } - $DisplayNet = currency_number_format($myrow2['fxnet'], $myrow['currcode']); + $DisplayNet = locale_money_format($myrow2['fxnet'], $myrow['currcode']); $DisplayPrice = $myrow2['fxprice']; $DisplayQty = $myrow2['quantity']; $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x, $YPos,$FormDesign->Data->Column1->Length, $FormDesign->Data->Column1->FontSize, $myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x, $YPos,$FormDesign->Data->Column2->Length, $FormDesign->Data->Column2->FontSize, $myrow2['description']); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x, $YPos,$FormDesign->Data->Column3->Length, $FormDesign->Data->Column3->FontSize, currency_number_format($DisplayPrice,$myrow['currcode']), 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x, $YPos,$FormDesign->Data->Column4->Length, $FormDesign->Data->Column4->FontSize, stock_number_format($DisplayQty,$myrow2['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x, $YPos,$FormDesign->Data->Column3->Length, $FormDesign->Data->Column3->FontSize, locale_money_format($DisplayPrice,$myrow['currcode']), 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x, $YPos,$FormDesign->Data->Column4->Length, $FormDesign->Data->Column4->FontSize, locale_number_format($DisplayQty,$myrow2['decimalplaces']), 'right'); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x, $YPos,$FormDesign->Data->Column5->Length, $FormDesign->Data->Column5->FontSize, $myrow2['units'], 'centre'); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x, $YPos,$FormDesign->Data->Column6->Length, $FormDesign->Data->Column6->FontSize, $DisplayDiscount, 'right'); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x, $YPos,$FormDesign->Data->Column7->Length, $FormDesign->Data->Column7->FontSize, $DisplayNet, 'right'); @@ -312,15 +312,15 @@ $pdf->line($FormDesign->LineAboveFooter->startx, $Page_Height - $FormDesign->LineAboveFooter->starty, $FormDesign->LineAboveFooter->endx, $Page_Height - $FormDesign->LineAboveFooter->endy); /* Now print out the footer and totals */ if ($InvOrCredit == 'Invoice') { - $DisplaySubTot = currency_number_format($myrow['ovamount'], $myrow['currcode']); - $DisplayFreight = currency_number_format($myrow['ovfreight'], $myrow['currcode']); - $DisplayTax = currency_number_format($myrow['ovgst'], $myrow['currcode']); - $DisplayTotal = currency_number_format($myrow['ovfreight'] + $myrow['ovgst'] + $myrow['ovamount'], $myrow['currcode']); + $DisplaySubTot = locale_money_format($myrow['ovamount'], $myrow['currcode']); + $DisplayFreight = locale_money_format($myrow['ovfreight'], $myrow['currcode']); + $DisplayTax = locale_money_format($myrow['ovgst'], $myrow['currcode']); + $DisplayTotal = locale_money_format($myrow['ovfreight'] + $myrow['ovgst'] + $myrow['ovamount'], $myrow['currcode']); } else { - $DisplaySubTot = currency_number_format(-$myrow['ovamount'], $myrow['currcode']); - $DisplayFreight = currency_number_format(-$myrow['ovfreight'], $myrow['currcode']); - $DisplayTax = currency_number_format(-$myrow['ovgst'], $myrow['currcode']); - $DisplayTotal = currency_number_format(-$myrow['ovfreight'] - $myrow['ovgst'] - $myrow['ovamount'], $myrow['currcode']); + $DisplaySubTot = locale_money_format(-$myrow['ovamount'], $myrow['currcode']); + $DisplayFreight = locale_money_format(-$myrow['ovfreight'], $myrow['currcode']); + $DisplayTax = locale_money_format(-$myrow['ovgst'], $myrow['currcode']); + $DisplayTotal = locale_money_format(-$myrow['ovfreight'] - $myrow['ovgst'] - $myrow['ovamount'], $myrow['currcode']); } /* Print out the payment terms */ $pdf->addTextWrap($FormDesign->PaymentTerms->x, $Page_Height - $FormDesign->PaymentTerms->y, $FormDesign->PaymentTerms->Length, $FormDesign->PaymentTerms->FontSize, _('Payment Terms') . ': ' . $myrow['terms']); @@ -678,13 +678,13 @@ $k = 1; } echo $RowStarter; - $DisplayPrice = currency_number_format($myrow2['fxprice'], $myrow['currcode']); - $DisplayQty = stock_number_format($myrow2['quantity'], $myrow2['decimalplaces']); - $DisplayNet = currency_number_format($myrow2['fxnet'], $myrow['currcode']); + $DisplayPrice = locale_money_format($myrow2['fxprice'], $myrow['currcode']); + $DisplayQty = locale_number_format($myrow2['quantity'], $myrow2['decimalplaces']); + $DisplayNet = locale_money_format($myrow2['fxnet'], $myrow['currcode']); if ($myrow2['discountpercent'] == 0) { $DisplayDiscount = ''; } else { - $DisplayDiscount = stock_number_format($myrow2['discountpercent'] * 100, 2) . '%'; + $DisplayDiscount = locale_number_format($myrow2['discountpercent'] * 100, 2) . '%'; } printf('<td>%s</td> <td>%s</td> @@ -790,15 +790,15 @@ } /* Now print out the footer and totals */ if ($InvOrCredit == 'Invoice') { - $DisplaySubTot = currency_number_format($myrow['ovamount'], $myrow['currcode']); - $DisplayFreight = currency_number_format($myrow['ovfreight'], $myrow['currcode']); - $DisplayTax = currency_number_format($myrow['ovgst'], $myrow['currcode']); - $DisplayTotal = currency_number_format($myrow['ovfreight'] + $myrow['ovgst'] + $myrow['ovamount'], $myrow['currcode']); + $DisplaySubTot = locale_money_format($myrow['ovamount'], $myrow['currcode']); + $DisplayFreight = locale_money_format($myrow['ovfreight'], $myrow['currcode']); + $DisplayTax = locale_money_format($myrow['ovgst'], $myrow['currcode']); + $DisplayTotal = locale_money_format($myrow['ovfreight'] + $myrow['ovgst'] + $myrow['ovamount'], $myrow['currcode']); } else { - $DisplaySubTot = currency_number_format(-$myrow['ovamount'], $myrow['currcode']); - $DisplayFreight = currency_number_format(-$myrow['ovfreight'], $myrow['currcode']); - $DisplayTax = currency_number_format(-$myrow['ovgst'], $myrow['currcode']); - $DisplayTotal = currency_number_format(-$myrow['ovfreight'] - $myrow['ovgst'] - $myrow['ovamount'], $myrow['currcode']); + $DisplaySubTot = locale_money_format(-$myrow['ovamount'], $myrow['currcode']); + $DisplayFreight = locale_money_format(-$myrow['ovfreight'], $myrow['currcode']); + $DisplayTax = locale_money_format(-$myrow['ovgst'], $myrow['currcode']); + $DisplayTotal = locale_money_format(-$myrow['ovfreight'] - $myrow['ovgst'] - $myrow['ovamount'], $myrow['currcode']); } /*Print out the invoice text entered */ echo '<table class="table1"> Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintCustTransPortrait.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -305,7 +305,7 @@ if ($myrow2['discountpercent'] == 0) { $DisplayDiscount = ''; } else { - $DisplayDiscount = stock_number_format($myrow2['discountpercent'] * 100, 2) . '%'; + $DisplayDiscount = locale_number_format($myrow2['discountpercent'] * 100, 2) . '%'; $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']); } $DisplayNet = $myrow2['fxnet']; @@ -321,11 +321,11 @@ $lines++; } - $LeftOvers = $pdf->addTextWrap($Left_Margin+270,$YPos,76,$FontSize,currency_number_format($DisplayPrice,$myrow['currcode']),'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,36,$FontSizestock_,stock_number_format($DisplayQty,$myrow2['decimalplaces']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+270,$YPos,76,$FontSize,locale_money_format($DisplayPrice,$myrow['currcode']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+350,$YPos,36,$FontSizestock_,locale_number_format($DisplayQty,$myrow2['decimalplaces']),'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+390,$YPos,26,$FontSize,$myrow2['units'],'center'); $LeftOvers = $pdf->addTextWrap($Left_Margin+420,$YPos,26,$FontSize,$DisplayDiscount,'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+450,$YPos,72,$FontSize,currency_number_format($DisplayNet,$myrow['currcode']),'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+450,$YPos,72,$FontSize,locale_money_format($DisplayNet,$myrow['currcode']),'right'); if ($myrow2['controlled']==1){ @@ -421,15 +421,15 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = currency_number_format($myrow['ovamount'],$myrow['currcode']); - $DisplayFreight = currency_number_format($myrow['ovfreight'],$myrow['currcode']); - $DisplayTax = currency_number_format($myrow['ovgst'],$myrow['currcode']); - $DisplayTotal = currency_number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['currcode']); + $DisplaySubTot = locale_money_format($myrow['ovamount'],$myrow['currcode']); + $DisplayFreight = locale_money_format($myrow['ovfreight'],$myrow['currcode']); + $DisplayTax = locale_money_format($myrow['ovgst'],$myrow['currcode']); + $DisplayTotal = locale_money_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['currcode']); } else { - $DisplaySubTot = currency_number_format(-$myrow['ovamount'],$myrow['currcode']); - $DisplayFreight = currency_number_format(-$myrow['ovfreight'],$myrow['currcode']); - $DisplayTax = currency_number_format(-$myrow['ovgst'],$myrow['currcode']); - $DisplayTotal = currency_number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['currcode']); + $DisplaySubTot = locale_money_format(-$myrow['ovamount'],$myrow['currcode']); + $DisplayFreight = locale_money_format(-$myrow['ovfreight'],$myrow['currcode']); + $DisplayTax = locale_money_format(-$myrow['ovgst'],$myrow['currcode']); + $DisplayTotal = locale_money_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['currcode']); } /*Print out the invoice text entered */ $YPos = $Bottom_Margin+(3*$line_height); @@ -884,14 +884,14 @@ echo $RowStarter; - $DisplayPrice = currency_number_format($myrow2['fxprice'],$myrow['currcode']); - $DisplayQty = stock_number_format($myrow2['quantity'],$myrow2['decimalplaces']); - $DisplayNet = currency_number_format($myrow2['fxnet'],$myrow['currcode']); + $DisplayPrice = locale_money_format($myrow2['fxprice'],$myrow['currcode']); + $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayNet = locale_money_format($myrow2['fxnet'],$myrow['currcode']); if ($myrow2['discountpercent']==0){ $DisplayDiscount =''; } else { - $DisplayDiscount = stock_number_format($myrow2['discountpercent']*100,2) . '%'; + $DisplayDiscount = locale_number_format($myrow2['discountpercent']*100,2) . '%'; } printf ('<td>%s</td> @@ -1015,15 +1015,15 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = currency_number_format($myrow['ovamount'],$myrow['currcode']); - $DisplayFreight = currency_number_format($myrow['ovfreight'],$myrow['currcode']); - $DisplayTax = currency_number_format($myrow['ovgst'],$myrow['currcode']); - $DisplayTotal = currency_number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['currcode']); + $DisplaySubTot = locale_money_format($myrow['ovamount'],$myrow['currcode']); + $DisplayFreight = locale_money_format($myrow['ovfreight'],$myrow['currcode']); + $DisplayTax = locale_money_format($myrow['ovgst'],$myrow['currcode']); + $DisplayTotal = locale_money_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['currcode']); } else { - $DisplaySubTot = currency_number_format(-$myrow['ovamount'],$myrow['currcode']); - $DisplayFreight = currency_number_format(-$myrow['ovfreight'],$myrow['currcode']); - $DisplayTax = currency_number_format(-$myrow['ovgst'],$myrow['currcode']); - $DisplayTotal = currency_number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['currcode']); + $DisplaySubTot = locale_money_format(-$myrow['ovamount'],$myrow['currcode']); + $DisplayFreight = locale_money_format(-$myrow['ovfreight'],$myrow['currcode']); + $DisplayTax = locale_money_format(-$myrow['ovgst'],$myrow['currcode']); + $DisplayTotal = locale_money_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['currcode']); } /*Print out the invoice text entered */ echo '<table class="table1"><tr> Modified: trunk/PrintSalesOrder_generic.php =================================================================== --- trunk/PrintSalesOrder_generic.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PrintSalesOrder_generic.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -147,9 +147,9 @@ $ListCount ++; - $DisplayQty = stock_number_format($myrow2['quantity'],$myrow2['decimalplaces']); - $DisplayPrevDel = stock_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); - $DisplayQtySupplied = stock_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQty = locale_number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayPrevDel = locale_number_format($myrow2['qtyinvoiced'],$myrow2['decimalplaces']); + $DisplayQtySupplied = locale_number_format($myrow2['quantity'] - $myrow2['qtyinvoiced'],$myrow2['decimalplaces']); $itemdesc = $myrow2['description'] . ' - ' . $myrow2['narrative']; $LeftOvers = $pdf->addTextWrap($XPos,$YPos,127,$FontSize,$myrow2['stkcode']); $LeftOvers = $pdf->addTextWrap(147,$YPos,355,$FontSize,$itemdesc); Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/PurchData.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -213,7 +213,7 @@ <td><a href="%s?StockID=%s&SupplierID=%s&Delete=1&EffectiveFrom=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this suppliers price?') . '\');">' . _('Delete') . '</a></td> </tr>', $myrow['suppname'], - currency_number_format($myrow['price'], $myrow['currcode']), + locale_money_format($myrow['price'], $myrow['currcode']), $myrow['currcode'], ConvertSQLDate($myrow['effectivefrom']), $myrow['unitname'], @@ -466,7 +466,7 @@ echo '<tr><td>' . _('Currency') . ':</td> <td><input type="hidden" name="CurrCode" . value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> - <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . currency_number_format($_POST['Price'], $CurrCode) . '" /></td></tr>'; + <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . locale_money_format($_POST['Price'], $CurrCode) . '" /></td></tr>'; echo '<tr><td>' . _('Date Updated') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom" maxlength="10" size="11" value="' . $_POST['EffectiveFrom'] . '" /></td></tr>'; echo '<tr><td>' . _('Our Unit of Measure') . ':</td>'; Modified: trunk/RecurringSalesOrders.php =================================================================== --- trunk/RecurringSalesOrders.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/RecurringSalesOrders.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -332,10 +332,10 @@ foreach ($_SESSION['Items'.$identifier]->LineItems as $StockItem) { $LineTotal = $StockItem->Quantity * $StockItem->Price * (1 - $StockItem->DiscountPercent); - $DisplayLineTotal = currency_number_format($LineTotal,$_SESSION['Items'.$identifier]->DefaultCurrency); - $DisplayPrice = currency_number_format($StockItem->Price,$_SESSION['Items'.$identifier]->DefaultCurrency); - $DisplayQuantity = stock_number_format($StockItem->Quantity,$StockItem->DecimalPlaces); - $DisplayDiscount = stock_number_format(($StockItem->DiscountPercent * 100),2); + $DisplayLineTotal = locale_money_format($LineTotal,$_SESSION['Items'.$identifier]->DefaultCurrency); + $DisplayPrice = locale_money_format($StockItem->Price,$_SESSION['Items'.$identifier]->DefaultCurrency); + $DisplayQuantity = locale_number_format($StockItem->Quantity,$StockItem->DecimalPlaces); + $DisplayDiscount = locale_number_format(($StockItem->DiscountPercent * 100),2); if ($k==1){ @@ -360,7 +360,7 @@ $_SESSION['Items'.$identifier]->totalWeight = $_SESSION['Items'.$identifier]->totalWeight + ($StockItem->Quantity * $StockItem->Weight); } -$DisplayTotal = currency_number_format($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->DefaultCurrency); +$DisplayTotal = locale_money_format($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->DefaultCurrency); echo '<tr> <td colspan="6" class="number"><b>'. _('TOTAL Excl Tax/Freight') .'</b></td> <td class="number">' . $DisplayTotal . '</td> Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/ReorderLevel.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -85,10 +85,10 @@ $pdf->addTextWrap(50,$YPos,100,$FontSize,$myrow['stockid'],'',0,$fill); $pdf->addTextWrap(150,$YPos,150,$FontSize,$myrow['description'],'',0,$fill); $pdf->addTextWrap(310,$YPos,60,$FontSize,$myrow['loccode'],'left',0,$fill); - $pdf->addTextWrap(370,$YPos,50,$FontSize,stock_number_format($myrow['quantity'], $myrow['decimalplaces']),'right',0,$fill); - $pdf->addTextWrap(420,$YPos,50,$FontSize,stock_number_format($myrow['reorderlevel'], $myrow['decimalplaces']),'right',0,$fill); + $pdf->addTextWrap(370,$YPos,50,$FontSize,locale_number_format($myrow['quantity'], $myrow['decimalplaces']),'right',0,$fill); + $pdf->addTextWrap(420,$YPos,50,$FontSize,locale_number_format($myrow['reorderlevel'], $myrow['decimalplaces']),'right',0,$fill); $shortage = $myrow['reorderlevel'] - $myrow['quantity']; - $pdf->addTextWrap(470,$YPos,50,$FontSize,stock_number_format($shortage, $myrow['decimalplaces']),'right',0,$fill); + $pdf->addTextWrap(470,$YPos,50,$FontSize,locale_number_format($shortage, $myrow['decimalplaces']),'right',0,$fill); if ($YPos < $Bottom_Margin + $line_height){ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, @@ -116,8 +116,8 @@ // and False to set to transparent $pdf->addTextWrap(310,$YPos,60,$FontSize,$myrow2['loccode'],'left',0,$fill); - $pdf->addTextWrap(370,$YPos,50,$FontSize,stock_number_format($myrow2['quantity'], $myrow2['decimalplaces']),'right',0,$fill); - $pdf->addTextWrap(420,$YPos,50,$FontSize,stock_number_format($myrow2['reorderlevel'], $myrow2['decimalplaces']),'right',0,$fill); + $pdf->addTextWrap(370,$YPos,50,$FontSize,locale_number_format($myrow2['quantity'], $myrow2['decimalplaces']),'right',0,$fill); + $pdf->addTextWrap(420,$YPos,50,$FontSize,locale_number_format($myrow2['reorderlevel'], $myrow2['decimalplaces']),'right',0,$fill); if ($YPos < $Bottom_Margin + $line_height){ PrintHeader($pdf,$YPos,$PageNumber,$Page_Height,$Top_Margin,$Left_Margin,$Page_Width, Modified: trunk/ReprintGRN.php =================================================================== --- trunk/ReprintGRN.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/ReprintGRN.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -85,7 +85,7 @@ echo '<td>' . $myrow['itemcode'] . '</td>'; echo '<td>' . $myrow['itemdescription'] . '</td>'; echo '<td>' . $myrow['deliverydate'] . '</td>'; - echo '<td class="number">' . stock_number_format($myrow['qtyrecd'], $myrow['decimalplaces']) . '</td>'; + echo '<td class="number">' . locale_number_format($myrow['qtyrecd'], $myrow['decimalplaces']) . '</td>'; echo '<td><a href="PDFGrn.php?GRNNo=' . $myrow['grnbatch'] .'&PONo=' . $_POST['PONumber'] . '">' . _('Reprint') . '</a></td>'; echo '</tr>'; } Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/ReverseGRN.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -300,7 +300,7 @@ '" . $GRN['deliverydate'] . "', '" . $PeriodNo . "', '" . $GRN['glcode'] . "', - '" . _('GRN Reversal for PO') .": " . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . currency_number_format($GRN['stdcostunit'],$GRN['currcode']) . "', + '" . _('GRN Reversal for PO') .": " . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . locale_money_format($GRN['stdcostunit'],$GRN['currcode']) . "', '" . -($GRN['stdcostunit'] * $QtyToReverse) . "' )"; @@ -322,7 +322,7 @@ '" . $GRN['deliverydate'] . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['grnact'] . "', '" - . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . stock_number_format($GRN['stdcostunit'],$GRN['decimalplaces']) . "', + . _('GRN Reversal PO') . ': ' . $GRN['orderno'] . " " . $_POST['SupplierID'] . " - " . $GRN['itemcode'] . "-" . $GRN['itemdescription'] . " x " . $QtyToReverse . " @ " . locale_number_format($GRN['stdcostunit'],$GRN['decimalplaces']) . "', '" . $GRN['stdcostunit'] * $QtyToReverse . "' )"; @@ -403,9 +403,9 @@ $k=1; } - $DisplayQtyRecd = stock_number_format($myrow['qtyrecd'],$myrow['decimalplaces']); - $DisplayQtyInv = stock_number_format($myrow['quantityinv'],$myrow['decimalplaces']); - $DisplayQtyRev = stock_number_format($myrow['qtytoreverse'],$myrow['decimalplaces']); + $DisplayQtyRecd = locale_number_format($myrow['qtyrecd'],$myrow['decimalplaces']); + $DisplayQtyInv = locale_number_format($myrow['quantityinv'],$myrow['decimalplaces']); + $DisplayQtyRev = locale_number_format($myrow['qtytoreverse'],$myrow['decimalplaces']); $DisplayDateDel = ConvertSQLDate($myrow['deliverydate']); $LinkToRevGRN = '<a href="' . $_SERVER['PHP_SELF'] . '?GRNNo=' . $myrow['grnno'] . '">' . _('Reverse') . '</a>'; Modified: trunk/SalesInquiry.php =================================================================== --- trunk/SalesInquiry.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/SalesInquiry.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -870,14 +870,14 @@ while ($myrow = DB_fetch_array($result)) { $linectr++; if ($_POST['DateType'] == 'Order') { - printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']) , $myrow['debtorno'], $myrow['name'], $myrow['brname'], stock_number_format($myrow['quantity'], $myrow['decimalplaces']) , currency_number_format($myrow['extcost'], $myrow['currcode']) , currency_number_format($myrow['extprice'], $myrow['currcode']) , stock_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , $myrow['linestatus'], ConvertSQLDate($myrow['itemdue']) , $myrow['salesman'], $myrow['area'], $myrow['description']); + printf('%10s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']) , $myrow['debtorno'], $myrow['name'], $myrow['brname'], locale_number_format($myrow['quantity'], $myrow['decimalplaces']) , locale_money_format($myrow['extcost'], $myrow['currcode']) , locale_money_format($myrow['extprice'], $myrow['currcode']) , locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , $myrow['linestatus'], ConvertSQLDate($myrow['itemdue']) , $myrow['salesman'], $myrow['area'], $myrow['description']); print '<br/>'; $TotalQty+= $myrow['quantity']; } else { // Detail for Invoiced Date - printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['transno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']) , $myrow['debtorno'], $myrow['name'], $myrow['brname'], stock_number_format($myrow['qty'], $myrow['decimalplaces']) , currency_number_format($myrow['extcost'], $myrow['currcode']) , currency_number_format($myrow['extprice'], $myrow['currcode']) , $myrow['linestatus'], ConvertSQLDate($myrow['trandate']) , $myrow['salesman'], $myrow['area'], $myrow['description']); + printf('%10s | %14s | %-20s | %10s | %-10s | %-30s | %-30s | %12s | %14s | %14s | %12s | %-10s | %-10s | %-10s | %-40s ', $myrow['orderno'], $myrow['transno'], $myrow['stkcode'], ConvertSQLDate($myrow['orddate']) , $myrow['debtorno'], $myrow['name'], $myrow['brname'], locale_number_format($myrow['qty'], $myrow['decimalplaces']) , locale_money_format($myrow['extcost'], $myrow['currcode']) , locale_money_format($myrow['extprice'], $myrow['currcode']) , $myrow['linestatus'], ConvertSQLDate($myrow['trandate']) , $myrow['salesman'], $myrow['area'], $myrow['description']); print '<br/>'; $TotalQty+= $myrow['qty']; } @@ -966,7 +966,7 @@ // qty is from stockmoves $displayqty = $myrow['qty']; } - printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s', $myrow[$summarytype], $myrow[$description], stock_number_format($displayqty, $myrow['decimalplaces']) , currency_number_format($myrow['extcost'], $myrow['currcode']) , currency_number_format($myrow['extprice'], $myrow['currcode']) , stock_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , $column7); + printf(' %-30s | %-40s | %12s | %14s | %14s | %14s | %-40s', $myrow[$summarytype], $myrow[$description], locale_number_format($displayqty, $myrow['decimalplaces']) , locale_money_format($myrow['extcost'], $myrow['currcode']) , locale_money_format($myrow['extprice'], $myrow['currcode']) , locale_number_format($myrow['qtyinvoiced'], $myrow['decimalplaces']) , $column7); print '<br/>'; $TotalQty+= $displayqty; $TotalExtCost+= $myrow['extcost']; Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/SelectCompletedOrder.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -559,7 +559,7 @@ $ViewPage = $rootpath . '/OrderDetails.php?OrderNumber=' . $myrow['orderno']; $FormatedDelDate = ConvertSQLDate($myrow['deliverydate']); $FormatedOrderDate = ConvertSQLDate($myrow['orddate']); - $FormatedOrderValue = currency_number_format($myrow['ordervalue'],$myrow['currcode']); + $FormatedOrderValue = locale_money_format($myrow['ordervalue'],$myrow['currcode']); printf('<td><a href="%s">%s</a></td> <td>%s</td> Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-09-12 02:27:24 UTC (rev 8132) +++ trunk/SelectCreditItems.php 2011-09-12 07:40:32 UTC (rev 8133) @@ -968,7 +968,7 @@ foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { $LineTotal = $LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent); - $DisplayLineTotal = currency_number_format($LineTotal,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); + $DisplayLineTotal = locale_money_format($LineTotal,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -982,16 +982,16 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength="6" size="6" value="' . stock_number_format($LineItem->Quantity, $LineItem->DecimalPlaces) . '" /></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength="6" size="6" value="' . locale_number_format($LineItem->Quantity, $LineItem->DecimalPlaces) . '" /></td>'; } else { echo '<td class="number"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type="hidden" name="Quantity_' . $LineItem->LineNumber . '" value="' . $LineItem->Quantity . '" /></td>'; } echo '<td>' . $LineItem->Units . '</td> - <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size="10" maxlength="12" value="' . currency_number_format($LineItem->Price, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" /></td> + <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size="10" maxlength="12" value="' . locale_money_format($LineItem->Price, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" /></td> <td><input type="checkbox" name="Gross" value="False" /></td> - <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size="3" maxlength="3" value="' . stock_number_format(($LineItem->DiscountPercent * 100),2) . '" /> %</td> + <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size="3" maxlength="3" value="' . locale_number_format(($LineItem->DiscountPercent * 100),2) . '" /> %</td> <td class="number">' . $DisplayLineTotal . '</td>'; @@ -1015,7 +1015,7 @@ if ($i>0){ echo '<br />'; } - echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . stock_number_format($Tax->TaxRate*100, 2) . '" /> %'; + echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . locale_number_format($Tax->TaxRate*100, 2) . '" /> %'; $i++; if ($Tax->TaxOnTax ==1){ $TaxTotals[$Tax->TaxAuthID] += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); @@ -1030,8 +1030,8 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = currency_number_format($TaxLineTotal ,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); - $DisplayGrossLineTotal = currency_number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); + $DisplayTaxAmount = locale_money_format($TaxLineTotal ,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); + $DisplayGrossLineTotal = locale_money_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems'.$identifier]->DefaultCurrency); echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> @@ -1058,7 +1058,7 @@ echo '<td colspan="2" class="number">'. _('Credit Freight').'</td> - <td><input type="text" class="number" size="6" maxlength="6" name="ChargeFreightCost" value="' . currency_number_format($_SESSION['CreditItems'.$identifier]->FreightCost ,$_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" /></td>'; + <td><input type="text" class="number" size="6" maxlength="6" name="ChargeFreightCost" value="' . locale_money_format($_SESSION['CreditItems'.$identifier]->FreightCost ,$_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" /></td>'; $FreightTaxTotal =0; //initialise tax total @@ -1081,7 +1081,7 @@ echo '<br />'; } - echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . '" maxlength="4" size="4" value="' . currency_number_format($FreightTaxLine->TaxRate * 100, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" />'; + echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . '" maxlength="4" size="4" value="' . locale_money_format($FreightTaxLine->TaxRate * 100, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '" />'; if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems'.$identifier]->FreightCost + $FreightTaxTotal)); @@ -1095,20 +1095,20 @@ } echo '</td>'; - echo '<td class="number">' . currency_number_format($FreightTaxTotal, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</td> - <td class="number">' . currency_number_format($FreightTaxTotal+ $_SESSION['CreditItems'.$identifier]->FreightCost, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</td> + echo '<td class="number">' . locale_money_format($FreightTaxTotal, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</td> + <td class="number">' . locale_money_format($FreightTaxTotal+ $_SESSION['CreditItems'.$identifier]->FreightCost, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; - $DisplayTotal = currency_number_format($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost, $_SESSION['CreditItems'.$identifier]->DefaultCurrency); + $DisplayTotal = locale_money_format($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost, $_SESSION['CreditItems'.$identifier]->DefaultCurrency); echo '<tr> <td colspan="7" class="number">' . _('Credit Totals') . '</td> <td class="number"><b>' . $DisplayTotal . '</b></td> <td colspan="2"></td> - <td class="number"><b>' . currency_number_format($TaxTotal, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</b></td> - <td class="number"><b>' . currency_number_format($TaxTotal+($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost), $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</b></td> + <td class="number"><b>' . locale_money_format($TaxTotal, $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</b></td> + <td class="number"><b>' . locale_money_format($TaxTotal+($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost), $_SESSION['CreditItems'.$identifier]->DefaultCurrency) . '</b></td> </tr></table></font>'; $_SESSION['CreditItems'.$identifier]->TaxTotal=$TaxTotal; $_SESSION['CreditItems'.$identifier]->TaxTotals=$TaxTotals; @@ -1339,7 +1339,7 @@ <td>'.$myrow['units'].'</td> <td><font size="1"><input class="number" type="text" size="6" name="Quantity'.$i.'" value="0" /></font></td> <input type="hidden" name="StockID'.$i.'" value="'.$myrow['stockid'].'" /> - <td class="number">'.currency_number_format($PriceRow['price'],$PriceRow['currabrev']).'</td> + <td class="number">'.locale_money_format($PriceRow['price'],$PriceRow['currabrev']).'</td> </tr>'; echo '<input type="hidden" name="ConversionFactor'.$i.'" value="' . $PriceRow['conversionfactor'] . '" />'; echo '<input type="hidden" name="Units'.$i.'" value="' . $myrow['unit... [truncated message content] |