@@ -, +, @@ - update fines/checkouts info - show/hide checkouts form and messages --- circ/circulation.pl | 27 -------- .../prog/en/includes/blocked-fines.inc | 14 ++-- .../prog/en/includes/checkouts-table.inc | 7 +- .../intranet-tmpl/prog/en/includes/checkouts.inc | 11 ++++ .../prog/en/modules/circ/circulation.tt | 74 ++++++++-------------- .../prog/en/modules/members/moremember.tt | 6 +- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 43 ++++++++++++- members/moremember.pl | 2 - svc/patron/fines | 45 +++++++++++++ 9 files changed, 133 insertions(+), 96 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/checkouts.inc create mode 100755 svc/patron/fines --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -273,18 +273,12 @@ if ($findborrower) { } # get the borrower information..... -my $balance = 0; $patron ||= Koha::Patrons->find( $borrowernumber ) if $borrowernumber; if ($patron) { $template->param( borrowernumber => $patron->borrowernumber ); output_and_exit_if_error( $query, $cookie, $template, { module => 'members', logged_in_user => $logged_in_user, current_patron => $patron } ); - my $overdues = $patron->get_overdues; - my $issues = $patron->checkouts; - $balance = $patron->account->balance; - - # if the expiry date is before today ie they have expired if ( $patron->is_expired ) { #borrowercard expired, no issues @@ -303,11 +297,6 @@ if ($patron) { $template->param("returnbeforeexpiry" => 1); } } - $template->param( - overduecount => $overdues->count, - issuecount => $issues->count, - finetotal => $balance, - ); if ( $patron and $patron->is_debarred ) { $template->param( @@ -434,7 +423,6 @@ if (@$barcodes) { ); } - # FIXME If the issue is confirmed, we launch another time checkouts->count, now display the issue count after issue $patron = Koha::Patrons->find( $borrowernumber ); $template_params->{issuecount} = $patron->checkouts->count; @@ -484,20 +472,6 @@ if ( $patron ) { $template->param( dbarred=> 1 ); $noissues = 1; } - my $account = $patron->account; - if( ( my $owing = $account->non_issues_charges ) > 0 ) { - my $noissuescharge = C4::Context->preference("noissuescharge") || 5; # FIXME If noissuescharge == 0 then 5, why?? - $noissues = ( not C4::Context->preference("AllowFineOverride") and ( $owing > $noissuescharge ) ); - $template->param( - charges => 1, - chargesamount => $owing, - ) - } elsif ( $balance < 0 ) { - $template->param( - credits => 1, - creditsamount => -$balance, - ); - } my $no_issues_charge_guarantees = C4::Context->preference("NoIssuesChargeGuarantees"); $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees ); @@ -617,7 +591,6 @@ $template->param( duedatespec => $duedatespec, restoreduedatespec => $restoreduedatespec, message => $message, - totaldue => sprintf('%.2f', $balance), # FIXME not used in template? inprocess => $inprocess, $view => 1, batch_allowed => $batch_allowed, --- a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/blocked-fines.inc @@ -1,13 +1,11 @@ -[% USE Price %] -[% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] -[% IF fines and fines > 0 %] -