]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Rechnungsfunktionen gehören natürlich nach IS und nicht nach IC.
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 5 Mar 2007 09:45:21 +0000 (09:45 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 5 Mar 2007 09:45:21 +0000 (09:45 +0000)
SL/IC.pm
SL/IS.pm
bin/mozilla/is.pl

index d692b6a7588ac3a787e17770e057cb2abd9cf7ae..0112127d4e06bf570b247a027c3ad04b1424846e 100644 (file)
--- 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;
index 6b69bb24909367cfdb9fde72ad9aa7a25be21e74..e5d61193d0b12ec6450e330f77b0ce9e3b0317e2 100644 (file)
--- 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;
 
index 9c11c3400b653f42f6f18e364f48a8b266e4af6f..5bfa9deeb3a5c51eb146ce7e017120c22d44c2b6 100644 (file)
@@ -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!"));
   }