From 674e385bf10903e6242bafe20a4af3d659111ee1 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 29 Mar 2022 01:00:27 +1300 Subject: [PATCH] Bug 30291: Changes to staff client files Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers --- catalogue/detail.pl | 2 +- circ/circulation.pl | 14 ++++---- circ/returns.pl | 12 +++---- .../prog/en/includes/recalls.inc | 36 +++++++++---------- .../prog/en/modules/circ/circulation.tt | 10 +++--- .../prog/en/modules/circ/returns.tt | 28 +++++++-------- .../en/modules/recalls/recalls_to_pull.tt | 6 ++-- .../en/modules/recalls/recalls_waiting.tt | 16 ++++----- members/recallshistory.pl | 2 +- misc/cronjobs/recalls/expire_recalls.pl | 8 ++--- recalls/recall_pickup_slip.pl | 12 +++---- recalls/recalls_old_queue.pl | 2 +- recalls/recalls_overdue.pl | 2 +- recalls/recalls_queue.pl | 2 +- recalls/recalls_to_pull.pl | 12 +++---- recalls/recalls_waiting.pl | 4 +-- recalls/request.pl | 4 +-- 17 files changed, 86 insertions(+), 86 deletions(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 612aa03874..9687f3b01b 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -408,7 +408,7 @@ foreach my $item (@items) { } if ( C4::Context->preference('UseRecalls') ) { - my $recall = Koha::Recalls->find({ itemnumber => $item->{itemnumber}, old => 0 }); + my $recall = Koha::Recalls->find({ item_id => $item->{itemnumber}, completed => 0 }); if ( defined $recall ) { $item->{recalled} = 1; $item->{recall} = $recall; diff --git a/circ/circulation.pl b/circ/circulation.pl index dfa5cb1fd7..6aaf831ba6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -396,14 +396,14 @@ if (@$barcodes) { if ( C4::Context->preference('UseRecalls') && !$recall_id ) { my $recall = Koha::Recalls->find( { - biblionumber => $item->biblionumber, - itemnumber => [ undef, $item->itemnumber ], - status => [ 'requested', 'waiting' ], - old => 0, - borrowernumber => $patron->borrowernumber, + biblio_id => $item->biblionumber, + item_id => [ undef, $item->itemnumber ], + status => [ 'requested', 'waiting' ], + completed => 0, + patron_id => $patron->borrowernumber, } ); - $recall_id = ( $recall and $recall->recall_id ) ? $recall->recall_id : undef; + $recall_id = ( $recall and $recall->id ) ? $recall->id : undef; } my $issue = AddIssue( $patron->unblessed, $barcode, $datedue, $cancelreserve, undef, undef, { onsite_checkout => $onsite_checkout, auto_renew => $session->param('auto_renew'), switch_onsite_checkout => $switch_onsite_checkout, cancel_recall => $cancel_recall, recall_id => $recall_id, } ); $template_params->{issue} = $issue; @@ -455,7 +455,7 @@ if ($patron) { ); if ( C4::Context->preference('UseRecalls') ) { $template->param( - recalls => $patron->recalls->filter_by_current->search({},{ order_by => { -asc => 'recalldate' } }), + recalls => $patron->recalls->filter_by_current->search({},{ order_by => { -asc => 'created_date' } }), specific_patron => 1, ); } diff --git a/circ/returns.pl b/circ/returns.pl index 8a6f5fff2a..e2d2317a37 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -181,11 +181,11 @@ if ( $query->param('recall_id') ) { if ($recall) { my $item; - if ( !$recall->item_level_recall ) { + if ( !$recall->item_level ) { $item = Koha::Items->find( $itemnumber ); } - if ( $recall->branchcode ne $return_branch ) { + if ( $recall->pickup_library_id ne $return_branch ) { $recall->start_transfer({ item => $item }) if !$recall->in_transit; } else { my $expirationdate = $recall->calc_expirationdate; @@ -254,7 +254,7 @@ if ($transit) { if ( $canceltransfer ) { $transfer->cancel({ reason => 'Manual', force => 1}); if ( C4::Context->preference('UseRecalls') ) { - my $recall_transfer_deleted = Koha::Recalls->find({ itemnumber => $itemnumber, status => 'in_transit' }); + my $recall_transfer_deleted = Koha::Recalls->find({ item_id => $itemnumber, status => 'in_transit' }); if ( defined $recall_transfer_deleted ) { $recall_transfer_deleted->revert_transfer; } @@ -268,7 +268,7 @@ if ($transit) { my $transfer = $item->get_transfer; $transfer->cancel({ reason => 'Manual', force => 1}); if ( C4::Context->preference('UseRecalls') ) { - my $recall_transfer_deleted = Koha::Recalls->find({ itemnumber => $itemnumber, status => 'in_transit' }); + my $recall_transfer_deleted = Koha::Recalls->find({ item_id => $itemnumber, status => 'in_transit' }); if ( defined $recall_transfer_deleted ) { $recall_transfer_deleted->revert_transfer; } @@ -534,10 +534,10 @@ if ( $messages->{TransferredRecall} ) { my $recall = $messages->{TransferredRecall}; # confirm transfer has arrived at the branch - my $transfer = Koha::Item::Transfers->search({ datearrived => { '!=' => undef }, itemnumber => $recall->itemnumber }, { order_by => { -desc => 'datearrived' } })->next; + my $transfer = Koha::Item::Transfers->search({ datearrived => { '!=' => undef }, itemnumber => $recall->item_id }, { order_by => { -desc => 'datearrived' } })->next; # if transfer has completed, show popup to confirm as waiting - if ( defined $transfer and $transfer->tobranch eq $recall->branchcode ) { + if ( defined $transfer and $transfer->tobranch eq $recall->pickup_library_id ) { $template->param( found => 1, recall => $recall, diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc index 75f42859ee..0c007f0285 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/recalls.inc @@ -18,20 +18,20 @@ [% FOREACH recall IN recalls %] - [% IF recall.old %][% ELSE %][% END %] + [% IF recall.completed %][% ELSE %][% END %] [% IF checkboxes %] - [% IF recall.old %] + [% IF recall.completed %]   [% ELSE %] - + [% END %] [% END %] - + [% recall.biblio.title | html %] [% FOREACH s IN recall.biblio.subtitle %] [% s | html %] @@ -48,13 +48,13 @@ [% END %] - [% recall.recalldate | $KohaDates %] + [% recall.created_date | $KohaDates %] - [% IF ( recall.expirationdate ) %] - [% recall.expirationdate | $KohaDates %] - [% ELSIF ( !recall.old ) %] + [% IF ( recall.expiration_date ) %] + [% recall.expiration_date | $KohaDates %] + [% ELSIF ( !recall.completed ) %] Never expires [% ELSE %] - @@ -71,9 +71,9 @@ [% ELSIF ( recall.waiting ) %] Ready for pickup [% ELSIF ( recall.expired ) %] - Expired on [% recall.expirationdate | $KohaDates %] + Expired on [% recall.expiration_date | $KohaDates %] [% ELSIF ( recall.cancelled ) %] - Cancelled on [% recall.cancellationdate | $KohaDates %] + Cancelled on [% recall.completed_date | $KohaDates %] [% ELSIF ( recall.overdue ) %] Overdue to be returned [% ELSIF ( recall.fulfilled ) %] @@ -87,8 +87,8 @@ [% IF recall.requested and recall.checkout %] Due to be returned by [% recall.checkout.date_due | $KohaDates %] - [% ELSIF recall.waiting and RECALL.expirationdate %] - Pick up by [% RECALL.expirationdate | $KohaDates %] + [% ELSIF recall.waiting and RECALL.expiration_date %] + Pick up by [% RECALL.expiration_date | $KohaDates %] [% ELSE %] - [% END %] @@ -97,22 +97,22 @@ [% UNLESS viewing_old %] - [% IF recall.old %] + [% IF recall.completed %]   [% ELSE %]
Actions
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 5a35cc181e..6b5ef7c81d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -238,9 +238,9 @@ [% IF RECALLED %] [% IF RECALLED.waiting %] -
  • Item [% RECALLED.biblio.title | html %] ([% RECALLED.item.barcode | html %]) has been waiting for [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %] ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.waitingdate | $KohaDates %]
  • +
  • Item [% RECALLED.biblio.title | html %] ([% RECALLED.item.barcode | html %]) has been waiting for [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %] ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.waiting_date | $KohaDates %]
  • [% ELSIF RECALLED.requested or RECALLED.overdue %] -
  • Item [% RECALLED.biblio.title | html %] [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %] ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.branchcode ) | html %] since [% RECALLED.recalldate | $KohaDates %]
  • +
  • Item [% RECALLED.biblio.title | html %] [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by [% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %] ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.created_date | $KohaDates %]
  • [% END %] [% END %] @@ -297,13 +297,13 @@

    - +

    [% IF RECALLED.waiting %]

    - +

    [% END %] [% END %] @@ -350,7 +350,7 @@ [% IF ( RECALLED ) %]
    - +
    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 6829eb8315..afba66427f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -749,19 +749,19 @@

    Recall found:
    - [% recall.biblio.title | html %] + [% recall.biblio.title | html %] [% IF recall.item %] [% END %]