From 95155b0d6ddca4b62319edce20397a3ceebac346 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 5 Mar 2007 09:45:21 +0000 Subject: [PATCH] =?utf8?q?Rechnungsfunktionen=20geh=C3=B6ren=20nat=C3=BCrl?= =?utf8?q?ich=20nach=20IS=20und=20nicht=20nach=20IC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/IC.pm | 19 ------------------- SL/IS.pm | 19 +++++++++++++++++++ bin/mozilla/is.pl | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/SL/IC.pm b/SL/IC.pm index d692b6a75..0112127d4 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -1888,23 +1888,4 @@ sub retrieve_accounts { $main::lxdebug->leave_sub(); } -sub has_storno { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - $main::lxdebug->leave_sub() and return 0 unless ($form->{id}); - - my $dbh = $form->dbconnect($myconfig); - - my $query = qq|SELECT storno FROM ar WHERE id = ?|; - my ($result) = selectrow_query($form, $dbh, $query, $form->{id}); - - $dbh->disconnect(); - - $main::lxdebug->leave_sub(); - - return $result; -} - 1; diff --git a/SL/IS.pm b/SL/IS.pm index 6b69bb249..e5d61193d 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -2223,5 +2223,24 @@ sub get_pricegroups_for_parts { $main::lxdebug->leave_sub(); } +sub has_storno { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form) = @_; + + $main::lxdebug->leave_sub() and return 0 unless ($form->{id}); + + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT storno FROM ar WHERE id = ?|; + my ($result) = selectrow_query($form, $dbh, $query, $form->{id}); + + $dbh->disconnect(); + + $main::lxdebug->leave_sub(); + + return $result; +} + 1; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9c11c3400..5bfa9deeb 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1518,7 +1518,7 @@ sub storno { $form->error($locale->text('Cannot storno storno invoice!')); } - if (IC->has_storno(\%myconfig, $form)) { + if (IS->has_storno(\%myconfig, $form)) { $form->error($locale->text("Invoice has already been storno'd!")); } -- 2.20.1