@@ -, +, @@ - update fines/checkouts info - show/hide checkouts form and messages --- circ/circulation.pl | 31 ---------- .../prog/en/includes/blocked-fines.inc | 12 ++-- .../prog/en/includes/checkouts-table.inc | 7 +-- .../prog/en/includes/checkouts.inc | 10 ++++ .../prog/en/includes/doc-head-close.inc | 6 +- .../prog/en/modules/circ/circulation.tt | 59 ++++++------------- .../prog/en/modules/members/moremember.tt | 15 ++--- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 50 +++++++++++++++- members/moremember.pl | 1 - svc/fines | 45 ++++++++++++++ 10 files changed, 135 insertions(+), 101 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/checkouts.inc create mode 100644 svc/fines --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -278,18 +278,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 @@ -308,11 +302,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( @@ -447,11 +436,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; - if ( $item ) { $template_params->{item} = $item; $template_params->{biblio} = $biblio; @@ -497,20 +481,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 ); @@ -615,7 +585,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,9 @@ -[% USE Price %] -[% SET NoIssuesCharge = Koha.Preference('noissuescharge') %] -[% IF fines and fines > 0 %] -