Bugzilla – Attachment 58115 Details for
Bug 17734
Make possible to pay and writeoff from boraccount page and make action buttons split button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17734: Make possible to pay and writeoff from boraccount page and make action buttons split button
Bug-17734-Make-possible-to-pay-and-writeoff-from-b.patch (text/plain), 4.10 KB, created by
Radek Šiman (R-Bit Technology, s.r.o.)
on 2016-12-12 12:22:51 UTC
(
hide
)
Description:
Bug 17734: Make possible to pay and writeoff from boraccount page and make action buttons split button
Filename:
MIME Type:
Creator:
Radek Šiman (R-Bit Technology, s.r.o.)
Created:
2016-12-12 12:22:51 UTC
Size:
4.10 KB
patch
obsolete
>From 49ee87e06e064f8303049c836c735d32b13ce97f Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 7 Dec 2016 11:06:44 +0000 >Subject: [PATCH] Bug 17734: Make possible to pay and writeoff from boraccount > page and make action buttons split button >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan >0) Have a patron with some fines - some paid and some unpaid >1) Apply the patch >2) git grep reverse_col should not return any appearence >3) Go to boraccount page, the last column header should have "Actions" >title >4) In the rightmost column you should see apropriate combination of buttons >for each row: > Print - fee which was written-off and write-off line > Pay + Print in dropdown - unpaid fee, for user without permission to >writeoff > Pay + Print and Write off in dropdown - unpaid fee, user with >permission to writeoff > Print + Reverse in dropdown - for payment row >5) Try all combination and use buttons and confirm they work as expected > >Signed-off-by: Radek Å iman <rbit@rbit.cz> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt | 10 +++------- > members/boraccount.pl | 3 --- > 2 files changed, 3 insertions(+), 10 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 66f0616..9ec674c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -66,11 +66,7 @@ $(document).ready(function() { > <th>Note</th> > <th>Amount</th> > <th>Outstanding</th> >- [% IF ( reverse_col ) %] >- <th>Actions</th> >- [% ELSE %] >- <th> </th> >- [% END %] >+ <th>Actions</th> > </tr> > </thead> > >@@ -123,7 +119,7 @@ $(document).ready(function() { > [% END %] > [% END %] > [% # If user can reverse, we need the dropdown %] >- [% IF ( reverse_col && account.payment ) %] >+ [% IF ( account.payment ) %] > <a class="btn btn-mini dropdown-toggle" id="subactions[% account.accountlines_id %]" role="button" data-toggle="dropdown" href="#"><i class="caret"></i></a> > <ul class="dropdown-menu" role="menu" arialabelledby="subactions[% account.accountlines_id %]"> > [% END %] >@@ -134,7 +130,7 @@ $(document).ready(function() { > [% END %] > <li><a target="_blank" href="printinvoice.pl?action=print&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]"><i class="fa fa-print"></i> Print</a></li> > [% END %] >- [% IF ( reverse_col && account.payment ) %] >+ [% IF ( account.payment ) %] > <li><a href="boraccount.pl?action=reverse&accountlines_id=[% account.accountlines_id %]&borrowernumber=[% account.borrowernumber %]"><i class="fa fa-undo"></i> Reverse</a></li> > [% END %] > </td> >diff --git a/members/boraccount.pl b/members/boraccount.pl >index ee8ea09..fe4b742 100755 >--- a/members/boraccount.pl >+++ b/members/boraccount.pl >@@ -73,7 +73,6 @@ if($total <= 0){ > $totalcredit = 1; > } > >-my $reverse_col = 0; # Flag whether we need to show the reverse column > foreach my $accountline ( @{$accts}) { > $accountline->{amount} += 0.00; > if ($accountline->{amount} <= 0 ) { >@@ -88,7 +87,6 @@ foreach my $accountline ( @{$accts}) { > $accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding}; > if ($accountline->{accounttype} =~ /^Pay/) { > $accountline->{payment} = 1; >- $reverse_col = 1; > } > } > >@@ -113,7 +111,6 @@ $template->param( > total => sprintf("%.2f",$total), > totalcredit => $totalcredit, > is_child => ($data->{'category_type'} eq 'C'), >- reverse_col => $reverse_col, > accounts => $accts, > activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), > RoutingSerials => C4::Context->preference('RoutingSerials'), >-- >2.1.4
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 17734
:
58009
|
58010
|
58115
|
58169
|
58171
|
58174
|
58175