@@ -, +, @@ --- svc/checkin.pl | 2 -- svc/checkouts.pl | 10 +++++++--- svc/holds.pl | 15 +++++++++------ svc/renew.pl | 4 ++-- 4 files changed, 18 insertions(+), 13 deletions(-) --- a/svc/checkin.pl +++ a/svc/checkin.pl @@ -27,8 +27,6 @@ use C4::Items qw(GetBarcodeFromItemnumber); use C4::Context; use C4::Auth qw(check_cookie_auth); -use Koha::DateUtils qw(output_pref_due); - my $input = new CGI; my ( $auth_status, $sessionID ) = --- a/svc/checkouts.pl +++ a/svc/checkouts.pl @@ -103,7 +103,7 @@ $sql .= " ORDER BY $sorting_column $sorting_direction "; my $dbh = C4::Context->dbh(); my $sth = $dbh->prepare($sql); -$sth->execute( @parameters ); +$sth->execute(@parameters); my $item_level_itypes = C4::Context->preference('item-level_itypes'); @@ -142,8 +142,12 @@ while ( my $c = $sth->fetchrow_hashref() ) { renewals_remaining => $renewals_remaining, issuedate_formatted => output_pref( dt_from_string( $c->{issuedate} ) ), - date_due_formatted => - output_pref_due( dt_from_string( $c->{date_due} ) ), + date_due_formatted => output_pref( + { + dt => dt_from_string( $c->{date_due} ), + as_due_date => 1 + } + ), subtitle => GetRecordValue( 'subtitle', GetMarcBiblio( $c->{biblionumber} ), --- a/svc/holds.pl +++ a/svc/holds.pl @@ -95,14 +95,17 @@ while ( my $h = $holds_rs->next() ) { 'subtitle', GetMarcBiblio($biblionumber), GetFrameworkCode($biblionumber) ), - reservedate_formatted => $h->reservedate() - ? output_pref_due( dt_from_string( $h->reservedate() ) ) + reservedate_formatted => $h->reservedate() ? output_pref( + { dt => dt_from_string( $h->reservedate() ), as_due_date => 1 } + ) : q{}, - suspend_until_formatted => $h->suspend_until() - ? output_pref_due( dt_from_string( $h->suspend_until() ) ) + suspend_until_formatted => $h->suspend_until() ? output_pref( + { dt => dt_from_string( $h->suspend_until() ), as_due_date => 1 } + ) : q{}, - expirationdate_formatted => $h->expirationdate() - ? output_pref_due( dt_from_string( $h->expirationdate() ) ) + expirationdate_formatted => $h->expirationdate() ? output_pref( + { dt => dt_from_string( $h->expirationdate() ), as_due_date => 1 } + ) : q{}, }; --- a/svc/renew.pl +++ a/svc/renew.pl @@ -26,7 +26,7 @@ use C4::Circulation; use C4::Context; use C4::Auth qw(check_cookie_auth); -use Koha::DateUtils qw(output_pref_due dt_from_string); +use Koha::DateUtils qw(output_pref dt_from_string); my $input = new CGI; @@ -63,7 +63,7 @@ $data->{branchcode} = $branchcode; if ( $data->{renew_okay} ) { $date_due = AddRenewal( $borrowernumber, $itemnumber, $branchcode, $date_due ); - $data->{date_due} = output_pref_due( $date_due ); + $data->{date_due} = output_pref( { dt => $date_due, as_due_date => 1 } ); } print to_json($data); --