Bugzilla – Attachment 122622 Details for
Bug 28656
Cancellations should be allowed on paid/partially paid debts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28656: Allow cancellations in the UI
Bug-28656-Allow-cancellations-in-the-UI.patch (text/plain), 2.78 KB, created by
Martin Renvoize
on 2021-07-06 13:11:27 UTC
(
hide
)
Description:
Bug 28656: Allow cancellations in the UI
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-07-06 13:11:27 UTC
Size:
2.78 KB
patch
obsolete
>From 1937baed7820a1a32f4fc7ec9dc1f32d37f389d6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 5 Jul 2021 17:39:00 +0100 >Subject: [PATCH] Bug 28656: Allow cancellations in the UI > >This allows cancellation against "reduced" as well as "unpaid" debts. >--- > Koha/Account/Line.pm | 10 ++++++++++ > .../prog/en/modules/members/boraccount.tt | 4 ++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 23d48eb1cd..d97d96c0bd 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -360,6 +360,16 @@ sub void { > return $void; > } > >+=head3 can_be_cancelled >+ >+=cut >+ >+sub can_be_cancelled { >+ my ($self) = @_; >+ >+ return $self->debit_offsets->filter_by_reversable->count ? 1 : 0; >+} >+ > =head3 cancel > > $debit_accountline->cancel(); >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 fd4484aeaa..56a96cb528 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -113,10 +113,10 @@ > [% IF account.is_debit && account.amountoutstanding > 0 %] > <a class="btn btn-default btn-xs" href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% account.borrowernumber | html %]&pay_individual=1&debit_type_code=[% account.debit_type_code | html %]&amount=[% account.amount | html %]&amountoutstanding=[% account.amountoutstanding | html %]&description=[% account.description | html %]&itemnumber=[% account.itemnumber | html %]&accountlines_id=[% account.accountlines_id | html %]"><i class="fa fa-money"></i> Pay</a> > [% END %] >- [% IF account.is_credit && account.status != 'VOID' %] >+ [% IF account.is_credit && account.status != 'VOID' && !(account.credit_type_code == 'CANCELLATION') %] > <a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id | uri %]&borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void payment</a> > [% END %] >- [% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] >+ [% IF account.is_debit && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') && !account.can_be_cancelled %] > <form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> > <input type="hidden" name="csrf_token" value="[% csrf_token | html %]"> > <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> >-- >2.20.1
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 28656
:
122551
|
122585
|
122604
|
122605
|
122606
|
122620
|
122621
| 122622