Bugzilla – Attachment 191145 Details for
Bug 41575
Tidy kohaTable block - pos
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41575: Tidy kohaTable - pos/pay.tt
3cc2f0c.patch (text/plain), 2.72 KB, created by
Jonathan Druart
on 2026-01-09 14:51:19 UTC
(
hide
)
Description:
Bug 41575: Tidy kohaTable - pos/pay.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-09 14:51:19 UTC
Size:
2.72 KB
patch
obsolete
>From 3cc2f0cbcc5653ac31e9fb557d9a06a227fa661f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Jan 2026 14:23:53 +0100 >Subject: [PATCH] Bug 41575: Tidy kohaTable - pos/pay.tt > >--- > .../intranet-tmpl/prog/en/modules/pos/pay.tt | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index f5cb9b2dd03..1a95ed9ecc7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -248,6 +248,17 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'format_price.inc' %] > [% INCLUDE 'datatables.inc' %] >+ <script> >+ var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %]; >+ var zero_formatted = "[% 0 | $Price %]"; >+ const payment_id = "[% payment_id | html %]"; >+ const tendered = "[% tendered | html %]"; >+ const change = "[% change | html %]"; >+ addPrefs({ >+ FinePaymentAutoPopup: [% Koha.Preference('FinePaymentAutoPopup') ? 1 : 0 | html %], >+ }); >+ </script> >+ > <script> > function moneyFormat(textObj) { > var newValue = textObj.value; >@@ -315,7 +326,6 @@ > > function updateChangeValues() { > var change = $('#change')[0]; >- var zero_formatted = "[% 0 | $Price %]"; > change.innerHTML = Math.round(($('#tendered')[0].value - $('#paid')[0].value) * 100) / 100; > if (change.innerHTML <= 0) { > var paid = $('#paid')[0]; >@@ -438,7 +448,6 @@ > } > }); > >- var items_table_settings = [% TablesSettings.GetTableSettings('pos', 'pay', 'invoices', 'json') | $raw %]; > var items_table = $("#invoices").kohaTable( > { > pagingType: "full", >@@ -519,13 +528,13 @@ > } > }); > >- [% IF payment_id && Koha.Preference('FinePaymentAutoPopup') %] >+ if (payment_id && prefs.FinePaymentAutoPopup){ > $("#printReceipt").click(function() { >- var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=[% payment_id | uri %]&tendered=[% tendered | uri %]&change=[% change | uri %]', '_blank'); >+ var win = window.open(`/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=${payment_id}&tendered=${tendered}&change=${change}`, '_blank'); > win.focus(); > }); > $("#printReceipt").click(); >- [% END %] >+ } > }); > </script> > [% END %] >-- >2.43.0 >
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 41575
: 191145 |
191146
|
191147
|
191148