diff options
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/IR.pm | 2 | ||||
-rwxr-xr-x | LedgerSMB/User.pm | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm index 69b20aea..35a0a07e 100755 --- a/LedgerSMB/IR.pm +++ b/LedgerSMB/IR.pm @@ -798,7 +798,7 @@ sub post_invoice { 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; diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 7ef25547..e935583d 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -35,6 +35,7 @@ package LedgerSMB::User; use LedgerSMB::Sysconfig; use LedgerSMB::Session; use Data::Dumper; +use LedgerSMB::Form; sub new { @@ -825,8 +826,11 @@ sub save_member { } 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, |