Revision 53aad992
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
161 | 161 |
} |
162 | 162 |
|
163 | 163 |
my $invoice = $class->new(%args, %{ $params{attributes} || {} }); |
164 |
my $items = delete($params{items}) || $source->items_sorted; |
|
164 | 165 |
|
165 | 166 |
my @items = map { |
166 | 167 |
my $source_item = $_; |
... | ... | |
174 | 175 |
custom_variables => \@custom_variables, |
175 | 176 |
); |
176 | 177 |
|
177 |
} @{ $source->items_sorted };
|
|
178 |
} @{ $items };
|
|
178 | 179 |
|
179 | 180 |
$invoice->invoiceitems(\@items); |
180 | 181 |
|
... | ... | |
327 | 328 |
|
328 | 329 |
=over 2 |
329 | 330 |
|
331 |
=item C<items> |
|
332 |
|
|
333 |
An optional array reference of RDBO instances for the items to use. If |
|
334 |
missing then the method C<items_sorted> will be called on |
|
335 |
C<$source>. This option can be used to override the sorting, to |
|
336 |
exclude certain positions or to add additional ones. |
|
337 |
|
|
330 | 338 |
=item C<attributes> |
331 | 339 |
|
332 | 340 |
An optional hash reference. If it exists then it is passed to C<new> |
Auch abrufbar als: Unified diff
SL::DB::{DeliveryOrder,Invoice}->new_from: Option items für Übergabe der zu verwendenden Positionen
Gründe dafür können sein:
- eigene Sortierung
- gewisse Positionen herauslassen
- weitere Positionen hinzufügen