Bug 37505: Remove onloan check when checking out to stats patron

To test:
1.  Create a Statistical Patron
2.  Set BlockReturnOfLostItems to Block.
3..  Mark an item as lost
4. Check it out to the Statistical Patron. You should see the message "Item was lost, cannot be returned."

5. Set BlockReturnOfWithdrawnItems to Block.
6.  Mark an item as withdrawn
7. Check it out to the Statistical Patron. You should see the message "Item was withdrawn, cannot be returned."
8. Turn off BlockReturnOfWithdrawnItems, check out the same item to the Statistical Patron. You should see a message "Item was withdrawn."

9. Place an item on hold.
10. Check it out to the Statistical Patron
11. See the message "Item on hold, please checkin."

12. Make sure  ClaimReturnedLostValue is set to a lost value
13. Claim a return, making sure it is not still checked out to the patron
14. Checkit it out to the Statistical Patron.
15. See the message "Item claimed returned, please checkin."

16. Have an item on a regular patron account that has been recalled.
17. Checkit it out to the Statistical Patron.
18. See the message "Item can fill a recall, please checkin."

Signed-off-by: Kelly <kelly@bywatersolutions.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 5ee142c7f7)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2024-08-29 21:54:57 +00:00
parent 40f8e3fb8c
commit 6bd354f74d
1 changed files with 9 additions and 12 deletions

View File

@ -364,19 +364,16 @@ if (@$barcodes && $op eq 'cud-checkout') {
}
if ( $issuingimpossible->{'STATS'} ) {
$template->param( STATS => 1 );
my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
AddReturn( $item->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 );
if ( $item->onloan ) {
my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
AddReturn( $item->barcode, C4::Context->userenv->{'branch'}, undef, undef, 1 );
$template->param(
CHECKEDIN => $stats_return,
MESSAGES => $stats_messages,
ITEM => $stats_iteminformation,
BORROWER => $stats_borrower,
);
}
$template->param(
STATS => 1,
CHECKEDIN => $stats_return,
MESSAGES => $stats_messages,
ITEM => $stats_iteminformation,
BORROWER => $stats_borrower,
);
#increment items.localuse
my $localuse_count = $item->localuse;