Bugzilla – Attachment 121478 Details for
Bug 28344
One should be able to issue refunds against payments that have already been cashed up.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28344: Restore ability to issue refund against older payments
Bug-28344-Restore-ability-to-issue-refund-against-.patch (text/plain), 8.70 KB, created by
Kyle M Hall (khall)
on 2021-05-28 12:07:15 UTC
(
hide
)
Description:
Bug 28344: Restore ability to issue refund against older payments
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-05-28 12:07:15 UTC
Size:
8.70 KB
patch
obsolete
>From 70e8af815120aa71579190d6dd14fb8d28549694 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 13 May 2021 11:25:36 +0100 >Subject: [PATCH] Bug 28344: Restore ability to issue refund against older > payments > >When implimenting the refund features into the point of sale system, it >appears that at some point we lost the ability to apply refunds against >accountlines in the historic transactions table. This patch restores >that ability. > >Test plan: >1/ Add some transations via the point of sale system >2/ Navigate to the 'register details' page and note that you have the >option to refund some of the lines. >3/ Use the Cashup option to make the transactions historic >4/ Refresh the page and then select a past date to see the historic >transactions in the second datatable >5/ Note that the option to refund has not dissapeared from all lines >6/ Apply patch >7/ Refresh and note the refund option now appears as expected. > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/pos/register.tt | 20 +++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index 64a997685e..e9f79e17a9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -113,9 +113,9 @@ > <td>[% credit.debit.amount | $Price %]</td> > <td></td> > <td> >- [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED' ) %] >- <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> >- [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber %] >+ [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %] >+ <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> >+ [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %] > <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> > [% END %] > </td> >@@ -192,7 +192,7 @@ > [% IF credit.debit %] > <tr> > <td>[% accountline.accountlines_id | html %]</td> >- <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td> >+ <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td> > <td>[% IF accountline.timestamp %][% accountline.timestamp | $KohaDates with_hours => 1 %][% END %]</td> > <td> > [%- PROCESS account_type_description account=credit.debit -%] >@@ -202,8 +202,10 @@ > <td>[% credit.debit.amount | $Price %]</td> > <td></td> > <td> >- [% IF CAN_user_cash_management_refund_cash_registers && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %] >+ [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %] > <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> >+ [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %] >+ <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button> > [% END %] > </td> > </tr> >@@ -214,11 +216,13 @@ > [% IF debit.credit %] > <tr> > <td>[% accountline.accountlines_id | html %]</td> >- <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td> >+ <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td> > <td></td> > <td>[%- PROCESS account_type_description account=debit.credit -%]</td> >- <td>[%- IF debit.credit.description %][% debit.credit.description | html %][% END %] >- [% IF ( debit.credit.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>[% END %]</td> >+ <td> >+ [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%] >+ [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%] >+ </td> > <td>[% debit.credit.amount | $Price %]</td> > <td></td> > </tr> >-- >2.30.1 (Apple Git-130)
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 28344
:
120915
|
121098
| 121478