Bugzilla – Attachment 83300 Details for
Bug 19489
Detailed description of charges on Accounting tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19489: Development for fines and Fees Module - Detailed Description of charges in Patron Account Tab/Fines Tab
Bug-19489-Development-for-fines-and-Fees-Module---.patch (text/plain), 12.62 KB, created by
Jonathan Druart
on 2018-12-17 15:18:57 UTC
(
hide
)
Description:
Bug 19489: Development for fines and Fees Module - Detailed Description of charges in Patron Account Tab/Fines Tab
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-12-17 15:18:57 UTC
Size:
12.62 KB
patch
obsolete
>From 7044cd58d3a722650dafb2b9319aff3418423e9f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= <nazli@devinim.com.tr> >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 >--- > 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 ae66f7ed52..687326b29e 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 @@ > <tr> > <th class="title-string">Date</th> > <th>Description of charges</th> >+ <th>Barcode</th> >+ <th>Due date</th> >+ <th>Return date</th> > <th>Note</th> > <th>Amount</th> > <th>Outstanding</th> >@@ -59,6 +62,24 @@ > </td> > > <td> >+ [% IF ( accountline.itemnumber ) %] >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% accountline.item.biblionumber | uri %]&itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a> >+ [% END %] >+ </td> >+ >+ <td> >+ [% IF ( accountline.issue_id ) %] >+ [% accountline.issue.date_due | $KohaDates as_due_date => 1 %] >+ [% END %] >+ </td> >+ >+ <td> >+ [% IF ( accountline.issue_id ) %] >+ [% accountline.issue.returndate | $KohaDates with_hours => 1 %] >+ [% END %] >+ </td> >+ >+ <td> > [% accountline.note | html_line_break %] > </td> > >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 e9680a5c55..a177d238f2 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 @@ > <tr> > <th class="title-string">Date</th> > <th>Description of charges</th> >+ <th>Barcode</th> >+ <th>Due date</th> >+ <th>Return date</th> > <th>Home library</th> > <th>Note</th> > <th>Amount</th> >@@ -65,6 +68,9 @@ > [%- IF account.description %], [% account.description | html %][% END %] > [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | uri %]&itemnumber=[% account.itemnumber | uri %]">[% account.item.biblio.title | html %]</a>[% END %]</td> > <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> >+ <td>[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% account.itemnumber | uri %]&biblionumber=[% account.item.biblionumber | uri %]#item[% account.itemnumber | uri %]">[% account.item.barcode | html %]</a>[% END %]</td> >+ <td>[% IF ( account.issue_id ) %][% account.issue.date_due | $KohaDates as_due_date => 1 %][% END %]</td> >+ <td>[% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 %][% END %]</td> > <td>[% account.note | html_line_break %]</td> > [% IF account.amount <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td> > [% IF account.amountoutstanding <= 0 %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amountoutstanding | $Price %]</td> >@@ -84,7 +90,7 @@ > [% END %] > <tfoot> > <tr> >- <td colspan="5">Total due</td> >+ <td colspan="8">Total due</td> > [% IF ( totalcredit ) %] > <td class="credit" style="text-align: right;">[% total | $Price %]</td> > [% 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 6d8c942149..1c4f274ffc 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 @@ > <th> </th> > <th>Fines & charges</th> > <th>Description</th> >+ <th>Barcode</th> >+ <th>Due date</th> >+ <th>Return date</th> > <th>Payment note</th> > <th>Account type</th> > <th>Amount</th> >@@ -51,7 +55,7 @@ > </thead> > <tfoot> > <tr> >- <td class="total" colspan="6">Total due:</td> >+ <td class="total" colspan="9">Total due:</td> > [% IF outstanding_credits.total_outstanding < 0 %] > <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td> > [% ELSE %] >@@ -74,6 +78,7 @@ > [% END %] > <input type="hidden" name="itemnumber[% line.accountlines_id | html %]" value="[% line.itemnumber | html %]" /> > <input type="hidden" name="description[% line.accountlines_id | html %]" value="[% line.description | html %]" /> >+ <input type="hidden" name="issue_id[% line.accountlines_id | html %]" value="[% line.issue_id | html %]" /> > <input type="hidden" name="accounttype[% line.accountlines_id | html %]" value="[% line.accounttype | html %]" /> > <input type="hidden" name="amount[% line.accountlines_id | html %]" value="[% line.amount | html %]" /> > <input type="hidden" name="accountlines_id[% line.accountlines_id | html %]" value="[% line.accountlines_id | html %]" /> >@@ -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 %] >+ </td> >+ <td> >+ [% IF line.itemnumber %] >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% line.itemnumber | uri %]&biblionumber=[% line.item.biblionumber | uri %]#item[% line.itemnumber | uri %]">[% line.item.barcode | html %]</a> >+ [% END %] >+ </td> >+ <td> >+ [% IF line.issue_id %] >+ [% line.issue.date_due | $KohaDates as_due_date => 1 %] >+ [% END %] >+ </td> >+ <td> >+ [% IF line.issue_id %] >+ [% line.issue.returndate | $KohaDates with_hours => 1 %] >+ [% END %] > </td> > <td><input type="text" name="payment_note_[% line.accountlines_id | html %]" /></td> > <td>[% line.accounttype | html %]</td> >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 @@ > <table> > [% IF ( LibraryName ) %] > <tr> >- <th colspan="5" class="centerednames"> >+ <th colspan="8" class="centerednames"> > <h3>[% LibraryName | html %]</h3> > </th> > </tr> > [% END %] > <tr> >- <th colspan="5" class="centerednames"> >+ <th colspan="8" class="centerednames"> > <h2><u>INVOICE</u></h2> > </th> > </tr> > <tr> >- <th colspan="5" class="centerednames"> >+ <th colspan="8" class="centerednames"> > <h2>[% Branches.GetName( patron.branchcode ) | html %]</h2> > </th> > </tr> > <tr> >- <th colspan="5" > >+ <th colspan="8" > > Bill to: [% patron.firstname | html %] [% patron.surname | html %] <br /> > Card number: [% patron.cardnumber | html %]<br /> > </th> >@@ -45,6 +45,9 @@ > <tr> > <th>Date</th> > <th>Description of charges</th> >+ <th>Barcode</th> >+ <th>Due date</th> >+ <th>Return date</th> > <th>Note</th> > <th style="text-align:right;">Amount</th> > <th style="text-align:right;">Amount outstanding</th> >@@ -57,6 +60,9 @@ > [% PROCESS account_type_description account=account %] > [%- IF account.description %], [% account.description | html %][% END %] > </td> >+ <td>[% account.item.barcode | html %]</td> >+ <td>[% account.issue.date_due | $KohaDates as_due_date => 1 %]</td> >+ <td>[% account.issue.returndate | $KohaDates with_hours => 1 %]</td> > <td>[% account.note | html %]</td> > [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount | $Price %]</td> > [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding | $Price %]</td> >@@ -65,7 +71,7 @@ > [% END %] > <tfoot> > <tr> >- <td colspan="4">Total outstanding dues as on date: </td> >+ <td colspan="7">Total outstanding dues as on date: </td> > [% IF ( totalcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% total | $Price %]</td> > </tr> > </tfoot> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19489
:
81956
|
81989
|
81991
|
82519
|
82520
|
82614
|
82615
|
82846
|
83109
|
83110
|
83242
|
83276
|
83277
|
83299
|
83300
|
83301
|
83618
|
83619
|
83620
|
85236
|
85237
|
85275
|
85315
|
85668
|
85669
|
85670
|
85671
|
85672
|
85673
|
85674
|
85675
|
85731
|
85732
|
85733
|
85734
|
85735
|
85736
|
85737
|
85738