Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a000b4a2

Von Tamino Steinert vor mehr als 2 Jahren hinzugefügt

  • ID a000b4a22d72a7fbc720d1b5610e6dea6ae8beed
  • Vorgänger 4578cdff
  • Nachfolger 1cc22d35

Reclamation: don't need shipped_qty

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
27 27

  
28 28
use SL::Helper::CreatePDF qw(:all);
29 29
use SL::Helper::PrintOptions;
30
use SL::Helper::ShippedQty;
31 30
use SL::Helper::UserPreferences::PositionsScrollbar;
32 31
use SL::Helper::UserPreferences::UpdatePositions;
33 32

  
......
900 899
    reason       => sub { $_[0]->reason eq undef ? "" : $_[0]->reason->name },
901 900
    reason_description_ext => sub { $_[0]->reason_description_ext },
902 901
    reason_description_int => sub { $_[0]->reason_description_int },
903
    shipped_qty  => sub { $_[0]->shipped_qty },
904 902
    qty          => sub { $_[0]->qty },
905 903
    sellprice    => sub { $_[0]->sellprice },
906 904
    discount     => sub { $_[0]->discount },
......
909 907

  
910 908
  $self->get_item_cvpartnumber($_) for @{$self->reclamation->items_sorted};
911 909

  
912
  if ($::form->{order_by} eq 'shipped_qty') {
913
    # Calculate shipped qtys here to prevent calling calculate for every item
914
    # via the items method. Do not use write_to_objects to prevent
915
    # reclamation->delivered to be set, because this should be the value from
916
    # db, which can be set manually or is set when linked delivery orders are
917
    # saved.
918
    SL::Helper::ShippedQty->new->calculate($self->reclamation)->write_to(\@{$self->reclamation->items});
919
  }
920

  
921 910
  my $method = $sort_keys{$::form->{order_by}};
922 911
  my @to_sort = map { { old_pos => $_->position, order_by => $method->($_) } } @{ $self->reclamation->items_sorted };
923 912
  if ($::form->{sort_dir}) {
......
1892 1881
    $item->active_discount_source($price_source->discount_from_source($item->active_discount_source));
1893 1882
  }
1894 1883

  
1895
  # Calculate shipped qtys here to prevent calling calculate for every item via
1896
  # the items method. Do not use write_to_objects to prevent
1897
  # reclamation->delivered to be set, because this should be the value from db,
1898
  # which can be set manually or is set when linked delivery orders are saved.
1899
  SL::Helper::ShippedQty->new->calculate($self->reclamation)->write_to(\@{$self->reclamation->items});
1900

  
1901 1884
  if ($self->reclamation->record_number && $::instance_conf->get_webdav) {
1902 1885
    my $webdav = SL::Webdav->new(
1903 1886
      type     => $self->type,
......
2631 2614

  
2632 2615
=item *
2633 2616

  
2617
<<<<<<< HEAD
2634 2618
Ordering item rows with drag and drop is possible. Sorting item rows is possible
2635 2619
(by partnumber, description, reason, reason_description_int,
2636 2620
reason_description_ext, qty, sellprice and discount for now).
2621
=======
2622
Ordering item rows with drag and drop is possible. Sorting item rows is
2623
possible (by partnumber, description, reason, qty, sellprice
2624
and discount for now).
2625
>>>>>>> 66ac9fa6c7 (Reclamation: don't need shipped_qty)
2637 2626

  
2638 2627
=item *
2639 2628

  

Auch abrufbar als: Unified diff