From: Niclas Zimmermann Date: Thu, 23 May 2013 14:47:46 +0000 (+0200) Subject: Gewicht im Einkauf/Verkauf X-Git-Tag: release-3.1.0beta1~388^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2de7b1da5588237977366ff7e6526f5b7c84a83b;p=kivitendo-erp.git Gewicht im Einkauf/Verkauf Gewicht wird nun sowohl im Einkauf als im Verkauf in allen Masken angezeigt. Die Variablen stehen auch im Druck zur Verfügung. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index ca3d0504e..a024cd85d 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -209,6 +209,8 @@ sub display_row { my $totalweight = 0; my $defaults = AM->get_defaults(); + + $form->{weightunit} = $defaults->{weightunit}; # rows my @ROWS; @@ -232,7 +234,6 @@ sub display_row { 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->{"weight_$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"}; @@ -251,6 +252,7 @@ sub display_row { } else { $column_data{price_factor} = ' '; } + $form->{"weight_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"partunit_$i"}, $all_units) || 1; $column_data{"unit"} = AM->unit_select_html($all_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef); # / unit ending @@ -331,6 +333,8 @@ sub display_row { $column_data{bin} = $form->{"bin_$i"}; $column_data{weight} = $form->format_amount(\%myconfig, $form->{"qty_$i"} * $form->{"weight_$i"}, 3) . ' ' . $defaults->{weightunit}; + #To add the hidden variable lineweight: + $form->{"lineweight_$i"} = $column_data{weight}; if ($is_delivery_order) { $column_data{stock_in_out} = calculate_stock_in_out($i); @@ -426,7 +430,7 @@ sub display_row { map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" } (qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber - longdescription basefactor marge_absolut marge_percent marge_price_factor weight), @hidden_vars) + longdescription basefactor marge_absolut marge_percent marge_price_factor weight lineweight), @hidden_vars) ); map { $form->{"${_}_base"} += $linetotal } (split(/ /, $form->{"taxaccounts_$i"})); diff --git a/locale/de/all b/locale/de/all index 3b82861f0..ce0bf65ca 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2165,6 +2165,7 @@ $self->{texts} = { 'Total Fees' => 'Kumulierte Gebühren', 'Total stock value' => 'Gesamter Bestandswert', 'Total sum' => 'Gesamtsumme', + 'Total weight' => 'Gesamtgewicht', 'Totals' => 'Summen', 'Trade Discount' => 'Rabatt', 'Trans Id' => 'Trans-ID', diff --git a/templates/webpages/do/form_footer.html b/templates/webpages/do/form_footer.html index 78ad35a41..6be226888 100644 --- a/templates/webpages/do/form_footer.html +++ b/templates/webpages/do/form_footer.html @@ -20,6 +20,24 @@ + + + + + + +
+ + + + + +
[% 'Total weight' | $T8 %] + [% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %] + +
+
+

diff --git a/templates/webpages/ir/form_footer.html b/templates/webpages/ir/form_footer.html index 8538fd42d..83ab34abb 100644 --- a/templates/webpages/ir/form_footer.html +++ b/templates/webpages/ir/form_footer.html @@ -33,6 +33,18 @@ [%- END %] + + + + + + +
[% 'Total weight' | $T8 %] + [% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %] + + +
+ [%- IF taxaccounts %] diff --git a/templates/webpages/is/form_footer.html b/templates/webpages/is/form_footer.html index f40dc27c6..f389e842a 100644 --- a/templates/webpages/is/form_footer.html +++ b/templates/webpages/is/form_footer.html @@ -49,7 +49,8 @@ [% 'Total weight' | $T8 %] [% LxERP.format_amount(totalweight) %] [% HTML.escape(weightunit) %] - + + diff --git a/templates/webpages/oe/form_footer.html b/templates/webpages/oe/form_footer.html index c9078ef98..24e9f255d 100644 --- a/templates/webpages/oe/form_footer.html +++ b/templates/webpages/oe/form_footer.html @@ -47,6 +47,18 @@ [%- END %] + + + + + + +
[% 'Total weight' | $T8 %] + [% LxERP.format_amount(totalweight, 3) %] [% HTML.escape(weightunit) %] + + +
+ [%- IF is_sales %]