X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fis.pl;h=7ac9f4d49a6432a83359c09f70085a90ee55a866;hb=c9902d7658d0cacdf665971b32de0e054637efd0;hp=b38cfd1d5446b3793fcd32ff9c4fc151990c308f;hpb=27557af4df09feccf6cb4e40b06af01102d029b1;p=kivitendo-erp.git diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index b38cfd1d5..7ac9f4d49 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -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); @@ -513,7 +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;