Bugzilla – Attachment 122606 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.11 KB, created by
Martin Renvoize
on 2021-07-06 08:51:24 UTC
(
hide
)
Description:
Bug 28656: Allow cancellations in the UI
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2021-07-06 08:51:24 UTC
Size:
2.11 KB
patch
obsolete
>From ea6077ad918e4a42a3a912671da4048b4be2e685 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 | 2 +- > 2 files changed, 11 insertions(+), 1 deletion(-) > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index af88da170b..2b540f7ee1 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..3697292355 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -116,7 +116,7 @@ > [% IF account.is_credit && account.status != 'VOID' %] > <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