From: Jan Büren Date: Fri, 26 Jun 2015 09:36:45 +0000 (+0200) Subject: Merge branch 'master' of github.com:kivitendo/kivitendo-erp X-Git-Tag: release-3.3.0beta~36 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/9985655a1d5ae8577901aec2f5052e1d357c52a3?hp=c51481ebe9349c170bfd750a0b7d46ee54e9e0c4 Merge branch 'master' of github.com:kivitendo/kivitendo-erp --- diff --git a/SL/DB/DeliveryOrder.pm b/SL/DB/DeliveryOrder.pm index 3afd59162..94725a8d0 100644 --- a/SL/DB/DeliveryOrder.pm +++ b/SL/DB/DeliveryOrder.pm @@ -160,6 +160,7 @@ sub new_from { } @{ $items }; + @items = grep { $params{item_filter}->($_) } @items if $params{item_filter}; @items = grep { $_->qty * 1 } @items if $params{skip_items_zero_qty}; @items = grep { $_->qty >=0 } @items if $params{skip_items_negative_qty}; @@ -245,6 +246,12 @@ a quantity of 0 are not affected by this option. If trueish then items with a quantity of 0 are skipped. +=item C + +An optional code reference that is called for each item with the item +as its sole parameter. Items for which the code reference returns a +falsish value will be skipped. + =item C An optional hash reference. If it exists then it is passed to C diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 82cf66b5e..8bfc918e8 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -203,6 +203,7 @@ sub new_from { $current_invoice_item; } @{ $items }; + @items = grep { $params{item_filter}->($_) } @items if $params{item_filter}; @items = grep { $_->qty * 1 } @items if $params{skip_items_zero_qty}; @items = grep { $_->qty >=0 } @items if $params{skip_items_negative_qty}; @@ -411,6 +412,12 @@ a quantity of 0 are not affected by this option. If trueish then items with a quantity of 0 are skipped. +=item C + +An optional code reference that is called for each item with the item +as its sole parameter. Items for which the code reference returns a +falsish value will be skipped. + =item C An optional hash reference. If it exists then it is passed to C diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 2ef7319e7..6b4cad7a6 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -762,15 +762,6 @@ sub check_form { $form->{creditremaining} -= &invoicetotal; } - #sk - # if pricegroups - if ( $form->{type} =~ (/sales_quotation/) - or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/)) - or (($form->{level} eq undef) and ($form->{type} =~ /invoice/)) - or ($form->{type} =~ /sales_order/)) { - - } - &display_form; $main::lxdebug->leave_sub();