@@ -, +, @@
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(-)
--- a/admin/columns_settings.yml
+++ a/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
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt
+++ a/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 %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
+++ a/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 %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt
+++ a/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:
Apply [% outstanding_credits.total_outstanding | $Price %]
[% 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 %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt
@@ -21,23 +21,23 @@
[% IF ( LibraryName ) %]
-
- [% LibraryName | html %]
+
+ [% LibraryName | html %]
[% END %]
-
- INVOICE
-
+
+ INVOICE
+
-
+
[% Branches.GetName( patron.branchcode ) | html %]
-
+
Bill to: [% patron.firstname | html %] [% patron.surname | html %]
Card number: [% patron.cardnumber | html %]
@@ -45,6 +45,9 @@
Date
Description of charges
+ Barcode
+ Due date
+ Return date
Note
Amount
Amount outstanding
@@ -57,6 +60,9 @@
[% PROCESS account_type_description account=account %]
[%- IF account.description %], [% account.description | html %][% END %]
+ [% account.item.barcode | html %]
+ [% account.issue.date_due | $KohaDates as_due_date => 1 %]
+ [% account.issue.returndate | $KohaDates with_hours => 1 %]
[% account.note | html %]
[% IF ( account.amountcredit ) %][% ELSE %] [% END %][% account.amount | $Price %]
[% IF ( account.amountoutstandingcredit ) %][% ELSE %] [% END %][% account.amountoutstanding | $Price %]
@@ -65,7 +71,7 @@
[% END %]
- Total outstanding dues as on date:
+ Total outstanding dues as on date:
[% IF ( totalcredit ) %][% ELSE %] [% END %][% total | $Price %]
--- a/members/pay.pl
+++ a/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 );
--- a/members/printinvoice.pl
+++ a/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 ) {
--