]> wagnertech.de Git - kivitendo-erp.git/blobdiff - bin/mozilla/ir.pl
Einkaufsrechnungen: Vor dem Stornieren die Daten aus der Datenbank holen und nicht...
[kivitendo-erp.git] / bin / mozilla / ir.pl
index 1515fa450dda1133dbb539fac95b397fc21d04a2..f5fd32f58d5f55033cf48f7adc2fc9a348495813 100644 (file)
@@ -558,7 +558,8 @@ sub form_footer {
 
         $tax .= qq|
                <tr>
-                 <th align=right>$form->{"${item}_description"}</th>
+                 <th align=right>$form->{"${item}_description"}&nbsp;|
+                    . $form->{"${item}_rate"} * 100 .qq|%</th>
                  <td align=right>$form->{"${item}_total"}</td>
                </tr>
 |;
@@ -599,7 +600,8 @@ sub form_footer {
 
         $tax .= qq|
              <tr>
-               <th align=right>Enthaltene $form->{"${item}_description"}</th>
+               <th align=right>Enthaltene $form->{"${item}_description"}&nbsp;|
+                                   . $form->{"${item}_rate"} * 100 .qq|%</th>
                <td align=right>$form->{"${item}_total"}</td>
              </tr>
              <tr>
@@ -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} = "";