X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/db68b6fd72b9f0d7d8be953746c0e7d6154f5eaf..379aa61a9855bd34637fd438cb2e2f2247129b68:/bin/mozilla/ir.pl diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 1515fa450..f5fd32f58 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -558,7 +558,8 @@ sub form_footer { $tax .= qq| - $form->{"${item}_description"} + $form->{"${item}_description"} | + . $form->{"${item}_rate"} * 100 .qq|% $form->{"${item}_total"} |; @@ -599,7 +600,8 @@ sub form_footer { $tax .= qq| - Enthaltene $form->{"${item}_description"} + Enthaltene $form->{"${item}_description"} | + . $form->{"${item}_rate"} * 100 .qq|% $form->{"${item}_total"} @@ -879,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 "") @@ -970,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} = "";