Koha::Acquisition::Orders object set class
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 closedbookseller_id
the bookseller idestimated_from
Beginning of the estimated delivery dateestimated_to
End of the estimated delivery datemy $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).
$orders->filter_out_cancelled
Return the orders of the set that have not been cancelled.
$orders->filter_by_cancelled
Return the orders of the set that have been cancelled.
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
$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.
$orders_rs->cancel( { delete_biblio => 0|1 } ); Returns a count and diagnostic object messages.