Bugzilla – Attachment 25715 Details for
Bug 11573
Fine descriptions related to Rentals are untranslatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Followup Bug-11573-display-derived-account-fines-tab-description
0003-PATCH-Bug-11573-display-derived-account-fines-tab-de.patch (text/plain), 7.12 KB, created by
wajasu
on 2014-02-28 02:22:13 UTC
(
hide
)
Description:
Followup Bug-11573-display-derived-account-fines-tab-description
Filename:
MIME Type:
Creator:
wajasu
Created:
2014-02-28 02:22:13 UTC
Size:
7.12 KB
patch
obsolete
>From a066d19734fd01a1c7f330d8f480474301602844 Mon Sep 17 00:00:00 2001 >From: wajasu <matted-34813@mypacks.net> >Date: Thu, 27 Feb 2014 19:33:36 -0600 >Subject: [PATCH 3/3] [PATCH] Bug 11573 - display derived account/fines tab > description without changing accountlines > >Followup patch: > After applying patches 24485 and 24486 above, this patch will adjust things >so that the fines realated Account and Pay Fines tabs will show a description >column that is more concise without the duplicated title problem that this bug >attempts to address. > This templates have been expanded to handle accounttype codes that I could find >mentioned in the existing codebase. In the case of the renewal, where no explicit >accounttype code exists as of yet, the template checks for 'enewal' in the >accountline.description field and adjusts accordingly. The original code that is >building description can be historically preserved (though not shown), >and we will just depend on the other columns to formulate a description. > >A barcode is shown if one exists, alongside the title. >The set of accounttype codes handled in the template has been expanded. >Unhandled codes will just appear untransformed as it does now. > >Someone with a long history of fines usage can > 'select distinct accounttype from accountlines;' to confirm the set is >sufficiently handled in the pay.tt and boraccount.tt templates. > >The reason for this followup was because the original two patches fixed things >by modifying accountlines, but inderectly cause 'Pay fines' tab to have duplicate >titles. >--- > .../prog/en/modules/members/boraccount.tt | 23 +++++++++++++++++----- > .../intranet-tmpl/prog/en/modules/members/pay.tt | 17 +++++++++++++--- > members/boraccount.pl | 2 ++ > members/pay.pl | 5 +++++ > 4 files changed, 39 insertions(+), 8 deletions(-) > >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 e670478..428f755 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -48,15 +48,28 @@ > [% SWITCH account.accounttype %] > [% CASE 'Pay' %]Payment,thanks > [% CASE 'N' %]New Card >- [% CASE 'F' %]Fine, [% account.title %] >- [% CASE 'A' %]Account management fee >+ [% CASE 'F' %]Fine >+ [% CASE 'FU' %]Fine Adjusted >+ [% CASE 'FN' %]Fine >+ [% CASE 'FFOR' %]Fine Forgiven On Return >+ [% CASE 'A' %]Account Management Fee > [% CASE 'M' %]Sundry >- [% CASE 'L' %]Lost >+ [% CASE 'L' %]Lost Item >+ [% CASE 'LR' %]Lost & Refunded > [% CASE 'W' %]Writeoff >+ [% CASE 'Rent' %]Rental >+ [% CASE 'REF' %]Refund Cash >+ [% CASE 'Rep' %]Replaced >+ [% CASE 'Res' %]Reserve >+ [% CASE 'O' %]Overdue > [% CASE %][% account.accounttype %] > [%- END -%] >- [%- IF account.description %], [% account.description %][% END %] >- [% IF ( account.itemnumber ) %]<a title="[% account.title %]" href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">View item</a> [% END %]</td> >+ [%- IF account.accounttype == 'Rent' AND account.description.match('enewal') %] Renewal[% END %] >+ [%- IF account.title %] ( [% account.title |html_entity %] >+ [% IF account.item AND account.item.barcode %] [% account.item.barcode |html_entity %][% END %] ) >+ [% END %] >+ [% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.biblionumber %]&itemnumber=[% account.itemnumber %]">View item</a> [% END %] >+ </td> > <td>[% account.note | html_line_break %]</td> > [% IF ( account.amountcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amount %]</td> > [% IF ( account.amountoutstandingcredit ) %]<td class="credit">[% ELSE %]<td class="debit">[% END %][% account.amountoutstanding %]</td> >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 e584588..24b6b35 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt >@@ -119,14 +119,25 @@ function enableCheckboxActions(){ > [% CASE 'Pay' %]Payment,thanks > [% CASE 'N' %]New Card > [% CASE 'F' %]Fine >- [% CASE 'A' %]Account management fee >+ [% CASE 'FU' %]Fine Adjusted >+ [% CASE 'FN' %]Fine >+ [% CASE 'FFOR' %]Fine Forgiven On Return >+ [% CASE 'A' %]Account Management Fee > [% CASE 'M' %]Sundry > [% CASE 'L' %]Lost Item >+ [% CASE 'LR' %]Lost & Refunded > [% CASE 'W' %]Writeoff >+ [% CASE 'Rent' %]Rental >+ [% CASE 'REF' %]Refund Cash >+ [% CASE 'Rep' %]Replaced >+ [% CASE 'Res' %]Reserve >+ [% CASE 'O' %]Overdue > [% CASE %][% line.accounttype %] > [%- END -%] >- [%- IF line.description %], [% line.description %][% END %] >- [% IF line.title %]([% line.title |html_entity %])[% END %] >+ [%- IF line.accounttype == 'Rent' AND line.description.match('enewal') %] Renewal[% END %] >+ [%- IF line.title %] ( [% line.title |html_entity %] >+ [% IF line.item AND line.item.barcode %] [% line.item.barcode |html_entity %] [% END %]) >+ [% END %] > </td> > <td><input type="text" name="payment_note_[% line.accountno %]" /></td> > <td>[% line.accounttype %]</td> >diff --git a/members/boraccount.pl b/members/boraccount.pl >index 255b1ff..da42603 100755 >--- a/members/boraccount.pl >+++ b/members/boraccount.pl >@@ -32,6 +32,7 @@ use CGI; > use C4::Members; > use C4::Branch; > use C4::Accounts; >+use C4::Biblio; > use C4::Members::Attributes qw(GetBorrowerAttributes); > > my $input=new CGI; >@@ -88,6 +89,7 @@ foreach my $accountline ( @{$accts}) { > $accountline->{payment} = 1; > $reverse_col = 1; > } >+ $accountline->{item} = GetBiblioFromItemNumber($accountline->{itemnumber}); > } > > $template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); >diff --git a/members/pay.pl b/members/pay.pl >index 8a8e902..fb66ea7 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -40,6 +40,7 @@ use C4::Stats; > use C4::Koha; > use C4::Overdues; > use C4::Branch; >+use C4::Biblio; > use C4::Members::Attributes qw(GetBorrowerAttributes); > > our $input = CGI->new; >@@ -123,6 +124,10 @@ sub add_accounts_to_template { > GetBorNotifyAcctRecord( $borrowernumber, $notify_id ); > if ( @{$accountlines} ) { > my $totalnotify = AmountNotify( $notify_id, $borrowernumber ); >+ foreach my $accountline (@{$accountlines}) { >+ my $item = GetBiblioFromItemNumber($accountline->{itemnumber}); >+ $accountline->{item} = $item; >+ } > push @{$accounts}, > { accountlines => $accountlines, > notify => $notify_id, >-- >1.8.5.3 >
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 11573
:
24473
|
24485
|
24486
|
25715
|
27822
|
27823
|
27824
|
47236
|
47237
|
47238
|
47239
|
47240
|
47241
|
47242
|
47288
|
47289
|
47290
|
47291
|
88549
|
88600
|
88601
|
88602
|
88603
|
88604
|
88605
|
88606
|
88726
|
88727
|
88728
|
88729
|
90231
|
90232
|
90233
|
90234
|
90246
|
90256
|
90313
|
90314
|
90315
|
90316
|
91529
|
91530
|
91531
|
91532
|
91800
|
91801
|
91802
|
91803
|
91804
|
91805
|
91806