Revision bbb98e03
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/DB/Invoice.pm | ||
---|---|---|
203 | 203 |
$current_invoice_item; |
204 | 204 |
} @{ $items }; |
205 | 205 |
|
206 |
@items = grep { $params{item_filter}->($_) } @items if $params{item_filter}; |
|
206 | 207 |
@items = grep { $_->qty * 1 } @items if $params{skip_items_zero_qty}; |
207 | 208 |
@items = grep { $_->qty >=0 } @items if $params{skip_items_negative_qty}; |
208 | 209 |
|
... | ... | |
411 | 412 |
|
412 | 413 |
If trueish then items with a quantity of 0 are skipped. |
413 | 414 |
|
415 |
=item C<item_filter> |
|
416 |
|
|
417 |
An optional code reference that is called for each item with the item |
|
418 |
as its sole parameter. Items for which the code reference returns a |
|
419 |
falsish value will be skipped. |
|
420 |
|
|
414 | 421 |
=item C<attributes> |
415 | 422 |
|
416 | 423 |
An optional hash reference. If it exists then it is passed to C<new> |
Auch abrufbar als: Unified diff
SL::DB::{Invoice,DeliveryOrder}->new_from: manuelles Filtern von Items via coderef