From: <tim...@us...> - 2010-09-06 07:15:26
|
Revision: 3707 http://web-erp.svn.sourceforge.net/web-erp/?rev=3707&view=rev Author: tim_schofield Date: 2010-09-06 07:15:20 +0000 (Mon, 06 Sep 2010) Log Message: ----------- Correct the roundings so that the double entry balances Modified Paths: -------------- trunk/SupplierInvoice.php trunk/doc/Change.log.html Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2010-09-05 14:55:54 UTC (rev 3706) +++ trunk/SupplierInvoice.php 2010-09-06 07:15:20 UTC (rev 3707) @@ -650,7 +650,7 @@ " . $PeriodNo . ', ' . $_SESSION['SuppTrans']->GRNAct . ", '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef . "', - " . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . ')'; + " . round($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate,2) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the shipment') . ' ' . $ShiptChg->ShiptRef . ' ' . _('could not be added because'); @@ -659,7 +659,7 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - $LocalTotal += $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate; + $LocalTotal += round($ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate,2); } $sql='SELECT conversionfactor @@ -696,7 +696,7 @@ ' . $_SESSION['SuppTrans']->GRNAct . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv * $conversionfactor . ' @ ' . _('std cost of') . ' ' . $EnteredGRN->StdCostUnit . "', - " . $EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv * $conversionfactor . ')'; + " . round($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv * $conversionfactor,2) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -770,7 +770,7 @@ $InvoiceNo . ", '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $StockGLCode['purchpricevaract'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . ($EnteredGRN->This_QuantityInv * $conversionfactor-$TotalQuantityOnHand) . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $WriteOffToVariances . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -795,7 +795,7 @@ ' . $StockGLCode['stockact'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - number_format(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $conversionfactor / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . ($PurchPriceVar - $WriteOffToVariances) . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -841,7 +841,7 @@ $InvoiceNo . ", '" . $SQLInvoiceDate . "', " . $PeriodNo . ', ' . $StockGLCode['purchpricevaract'] . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var of') . ' ' . - number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . + round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $PurchPriceVar . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -869,7 +869,7 @@ ' . $EnteredGRN->GLCode . ", '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemDescription . ' x ' . $EnteredGRN->This_QuantityInv . ' x ' . _('price var') . - ' ' . number_format(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + ' ' . round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', " . $PurchPriceVar . ')'; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -1107,4 +1107,4 @@ echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-09-05 14:55:54 UTC (rev 3706) +++ trunk/doc/Change.log.html 2010-09-06 07:15:20 UTC (rev 3707) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>06/09/10 Tim: SupplierInvoice.php - Correct the roundings so that the double entry balances</p> <p>05/09/10 Tim: PO_AuthoriseMyOrders.php - Update correct status when language not English</p> <p>05/09/10 Tim: PcAssignCashToTab.php - Show authorised, notes, and receipt fields correctly. Changed to use DB_fetch_array() rather than DB_fetch_row().</p> <p>05/09/10 Tim: PDFStockTransListing.php - List stock transactions by transaction type.</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |