@@ -, +, @@ - 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 ++- .../intranet-tmpl/prog/en/includes/checkouts.inc | 10 ++++ .../prog/en/modules/circ/circulation.tt | 56 +++++++--------------- .../prog/en/modules/members/moremember.tt | 21 +++----- koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 50 ++++++++++++++++++- members/moremember.pl | 1 - svc/fines | 45 +++++++++++++++++ 9 files changed, 133 insertions(+), 100 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 @@ -253,18 +253,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 @@ -283,11 +277,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( @@ -429,11 +418,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; @@ -479,20 +463,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, - ); - } # Check the debt of this patrons guarantors *and* the guarantees of those guarantors my $no_issues_charge_guarantors = C4::Context->preference("NoIssuesChargeGuarantorsWithGuarantees"); @@ -610,7 +580,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 %] -