From 439e3f677f34ea525562d4a3b9e2653df7611dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= Date: Mon, 18 Feb 2019 09:50:10 +0000 Subject: [PATCH] Bug 19489: (Rebased) Development for fines and Fees Module - Detailed Description of charges in Patron Account Tab/Fines Tab --- admin/columns_settings.yml | 12 ++++++++++ .../prog/en/modules/members/accountline-details.tt | 21 +++++++++++++++++ .../prog/en/modules/members/boraccount.tt | 8 ++++++- .../intranet-tmpl/prog/en/modules/members/pay.tt | 27 ++++++++++++++++++---- .../prog/en/modules/members/printinvoice.tt | 22 +++++++++++------- members/pay.pl | 8 +------ members/printinvoice.pl | 5 +++- 7 files changed, 82 insertions(+), 21 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 6bc5c5502c8..296103de450 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -358,6 +358,12 @@ modules: - columnname: description - + columnname: barcode + - + columnname: date_due + - + columnname: returndate + - columnname: note - columnname: amount @@ -387,6 +393,12 @@ modules: - columnname: date - + columnname: barcode + - + columnname: date_due + - + columnname: returndate + - columnname: note - columnname: account_type 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 1e9855bbc2b..b777370169e 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 @@ -42,6 +42,9 @@ Date Description of charges + Barcode + Due date + Return date Note Amount Outstanding @@ -70,6 +73,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 eb5d770dc18..cc3784176e5 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 f82fbeaadcd..89819b615b3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -47,6 +47,9 @@ Actions Description Date + Barcode + Due date + Return date Payment note Account type Amount @@ -71,6 +74,7 @@ [% END %] + @@ -102,11 +106,26 @@ [% 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 %] [% line.date | $KohaDates %] + + [% 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 %] + Add note @@ -121,18 +140,18 @@ [% IF outstanding_credits.total_outstanding < 0 %] - Outstanding credits could be applied: + Outstanding credits could be applied: [% END %] [% IF ( account_grp.total ) %] - Sub total: + Sub total: [% account_grp.total | $Price %] [% END %] - Total due: + Total due: [% IF outstanding_credits.total_outstanding < 0 %] [% total + outstanding_credits.total_outstanding | $Price %] [% ELSE %] 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 a28ac03e349..27fc6207136 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 848141906e2..e33c12c9edf 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 a6d92f7e3a5..49e777ef77a 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 %]

+
+

[% LibraryName | html %]

-

INVOICE

-
+

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 %]