Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f51b2f1a

Von Niclas Zimmermann vor etwa 12 Jahren hinzugefügt

  • ID f51b2f1ad0639c60604f682af4325caf6e6f25c6
  • Vorgänger ffac4820
  • Nachfolger 175dd1fb

Erweiterung Lieferplan

Im Lieferplan wird jetzt noch zusätzlich zu der Gesamtliefermenge
und der schon gelieferten Menge auch noch die Differenz (also die
Menge, die noch nicht geliefert wurde) angezeigt.

Unterschiede anzeigen:

SL/Controller/DeliveryPlan.pm
26 26
);
27 27

  
28 28
__PACKAGE__->make_sorted(
29
  MODEL       => 'OrderItem',
30
  ONLY        => [ qw(list) ],
31

  
32
  DEFAULT_BY  => 'reqdate',
33
  DEFAULT_DIR => 1,
34

  
35
  reqdate     => t8('Reqdate'),
36
  description => t8('Description'),
37
  partnumber  => t8('Part Number'),
38
  qty         => t8('Qty'),
39
  shipped_qty => t8('shipped'),
40
  ordnumber   => t8('Order'),
41
  customer    => t8('Customer'),
29
  MODEL             => 'OrderItem',
30
  ONLY              => [ qw(list) ],
31

  
32
  DEFAULT_BY        => 'reqdate',
33
  DEFAULT_DIR       => 1,
34

  
35
  reqdate           => t8('Reqdate'),
36
  description       => t8('Description'),
37
  partnumber        => t8('Part Number'),
38
  qty               => t8('Qty'),
39
  shipped_qty       => t8('shipped'),
40
  not_shipped_qty   => t8('not shipped'),
41
  ordnumber         => t8('Order'),
42
  customer          => t8('Customer'),
42 43
);
43 44

  
44 45
sub action_list {
......
131 132
  my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
132 133
  $self->{report} = $report;
133 134

  
134
  my @columns     = qw(reqdate customer ordnumber partnumber description qty shipped_qty);
135
  my @columns     = qw(reqdate customer ordnumber partnumber description qty shipped_qty not_shipped_qty);
135 136
  my @sortable    = qw(reqdate customer ordnumber partnumber description                );
136 137

  
137 138
  my %column_defs = (
138
    reqdate       => {      sub => sub { $_[0]->reqdate_as_date || $_[0]->order->reqdate_as_date                         } },
139
    description   => {      sub => sub { $_[0]->description                                                              },
140
                       obj_link => sub { $self->link_to($_[0]->part)                                                     } },
141
    partnumber    => {      sub => sub { $_[0]->part->partnumber                                                         },
142
                       obj_link => sub { $self->link_to($_[0]->part)                                                     } },
143
    qty           => {      sub => sub { $_[0]->qty_as_number . ' ' . $_[0]->unit                                        } },
144
    shipped_qty   => {      sub => sub { $::form->format_amount(\%::myconfig, $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } },
145
    ordnumber     => {      sub => sub { $_[0]->order->ordnumber                                                         },
146
                       obj_link => sub { $self->link_to($_[0]->order)                                                    } },
147
    customer      => {      sub => sub { $_[0]->order->customer->name                                                    },
148
                       obj_link => sub { $self->link_to($_[0]->order->customer)                                          } },
139
    reqdate           => {      sub => sub { $_[0]->reqdate_as_date || $_[0]->order->reqdate_as_date                         } },
140
    description       => {      sub => sub { $_[0]->description                                                              },
141
                            obj_link => sub { $self->link_to($_[0]->part)                                                     } },
142
    partnumber        => {      sub => sub { $_[0]->part->partnumber                                                         },
143
                            obj_link => sub { $self->link_to($_[0]->part)                                                     } },
144
    qty               => {      sub => sub { $_[0]->qty_as_number . ' ' . $_[0]->unit                                        } },
145
    shipped_qty       => {      sub => sub { $::form->format_amount(\%::myconfig, $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } },
146
    not_shipped_qty   => {      sub => sub { $::form->format_amount(\%::myconfig, $_[0]->qty - $_[0]->shipped_qty, 2) . ' ' . $_[0]->unit } },
147
    ordnumber         => {      sub => sub { $_[0]->order->ordnumber                                                         },
148
                            obj_link => sub { $self->link_to($_[0]->order)                                                    } },
149
    customer          => {      sub => sub { $_[0]->order->customer->name                                                    },
150
                            obj_link => sub { $self->link_to($_[0]->order->customer)                                          } },
149 151
  );
150 152

  
151 153
  map { $column_defs{$_}->{text} = $::locale->text( $self->get_sort_spec->{$_}->{title} ) } keys %column_defs;

Auch abrufbar als: Unified diff