Koha::Acquisition::Basket - Koha Basket Object class
Returns the vendor
my $creator = $basket->creator;
Returns the Koha::Patron for the basket creator.
Returns the basket group associated to this basket
my $orders = $basket->orders;
Returns a Koha::Acquisition::Orders resultset, with the orders linked to this basket.
Returns create_items
for this basket, falling back to AcqCreateItem
if unset.
my $estimated_delivery_date = $basket->estimated_delivery_date;
Return the estimated delivery date for this basket.
It is calculated adding the delivery time of the vendor to the close date of this basket.
Return implicit undef if the basket is not closed, or the vendor does not have a delivery time.
my $number_of_days_late = $basket->late_since_days;
Return the number of days the basket is late.
Return implicit undef if the basket is not closed.
my $authorizer = $basket->authorizer;
Returns the patron who authorized/created this basket.
if ( $basket->is_closed ) { ... }
Returns a boolean value representing if the basket is closed.
$basket->close;
Close the basket and mark all open orders as ordered.
A Koha::Exceptions::Acquisition::Basket::AlreadyClosed exception is thrown if the basket is already closed.
my $json = $basket->to_api;
Overloaded method that returns a JSON representation of the Koha::Acquisition::Basket object, suitable for API output.
This method returns the mapping for representing a Koha::Acquisition::Basket object on the API.
Aleisha Amohia <aleisha@catalyst.net.nz> Catalyst IT