return $rc;
}
+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 ap WHERE id = ?|;
+ my ($result) = selectrow_query($form, $dbh, $query, $form->{id});
+
+ $dbh->disconnect();
+
+ $main::lxdebug->leave_sub();
+
+ return $result;
+}
+
1;
$form->error($locale->text('Cannot storno storno invoice!'));
}
+ if (IR->has_storno(\%myconfig, $form)) {
+ $form->error($locale->text("Invoice has already been storno'd!"));
+ }
+
$form->{storno_id} = $form->{id};
$form->{storno} = 1;
$form->{id} = "";
'Invoice Number' => 'Rechnungsnummer',
'Invoice Number missing!' => 'Rechnungsnummer fehlt!',
'Invoice deleted!' => 'Rechnung gelöscht!',
+ 'Invoice has already been storno\'d!' => 'Diese Rechnung wurde bereits storniert.',
'Item not on file!' => 'Dieser Artikel ist nicht in der Datenbank!',
'Jan' => 'Jan',
'January' => 'Januar',