From: <te...@us...> - 2015-03-30 09:54:18
|
Revision: 7242 http://sourceforge.net/p/web-erp/reponame/7242 Author: tehonu Date: 2015-03-30 09:54:16 +0000 (Mon, 30 Mar 2015) Log Message: ----------- Bug fix on gross profit calculation Modified Paths: -------------- trunk/GLTagProfit_Loss.php Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2015-03-30 00:04:01 UTC (rev 7241) +++ trunk/GLTagProfit_Loss.php 2015-03-30 09:54:16 UTC (rev 7242) @@ -526,7 +526,7 @@ echo '<tr> <th colspan="9"> <div class="centre"> - <h2><b>' . _('Statement of Income and Expenditure for Tag'). ' ' . $myrow[0]._('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</b></h2> + <h2><b>' . _('Statement of Income and Expenditure for Tag'). ' ' . $myrow[0]. ' ' . _('during the'). ' ' . $NumberOfMonths . ' ' . _('months to'). ' ' . $PeriodToDate . '</b></h2> </div> </th> </tr>'; @@ -553,11 +553,9 @@ $SectionPrdBudget= 0; $PeriodProfitLoss = 0; - $PeriodProfitLoss = 0; $PeriodLYProfitLoss = 0; $PeriodBudgetProfitLoss = 0; - $ActGrp =''; $ParentGroups = array(); $Level = 0; @@ -687,10 +685,10 @@ <td></td> <td class="number">%s</td> </tr>', - locale_number_format($TotalIncome - $SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); + locale_number_format($TotalIncome + $SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); if ($TotalIncome !=0){ - $PrdGPPercent = 100*($TotalIncome - $SectionPrdActual)/$TotalIncome; + $PrdGPPercent = 100*($TotalIncome + $SectionPrdActual)/$TotalIncome; } else { $PrdGPPercent =0; } |