X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/8e0f6e70f1acb084e6757ccd8b59221f78a2ff56..2ecfde54bd40a15f430010faa28ec81383e4eec6:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index 0e671bd38..86869f235 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -885,8 +885,8 @@ sub _close_quotations_rfqs { $query = qq|UPDATE oe SET closed = TRUE WHERE id IN (| . join(', ', ('?') x scalar @close_ids) . qq|)|; do_query($form, $dbh, $query, @close_ids); } - - }); + 1; + }) or do { die SL::DB->client->error }; $main::lxdebug->leave_sub(); } @@ -905,7 +905,7 @@ sub delete { unlink map { "$spool/$_" } @spoolfiles if $spool; 1; - }); + }) or do { die SL::DB->client->error }; $main::lxdebug->leave_sub(); @@ -1257,7 +1257,7 @@ sub order_details { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->get_standard_dbh; + my $dbh = SL::DB->client->dbh; my $query; my @values = (); my $sth; @@ -1605,8 +1605,6 @@ sub order_details { $form->{username} = $myconfig->{name}; - $dbh->disconnect; - $form->{delivery_term} = SL::DB::Manager::DeliveryTerm->find_by(id => $form->{delivery_term_id} || undef); $form->{delivery_term}->description_long($form->{delivery_term}->translated_attribute('description_long', $form->{language_id})) if $form->{delivery_term} && $form->{language_id};