<<

NAME

Koha::Acquisition::Orders object set class

API

Class methods

filter_by_lates

my $late_orders = $orders->filter_by_lates($params);

Filter an order set given different parameters.

This is the equivalent method of the former GetLateOrders C4 subroutine

$params can be:

delay the number of days the basket has been closed
bookseller_id the bookseller id
estimated_from Beginning of the estimated delivery date
estimated_to End of the estimated delivery date

filter_by_active

    my $new_rs = $orders->filter_by_active;

Returns a new resultset containing active orders only.

Note: An active order (line) has status ordered or partial, or it has status new and the basket is marked as standing order. Additionally, we still expect items on this order (checking quantity and quantityreceived).

filter_out_cancelled

    $orders->filter_out_cancelled

Return the orders of the set that have not been cancelled.

filter_by_cancelled

    $orders->filter_by_cancelled

Return the orders of the set that have been cancelled.

filter_by_id_including_transfers

    my $orders = $orders->filter_by_id_including_transfers(
        {
            ordernumber => $ordernumber
        }
    );

When searching for orders by ordernumber, include the aqorders_transfers table so we can find orders that have changed their ordernumber as the result of a transfer

filter_by_obsolete

    $orders->filter_by_obsolete( $age );

    What are obsolete orders here?
    [1] Order lines that have no biblio anymore but are still considered open
        (received < ordered, not cancelled).
    [2] Order lines with status 'cancelled' but no cancellation date.
    [3] Order lines with cancellation date and no status 'cancelled'.

    An optional parameter age may limit the selection by entrydate older than $age days.

cancel

    $orders_rs->cancel( { delete_biblio => 0|1 } );

    Returns a count and diagnostic object messages.

Internal methods

_type

object_class

<<