X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/35285a5be7de15d43aeb6feb04740aaf46d45c8b..f7b15d4334848fad1bcd0b569eff5139f9a6ba4d:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index 510cc5d29..e5ae896e5 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -25,7 +25,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Accounts Receivable module backend routines @@ -452,7 +453,8 @@ sub delete_transaction { # acc_trans entries are deleted by database triggers. my $query = qq|DELETE FROM ar WHERE id = ?|; do_query($form, SL::DB->client->dbh, $query, $form->{id}); - }); + 1; + }) or do { die SL::DB->client->error }; $main::lxdebug->leave_sub(); @@ -656,7 +658,7 @@ sub get_transdate { my ($self, $myconfig, $form) = @_; # connect to database - my $dbh = $form->dbconnect($myconfig); + my $dbh = SL::DB->client->dbh; my $query = "SELECT COALESCE(" . @@ -665,8 +667,6 @@ sub get_transdate { " current_date)"; ($form->{transdate}) = $dbh->selectrow_array($query); - $dbh->disconnect; - $main::lxdebug->leave_sub(); }