Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 56b91fb4

Von Bernd Bleßmann vor mehr als 11 Jahren hinzugefügt

  • ID 56b91fb4030432fde4159c11a0ca97a7571535f3
  • Vorgänger 67f2e7a5
  • Nachfolger efac2a40

neue Methode items_sorted für Order, DeliveryOrder, Invoice, PurchaseInvoice

Unterschiede anzeigen:

SL/DB/DeliveryOrder.pm
25 25

  
26 26
sub items { goto &orderitems; }
27 27

  
28
sub items_sorted {
29
  my ($self) = @_;
30

  
31
  my @sorted =  sort {$a->id <=> $b->id } @{ $self->items };
32
  return wantarray ? @sorted : \@sorted;
33
}
34

  
28 35
sub sales_order {
29 36
  my $self   = shift;
30 37
  my %params = @_;
SL/DB/Invoice.pm
47 47

  
48 48
sub items { goto &invoiceitems; }
49 49

  
50
sub items_sorted {
51
  my ($self) = @_;
52

  
53
  my @sorted =  sort {$a->id <=> $b->id } @{ $self->items };
54
  return wantarray ? @sorted : \@sorted;
55
}
56

  
50 57
sub is_sales {
51 58
  # For compatibility with Order, DeliveryOrder
52 59
  croak 'not an accessor' if @_ > 1;
SL/DB/Order.pm
39 39

  
40 40
sub items { goto &orderitems; }
41 41

  
42
sub items_sorted {
43
  my ($self) = @_;
44

  
45
  my @sorted =  sort {$a->id <=> $b->id } @{ $self->items };
46
  return wantarray ? @sorted : \@sorted;
47
}
48

  
42 49
sub type {
43 50
  my $self = shift;
44 51

  
SL/DB/PurchaseInvoice.pm
29 29

  
30 30
sub items { goto &invoiceitems; }
31 31

  
32
sub items_sorted {
33
  my ($self) = @_;
34

  
35
  my @sorted =  sort {$a->id <=> $b->id } @{ $self->items };
36
  return wantarray ? @sorted : \@sorted;
37
}
38

  
32 39
sub is_sales {
33 40
  # For compatibility with Order, DeliveryOrder
34 41
  croak 'not an accessor' if @_ > 1;

Auch abrufbar als: Unified diff