From: <Ex...@us...> - 2012-02-14 02:46:50
|
Revision: 4894 http://web-erp.svn.sourceforge.net/web-erp/?rev=4894&view=rev Author: ExsonQu Date: 2012-02-14 02:46:43 +0000 (Tue, 14 Feb 2012) Log Message: ----------- Add Round() function to round the amount of work order variance with $_SESSION['CompanyRecord']['decimalplaces'] Modified Paths: -------------- trunk/WorkOrderCosting.php Modified: trunk/WorkOrderCosting.php =================================================================== --- trunk/WorkOrderCosting.php 2012-02-13 15:40:18 UTC (rev 4893) +++ trunk/WorkOrderCosting.php 2012-02-14 02:46:43 UTC (rev 4894) @@ -357,7 +357,7 @@ '" . $PeriodNo . "', '" . $WORow['materialuseagevarac'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of variance') . "', - '" . (-$TotalVariance*$ShareProportion*(1-$ProportionOnHand)) . "')"; + '" .round((-$TotalVariance*$ShareProportion*(1-$ProportionOnHand)),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the work order variance could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -378,7 +378,7 @@ '" . $PeriodNo . "', '" . $WORow['stockact'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of variance') . "', - '" . (-$TotalVariance*$ShareProportion*$ProportionOnHand) . "')"; + '" . round((-$TotalVariance*$ShareProportion*$ProportionOnHand),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the work order variance could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -397,7 +397,7 @@ '" . $PeriodNo . "', '" . $WORow['wipact'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of variance') . "', - '" . ($TotalVariance*$ShareProportion) . "')"; + '" . round(($TotalVariance*$ShareProportion),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the WIP side of the work order variance posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -434,7 +434,7 @@ '" . $PeriodNo . "', '" . $WORow['materialuseagevarac'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of usage variance') . "', - '" . (-$TotalUsageVar*$ShareProportion) . "')"; + '" . round((-$TotalUsageVar*$ShareProportion),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the material usage variance could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -453,7 +453,7 @@ '" . $PeriodNo . "', '" . $WORow['wipact'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of usage variance') . "', - '" . ($TotalUsageVar*$ShareProportion) . "')"; + '" . round(($TotalUsageVar*$ShareProportion),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the WIP side of the usage variance posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -476,7 +476,7 @@ '" . $PeriodNo . "', '" . $WORow['purchpricevaract'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of cost variance') . "', - '" . (-$TotalCostVar*$ShareProportion) . "')"; + '" . round((-$TotalCostVar*$ShareProportion),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the cost variance could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -495,7 +495,7 @@ '" . $PeriodNo . "', '" . $WORow['wipact'] . "', '" . $_POST['WO'] . ' - ' . $WORow['stockid'] . ' ' . _('share of cost variance') . "', - '" . ($TotalCostVar*$ShareProportion) . "')"; + '" . round(($TotalCostVar*$ShareProportion),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL posting for the WIP side of the cost variance posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -551,4 +551,4 @@ </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |