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

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



Revision: 1077
          http://svn.sourceforge.net/ledger-smb/?rev=1077&view=rev
Author:   christopherm
Date:     2007-04-17 13:08:22 -0700 (Tue, 17 Apr 2007)

Log Message:
-----------
Fixing vendor invoice issue where * -1 in prepared query caused type problems

Modified Paths:
--------------
    branches/1.2/LedgerSMB/IR.pm
    branches/1.2-experimental/LedgerSMB/IR.pm

Modified: branches/1.2/LedgerSMB/IR.pm
===================================================================
--- branches/1.2/LedgerSMB/IR.pm	2007-04-17 20:05:55 UTC (rev 1076)
+++ branches/1.2/LedgerSMB/IR.pm	2007-04-17 20:08:22 UTC (rev 1077)
@@ -274,7 +274,7 @@
 				   SET trans_id = ?,
 				       parts_id = ?,
 				       description = ?,
-				       qty = ? * -1,
+				       qty = ?,
 				       sellprice = ?,
 				       fxsellprice = ?,
 				       discount = ?,
@@ -288,7 +288,7 @@
             $sth = $dbh->prepare($query);
             $sth->execute(
                 $form->{id},               $form->{"id_$i"},
-                $form->{"description_$i"}, $form->{"qty_$i"},
+                $form->{"description_$i"}, $form->{"qty_$i"} * -1,
                 $form->{"sellprice_$i"},   $fxsellprice,
                 $form->{"discount_$i"},    $allocated,
                 $form->{"unit_$i"},        $form->{"deliverydate_$i"},

Modified: branches/1.2-experimental/LedgerSMB/IR.pm
===================================================================
--- branches/1.2-experimental/LedgerSMB/IR.pm	2007-04-17 20:05:55 UTC (rev 1076)
+++ branches/1.2-experimental/LedgerSMB/IR.pm	2007-04-17 20:08:22 UTC (rev 1077)
@@ -275,7 +275,7 @@
 				   SET trans_id = ?,
 				       parts_id = ?,
 				       description = ?,
-				       qty = ? * -1,
+				       qty = ?,
 				       sellprice = ?,
 				       fxsellprice = ?,
 				       discount = ?,
@@ -289,7 +289,7 @@
 			$sth = $dbh->prepare($query);
 			$sth->execute(
 				$form->{id},  $form->{"id_$i"}, 
-				$form->{"description_$i"}, $form->{"qty_$i"},
+				$form->{"description_$i"}, $form->{"qty_$i"} * -1,
 				$form->{"sellprice_$i"}, $fxsellprice,
 				$form->{"discount_$i"}, $allocated, 
 				$form->{"unit_$i"}, $form->{"deliverydate_$i"},


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