X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/53aad992851d0e653fe5d3f291d72ebe5b5ac1e5..fff57e55bed689ab673bf72937bfd71eab26a293:/SL/DB/Invoice.pm diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 987ab72a7..8a4f4ec8e 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -177,6 +177,8 @@ sub new_from { } @{ $items }; + @items = grep { $_->qty * 1 } @items if $params{skip_items_zero_qty}; + $invoice->invoiceitems(\@items); return $invoice; @@ -335,6 +337,10 @@ missing then the method C will be called on C<$source>. This option can be used to override the sorting, to exclude certain positions or to add additional ones. +=item C + +If trueish then items with a quantity of 0 are skipped. + =item C An optional hash reference. If it exists then it is passed to C