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

SF.net SVN: ledger-smb: [1449] trunk/LedgerSMB/OE.pm



Revision: 1449
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1449&view=rev
Author:   einhverfr
Date:     2007-07-27 10:01:13 -0700 (Fri, 27 Jul 2007)

Log Message:
-----------
Fixing a large number of SQL errors in certain circumstances

Modified Paths:
--------------
    trunk/LedgerSMB/OE.pm

Modified: trunk/LedgerSMB/OE.pm
===================================================================
--- trunk/LedgerSMB/OE.pm	2007-07-27 16:57:28 UTC (rev 1448)
+++ trunk/LedgerSMB/OE.pm	2007-07-27 17:01:13 UTC (rev 1449)
@@ -2105,7 +2105,7 @@
     my $query = qq|
 		INSERT INTO inventory
 			(warehouse_id, parts_id, qty, shippingdate, employee_id)
-		VALUES (?, ?, ?, '$shippingdate', $form->{employee_id})|;
+		VALUES (?, ?, ?, ?, ?)|;
     $sth = $dbh->prepare($query) || $form->dberror($query);
 
     my $qty;
@@ -2128,7 +2128,8 @@
             # from warehouse
             if ( $form->{"warehouse_id_$i"} ) {
                 $sth->execute( $form->{"warehouse_id_$i"},
-                    $form->{"id_$i"}, $qty * -1 )
+                    $form->{"id_$i"}, $qty * -1, $shippingdate, 
+                    $form->{employee_id})
                   || $form->dberror;
                 $sth->finish;
             }


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