Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f01ed5d1

Von Bernd Bleßmann vor fast 3 Jahren hinzugefügt

  • ID f01ed5d1c0d1bed1d04005e004a785c6cf047233
  • Vorgänger ffd2ad0a
  • Nachfolger 043285c8

Erzeugnisse: Gewicht aus einzelnen Bestandteilen ermitteln und speichern.

Unterschiede anzeigen:

SL/Controller/Part.pm
284 284
  my $part_type = $::form->{part_type};
285 285
  die unless $part_type =~ /^(assortment|assembly)$/;
286 286

  
287
  my $sellprice_sum = $self->recalc_item_totals(part_type => $part_type, price_type => 'sellcost');
288
  my $lastcost_sum  = $self->recalc_item_totals(part_type => $part_type, price_type => 'lastcost');
287
  my $sellprice_sum    = $self->recalc_item_totals(part_type => $part_type, price_type => 'sellcost');
288
  my $lastcost_sum     = $self->recalc_item_totals(part_type => $part_type, price_type => 'lastcost');
289
  my $items_weight_sum = $self->recalc_item_totals(part_type => $part_type, price_type => 'weight');
289 290

  
290 291
  my $sum_diff      = $sellprice_sum-$lastcost_sum;
291 292

  
......
295 296
    ->html('#items_sum_diff',            $::form->format_amount(\%::myconfig, $sum_diff,      2, 0))
296 297
    ->html('#items_sellprice_sum_basic', $::form->format_amount(\%::myconfig, $sellprice_sum, 2, 0))
297 298
    ->html('#items_lastcost_sum_basic',  $::form->format_amount(\%::myconfig, $lastcost_sum,  2, 0))
299
    ->html('#items_weight_sum_basic'   , $::form->format_amount(\%::myconfig, $items_weight_sum))
298 300
    ->no_flash_clear->render();
299 301
}
300 302

  
......
400 402
  my $items_sellprice_sum = $part->items_sellprice_sum;
401 403
  my $items_lastcost_sum  = $part->items_lastcost_sum;
402 404
  my $items_sum_diff      = $items_sellprice_sum - $items_lastcost_sum;
405
  my $items_weight_sum    = $part->items_weight_sum;
403 406

  
404 407
  $self->js
405 408
    ->append('#assembly_rows', $html)  # append in tbody
......
410 413
    ->html('#items_sum_diff',      $::form->format_amount(\%::myconfig, $items_sum_diff     , 2, 0))
411 414
    ->html('#items_sellprice_sum_basic', $::form->format_amount(\%::myconfig, $items_sellprice_sum, 2, 0))
412 415
    ->html('#items_lastcost_sum_basic' , $::form->format_amount(\%::myconfig, $items_lastcost_sum , 2, 0))
416
    ->html('#items_weight_sum_basic'   , $::form->format_amount(\%::myconfig, $items_weight_sum))
413 417
    ->render;
414 418
}
415 419

  
......
734 738
    }
735 739
  } elsif ( $part->is_assembly ) {
736 740
    $part->assemblies( @{$self->assembly_items} );
737
    if ( $params{price_type} eq 'lastcost' ) {
741
    if ( $params{price_type} eq 'weight' ) {
742
      return $part->items_weight_sum;
743
    } elsif ( $params{price_type} eq 'lastcost' ) {
738 744
      return $part->items_lastcost_sum;
739 745
    } else {
740 746
      return $part->items_sellprice_sum;

Auch abrufbar als: Unified diff