Test plan:
- Set up an expired patron
- Do a SIP checkout
- Check that the message is "Patron expired"
- Apply the patch
- Check that the message is "Patron expired on <correctly_formatted_date>"
- Prove t//db_dependent/SIP/Transaction.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
use warnings;
use strict;
use C4::SIP::Sip qw( siplog );
+use Koha::DateUtils qw( dt_from_string output_pref );
use Data::Dumper;
use C4::SIP::ILS::Item;
if ($patron->debarred) {
$circ->screen_msg("Patron debarred");
} elsif ($patron->expired) {
- $circ->screen_msg("Patron expired");
+ $circ->screen_msg("Patron expired on " . output_pref({ dt => dt_from_string( $patron->dateexpiry_iso, 'iso' ), dateonly => 1 }));
} elsif ($patron->fine_blocked) {
$circ->screen_msg("Patron has fines");
} else {
class => 'Koha::Patrons',
value => {
branchcode => $library->branchcode,
- dateexpiry => '2020/01/01',
+ dateexpiry => '2020/01/03',
}
}
);
my $circ = $ils->checkout($expired_patron->cardnumber, $item->barcode);
- is( $circ->{screen_msg}, 'Patron expired', "Got correct expired screen message" );
+ is( $circ->{screen_msg}, 'Patron expired on 01/03/2020', "Got correct expired screen message" );
my $fines_patron = $builder->build_object(
{