]> wagnertech.de Git - mfinanz.git/commitdiff
Fix für Bug 1395: Die bei der Einlagerung von Artikeln aus Lieferscheinen zum jeweili...
authorJan Büren <jan@lx-office-hosting.de>
Tue, 28 Dec 2010 10:54:21 +0000 (11:54 +0100)
committerJan Büren <jan@lx-office-hosting.de>
Tue, 28 Dec 2010 10:54:21 +0000 (11:54 +0100)
bin/mozilla/do.pl
bin/mozilla/wh.pl
templates/webpages/do/stock_in_form.html

index 0d5941cb0b4f5c9ed812891b6ae2e98c71ff9e5b..bf76cdd8b24c82ef40e4518960990f1c52b65eba 100644 (file)
@@ -1043,7 +1043,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' });
index a55bf70c676e8369eca6aea02b6cf97c3ce84055..aa22c51d5797a60041737ecf85b191c4523923dc 100644 (file)
@@ -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};
index 238747ef6c8f325eb22029c22434a593849191f6..0d5ea684f8f0625f7504de4bcf9cb6022f7528f6 100644 (file)
      <td>
       <select name="unit_[% loop.count %]">
        [%- FOREACH unit = UNITS %]
-       <option[% IF unit.name == row.unit %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
+       <option[% IF unit.selected %] selected[% END %]>[% HTML.escape(unit.name) %]</option>
        [%- END %]
       </select>
      </td>