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

SF.net SVN: ledger-smb: [870] branches/1.2/LedgerSMB/AM.pm



Revision: 870
          http://svn.sourceforge.net/ledger-smb/?rev=870&view=rev
Author:   einhverfr
Date:     2007-03-09 15:15:17 -0800 (Fri, 09 Mar 2007)

Log Message:
-----------
Fixing error when deleting accounts...

Modified Paths:
--------------
    branches/1.2/LedgerSMB/AM.pm

Modified: branches/1.2/LedgerSMB/AM.pm
===================================================================
--- branches/1.2/LedgerSMB/AM.pm	2007-03-09 17:22:09 UTC (rev 869)
+++ branches/1.2/LedgerSMB/AM.pm	2007-03-09 23:15:17 UTC (rev 870)
@@ -251,10 +251,10 @@
 	# set inventory_accno_id, income_accno_id, expense_accno_id to defaults
 	$query = qq|
 		UPDATE parts
-		   SET inventory_accno_id = (SELECT value
+		   SET inventory_accno_id = (SELECT value::int
 		                               FROM defaults
 					      WHERE setting_key = 
-							'inventory_accno_id')
+							'inventory_accno_id')::
 		 WHERE inventory_accno_id = ?|;
 
 	$sth = $dbh->prepare($query);
@@ -263,7 +263,7 @@
 	for (qw(income_accno_id expense_accno_id)){
 		$query = qq|
 			UPDATE parts
-			   SET $_ = (SELECT value
+			   SET $_ = (SELECT value::int
 			               FROM defaults
 			              WHERE setting_key = '$_')
 			 WHERE $_ = ?|;


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