Revision bbb98e03
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/DB/DeliveryOrder.pm | ||
---|---|---|
160 | 160 |
|
161 | 161 |
} @{ $items }; |
162 | 162 |
|
163 |
@items = grep { $params{item_filter}->($_) } @items if $params{item_filter}; |
|
163 | 164 |
@items = grep { $_->qty * 1 } @items if $params{skip_items_zero_qty}; |
164 | 165 |
@items = grep { $_->qty >=0 } @items if $params{skip_items_negative_qty}; |
165 | 166 |
|
... | ... | |
245 | 246 |
|
246 | 247 |
If trueish then items with a quantity of 0 are skipped. |
247 | 248 |
|
249 |
=item C<item_filter> |
|
250 |
|
|
251 |
An optional code reference that is called for each item with the item |
|
252 |
as its sole parameter. Items for which the code reference returns a |
|
253 |
falsish value will be skipped. |
|
254 |
|
|
248 | 255 |
=item C<attributes> |
249 | 256 |
|
250 | 257 |
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