X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fio.pl;h=b518db00edb8b35fad6f71d7f2054a7ca417fab3;hb=81fed28305f28aff317639f9a190cdf83a678ed4;hp=7e1970bbee5c49a13f2f3e0717a53a5254a1e64c;hpb=e2b15672816b9ceac6a8c70178a4c83781f301c1;p=kivitendo-erp.git diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 7e1970bbe..b518db00e 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -226,6 +226,7 @@ sub display_row { # adjust prices by unit, ignore if pricegroup changed if ((!$form->{"prices_$i"}) || ($form->{"new_pricegroup_$i"} == $form->{"old_pricegroup_$i"})) { $form->{"sellprice_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"unit_old_$i"}, $all_units) || 1; + $form->{"lastcost_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"unit_old_$i"}, $all_units) || 1; $form->{"unit_old_$i"} = $form->{"selected_unit_$i"}; } my $this_unit = $form->{"unit_$i"}; @@ -358,7 +359,7 @@ sub display_row { } else { $real_sellprice = $linetotal; }; - my $real_lastcost = $form->{"lastcost_$i"} * $form->{"qty_$i"} / ( $form->{"marge_price_factor_$i"} || 1 ); + my $real_lastcost = $form->round_amount($form->{"lastcost_$i"} * $form->{"qty_$i"} / $price_factor, 2); my $marge_percent_warn = $myconfig{marge_percent_warn} * 1 || 15; my $marge_adjust_credit_note = $form->{type} eq 'credit_note' ? -1 : 1; @@ -487,7 +488,7 @@ sub select_item { } @{ $::form->{item_list} }; # delete action variable - delete @{$::form}{qw(action item_list header)}; + delete @{$::form}{qw(action item_list)}; print $::form->parse_html_template('io/select_item', { PREVIOUS_FORM => $previous_form, MODE => $mode, @@ -977,7 +978,7 @@ sub edit_e_mail { my $attachment_filename = $form->generate_attachment_filename(); my $subject = $form->{subject} || $form->generate_email_subject(); - $form->{"fokus"} = $form->{"email"} ? "Form.subject" : "Form.email"; + $::request->{layout}->focus($form->{"email"} ? "#subject" : "#email"); $form->header; my (@dont_hide_key_list, %dont_hide_key, @hidden_keys);