From 5819480b6138eeef412c27b6cd42ca33c89afa16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= Date: Mon, 17 Dec 2018 13:20:17 +0000 Subject: [PATCH] Bug 19489: Development for fines and Fees Module - Detailed Description of charges in Patron Account Tab/Fines Tab Test plan: 1) Apply this patch 2) Choose a patron with overdue items applied fines 3) Click Fines from left menu 4) Test the values in barcode, due date and return date in Pay fines and Account tabs 5) Also test Column visibility, Print and Details buttons for functioning Signed-off-by: Nick Clemens --- admin/columns_settings.yml | 6 ++++++ .../prog/en/modules/members/accountline-details.tt | 21 +++++++++++++++++++ .../prog/en/modules/members/boraccount.tt | 8 +++++++- .../intranet-tmpl/prog/en/modules/members/pay.tt | 24 ++++++++++++++++++++-- .../prog/en/modules/members/printinvoice.tt | 16 ++++++++++----- members/pay.pl | 8 +------- members/printinvoice.pl | 5 ++++- 7 files changed, 72 insertions(+), 16 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index eacc02bdd8..a392d55859 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -305,6 +305,12 @@ modules: - columnname: description - + columnname: barcode + - + columnname: date_due + - + columnname: returndate + - columnname: note - columnname: amount diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt index 48292b55f6..58a3a6242c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -31,6 +31,9 @@ Date Description of charges + Barcode + Due date + Return date Note Amount Outstanding @@ -59,6 +62,24 @@ + [% IF ( accountline.itemnumber ) %] + [% accountline.item.barcode | html %] + [% END %] + + + + [% IF ( accountline.issue_id ) %] + [% accountline.issue.date_due | $KohaDates as_due_date => 1 %] + [% END %] + + + + [% IF ( accountline.issue_id ) %] + [% accountline.issue.returndate | $KohaDates with_hours => 1 %] + [% END %] + + + [% accountline.note | html_line_break %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt index 1136de608e..c8c3c4b8a6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt @@ -46,6 +46,9 @@ Date Description of charges + Barcode + Due date + Return date Home library Note Amount @@ -64,6 +67,9 @@ [%- IF account.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] [%- IF account.description %], [% account.description | html %][% END %]  [% IF ( account.itemnumber ) %][% account.item.biblio.title | html %][% END %] + [% IF ( account.itemnumber ) %][% account.item.barcode | html %][% END %] + [% IF ( account.issue_id ) %][% account.issue.date_due | $KohaDates as_due_date => 1 %][% END %] + [% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 %][% END %] [% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %] [% account.note | html_line_break %] [% IF account.amount <= 0 %][% ELSE %][% END %][% account.amount | $Price %] @@ -84,7 +90,7 @@ [% END %] - Total due + Total due [% IF ( totalcredit ) %] [% total | $Price %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index b58c4e66e3..d3553ff9d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -1,6 +1,7 @@ [% USE raw %] [% USE Asset %] [% USE Koha %] +[% USE KohaDates %] [% USE AuthorisedValues %] [% USE Branches %] [% USE Price %] @@ -43,6 +44,9 @@   Fines & charges Description + Barcode + Due date + Return date Payment note Account type Amount @@ -51,7 +55,7 @@ - Total due: + Total due: [% IF outstanding_credits.total_outstanding < 0 %] [% total + outstanding_credits.total_outstanding | $Price %] [% ELSE %] @@ -74,6 +78,7 @@ [% END %] + @@ -105,7 +110,22 @@ [% CASE %][% line.accounttype | html %] [%- END -%] [%- IF line.description %], [% line.description | html %][% END %] - [% IF line.title %]([% line.title | html %])[% END %] + [% IF line.itemnumber %]([% line.item.biblio.title | html %])[% END %] + + + [% IF line.itemnumber %] + [% line.item.barcode | html %] + [% END %] + + + [% IF line.issue_id %] + [% line.issue.date_due | $KohaDates as_due_date => 1 %] + [% END %] + + + [% IF line.issue_id %] + [% line.issue.returndate | $KohaDates with_hours => 1 %] + [% END %] [% line.accounttype | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt index a28ac03e34..eaba0dd6c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt @@ -21,23 +21,23 @@ [% IF ( LibraryName ) %] - [% END %] - - - @@ -45,6 +45,9 @@ + + + @@ -57,6 +60,9 @@ [% PROCESS account_type_description account=account %] [%- IF account.description %], [% account.description | html %][% END %] + + + [% IF ( account.amountcredit ) %] [% IF ( account.amountoutstandingcredit ) %] @@ -65,7 +71,7 @@ [% END %] - + [% IF ( totalcredit ) %] diff --git a/members/pay.pl b/members/pay.pl index 848141906e..e33c12c9ed 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -147,13 +147,6 @@ sub add_accounts_to_template { my $total = $account_lines->total_outstanding; my @accounts; while ( my $account_line = $account_lines->next ) { - $account_line = $account_line->unblessed; - if ( $account_line->{itemnumber} ) { - my $item = Koha::Items->find( $account_line->{itemnumber} ); - my $biblio = $item->biblio; - $account_line->{biblionumber} = $biblio->biblionumber; - $account_line->{title} = $biblio->title; - } push @accounts, $account_line; } borrower_add_additional_fields($patron); @@ -198,6 +191,7 @@ sub redirect_to_paycollect { $redirect .= get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 ); $redirect .= get_for_redirect( 'description', "description$line_no", 0 ); + $redirect .= get_for_redirect( 'issue_id', "issue_id$line_no", 0 ); $redirect .= get_for_redirect( 'title', "title$line_no", 0 ); $redirect .= get_for_redirect( 'itemnumber', "itemnumber$line_no", 0 ); $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 ); diff --git a/members/printinvoice.pl b/members/printinvoice.pl index a6d92f7e3a..49e777ef77 100755 --- a/members/printinvoice.pl +++ b/members/printinvoice.pl @@ -55,7 +55,10 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log #get account details my $total = $patron->account->balance; -my $accountline = Koha::Account::Lines->find($accountlines_id)->unblessed; +my $accountline_object = Koha::Account::Lines->find($accountlines_id); +my $accountline = $accountline_object->unblessed; +$accountline->{item} = $accountline_object->item || "" ; +$accountline->{issue} = $accountline_object->issue || ""; my $totalcredit; if ( $total <= 0 ) { -- 2.11.0
+

[% LibraryName | html %]

+

INVOICE

+

[% Branches.GetName( patron.branchcode ) | html %]

+ Bill to: [% patron.firstname | html %] [% patron.surname | html %]
Card number: [% patron.cardnumber | html %]
Date Description of chargesBarcodeDue dateReturn date Note Amount Amount outstanding[% account.item.barcode | html %][% account.issue.date_due | $KohaDates as_due_date => 1 %][% account.issue.returndate | $KohaDates with_hours => 1 %] [% account.note | html %][% ELSE %][% END %][% account.amount | $Price %][% ELSE %][% END %][% account.amountoutstanding | $Price %]
Total outstanding dues as on date: Total outstanding dues as on date: [% ELSE %][% END %][% total | $Price %]