]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge branch 'master' of ssh://lx-office.linet-services.de/~/lx-office-erp
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 29 Dec 2010 10:21:59 +0000 (11:21 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 29 Dec 2010 10:21:59 +0000 (11:21 +0100)
1  2 
bin/mozilla/is.pl

diff --combined bin/mozilla/is.pl
index f4ae1c9520e74ed5ca6bbeb880a9ddfa1fc3682d,b5e0927fe03b5b6ab342a180ad35167af78ff9a6..7ac9f4d49a6432a83359c09f70085a90ee55a866
@@@ -155,6 -155,14 +155,6 @@@ sub invoice_links 
      $ref->{name} = $form->quote($ref->{name});
    }
  
 -  # Load data for a specific order and update form fields
 -  my $order_data = OE->get_order_data_by_ordnumber(%$form) if $form->{ordnumber};
 -
 -  # Copy the fields we need to %form
 -  for my $key (qw(payment_id salesman_id orddate taxzone_id quonumber)) {
 -    $form->{$key} = $order_data->{$key};
 -  }
 -
    $form->restore_vars(qw(id));
  
    IS->retrieve_invoice(\%myconfig, \%$form);
@@@ -505,7 -513,11 +505,11 @@@ sub update 
  
      my $rows = scalar @{ $form->{item_list} };
  
-     $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
+     # Falls kein Kundenrabatt vorhanden ist, den aktuellen Rabatt nicht mit 0% überschreiben,
+     # da hier der Anwender schon manual einen Wert eingetragen haben könnte (analog zu qty) Bugfix: 1412
+     if ($form->{customer_discount}){
+       $form->{"discount_$i"} = $form->format_amount(\%myconfig, $form->{customer_discount} * 100);
+     }
  
      if ($rows) {
        $form->{"qty_$i"} = ($form->{"qty_$i"} * 1) ? $form->{"qty_$i"} : 1;