View | Details | Raw Unified | Return to bug 28656
Collapse All | Expand All

(-)a/Koha/Account/Line.pm (+10 lines)
Lines 360-365 sub void { Link Here
360
    return $void;
360
    return $void;
361
}
361
}
362
362
363
=head3 can_be_cancelled
364
365
=cut
366
367
sub can_be_cancelled {
368
    my ($self) = @_;
369
370
    return $self->debit_offsets->filter_by_reversable->count ? 1 : 0;
371
}
372
363
=head3 cancel
373
=head3 cancel
364
374
365
  $debit_accountline->cancel();
375
  $debit_accountline->cancel();
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-2 / +1 lines)
Lines 116-122 Link Here
116
        [% IF account.is_credit && account.status != 'VOID' %]
116
        [% IF account.is_credit && account.status != 'VOID' %]
117
          <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void payment</a>
117
          <a href="boraccount.pl?action=void&amp;accountlines_id=[% account.accountlines_id | uri %]&amp;borrowernumber=[% account.borrowernumber | uri %]" class="btn btn-default btn-xs void"><i class="fa fa-ban"></i> Void payment</a>
118
        [% END %]
118
        [% END %]
119
        [% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %]
119
        [% IF account.is_debit && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') && !(account.debit_type_code == 'VOID') && !account.can_be_cancelled %]
120
          <form method="post" action="/cgi-bin/koha/members/cancel-charge.pl">
120
          <form method="post" action="/cgi-bin/koha/members/cancel-charge.pl">
121
            <input type="hidden" name="csrf_token" value="[% csrf_token | html %]">
121
            <input type="hidden" name="csrf_token" value="[% csrf_token | html %]">
122
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]">
122
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]">
123
- 

Return to bug 28656