Bugzilla – Attachment 81956 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), 14.41 KB, created by
Devinim
on 2018-11-05 14:20:29 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:
Devinim
Created:
2018-11-05 14:20:29 UTC
Size:
14.41 KB
patch
obsolete
>From 76702184b8e5c4626b06f6375ff273002674a436 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= <nazli@devinim.com.tr> >Date: Mon, 5 Nov 2018 14:05:45 +0000 >Subject: [PATCH] Bug 19489 - Development for fines and Fees Module - Detailed > Description of charges in Patron Account Tab/Fines Tab > >--- > admin/columns_settings.yml | 6 ++++++ > .../prog/en/modules/members/accountline-details.tt | 13 ++++++++++++- > .../intranet-tmpl/prog/en/modules/members/boraccount.tt | 8 +++++++- > koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 12 +++++++++++- > .../prog/en/modules/members/printinvoice.tt | 16 +++++++++++----- > members/accountline-details.pl | 12 +++++++++++- > members/boraccount.pl | 6 ++++++ > members/pay.pl | 10 ++++++++++ > members/printinvoice.pl | 11 +++++++++++ > 9 files changed, 85 insertions(+), 9 deletions(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 14800190c3..81b72104d1 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -264,6 +264,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 dc5ad32a74..9a20a57fd7 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 >@@ -29,6 +29,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> >@@ -55,7 +58,15 @@ > <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% accountline.itemnumber | uri %]">[% biblio.title | html %]</a> > [% END %] > </td> >- >+ <td> >+ [% IF ( accountline.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio.biblionumber | uri %]&itemnumber=[% accountline.itemnumber | uri %]#item[% accountline.itemnumber | uri %]">[% accountline.item.barcode | html %]</a>[% END %] >+ </td> >+ <td> >+ [% IF ( accountline.issue_id ) %][% issue.date_due | $KohaDates with_hours => 1 | html %][% END %] >+ </td> >+ <td> >+ [% IF ( accountline.issue_id ) %][% issue.returndate | $KohaDates with_hours => 1 | html %][% 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 44015bb14c..66d3edbeeb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -43,6 +43,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.payment_type %], [% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] > [%- 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 ) %]<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 with_hours => 1 | html %][% END %]</td> >+ <td>[% IF ( account.issue_id ) %][% account.issue.returndate | $KohaDates with_hours => 1 | html %][% END %]</td> > <td>[% IF account.itemnumber %][% Branches.GetName( account.item.homebranch ) | html %][% END %]</td> > <td>[% account.note | html_line_break %]</td> > [% IF ( account.amountcredit ) %]<td class="credit" style="text-align: right;">[% ELSE %]<td class="debit" style="text-align: right;">[% END %][% account.amount | $Price %]</td> >@@ -94,7 +100,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 cb49492a94..cca7b3d042 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> > <td style="text-align: right;">[% total | $Price %]</td> > </tr> > </tfoot> >@@ -70,6 +74,9 @@ > [% 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="barcode[% line.accountlines_id | html %]" value="[% line.barcode | html %]" /> >+ <input type="hidden" name="date_due[% line.accountlines_id | html %]" value="[% line.issue.date_due | html %]" /> >+ <input type="hidden" name="returndate[% line.accountlines_id | html %]" value="[% line.issue.returndate | 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 %]" /> >@@ -103,6 +110,9 @@ > [%- IF line.description %], [% line.description | html %][% END %] > [% IF line.title %]([% line.title | html %])[% END %] > </td> >+ <td>[% IF line.itemnumber %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% line.itemnumber | uri %]&biblionumber=[% line.biblionumber | uri %]#item[% line.itemnumber | uri %]">[% line.barcode | html %]</a>[% END %]</td> >+ <td>[% IF line.issue_id %][% line.issue.date_due | $KohaDates with_hours => 1 | html %][% END %]</td> >+ <td>[% IF line.issue_id %][% line.issue.returndate | $KohaDates with_hours => 1 | html %][% END %]</td> > <td><input type="text" name="payment_note_[% line.accountlines_id | html %]" /></td> > <td>[% line.accounttype | html %]</td> > <td class="debit" style="text-align: right;">[% line.amount | $Price %]</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 33ae62cfdf..14cf2d79db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tt >@@ -18,23 +18,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> >@@ -42,6 +42,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> >@@ -54,6 +57,9 @@ > [% INCLUDE 'accounttype.inc' account => account %] > [%- IF account.description %], [% account.description | html %][% END %] > </td> >+ <td>[% account.barcode | html %]</td> >+ <td>[% account.issue.date_due | $KohaDates with_hours => 1 | html %]</td> >+ <td>[% account.issue.returndate | $KohaDates with_hours => 1 | html %]</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> >@@ -62,7 +68,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/accountline-details.pl b/members/accountline-details.pl >index 1ac40a0210..c1d1fd4d8d 100755 >--- a/members/accountline-details.pl >+++ b/members/accountline-details.pl >@@ -24,6 +24,8 @@ use C4::Auth; > use C4::Output; > use C4::Context; > use Koha::Patrons; >+use Koha::Checkouts; >+use Koha::Old::Checkouts; > use Koha::Account::Lines; > > my $input = new CGI; >@@ -63,7 +65,15 @@ if ($accountline) { > ); > > my $patron = Koha::Patrons->find( $accountline->borrowernumber ); >- $template->param( patron => $patron ); >+ my $issues; >+ if ( $accountline->issue_id ) { >+ $issues = Koha::Checkouts->find($accountline->issue_id ); >+ $issues = Koha::Old::Checkouts->find($accountline->issue_id ) unless $issues; >+ } >+ $template->param( >+ patron => $patron, >+ issue => $issues, >+ ); > } > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/members/boraccount.pl b/members/boraccount.pl >index 582264a6fe..5073c11299 100755 >--- a/members/boraccount.pl >+++ b/members/boraccount.pl >@@ -109,6 +109,12 @@ while ( my $line = $accts->next ) { > # Because we will not have access to the object from the template > $accountline->{item} = $line->item; > } >+ >+ if ( $accountline->{issue_id} ) { >+ my $issues = Koha::Checkouts->find($accountline->{issue_id} ); >+ $issues = Koha::Old::Checkouts->find($accountline->{issue_id} ) unless $issues; >+ $accountline->{issue} = $issues; >+ } > push @accountlines, $accountline; > } > >diff --git a/members/pay.pl b/members/pay.pl >index b2216aa511..f72314c70d 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -148,7 +148,14 @@ sub add_accounts_to_template { > my $biblio = $item->biblio; > $account_line->{biblionumber} = $biblio->biblionumber; > $account_line->{title} = $biblio->title; >+ $account_line->{barcode} = $item->barcode; > } >+ if ( $account_line->{issue_id} ) { >+ my $issues = Koha::Checkouts->find($account_line->{issue_id} ); >+ $issues = Koha::Old::Checkouts->find($account_line->{issue_id} ) unless $issues; >+ $account_line->{issue} = $issues; >+ } >+ > push @accounts, $account_line; > } > borrower_add_additional_fields($patron); >@@ -192,6 +199,9 @@ sub redirect_to_paycollect { > get_for_redirect( 'amountoutstanding', "amountoutstanding$line_no", 1 ); > $redirect .= get_for_redirect( 'description', "description$line_no", 0 ); > $redirect .= get_for_redirect( 'title', "title$line_no", 0 ); >+ $redirect .= get_for_redirect( 'barcode', "barcode$line_no", 0 ); >+ $redirect .= get_for_redirect( 'date_due', "date_due$line_no", 0 ); >+ $redirect .= get_for_redirect( 'returndate', "returndate$line_no", 0 ); > $redirect .= get_for_redirect( 'itemnumber', "itemnumber$line_no", 0 ); > $redirect .= get_for_redirect( 'accountlines_id', "accountlines_id$line_no", 0 ); > $redirect .= q{&} . 'payment_note' . q{=} . uri_escape_utf8( scalar $input->param("payment_note_$line_no") ); >diff --git a/members/printinvoice.pl b/members/printinvoice.pl >index a6d92f7e3a..10102df4de 100755 >--- a/members/printinvoice.pl >+++ b/members/printinvoice.pl >@@ -57,6 +57,17 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log > my $total = $patron->account->balance; > my $accountline = Koha::Account::Lines->find($accountlines_id)->unblessed; > >+if ( $accountline->{itemnumber} ) { >+ my $item = Koha::Items->find( $accountline->{itemnumber} ); >+ $accountline->{barcode} = $item->barcode; >+} >+ >+if ( $accountline->{issue_id} ) { >+ my $issues = Koha::Checkouts->find($accountline->{issue_id} ); >+ $issues = Koha::Old::Checkouts->find($accountline->{issue_id} ) unless $issues; >+ $accountline->{issue} = $issues; >+} >+ > my $totalcredit; > if ( $total <= 0 ) { > $totalcredit = 1; >-- >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