From: Moritz Bunkus Date: Mon, 5 Mar 2007 09:45:21 +0000 (+0000) Subject: Rechnungsfunktionen gehören natürlich nach IS und nicht nach IC. X-Git-Tag: release-2.4.3^2~634 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/commitdiff_plain/95155b0d6ddca4b62319edce20397a3ceebac346?ds=sidebyside Rechnungsfunktionen gehören natürlich nach IS und nicht nach IC. --- 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!")); }