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

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



Revision: 2025
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2025&view=rev
Author:   einhverfr
Date:     2007-12-31 12:30:08 -0800 (Mon, 31 Dec 2007)

Log Message:
-----------
* Committed Tony Brummett's patch for last/avg costs
* Committing fix for User.pm error handling (1860699)

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

Modified: branches/1.2/LedgerSMB/IR.pm
===================================================================
--- branches/1.2/LedgerSMB/IR.pm	2007-12-31 18:23:53 UTC (rev 2024)
+++ branches/1.2/LedgerSMB/IR.pm	2007-12-31 20:30:08 UTC (rev 2025)
@@ -798,7 +798,7 @@
 			   SET avgcost = avgcost($item),
 			       lastcost = lastcost($item)
 			 WHERE id = $item|;
-        $dbh->prepare($query) || $form->dberror($query);
+        $dbh->do($query) || $form->dberror($query);
     }
     my $rc = $dbh->commit;
 

Modified: branches/1.2/LedgerSMB/User.pm
===================================================================
--- branches/1.2/LedgerSMB/User.pm	2007-12-31 18:23:53 UTC (rev 2024)
+++ branches/1.2/LedgerSMB/User.pm	2007-12-31 20:30:08 UTC (rev 2025)
@@ -35,6 +35,7 @@
 use LedgerSMB::Sysconfig;
 use LedgerSMB::Session;
 use Data::Dumper;
+use LedgerSMB::Form;
 
 sub new {
 
@@ -825,8 +826,11 @@
         }
         else {
 
-            my ($employeenumber) =
-              Form::update_defaults( "", \%$self, "employeenumber", $dbh );
+            my $form = {dbh => $dbh};
+            bless($form, 'Form');
+
+            my ($employeenumber) = $form->update_defaults(\%$self, "employeenumber");
+
             $query = qq|
 				INSERT INTO employee 
 				            (login, employeenumber, name, 


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