[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [715] branches/1.2/LedgerSMB



Revision: 715
          http://svn.sourceforge.net/ledger-smb/?rev=715&view=rev
Author:   einhverfr
Date:     2006-12-04 18:58:58 -0800 (Mon, 04 Dec 2006)

Log Message:
-----------
Fixing all possibilities of bug-1607680-like errors in 1.2

Modified Paths:
--------------
    branches/1.2/LedgerSMB/AA.pm
    branches/1.2/LedgerSMB/CP.pm

Modified: branches/1.2/LedgerSMB/AA.pm
===================================================================
--- branches/1.2/LedgerSMB/AA.pm	2006-12-04 21:13:01 UTC (rev 714)
+++ branches/1.2/LedgerSMB/AA.pm	2006-12-05 02:58:58 UTC (rev 715)
@@ -346,10 +346,10 @@
 				            transdate, fx_transaction)
 				     VALUES (?, (SELECT id FROM chart
 					          WHERE accno = ?),
-				            ? * ?, ?, ?)|;
+				            ?, ?, ?)|;
 
 			@queryargs = ($form->{id}, $ref->{accno}, 
-				$ref->{amount}, $ml, $form->{transdate}, 
+				$ref->{amount} * $ml, $form->{transdate}, 
 				$ref->{fx_transaction});
 			$dbh->prepare($query)->execute(@queryargs) 
 				|| $form->dberror($query);

Modified: branches/1.2/LedgerSMB/CP.pm
===================================================================
--- branches/1.2/LedgerSMB/CP.pm	2006-12-04 21:13:01 UTC (rev 714)
+++ branches/1.2/LedgerSMB/CP.pm	2006-12-05 02:58:58 UTC (rev 715)
@@ -419,10 +419,10 @@
 				            amount)
 				     VALUES (?, ?, 
 				            ?, 
-				            ? * ?)|;
+				            ?)|;
 			$sth = $dbh->prepare($query);
 			$sth->execute($form->{"id_$i"}, $id, 
-				$form->{date_paid}, $amount, $ml) 
+				$form->{date_paid}, $amount * $ml) 
 					|| $form->dberror($query, 'CP.pm', 427);
 
 			# add payment
@@ -433,11 +433,12 @@
 				     VALUES (?, (SELECT id 
 				                   FROM chart
 				                  WHERE accno = ?),
-				 	    ?, ? * ? * -1, ?, ?)|;
+				 	    ?, ?, ?, ?)|;
 			$sth = $dbh->prepare($query);
 			$sth->execute(
 				$form->{"id_$i"}, $paymentaccno, 
-				$form->{datepaid}, $form->{"paid_$i"}, $ml,
+				$form->{datepaid}, 
+				$form->{"paid_$i"} * $ml * -1,
 				$form->{source}, $form->{memo})
 					|| $form->dberror(
 						$query, 'CP.pm', 444);
@@ -458,12 +459,12 @@
 					     VALUES (?, (SELECT id 
 					                   FROM chart
 					                  WHERE accno = ?),
-					             ?, ? * ? * -1, '0', '1', 
+					             ?, ?, '0', '1', 
 					             ?)|;
 				$sth = $dbh->prepare($query);
 				$sth->execute(
 					$form->{"id_$i"}, $paymentaccno,
-					$form->{datepaid}, $amount, $ml, 
+					$form->{datepaid}, $amount * $ml * -1, 
 					$form->{source})
 						|| $form->dberror(
 							$query, 'CP.pm', 470);
@@ -693,12 +694,12 @@
 				INSERT INTO acc_trans 
 				            (trans_id, chart_id, transdate, 
 				            amount)
-				     VALUES (?, ?, ?, ? * ?)|;
+				     VALUES (?, ?, ?, ?)|;
 
 			$sth = $dbh->prepare($query);
 			$sth->execute(
 				$form->{"id_$i"}, $id, $form->{datepaid},
-				$amount, $ml)
+				$amount * $ml)
 					|| $form->dberror($query, 'CP.pm', 
 						701);
 
@@ -715,12 +716,13 @@
 				INSERT INTO acc_trans 
 				            (trans_id, chart_id, transdate,
 				            amount, source, memo)
-				    VALUES (?, ?, ?, ? * ? * -1, ?, ?)|;
+				    VALUES (?, ?, ?, ?, ?, ?)|;
 
 			$sth = $dbh->prepare($query);
 			$sth->execute(
 				$form->{"id_$i"}, $accno_id, $form->{datepaid},
-				$paid, $ml, $form->{source}, $form->{memo})
+				$paid * $ml * -1, $form->{source}, 
+				$form->{memo})
 					|| $form->dberror($query, 'CP.pm', 
 						723);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.