Einkaufsrechnungen: Vor dem Stornieren die Daten aus der Datenbank holen und nicht...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 5 Mar 2007 16:15:53 +0000 (16:15 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 5 Mar 2007 16:15:53 +0000 (16:15 +0000)
SL/IR.pm
bin/mozilla/ir.pl

index dc582ef..553e782 100644 (file)
--- a/SL/IR.pm
+++ b/SL/IR.pm
@@ -100,6 +100,8 @@ sub post_invoice {
     ? $exchangerate
     : $form->parse_amount($myconfig, $form->{exchangerate});
 
+  $form->{exchangerate} = 1 unless ($form->{exchangerate} * 1);
+
   for my $i (1 .. $form->{rowcount}) {
     $form->{"qty_$i"} = $form->parse_amount($myconfig, $form->{"qty_$i"});
     
index e088def..f5fd32f 100644 (file)
@@ -976,6 +976,10 @@ sub storno {
     $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} = "";