X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/5e59cc54dd5e2d69f71828541795a29ed51a96f0..379aa61a9855bd34637fd438cb2e2f2247129b68:/bin/mozilla/ir.pl diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 78a0333e3..f5fd32f58 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -881,7 +881,7 @@ sub update { } $i = $form->{rowcount}; - $exchangerate = ($form->{exchangerate}) ? $form->{exchangerate} : 1; + $exchangerate = ($form->{exchangerate} * 1) ? $form->{exchangerate} * 1 : 1; if ( ($form->{"partnumber_$i"} eq "") && ($form->{"description_$i"} eq "") @@ -972,6 +972,14 @@ sub storno { $form->error($locale->text('Cannot storno storno invoice!')); } + if (IR->has_storno(\%myconfig, $form)) { + $form->error($locale->text("Invoice has already been storno'd!")); + } + + invoice_links(); + prepare_invoice(); + relink_accounts(); + $form->{storno_id} = $form->{id}; $form->{storno} = 1; $form->{id} = "";