From: Jan Büren Date: Tue, 28 Dec 2010 10:55:57 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~51^2~9^2~1 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/6a8787147ad643549eb26cb4f9a373b5b354b8b9?ds=inline;hp=-c Merge branch 'master' of ssh://git-jbueren@lx-office.linet-services.de/~/lx-office-erp --- 6a8787147ad643549eb26cb4f9a373b5b354b8b9 diff --combined bin/mozilla/do.pl index bf76cdd8b,2b1bdd948..120606acd --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@@ -551,6 -551,7 +551,7 @@@ sub orders 'attachment_basename' => $attachment_basename . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; # add sort and escape callback, this one we use for the add sub $form->{callback} = $href .= "&sort=$form->{sort}"; @@@ -938,7 -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(); @@@ -1043,8 -1044,7 +1044,8 @@@ sub display_stock_in_form my $part_info = IC->get_basic_part_info('id' => $form->{parts_id}); my $units = AM->retrieve_units(\%myconfig, $form); - my $units_data = AM->unit_select_data($units, undef, undef, $part_info->{unit}); + # der zweite Parameter von unit_select_data gibt den default-Namen (selected) vor + my $units_data = AM->unit_select_data($units, $form->{do_unit}, undef, $part_info->{unit}); $form->get_lists('warehouses' => { 'key' => 'WAREHOUSES', 'bins' => 'BINS' }); @@@ -1061,6 -1061,18 +1062,18 @@@ $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 +1092,8 @@@ $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 +1187,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 --combined bin/mozilla/wh.pl index aa22c51d5,c990e632f..fc34ba6e7 --- a/bin/mozilla/wh.pl +++ b/bin/mozilla/wh.pl @@@ -85,8 -85,7 +85,8 @@@ sub transfer_warehouse_selection show_no_warehouses_error() if (!scalar @{ $form->{WAREHOUSES} }); my $units = AM->retrieve_units(\%myconfig, $form); - $form->{UNITS} = AM->unit_select_data($units, $form->{unit}, 0, $form->{partunit}); + # der zweite Parameter von unit_select_data gibt den default-Namen (selected) vor + $form->{UNITS} = AM->unit_select_data($units, $form->{partunit}, 0, $form->{partunit}); if (scalar @{ $form->{WAREHOUSES} }) { $form->{warehouse_id} ||= $form->{WAREHOUSES}->[0]->{id}; @@@ -311,7 -310,7 +311,7 @@@ sub transfer_stock_update_part } elsif (($form->{partnumber} && ($form->{partnumber} ne $form->{old_partnumber})) || $form->{description} || $form->{ean}) { - $form->{no_services} = 1; + # $form->{no_services} = 1; # services may now be transfered. fix for Bug 1383. $form->{no_assemblies} = 0; # assemblies duerfen eingelagert werden (z.B. bei retouren) my $parts = Common->retrieve_parts(\%myconfig, $form, 'description', 1); @@@ -722,6 -721,7 +722,7 @@@ sub generate_journal 'title' => $form->{title}, 'attachment_basename' => strftime($locale->text('warehouse_journal_list') . '_%Y%m%d', localtime time)); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; my $all_units = AM->retrieve_units(\%myconfig, $form); my @contents = WH->get_warehouse_journal(%filter); @@@ -870,6 -870,7 +871,7 @@@ sub generate_report 'title' => $form->{title}, 'attachment_basename' => strftime($locale->text('warehouse_report_list') . '_%Y%m%d', localtime time)); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; my $all_units = AM->retrieve_units(\%myconfig, $form); my @contents = WH->get_warehouse_report(%filter);