X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fdo.pl;h=796118a120d60f9cee60a4b5544f58f79266eca5;hb=92331b8e3417f4a28db17f7af1b8154e985c4da1;hp=de5f1167edeee1712987f917442e8c7cefa3ec72;hpb=f4df09ae9d5e755ebef5f7807d83a9a8623c606c;p=kivitendo-erp.git diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index de5f1167e..796118a12 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -179,9 +179,9 @@ sub order_links { # get customer / vendor if ($form->{vc} eq 'vendor') { IR->get_vendor(\%myconfig, \%$form); + $form->{discount} = $form->{vendor_discount}; } else { IS->get_customer(\%myconfig, \%$form); - # OFFEN tritt bug 1284 auch bei vendor auf? $form->{discount} = $form->{customer_discount}; } @@ -733,9 +733,9 @@ sub invoice { for my $i (1 .. $form->{rowcount}) { # für bug 1284 - if ($form->{discount}){ # Falls wir einen Kundenrabatt haben + if ($form->{discount}){ # Falls wir einen Lieferanten-/Kundenrabatt haben # und keinen anderen discount wert an $i ... - $form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir den kundenrabatt + $form->{"discount_$i"} ||= $form->{discount}*100; # ... nehmen wir diesen Rabatt } map { $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"} } qw(ship qty sellprice listprice lastcost basefactor); } @@ -1310,6 +1310,7 @@ sub transfer_out { foreach my $request (@{ DO->unpack_stock_information('packed' => $form->{"stock_out_$i"}) }) { $request->{parts_id} = $form->{"id_$i"}; $request->{base_qty} = $request->{qty} * $units->{$request->{unit}}->{factor} / $base_unit_factor; + $request->{project_id} = $form->{"project_id_$i"} ? $form->{"project_id_$i"} : $form->{globalproject_id}; my $map_key = join '--', ($form->{"id_$i"}, @{$request}{qw(warehouse_id bin_id chargenumber bestbefore)}); @@ -1383,7 +1384,6 @@ sub transfer_out { ::end_of_request(); } } - DO->transfer_in_out('direction' => 'out', 'requests' => \@all_requests);