Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2de7b1da

Von Niclas Zimmermann vor mehr als 11 Jahren hinzugefügt

  • ID 2de7b1da5588237977366ff7e6526f5b7c84a83b
  • Vorgänger a7ecfa38
  • Nachfolger 7f6cc129

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.

Unterschiede anzeigen:

bin/mozilla/io.pl
209 209

  
210 210
  my $totalweight = 0;
211 211
  my $defaults = AM->get_defaults();
212

  
213
  $form->{weightunit} = $defaults->{weightunit};
212 214
  # rows
213 215

  
214 216
  my @ROWS;
......
232 234
    if ((!$form->{"prices_$i"}) || ($form->{"new_pricegroup_$i"} == $form->{"old_pricegroup_$i"})) {
233 235
        $form->{"sellprice_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"unit_old_$i"}, $all_units) || 1;
234 236
        $form->{"lastcost_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"unit_old_$i"}, $all_units) || 1;
235
        $form->{"weight_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"unit_old_$i"}, $all_units) || 1;
236 237
        $form->{"unit_old_$i"}   = $form->{"selected_unit_$i"};
237 238
    }
238 239
    my $this_unit = $form->{"unit_$i"};
......
251 252
    } else {
252 253
      $column_data{price_factor} = ' ';
253 254
    }
255
    $form->{"weight_$i"} *= AM->convert_unit($form->{"selected_unit_$i"}, $form->{"partunit_$i"}, $all_units) || 1;
254 256

  
255 257
    $column_data{"unit"} = AM->unit_select_html($all_units, "unit_$i", $this_unit, $form->{"id_$i"} ? $form->{"unit_$i"} : undef);
256 258
# / unit ending
......
331 333
    $column_data{bin}         = $form->{"bin_$i"};
332 334

  
333 335
    $column_data{weight}      = $form->format_amount(\%myconfig, $form->{"qty_$i"} * $form->{"weight_$i"}, 3) . ' ' . $defaults->{weightunit};
336
    #To add the hidden variable lineweight:
337
    $form->{"lineweight_$i"}       = $column_data{weight};
334 338

  
335 339
    if ($is_delivery_order) {
336 340
      $column_data{stock_in_out} =  calculate_stock_in_out($i);
......
426 430
          map { ($cgi->hidden("-name" => $_, "-value" => $form->{$_})); } map { $_."_$i" }
427 431
            (qw(orderitems_id bo pricegroup_old price_old id inventory_accno bin partsgroup partnotes
428 432
                income_accno expense_accno listprice assembly taxaccounts ordnumber transdate cusordnumber
429
                longdescription basefactor marge_absolut marge_percent marge_price_factor weight), @hidden_vars)
433
                longdescription basefactor marge_absolut marge_percent marge_price_factor weight lineweight), @hidden_vars)
430 434
    );
431 435

  
432 436
    map { $form->{"${_}_base"} += $linetotal } (split(/ /, $form->{"taxaccounts_$i"}));

Auch abrufbar als: Unified diff