Bugzilla – Attachment 142323 Details for
Bug 29987
Manual credits are not recorded for a register
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29987: Display credit without offsets in transactions
Bug-29987-Display-credit-without-offsets-in-transa.patch (text/plain), 3.95 KB, created by
Kyle M Hall (khall)
on 2022-10-21 10:52:55 UTC
(
hide
)
Description:
Bug 29987: Display credit without offsets in transactions
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-10-21 10:52:55 UTC
Size:
3.95 KB
patch
obsolete
>From 35153b6f73e8042df6005becb7e0934bdea53181 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 24 Aug 2022 11:06:57 +0100 >Subject: [PATCH] Bug 29987: Display credit without offsets in transactions > >This patch adds a row to the transactions table for credits without >corresponding offsets > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/modules/pos/register.tt | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > >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 84cd8d56e1..8e8bd5c52d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -102,9 +102,20 @@ > <tbody> > [% FOREACH accountline IN accountlines %] > [% IF accountline.is_credit %] >+ [% IF accountline.credit_offsets.count == 1 %] >+ <tr class="credit dtrg-group dtrg-start dtrg-level-0"> >+ <td></td> >+ <td>{}</td> >+ <td>[% accountline.timestamp | $KohaDates with_hours => 1 %] ([% IF accountline.credit_number %][%- accountline.credit_number | html -%][% ELSE %][% accountline.accountlines_id | html %][% END %])</td> >+ <td>[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])</td> >+ <td></td> >+ <td>[% accountline.amount * -1 | $Price %]</td> >+ <td><button class="printReceipt btn btn-default btn-xs" data-accountline="[% accountline.accountlines_id | uri %]"><i class="fa fa-print"></i> Print receipt</button></td> >+ </tr> >+ [% ELSE %] > [% FOREACH credit IN accountline.credit_offsets %] > [% IF credit.debit %] >- <tr> >+ <tr cnt="[% accountline.credit_offsets.count %]"> > <td>[% accountline.accountlines_id | html %]</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 %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" }</td> > <td></td> >@@ -125,6 +136,7 @@ > </tr> > [% END %] > [% END %] >+ [% END %] > [% ELSE %] > [% FOREACH debit IN accountline.debit_offsets %] > [% IF debit.credit %] >@@ -349,6 +361,7 @@ > rowGroup: { > dataSrc: 0, > startRender: function ( rows, group ) { >+ if ( group ) { > var details = JSON.parse(rows.data().pluck(1).pop()); > var identifier = details.identifier || group; > return $('<tr class="'+details.type+'"/>') >@@ -356,6 +369,7 @@ > .append( '<td colspan="2">'+details.description+'</td>' ) > .append( '<td>'+details.amount+'</td>' ) > .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>'); >+ } > }, > endRender: null, > }, >-- >2.30.2
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 29987
:
136743
|
136755
|
139703
|
139704
|
139705
|
141165
|
141166
|
141167
|
141171
|
141469
|
141470
|
141471
|
141472
|
142321
|
142322
| 142323 |
142324
|
142325