X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=aa6df6d615f3a909f62a764e982ed4969463ddac;hb=e0ad5757c7f9551f808b55c114ff8892f09689f4;hp=dd1d8e2c7c372fe08c3c12b647ffa4f38849ddc5;hpb=4ba806ac9da862d3a8d96d2f560696c22492a622;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index dd1d8e2c7..aa6df6d61 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -240,7 +240,7 @@ sub order_links { $form->{"$form->{vc}_id"} ||= $form->{"all_$form->{vc}"}->[0]->{id} if $form->{"all_$form->{vc}"}; $form->backup_vars(qw(payment_id language_id taxzone_id salesman_id taxincluded cp_id intnotes shipto_id currency)); - $form->{shipto} = 1 if $form->{id}; + $form->{shipto} = 1 if $form->{id} || $form->{convert_from_oe_ids}; # get customer / vendor IR->get_vendor(\%myconfig, \%$form) if $form->{type} =~ /(purchase_order|request_quotation)/; @@ -536,11 +536,13 @@ sub update { set_headings($form->{"id"} ? "edit" : "add"); - map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call; $form->{update} = 1; &check_name($form->{vc}); + if (!$form->{forex}) { # read exchangerate from input field (not hidden) + map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } qw(exchangerate) unless $recursive_call; + } my $buysell = 'buy'; $buysell = 'sell' if ($form->{vc} eq 'vendor'); $form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{transdate}, $buysell);