|
From: <dai...@us...> - 2011-10-02 09:17:02
|
Revision: 4708
http://web-erp.svn.sourceforge.net/web-erp/?rev=4708&view=rev
Author: daintree
Date: 2011-10-02 09:16:51 +0000 (Sun, 02 Oct 2011)
Log Message:
-----------
number_formats
Modified Paths:
--------------
trunk/AgedDebtors.php
trunk/AgedSuppliers.php
trunk/BankReconciliation.php
trunk/ConfirmDispatchControlled_Invoice.php
trunk/ConfirmDispatch_Invoice.php
trunk/CounterSales.php
trunk/Credit_Invoice.php
trunk/DeliveryDetails.php
trunk/GLAccountReport.php
trunk/Numbers/Words/lang.bg.php
trunk/Numbers/Words/lang.fr.php
trunk/Numbers/Words/lang.fr_BE.php
trunk/PDFBankingSummary.php
trunk/PDFChequeListing.php
trunk/PDFCustTransListing.php
trunk/PDFCustomerList.php
trunk/PDFLowGP.php
trunk/PDFPickingList.php
trunk/PDFPriceList.php
trunk/PDFPrintLabel.php
trunk/PDFQuotation.php
trunk/PDFQuotationPortrait.php
trunk/PDFReceipt.php
trunk/PDFRemittanceAdvice.php
trunk/PDFSuppTransListing.php
trunk/PDFTopItems.php
trunk/POReport.php
trunk/PO_AuthorisationLevels.php
trunk/PO_Items.php
trunk/PO_OrderDetails.php
trunk/PO_PDFPurchOrder.php
trunk/PO_SelectPurchOrder.php
trunk/PcAssignCashToTab.php
trunk/PcAuthorizeExpenses.php
trunk/PcClaimExpensesFromTab.php
trunk/PcReportTab.php
trunk/PricesByCost.php
trunk/PrintCheque.php
trunk/PrintCustStatements.php
trunk/PrintCustTrans.php
trunk/PrintCustTransPortrait.php
trunk/PurchData.php
trunk/RecurringSalesOrders.php
trunk/ReverseGRN.php
trunk/SMTPServer.php
trunk/SalesByTypePeriodInquiry.php
trunk/SalesCategoryPeriodInquiry.php
trunk/SalesInquiry.php
trunk/SalesPeople.php
trunk/SalesTopItemsInquiry.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/SelectWorkOrder.php
trunk/ShipmentCosting.php
trunk/Shipments.php
trunk/SpecialOrder.php
trunk/StockAdjustments.php
trunk/doc/Change.log
trunk/includes/DefineCartClass.php
trunk/includes/DefineSpecialOrderClass.php
trunk/includes/LanguageSetup.php
trunk/includes/LanguagesArray.php
trunk/includes/MiscFunctions.php
trunk/includes/SelectOrderItems_IntoCart.inc
trunk/includes/phplot/phplot.php
trunk/includes/session.inc
trunk/includes/tcpdf/tcpdf.php
Added Paths:
-----------
trunk/css/aguapop/
trunk/css/aguapop/README.txt
trunk/css/aguapop/default.css
trunk/css/aguapop/default.css_large
trunk/css/aguapop/footer.inc.NEW
trunk/css/aguapop/images/
trunk/css/aguapop/images/Graphique-32.png
trunk/css/aguapop/images/allocation.png
trunk/css/aguapop/images/ar.png
trunk/css/aguapop/images/back.png
trunk/css/aguapop/images/bank.png
trunk/css/aguapop/images/bar.png
trunk/css/aguapop/images/body_bg.png
trunk/css/aguapop/images/button_bg.png
trunk/css/aguapop/images/company.png
trunk/css/aguapop/images/contract.png
trunk/css/aguapop/images/currency.png
trunk/css/aguapop/images/customer.png
trunk/css/aguapop/images/error.png
trunk/css/aguapop/images/folder_add.png
trunk/css/aguapop/images/footer.png
trunk/css/aguapop/images/gl.png
trunk/css/aguapop/images/group_add.png
trunk/css/aguapop/images/input.png
trunk/css/aguapop/images/input_bg.png
trunk/css/aguapop/images/inputh.png
trunk/css/aguapop/images/inputhtxt.png
trunk/css/aguapop/images/inputtxt.png
trunk/css/aguapop/images/inquireies.png
trunk/css/aguapop/images/inventory.png
trunk/css/aguapop/images/magnifier.png
trunk/css/aguapop/images/maintenance.png
trunk/css/aguapop/images/money_add.png
trunk/css/aguapop/images/money_delete.png
trunk/css/aguapop/images/note_add.png
trunk/css/aguapop/images/pdf.png
trunk/css/aguapop/images/preview.png
trunk/css/aguapop/images/printer.png
trunk/css/aguapop/images/reports.png
trunk/css/aguapop/images/sales.png
trunk/css/aguapop/images/stripe.png
trunk/css/aguapop/images/supplier.png
trunk/css/aguapop/images/tab_bg.png
trunk/css/aguapop/images/top.png
trunk/css/aguapop/images/top_bg.png
trunk/css/aguapop/images/transactions.png
trunk/css/aguapop/images/user.png
trunk/css/aguapop/images/x-mail-distribution-list.png
trunk/css/aguapop/login.css
Modified: trunk/AgedDebtors.php
===================================================================
--- trunk/AgedDebtors.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/AgedDebtors.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -291,11 +291,11 @@
while ($AgedAnalysis = DB_fetch_array($CustomerResult,$db)){
$DecimalPlaces = $AgedAnalysis['decimalplaces'];
- $DisplayDue = locale_money_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],$DecimalPlaces);
- $DisplayCurrent = locale_money_format($AgedAnalysis['balance']-$AgedAnalysis['due'],$DecimalPlaces);
- $DisplayBalance = locale_money_format($AgedAnalysis['balance'],$DecimalPlaces);
- $DisplayOverdue1 = locale_money_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],$DecimalPlaces);
- $DisplayOverdue2 = locale_money_format($AgedAnalysis['overdue2'],$DecimalPlaces);
+ $DisplayDue = locale_number_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],$DecimalPlaces);
+ $DisplayCurrent = locale_number_format($AgedAnalysis['balance']-$AgedAnalysis['due'],$DecimalPlaces);
+ $DisplayBalance = locale_number_format($AgedAnalysis['balance'],$DecimalPlaces);
+ $DisplayOverdue1 = locale_number_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],$DecimalPlaces);
+ $DisplayOverdue2 = locale_number_format($AgedAnalysis['overdue2'],$DecimalPlaces);
$TotBal += $AgedAnalysis['balance'];
$TotDue += ($AgedAnalysis['due']-$AgedAnalysis['overdue1']);
@@ -384,11 +384,11 @@
$DisplayTranDate = ConvertSQLDate($DetailTrans['trandate']);
$LeftOvers = $pdf->addTextWrap($Left_Margin+125,$YPos,75,$FontSize,$DisplayTranDate,'left');
- $DisplayDue = locale_money_format($DetailTrans['due']-$DetailTrans['overdue1'],$DecimalPlaces);
- $DisplayCurrent = locale_money_format($DetailTrans['balance']-$DetailTrans['due'],$DecimalPlaces);
- $DisplayBalance = locale_money_format($DetailTrans['balance'],$DecimalPlaces);
- $DisplayOverdue1 = locale_money_format($DetailTrans['overdue1']-$DetailTrans['overdue2'],$DecimalPlaces);
- $DisplayOverdue2 = locale_money_format($DetailTrans['overdue2'],$DecimalPlaces);
+ $DisplayDue = locale_number_format($DetailTrans['due']-$DetailTrans['overdue1'],$DecimalPlaces);
+ $DisplayCurrent = locale_number_format($DetailTrans['balance']-$DetailTrans['due'],$DecimalPlaces);
+ $DisplayBalance = locale_number_format($DetailTrans['balance'],$DecimalPlaces);
+ $DisplayOverdue1 = locale_number_format($DetailTrans['overdue1']-$DetailTrans['overdue2'],$DecimalPlaces);
+ $DisplayOverdue2 = locale_number_format($DetailTrans['overdue2'],$DecimalPlaces);
$LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayBalance,'right');
$LeftOvers = $pdf->addTextWrap(280,$YPos,60,$FontSize,$DisplayCurrent,'right');
@@ -418,11 +418,11 @@
$pdf->line($Page_Width-$Right_Margin, $YPos+10 ,220, $YPos+10);
}
- $DisplayTotBalance = locale_money_format($TotBal,$DecimalPlaces);
- $DisplayTotDue = locale_money_format($TotDue,$DecimalPlaces);
- $DisplayTotCurrent = locale_money_format($TotCurr,$DecimalPlaces);
- $DisplayTotOverdue1 = locale_money_format($TotOD1,$DecimalPlaces);
- $DisplayTotOverdue2 = locale_money_format($TotOD2,$DecimalPlaces);
+ $DisplayTotBalance = locale_number_format($TotBal,$DecimalPlaces);
+ $DisplayTotDue = locale_number_format($TotDue,$DecimalPlaces);
+ $DisplayTotCurrent = locale_number_format($TotCurr,$DecimalPlaces);
+ $DisplayTotOverdue1 = locale_number_format($TotOD1,$DecimalPlaces);
+ $DisplayTotOverdue2 = locale_number_format($TotOD2,$DecimalPlaces);
$LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right');
$LeftOvers = $pdf->addTextWrap(280,$YPos,60,$FontSize,$DisplayTotCurrent,'right');
Modified: trunk/AgedSuppliers.php
===================================================================
--- trunk/AgedSuppliers.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/AgedSuppliers.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -126,11 +126,11 @@
While ($AgedAnalysis = DB_fetch_array($SupplierResult,$db)){
- $DisplayDue = locale_money_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],2);
- $DisplayCurrent = locale_money_format($AgedAnalysis['balance']-$AgedAnalysis['due'],2);
- $DisplayBalance = locale_money_format($AgedAnalysis['balance'],2);
- $DisplayOverdue1 = locale_money_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],2);
- $DisplayOverdue2 = locale_money_format($AgedAnalysis['overdue2'],2);
+ $DisplayDue = locale_number_format($AgedAnalysis['due']-$AgedAnalysis['overdue1'],2);
+ $DisplayCurrent = locale_number_format($AgedAnalysis['balance']-$AgedAnalysis['due'],2);
+ $DisplayBalance = locale_number_format($AgedAnalysis['balance'],2);
+ $DisplayOverdue1 = locale_number_format($AgedAnalysis['overdue1']-$AgedAnalysis['overdue2'],2);
+ $DisplayOverdue2 = locale_number_format($AgedAnalysis['overdue2'],2);
$TotBal += $AgedAnalysis['balance'];
$TotDue += ($AgedAnalysis['due']-$AgedAnalysis['overdue1']);
@@ -204,11 +204,11 @@
$DisplayTranDate = ConvertSQLDate($DetailTrans['trandate']);
$LeftOvers = $pdf->addTextWrap($Left_Margin+105,$YPos,70,$FontSize,$DisplayTranDate,'left');
- $DisplayDue = locale_money_format($DetailTrans['due']-$DetailTrans['overdue1'],2);
- $DisplayCurrent = locale_money_format($DetailTrans['balance']-$DetailTrans['due'],2);
- $DisplayBalance = locale_money_format($DetailTrans['balance'],2);
- $DisplayOverdue1 = locale_money_format($DetailTrans['overdue1']-$DetailTrans['overdue2'],2);
- $DisplayOverdue2 = locale_money_format($DetailTrans['overdue2'],2);
+ $DisplayDue = locale_number_format($DetailTrans['due']-$DetailTrans['overdue1'],2);
+ $DisplayCurrent = locale_number_format($DetailTrans['balance']-$DetailTrans['due'],2);
+ $DisplayBalance = locale_number_format($DetailTrans['balance'],2);
+ $DisplayOverdue1 = locale_number_format($DetailTrans['overdue1']-$DetailTrans['overdue2'],2);
+ $DisplayOverdue2 = locale_number_format($DetailTrans['overdue2'],2);
$LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayBalance,'right');
$LeftOvers = $pdf->addTextWrap(280,$YPos,60,$FontSize,$DisplayCurrent,'right');
@@ -238,11 +238,11 @@
$pdf->line($Page_Width-$Right_Margin, $YPos+10 ,220, $YPos+10);
}
- $DisplayTotBalance = locale_money_format($TotBal,2);
- $DisplayTotDue = locale_money_format($TotDue,2);
- $DisplayTotCurrent = locale_money_format($TotCurr,2);
- $DisplayTotOverdue1 = locale_money_format($TotOD1,2);
- $DisplayTotOverdue2 = locale_money_format($TotOD2,2);
+ $DisplayTotBalance = locale_number_format($TotBal,2);
+ $DisplayTotDue = locale_number_format($TotDue,2);
+ $DisplayTotCurrent = locale_number_format($TotCurr,2);
+ $DisplayTotOverdue1 = locale_number_format($TotOD1,2);
+ $DisplayTotOverdue2 = locale_number_format($TotOD2,2);
$LeftOvers = $pdf->addTextWrap(220,$YPos,60,$FontSize,$DisplayTotBalance,'right');
$LeftOvers = $pdf->addTextWrap(280,$YPos,60,$FontSize,$DisplayTotCurrent,'right');
Modified: trunk/BankReconciliation.php
===================================================================
--- trunk/BankReconciliation.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/BankReconciliation.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -42,7 +42,7 @@
$CalculatedBalance = filter_number_format($_POST['DoExchangeDifference']);
- $ExchangeDifference = filter_number_format(($CalculatedBalance - $_POST['BankStatementBalance'])/$CurrencyRow['rate']);
+ $ExchangeDifference = ($CalculatedBalance - filter_number_format($_POST['BankStatementBalance']))/$CurrencyRow['rate'];
include ('includes/SQL_CommonFunctions.inc');
$ExDiffTransNo = GetNextTransNo(36,$db);
@@ -89,7 +89,7 @@
$result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
$result = DB_Txn_Commit($db);
- prnMsg(_('Exchange difference of') . ' ' . locale_money_format($ExchangeDifference,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success');
+ prnMsg(_('Exchange difference of') . ' ' . locale_number_format($ExchangeDifference,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success');
} //end if the bank statement balance was numeric
}
@@ -173,7 +173,7 @@
echo ' (' . $CurrencyRow['currcode'] . ' @ ' . $CurrencyRow['rate'] .')';
}
echo '</b></td>
- <td valign=bottom class="number"><b>' . locale_money_format($Balance*$CurrencyRow['rate'],$CurrencyRow['currdecimalplaces']) . '</b></td></tr>';
+ <td valign=bottom class="number"><b>' . locale_number_format($Balance*$CurrencyRow['rate'],$CurrencyRow['currdecimalplaces']) . '</b></td></tr>';
$SQL = "SELECT amount/exrate AS amt,
amountcleared,
@@ -231,8 +231,8 @@
$myrow['typename'],
$myrow['transno'],
$myrow['ref'],
- locale_money_format($myrow['amt'],$CurrencyRow['currdecimalplaces']),
- locale_money_format($myrow['outstanding'],$CurrencyRow['currdecimalplaces']));
+ locale_number_format($myrow['amt'],$CurrencyRow['currdecimalplaces']),
+ locale_number_format($myrow['outstanding'],$CurrencyRow['currdecimalplaces']));
$TotalUnpresentedCheques +=$myrow['outstanding'];
@@ -243,9 +243,9 @@
}
}
//end of while loop
- $TotalUnpresentedCheques = filter_number_format($TotalUnpresentedCheques);
+
echo '<tr></tr>
- <tr class=EvenTableRows><td colspan=6>' . _('Total of all unpresented cheques') . '</td><td class="number">' . locale_money_format($TotalUnpresentedCheques,$CurrencyRow['currdecimalplaces']) . '</td></tr>';
+ <tr class=EvenTableRows><td colspan=6>' . _('Total of all unpresented cheques') . '</td><td class="number">' . locale_number_format($TotalUnpresentedCheques,$CurrencyRow['currdecimalplaces']) . '</td></tr>';
$SQL = "SELECT amount/exrate AS amt,
amountcleared,
@@ -303,8 +303,8 @@
$myrow['typename'],
$myrow['transno'],
$myrow['ref'],
- locale_money_format($myrow['amt'],$CurrencyRow['currdecimalplaces']),
- locale_money_format($myrow['outstanding'],$CurrencyRow['currdecimalplaces']) );
+ locale_number_format($myrow['amt'],$CurrencyRow['currdecimalplaces']),
+ locale_number_format($myrow['outstanding'],$CurrencyRow['currdecimalplaces']) );
$TotalUnclearedDeposits +=$myrow['outstanding'];
@@ -318,13 +318,13 @@
echo '<tr></tr>
<tr class=EvenTableRows>
<td colspan=6>' . _('Total of all uncleared deposits') . '</td>
- <td class="number">' . locale_money_format($TotalUnclearedDeposits,$CurrencyRow['currdecimalplaces']) . '</td>
+ <td class="number">' . locale_number_format($TotalUnclearedDeposits,$CurrencyRow['currdecimalplaces']) . '</td>
</tr>';
- $FXStatementBalance = filter_number_format(($Balance*$CurrencyRow['rate']) - $TotalUnpresentedCheques -$TotalUnclearedDeposits);
+ $FXStatementBalance = ($Balance*$CurrencyRow['rate'] - $TotalUnpresentedCheques -$TotalUnclearedDeposits);
echo '<tr></tr>
<tr class=EvenTableRows>
<td colspan=6><b>' . _('Bank statement balance should be') . ' (' . $CurrencyRow['currcode'] . ')</b></td>
- <td class="number">' . locale_money_format($FXStatementBalance,$CurrencyRow['currdecimalplaces']) . '</td></tr>';
+ <td class="number">' . locale_number_format($FXStatementBalance,$CurrencyRow['currdecimalplaces']) . '</td></tr>';
if (isset($_POST['DoExchangeDifference'])){
echo '<input type="hidden" name="DoExchangeDifference" value=' . $FXStatementBalance . ' />';
Modified: trunk/ConfirmDispatchControlled_Invoice.php
===================================================================
--- trunk/ConfirmDispatchControlled_Invoice.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/ConfirmDispatchControlled_Invoice.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -69,7 +69,7 @@
/*TotalQuantity set inside this include file from the sum of the bundles
of the item selected for dispatch */
-$_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = filter_number_format($TotalQuantity);
+$_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity;
include('includes/footer.inc');
exit;
Modified: trunk/ConfirmDispatch_Invoice.php
===================================================================
--- trunk/ConfirmDispatch_Invoice.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/ConfirmDispatch_Invoice.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -212,7 +212,7 @@
}
foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) {
if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){
- $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format(filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100);
+ $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100;
}
}
@@ -220,14 +220,14 @@
if (sizeOf($Itm->SerialItems) > 0) {
$_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched
foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities
- $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += filter_number_format($SerialItem->BundleQty);
+ $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty;
}
} else if (is_numeric($_POST[$Itm->LineNumber . '_QtyDispatched' ]) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){
$_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']);
}
foreach ($Itm->Taxes as $TaxLine) {
if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){
- $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format(filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100);
+ $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100;
}
}
} //end foreach lineitem
@@ -323,8 +323,8 @@
}
}
$DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%';
- $DisplayLineNetTotal = locale_money_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces);
- $DisplayPrice = locale_money_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces);
+ $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces);
+ $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces);
echo '<td class="number">'.$DisplayPrice.'</td>
<td class="number">'.$DisplayDiscountPercent.'</td>
<td class="number">'.$DisplayLineNetTotal.'</td>';
@@ -356,8 +356,7 @@
if (isset($_POST['ProcessInvoice'])) {
echo $Tax->TaxRate*100;
} else {
- echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder .
- '_TaxRate" maxlength=4 size=4 value="' . $Tax->TaxRate*100 . '">';
+ echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />';
}
$i++;
if ($Tax->TaxOnTax ==1){
@@ -373,11 +372,12 @@
$TaxTotal += $TaxLineTotal;
- $DisplayTaxAmount = locale_money_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces);
+ $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces);
- $DisplayGrossLineTotal = locale_money_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces);
+ $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces);
- echo '<td class="number">'.$DisplayTaxAmount.'</td><td class="number">'.$DisplayGrossLineTotal.'</td>';
+ echo '<td class="number">'.$DisplayTaxAmount.'</td>
+ <td class="number">'.$DisplayGrossLineTotal.'</td>';
if ($LnItm->Controlled==1){
if (!isset($_POST['ProcessInvoice'])) {
@@ -445,11 +445,11 @@
echo '<tr>
<td colspan="5" class="number">' . _('Order Freight Cost'). '</td>
- <td class="number">' . $_SESSION['Old_FreightCost'] . '</td>';
+ <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>';
if ($_SESSION['DoFreightCalc']==True){
echo '<td colspan="2" class="number">' ._('Recalculated Freight Cost'). '</td>
- <td class="number">' . $FreightCost . '</td>';
+ <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>';
} else {
// echo '<td colspan="1"></td>';
}
@@ -464,9 +464,9 @@
} else {
echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>';
if (isset($_POST['ProcessInvoice'])) {
- echo '<td class="number">' . $_SESSION['Items']->FreightCost . '</td>';
+ echo '<td class="number">' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>';
} else {
- echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . $_SESSION['Items']->FreightCost . '" /></td>';
+ echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '" /></td>';
}
$_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost;
}
@@ -496,7 +496,7 @@
echo $FreightTaxLine->TaxRate * 100 ;
} else {
echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder .
- '" maxlength="4" size="4" value="' . $FreightTaxLine->TaxRate * 100 . '" />';
+ '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items']->CurrDecimalPlaces) . '" />';
}
if ($FreightTaxLine->TaxOnTax ==1){
@@ -511,13 +511,13 @@
}
echo '</td>';
-echo '<td class="number">' . locale_money_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td>
- <td class="number">' . locale_money_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>
+echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>
</tr>';
$TaxTotal += $FreightTaxTotal;
-$DisplaySubTotal = locale_money_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces);
+$DisplaySubTotal = locale_number_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces);
/* round the totals to avoid silly entries */
@@ -529,8 +529,8 @@
<td colspan="10" class="number">' . _('Invoice Totals'). '</td>
<td class="number:><hr><b>'.$DisplaySubTotal.'</b><hr></td>
<td colspan="2"></td>
- <td class="number"><hr><b>' . locale_money_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td>
- <td class="number"><hr><b>' . locale_money_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td>
+ <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td>
+ <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td>
</tr>';
if (! isset($_POST['DispatchDate']) OR ! Is_Date($_POST['DispatchDate'])){
@@ -764,10 +764,10 @@
'',
'" . $_SESSION['Items']->DefaultSalesType . "',
'" . $_SESSION['ProcessingOrder'] . "',
- '" . filter_number_format($_SESSION['Items']->total) . "',
- '" . filter_number_format($TaxTotal) . "',
+ '" . $_SESSION['Items']->total . "',
+ '" . $TaxTotal . "',
'" . filter_number_format($_POST['ChargeFreightCost']) . "',
- '" . filter_number_format($_SESSION['CurrencyRate']) . "',
+ '" . $_SESSION['CurrencyRate'] . "',
'" . DB_escape_string($_POST['InvoiceText']) . "',
'" . $_SESSION['Items']->ShipVia . "',
'" . DB_escape_string($_POST['Consignment']) . "' )";
@@ -786,7 +786,7 @@
taxamount)
VALUES ('" . $DebtorTransID . "',
'" . $TaxAuthID . "',
- '" . filter_number_format($TaxAmount/$_SESSION['CurrencyRate']) . "')";
+ '" . $TaxAmount/$_SESSION['CurrencyRate'] . "')";
$ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction taxes records could not be inserted because');
$DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used');
@@ -816,7 +816,7 @@
if ($_POST['BOPolicy']=='CAN'){
$SQL = "UPDATE salesorderdetails
- SET quantity = quantity - " . filter_number_format($OrderLine->Quantity - $OrderLine->QtyDispatched) . "
+ SET quantity = quantity - " . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "
WHERE orderno = '" . $_SESSION['ProcessingOrder'] . " '
AND stkcode = '" . $OrderLine->StockID . "'";
@@ -838,7 +838,7 @@
'" . $_SESSION['ProcessingOrder'] . "',
'" . $InvoiceNo . "',
'" . $OrderLine->StockID . "',
- '" . filter_number_format($OrderLine->Quantity - $OrderLine->QtyDispatched) . "',
+ '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "',
'" . $_SESSION['Items']->DebtorNo . "',
'" . $_SESSION['Items']->Branch . "',
'CAN')";
@@ -866,7 +866,7 @@
'" . $_SESSION['ProcessingOrder'] . "',
'" . $InvoiceNo . "',
'" . $OrderLine->StockID . "',
- '" . filter_number_format($OrderLine->Quantity - $OrderLine->QtyDispatched) . "',
+ '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "',
'" . $_SESSION['Items']->DebtorNo . "',
'" . $_SESSION['Items']->Branch . "',
'BO'
@@ -884,14 +884,14 @@
// Test above to see if the line is completed or not
if ($OrderLine->QtyDispatched>=($OrderLine->Quantity - $OrderLine->QtyInv) OR $_POST['BOPolicy']=='CAN'){
$SQL = "UPDATE salesorderdetails
- SET qtyinvoiced = qtyinvoiced + " . filter_number_format($OrderLine->QtyDispatched) . ",
+ SET qtyinvoiced = qtyinvoiced + " . $OrderLine->QtyDispatched . ",
actualdispatchdate = '" . $DefaultDispatchDate . "',
completed=1
WHERE orderno = '" . $_SESSION['ProcessingOrder'] . "'
AND orderlineno = '" . $OrderLine->LineNumber . "'";
} else {
$SQL = "UPDATE salesorderdetails
- SET qtyinvoiced = qtyinvoiced + " . filter_number_format($OrderLine->QtyDispatched) . ",
+ SET qtyinvoiced = qtyinvoiced + " . $OrderLine->QtyDispatched . ",
actualdispatchdate = '" . $DefaultDispatchDate . "'
WHERE orderno = '" . $_SESSION['ProcessingOrder'] . "'
AND orderlineno = '" . $OrderLine->LineNumber . "'";
@@ -931,7 +931,7 @@
$QtyOnHandPrior = 0;
}
- $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . filter_number_format($OrderLine->QtyDispatched) . "
+ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . "
WHERE locstock.stockid = '" . $OrderLine->StockID . "'
AND loccode = '" . $_SESSION['Items']->Location . "'";
@@ -1003,10 +1003,10 @@
'" . $_SESSION['Items']->Branch . "',
'" . $PeriodNo . "',
'" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "',
- '" . filter_number_format(-$AssParts['quantity'] * $OrderLine->QtyDispatched) . "',
+ '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "',
'" . $AssParts['standard'] . "',
0,
- '" . filter_number_format($QtyOnHandPrior - $AssParts['quantity'] * $OrderLine->QtyDispatched) . "' )";
+ '" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLine->QtyDispatched) . "' )";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of'). ' '. $OrderLine->StockID . ' ' . _('could not be inserted because');
$DbgMsg = _('The following SQL to insert the assembly components stock movement records was used');
@@ -1014,7 +1014,7 @@
$SQL = "UPDATE locstock
- SET quantity = locstock.quantity - " . filter_number_format($AssParts['quantity'] * $OrderLine->QtyDispatched) . "
+ SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . "
WHERE locstock.stockid = '" . $AssParts['component'] . "'
AND loccode = '" . $_SESSION['Items']->Location . "'";
@@ -1057,13 +1057,13 @@
'" . $DefaultDispatchDate . "',
'" . $_SESSION['Items']->DebtorNo . "',
'" . $_SESSION['Items']->Branch . "',
- '" . filter_number_format($LocalCurrencyPrice) . "',
+ '" . $LocalCurrencyPrice . "',
'" . $PeriodNo . "',
'" . $_SESSION['ProcessingOrder'] . "',
- '" . filter_number_format(-$OrderLine->QtyDispatched) . "',
- '" . filter_number_format($OrderLine->DiscountPercent) . "',
- '" . filter_number_format($OrderLine->StandardCost) . "',
- '" . filter_number_format($QtyOnHandPrior - $OrderLine->QtyDispatched) . "',
+ '" . -$OrderLine->QtyDispatched . "',
+ '" . $OrderLine->DiscountPercent . "',
+ '" . $OrderLine->StandardCost . "',
+ '" . ($QtyOnHandPrior - $OrderLine->QtyDispatched) . "',
'" . DB_escape_string($OrderLine->Narrative) . "' )";
} else {
// its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil
@@ -1091,12 +1091,12 @@
'" . $DefaultDispatchDate . "',
'" . $_SESSION['Items']->DebtorNo . "',
'" . $_SESSION['Items']->Branch . "',
- '" . filter_number_format($LocalCurrencyPrice) . "',
+ '" . $LocalCurrencyPrice . "',
'" . $PeriodNo . "',
'" . $_SESSION['ProcessingOrder'] . "',
- '" . filter_number_format(-$OrderLine->QtyDispatched) . "',
- '" . filter_number_format($OrderLine->DiscountPercent) . "',
- '" . filter_number_format($OrderLine->StandardCost) . "',
+ '" . -$OrderLine->QtyDispatched . "',
+ '" . $OrderLine->DiscountPercent . "',
+ '" . $OrderLine->StandardCost . "',
'" . DB_escape_string($OrderLine->Narrative) . "')";
}
@@ -1118,7 +1118,7 @@
taxontax)
VALUES ('" . $StkMoveNo . "',
'" . $Tax->TaxAuthID . "',
- '" . filter_number_format($Tax->TaxRate) . "',
+ '" . $Tax->TaxRate . "',
'" . $Tax->TaxCalculationOrder . "',
'" . $Tax->TaxOnTax . "')";
@@ -1134,7 +1134,7 @@
foreach($OrderLine->SerialItems as $Item){
/*We need to add the StockSerialItem record and the StockSerialMoves as well */
- $SQL = "UPDATE stockserialitems SET quantity= quantity - " . filter_number_format($Item->BundleQty) . "
+ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . "
WHERE stockid='" . $OrderLine->StockID . "'
AND loccode='" . $_SESSION['Items']->Location . "'
AND serialno='" . DB_escape_string($Item->BundleRef) . "'";
@@ -1152,7 +1152,7 @@
VALUES ('" . $StkMoveNo . "',
'" . $OrderLine->StockID . "',
'" . DB_escape_string($Item->BundleRef) . "',
- '" . filter_number_format(-$Item->BundleQty) . "')";
+ '" . -$Item->BundleQty . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because');
$DbgMsg = _('The following SQL to insert the serial stock movement records was used');
@@ -1203,10 +1203,10 @@
if ($myrow[0]>0){ /*Update the existing record that already exists */
- $SQL = "UPDATE salesanalysis SET amt=amt+" . filter_number_format($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ",
- cost=cost+" . filter_number_format($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ",
- qty=qty +" . filter_number_format($OrderLine->QtyDispatched) . ",
- disc=disc+" . filter_number_format($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "
+ $SQL = "UPDATE salesanalysis SET amt=amt+" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ",
+ cost=cost+" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ",
+ qty=qty +" . $OrderLine->QtyDispatched . ",
+ disc=disc+" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "
WHERE salesanalysis.area='" . $myrow[5] . "'
AND salesanalysis.salesperson='" . $myrow[8] . "'
AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "'
@@ -1234,12 +1234,12 @@
stkcategory )
SELECT '" . $_SESSION['Items']->DefaultSalesType . "',
'" . $PeriodNo . "',
- '" . filter_number_format($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "',
- '" . filter_number_format($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "',
+ '" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "',
+ '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "',
'" . $_SESSION['Items']->DebtorNo . "',
'" . $_SESSION['Items']->Branch . "',
- '" . filter_number_format($OrderLine->QtyDispatched) . "',
- '" . filter_number_format($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "',
+ '" . ($OrderLine->QtyDispatched) . "',
+ '" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "',
'" . $OrderLine->StockID . "',
custbranch.area,
1,
@@ -1276,7 +1276,7 @@
'" . $PeriodNo . "',
'" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "',
- '" . filter_number_format($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')";
+ '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1299,7 +1299,7 @@
'" . $PeriodNo . "',
'" . $StockGLCode['stockact'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "',
- '" . filter_number_format(-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')";
+ '" . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1326,7 +1326,7 @@
'" . $PeriodNo . "',
'" . $SalesGLAccounts['salesglcode'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "',
- '" . filter_number_format(-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')";
+ '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because');
$DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used');
@@ -1348,7 +1348,7 @@
'" . $PeriodNo . "',
'" . $SalesGLAccounts['discountglcode'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%',
- '" . filter_number_format($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')";
+ '" . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1394,7 +1394,7 @@
'" . $PeriodNo . "',
'" . $DisposalRow['accumdepnact'] . "',
'" . $_SESSION['Items']->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "',
- '" . filter_number_format(-$DisposalRow['accumdpen']) . "')";
+ '" . -$DisposalRow['accumdpen'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of accumulated depreciation GL posting on disposal could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1416,7 +1416,7 @@
'" . $PeriodNo . "',
'" . $DisposalRow['costact'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "',
- '" . filter_number_format(-$DisposalRow['cost']) . "')";
+ '" . -$DisposalRow['cost'] . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1438,7 +1438,7 @@
'" . $PeriodNo . "',
'" . $DisposalRow['disposalact'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "',
- '" . filter_number_format($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')";
+ '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because');
$DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used');
@@ -1460,7 +1460,7 @@
'" . $PeriodNo . "',
'" . $DisposalRow['disposalact'] . "',
'" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "',
- '" . filter_number_format(-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')";
+ '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because');
$DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used');
@@ -1488,14 +1488,14 @@
'" . $PeriodNo . "',
'" . Date('Y-m-d') . "',
'disposal',
- '" . filter_number_format($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "',
+ '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "',
'" . $DefaultDispatchDate . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because');
$DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used');
$Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);
$SQL = "UPDATE fixedassets
- SET disposalproceeds ='" . filter_number_format($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "',
+ SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "',
disposaldate ='" . $DefaultDispatchDate . "'
WHERE assetid ='" . $AssetNumber . "'";
@@ -1526,7 +1526,7 @@
'" . $PeriodNo . "',
'" . $_SESSION['CompanyRecord']['debtorsact'] . "',
'" . $_SESSION['Items']->DebtorNo . "',
- '" . filter_number_format(($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')";
+ '" . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used');
@@ -1551,7 +1551,7 @@
'" . $PeriodNo . "',
'" . $_SESSION['CompanyRecord']['freightact'] . "',
'" . $_SESSION['Items']->DebtorNo . "',
- '" . filter_number_format(-($_SESSION['Items']->FreightCost)/$_SESSION['CurrencyRate']) . "')";
+ '" . (-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
@@ -1573,7 +1573,7 @@
'" . $PeriodNo . "',
'" . $TaxGLCodes[$TaxAuthID] . "',
'" . $_SESSION['Items']->DebtorNo . "',
- '" . filter_number_format(-$TaxAmount/$_SESSION['CurrencyRate']) . "')";
+ '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because');
$DbgMsg = _('The following SQL to insert the GLTrans record was used');
Modified: trunk/CounterSales.php
===================================================================
--- trunk/CounterSales.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/CounterSales.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -15,6 +15,8 @@
include('includes/SQL_CommonFunctions.inc');
include('includes/GetSalesTransGLCodes.inc');
+$AlreadyWarnedAboutCredit = false;
+
if (empty($_GET['identifier'])) {
$identifier=date('U');
} else {
@@ -36,7 +38,8 @@
if (isset($_POST['SelectingOrderItems'])){
foreach ($_POST as $FormVariable => $Quantity) {
if (mb_strpos($FormVariable,'OrderQty')!==false) {
- $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format(trim($Quantity));
+ $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format($Quantity);
+ echo '<br/> The quantitiy entered was ' . filter_number_format($Quantity) . ' the quantity for ' . $_POST['StockID' . mb_substr($FormVariable,8)] . ' unfiltered was: ' . $Quantity;
}
}
}
@@ -483,12 +486,12 @@
foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) {
if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){
-
+
$Quantity = filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]);
if (abs($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){
$Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]);
- $_POST['GPPercent_' . $OrderLine->LineNumber] = filter_number_format((($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100));
+ $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100);
} else if (abs($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) {
//then do a recalculation of the price at this new GP Percentage
$Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100));
@@ -518,7 +521,7 @@
$_SESSION['Items'.$identifier]->update_cart_item($OrderLine->LineNumber,
$Quantity,
$Price,
- filter_number_format($DiscountPercentage/100),
+ $DiscountPercentage/100,
$Narrative,
'Yes', /*Update DB */
$_POST['ItemDue_' . $OrderLine->LineNumber],
@@ -769,16 +772,16 @@
echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td>
<td>' . $OrderLine->ItemDescription . '</td>';
- echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . $OrderLine->Quantity . '" />';
+ echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />';
echo '</td>
- <td class="number">' . $OrderLine->QOHatLoc . '</td>
+ <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td>
<td>' . $OrderLine->Units . '</td>';
- echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . $OrderLine->Price . '" /></td>
- <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . ($OrderLine->DiscountPercent * 100) . '" /></td>
- <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . $OrderLine->GPPercent . '" /></td>';
- echo '<td class="number">' . locale_money_format($SubTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
+ echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>
+ <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td>
+ <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>';
+ echo '<td class="number">' . locale_number_format($SubTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
$LineDueDate = $OrderLine->ItemDue;
if (!Is_Date($OrderLine->ItemDue)){
$LineDueDate = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays);
@@ -804,8 +807,8 @@
$TaxTotal += $TaxLineTotal;
$_SESSION['Items'.$identifier]->TaxTotals=$TaxTotals;
$_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes;
- echo '<td class="number">' . locale_money_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
- echo '<td class="number">' . locale_money_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
+ echo '<td class="number">' . locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
+ echo '<td class="number">' . locale_number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>';
echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>';
if ($_SESSION['AllowOrderLineItemNarrative'] == 1){
@@ -822,9 +825,9 @@
} /* end of loop around items */
echo '<tr class="EvenTableRows"><td colspan="8" class="number"><b>' . _('Total') . '</b></td>
- <td class="number">' . locale_money_format(($_SESSION['Items'.$identifier]->total),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
- <td class="number">' . locale_money_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
- <td class="number">' . locale_money_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format(($_SESSION['Items'.$identifier]->total),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>
</tr>
</table>';
echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />';
@@ -1889,7 +1892,7 @@
'" . $BankAccountExRate . "',
'" . $DefaultDispatchDate . "',
'" . $_POST['PaymentMethod'] . "',
- '" . filter_number_format(filter_number_format($_POST['AmountPaid']) * $BankAccountExRate) . "',
+ '" . filter_number_format($_POST['AmountPaid']) * $BankAccountExRate . "',
'" . $_SESSION['Items'.$identifier]->DefaultCurrency . "')";
$DbgMsg = _('The SQL that failed to insert the bank account transaction was');
Modified: trunk/Credit_Invoice.php
===================================================================
--- trunk/Credit_Invoice.php 2011-10-01 06:40:49 UTC (rev 4707)
+++ trunk/Credit_Invoice.php 2011-10-02 09:16:51 UTC (rev 4708)
@@ -293,11 +293,11 @@
$j=0; //row counter
foreach ($_SESSION['CreditItems']->LineItems as $LnItm) {
- $LineTotal =(filter_number_format($LnItm->QtyDispatched) * filter_number_format($LnItm->Price) * (1 - filter_number_format($LnItm->DiscountPercent)));
+ $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent);
if (!isset($_POST['ProcessCredit'])) {
$_SESSION['CreditItems']->total += $LineTotal;
- $_SESSION['CreditItems']->totalVolume += (filter_number_format($LnItm->QtyDispatched) * filter_number_format($LnItm->Volume));
- $_SESSION['CreditItems']->totalWeight += (filter_number_format($LnItm->QtyDispatched) * filter_number_format($LnItm->Weight));
+ $_SESSION['CreditItems']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume);
+ $_SESSION['CreditItems']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight);
if ($k==1){
$RowStarter = 'class="EvenTableRows"';
@@ -323,7 +323,7 @@
}
- $DisplayLineTotal = locale_money_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces);
+ $DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces);
$j++;
echo '<td><input tabindex=' . $j . ' type="text" class="number" name="Price_' . $LnItm->LineNumber . '" maxlength=12 size=6 value=' . $LnItm->Price . '></td>
@@ -370,8 +370,8 @@
}
$TaxTotal += $TaxLineTotal;
- $DisplayTaxAmount = locale_money_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces);
- $DisplayGrossLineTotal = locale_money_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces);
+ $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces);
+ $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces);
if (!isset($_POST['ProcessCredit'])) {
echo '</td>';
@@ -392,7 +392,7 @@
if (!isset($_POST['ProcessCredit'])) {
echo '<tr>
<td colspan="3" class="number">' . _('Freight cost charged on invoice') . '</td>
- <td class="number">' . locale_money_format($_SESSION['Old_FreightCost'],$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
<td></td>
<td colspan="2" class="number">' . _('Credit Freight Cost') . '</td>
<td><input tabindex='.$j.' type="text" class="number" size="6" maxlength="6" name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>';
@@ -432,21 +432,21 @@
}
if (!isset($_POST['ProcessCredit'])) {
echo '</td>';
- echo '<td class="number">' . locale_money_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
- <td class="number">' . locale_money_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
+ echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
+ <td class="number">' . locale_number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td>
</tr>';
}
$TaxTotal += $FreightTaxTotal;
-$DisplayTotal = locale_money_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces);
+$DisplayTotal = locale_number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces);
if (!isset($_POST['ProcessCredit'])) {
echo '<tr>
<td colspan="7" class="number">' . _('Credit Totals') . '</td>
<td class="number"><hr><b>' . $DisplayTotal . '</b><hr></td>
<td colspan=2></td>
- <td class="number"><hr><b>' . locale_money_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '<hr></td>
- <td class="number"><hr><b>' . locale_money_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b><hr></td>
+ <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '<hr></td>
+ <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b><hr></td>
</tr></table>';
}
$DefaultDispatchDate = Date($_SESSION['DefaultDateFormat']);
@@ -530,7 +530,7 @@
/*Now need to update the invoice DebtorTrans record for the amount to be allocated and if the invoice is now settled*/
$SQL = "UPDATE debtortrans
- SET alloc = alloc + " . filter_number_format($Allocate_amount) . ",
+ SET alloc = alloc + " . $Allocate_amount . ",
settled='" . $SettledInvoice . "'
WHERE transno = '" . $_SESSION['ProcessingCredit'] . "'
AND type=10";
@@ -568,12 +568,12 @@
'Inv-" . $_SESSION['ProcessingCredit'] . "',
'" . $_SESSION['CreditItems']->DefaultSalesType . "',
'" . $_SESSION['CreditItems']->OrderNo . "',
- '" . -filter_number_format($_SESSION['CreditItems']->total) . "',
- '" . -filter_number_format($TaxTotal) . "',
- '" . -filter_number_format($_SESSION['CreditItems']->FreightCost) . "',
+ '" . -$_SESSION['CreditItems']->total . "',
+ '" . -$TaxTotal . "',
+ '" . -$_SESSION['CreditItems']->FreightCost . "',
'" . $_SESSION['CurrencyRate'] . "',
'" . DB_escape_string($_POST['CreditText']) . "',
- '" . -filter_number_format($Allocate_amount) . "',
+ '" . -$Allocate_amount . "',
'" . $Settled . "')";
$ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The customer credit note transaction could not be added to the database because');
@@ -591,7 +591,7 @@
taxamount)
VALUES ('" . $CreditTransID . "',
'" . $TaxAuthID . "',
- '" . -filter_number_format($TaxAmount/$_SESSION['CurrencyRate']) . "')";
+ '" . -$TaxAmount/$_SESSION['CurrencyRate'] . "')";
$ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction taxes records could not be inserted because');
$DbgMsg = _('The following SQL to insert the debtor transaction taxes record was used');
@@ -604,7 +604,7 @@
transid_allocfrom,
transid_allocto,
datealloc)
- VALUES ('" . filter_number_format($Allocate_amount) . "',
+ VALUES ('" . $Allocate_amount . "',
'" . $CreditTransID . "',
'" . $_SESSION['CreditItems']->TransID . "',
'" . Date('Y-m-d') . "')";
@@ -653,7 +653,7 @@
/* some want this some do not */
$SQL = "UPDATE salesorderdetails
- SET qtyinvoiced = qtyinvoiced - " . filter_number_format($CreditLine->QtyDispatched) . ",
+ SET qtyinvoiced = qtyinvoiced - " . $CreditLine->QtyDispatched . ",
completed=0
WHERE orderno = '" . $_SESSION['CreditItems']->OrderNo . "'
AND stkcode = '" . $CreditLine->StockID . "'
@@ -668,7 +668,7 @@
if ($MBFlag=='B' OR $MBFlag=='M') {
$SQL = "UPDATE locstock
- SET locstock.quantity = locstock.quantity + " . filter_number_format($CreditLine->QtyDispatched) . "
+ SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . "
WHERE locstock.stockid = '" . $CreditLine->StockID . "'
AND loccode = '" . $_SESSION['CreditItems']->Location . "'";
@@ -751,10 +751,10 @@
'" . $_SESSION['CreditItems']->Branch . "',
'" . $PeriodNo . "',
'" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "',
- '" . filter_number_format($AssParts['quantity'] * $CreditLine->QtyDispatched) . "',
+ '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "',
'" . $AssParts['standard'] . "',
0,
- '" . filter_number_format($QtyOnHandPrior + ($AssParts['quantity'] * filter_number_format($CreditLine->QtyDispatched))) . "'
+ '" . $QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched) . "'
)";
} else {
@@ -779,7 +779,7 @@
'" . $_SESSION[...
[truncated message content] |