From: <Ex...@us...> - 2012-05-08 05:01:21
|
Revision: 5321 http://web-erp.svn.sourceforge.net/web-erp/?rev=5321&view=rev Author: ExsonQu Date: 2012-05-08 05:01:15 +0000 (Tue, 08 May 2012) Log Message: ----------- 8/05/2012 Exson: Fixed the bug of Credit_Invoice.php the total will be doubled when use Update button. The bug is introduced for a fix of directly proceed the Credit. Reported by PakRichard. Modified Paths: -------------- trunk/Credit_Invoice.php Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-05-08 04:57:50 UTC (rev 5320) +++ trunk/Credit_Invoice.php 2012-05-08 05:01:15 UTC (rev 5321) @@ -292,14 +292,14 @@ $k=0; //row colour counter $j=0; //row counter -if(isset($_POST['AutoUpdate'])){//clear the $_SESSION value when users have not click update button and directly process the credit note +if(isset($_POST['AutoUpdate']) and !isset($_POST['Update'])){//clear the $_SESSION value when users have not click update button and directly process the credit note $_SESSION['CreditItems']->total = 0; $_SESSION['CreditItems']->totalVolume = 0; $_SESSION['CreditItems']->totalWeight = 0; } foreach ($_SESSION['CreditItems']->LineItems as $LnItm) { $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - if (isset($_POST['AutoUpdate'])){//If users push Process Credit button instead of Update button, use this variable to update related information + if (isset($_POST['AutoUpdate']) and !isset($_POST['Update'])){//If users push Process Credit button instead of Update button, use this variable to update related information $_SESSION['CreditItems']->total +=$LineTotal; $_SESSION['CreditItems']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); $_SESSION['CreditItems']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |