Bug 26190: Allow to close a basket with only cancelled order lines
At the moment there are several cases, when closing a basket is not possible: - when there are no order lines in it - when there are order lines with uncertain prices - when the basket is marked as a standing order The first case wasn't checked correctly as only pending/received orders would be counted, but not cancelled orders. To test: - Create a basket - Create an order line - Verify the "close this basket" button shows - Cancel the order line - the button disappears - Apply the patch - Verify the button appears and works now - Create another basket - make sure you cannot close it without order lines - Create an order line with uncertain price checked - you cannot close it - Resolve the uncertain price - you can now close the basket. Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit2d6595a1bf) Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit87cbd07be8) Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
This commit is contained in:
parent
81be2e66f6
commit
f402c9366f
|
|
@ -428,7 +428,7 @@ if ( $op eq 'list' ) {
|
|||
#
|
||||
# (The template has another implicit restriction that the order cannot be closed if there
|
||||
# are any orders with uncertain prices.)
|
||||
unclosable => @orders ? $basket->{is_standing} : 1,
|
||||
unclosable => @orders || @cancelledorders ? $basket->{is_standing} : 1,
|
||||
has_budgets => $has_budgets,
|
||||
duplinbatch => $duplinbatch,
|
||||
csv_profiles => [ Koha::CsvProfiles->search({ type => 'sql', used_for => 'export_basket' }) ],
|
||||
|
|
|
|||
Loading…
Reference in New Issue