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

SF.net SVN: ledger-smb: [1491] trunk/LedgerSMB/CT.pm



Revision: 1491
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1491&view=rev
Author:   einhverfr
Date:     2007-09-01 14:50:10 -0700 (Sat, 01 Sep 2007)

Log Message:
-----------
Fixing tax selection for creating new customers in old code

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

Modified: trunk/LedgerSMB/CT.pm
===================================================================
--- trunk/LedgerSMB/CT.pm	2007-09-01 18:29:22 UTC (rev 1490)
+++ trunk/LedgerSMB/CT.pm	2007-09-01 21:50:10 UTC (rev 1491)
@@ -329,12 +329,13 @@
         if ( $form->{"tax_$item"} ) {
             $query = qq|
 				INSERT INTO customertax (customer_id, chart_id)
-				     VALUES (?, (SELECT id
+				     VALUES (currval('entity_credit_account_id_seq'), 
+				                 (SELECT id
 				                   FROM chart
 				                  WHERE accno = ?))|;
 
             $sth = $dbh->prepare($query);
-            $sth->execute( $form->{id}, $item )
+            $sth->execute( $item )
               || $form->dberror($query);
         }
     }


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