From: Moritz Bunkus Date: Mon, 27 Dec 2010 16:11:12 +0000 (+0100) Subject: Lieferschein ein- und auslagern: sofort Mengenanzeige in entsprechender Zeile aktuali... X-Git-Tag: release-2.6.2beta1~60^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=50e62c5790434d450a11a01bbdebe293966c3c5a;p=kivitendo-erp.git Lieferschein ein- und auslagern: sofort Mengenanzeige in entsprechender Zeile aktualisieren, wenn Popup mit Lagermengen geschlossen wird Fix für Bug 1400. --- diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index cde1c602e..2b1bdd948 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -939,7 +939,7 @@ sub calculate_stock_in_out { 'amount_unit' => $all_units->{$form->{"partunit_$i"}}->{base_unit}, 'conv_units' => 'convertible_not_smaller', 'max_places' => 2); - $content .= qq| |; + $content = qq|${content} |; $main::lxdebug->leave_sub(); @@ -1061,6 +1061,18 @@ sub display_stock_in_form { $main::lxdebug->leave_sub(); } +sub _stock_in_out_set_qty_display { + my $stock_info = shift; + my $form = $::form; + my $all_units = AM->retrieve_all_units(); + my $sum = AM->sum_with_unit(map { $_->{qty}, $_->{unit} } @{ $stock_info }); + $form->{qty_display} = $form->format_amount_units(amount => $sum * 1, + part_unit => $form->{partunit}, + amount_unit => $all_units->{ $form->{partunit} }->{base_unit}, + conv_units => 'convertible_not_smaller', + max_places => 2); +} + sub set_stock_in { $main::lxdebug->enter_sub(); @@ -1079,6 +1091,8 @@ sub set_stock_in { $form->{stock} = YAML::Dump($stock_info); + _stock_in_out_set_qty_display($stock_info); + $form->header(); print $form->parse_html_template('do/set_stock_in_out'); @@ -1172,6 +1186,8 @@ sub set_stock_out { stock_in_out_form(); } else { + _stock_in_out_set_qty_display($stock_info); + $form->header(); print $form->parse_html_template('do/set_stock_in_out'); } diff --git a/templates/webpages/do/set_stock_in_out.html b/templates/webpages/do/set_stock_in_out.html index 36bbf7ff0..07e084d4d 100644 --- a/templates/webpages/do/set_stock_in_out.html +++ b/templates/webpages/do/set_stock_in_out.html @@ -1,13 +1,14 @@ -[% USE HTML %] +[% USE HTML %] +[% USE L %] +[% L.javascript_tag('jquery') %] +
- - - + + + +