X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Foe.pl;h=aa6df6d615f3a909f62a764e982ed4969463ddac;hb=e0ad5757c7f9551f808b55c114ff8892f09689f4;hp=29012eb94a9735d69c71b4451b1bd88bc4681eee;hpb=c29f804f6abc440789b0c89ff4d7fc171fcf5bda;p=kivitendo-erp.git diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 29012eb94..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); @@ -1849,6 +1851,9 @@ sub delivery_order { map { $form->{$_} = $old_values{$_} if ($old_values{$_}) } keys %old_values; + for my $i (1 .. $form->{rowcount}) { + (my $dummy, $form->{"pricegroup_id_$i"}) = split /--/, $form->{"sellprice_pg_$i"}; + } update(); $main::lxdebug->leave_sub();