Koha::Charges::Sale - Module for collecting sales in Koha
use Koha::Charges::Sale; my $sale = Koha::Charges::Sale->new( { cash_register => $register, staff_id => $staff_id } ); $sale->add_item($item); $sale->purchase( { payment_type => 'CASH' } );
Koha::Charges::Sale->new( { cash_register => $cash_register, staff_id => $staff_id, [ payment_type => $payment_type ], [ items => $items ], [ patron => $patron ], } );
my $payment_type = $sale->payment_type( $payment_type );
A getter/setter for this instances associated payment type.
my $valid_payments = $sale->_get_valid_payments;
A getter which returns a hashref whose keys represent valid payment types.
my $item = { price => 0.25, quantity => 1, code => 'COPY' }; $sale->add_item( $item );
my $valid_items = $sale->_get_valid_items;
A getter which returns a hashref whose keys represent valid sale items.
my $credit_line = $sale->purchase;
Martin Renvoize <martin.renvoize@ptfs-europe.com>