Bugzilla – Attachment 182386 Details for
Bug 38457
Add additional fields support to debit types
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38457: Add additional fields to debit display
Bug-38457-Add-additional-fields-to-debit-display.patch (text/plain), 3.80 KB, created by
Martin Renvoize (ashimema)
on 2025-05-13 16:06:58 UTC
(
hide
)
Description:
Bug 38457: Add additional fields to debit display
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-05-13 16:06:58 UTC
Size:
3.80 KB
patch
obsolete
>From 360ab5b90353b587c2ba3b29d712d2ce8eb808ae Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 17 Dec 2024 17:05:43 +0000 >Subject: [PATCH] Bug 38457: Add additional fields to debit display > >This patch adds the previously added additional fields to the display >in the debit types management page table > >Sponsored-by: PTFS Europe <https://ptfs-europe.com> >Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk> >Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> >--- > admin/debit_types.pl | 5 +++-- > .../prog/en/modules/admin/debit_types.tt | 14 ++++++++++++++ > 2 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/admin/debit_types.pl b/admin/debit_types.pl >index 6b19f3d8c00..03211d47da2 100755 >--- a/admin/debit_types.pl >+++ b/admin/debit_types.pl >@@ -43,6 +43,9 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > } > ); > >+my @additional_fields = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list; >+$template->param( additional_fields => \@additional_fields, ); >+ > my $debit_type; > if ($code) { > $debit_type = Koha::Account::DebitTypes->find($code); >@@ -67,13 +70,11 @@ if ( $op eq 'add_form' ) { > }; > } > >- my @additional_fields = Koha::AdditionalFields->search( { tablename => 'account_debit_types' } )->as_list; > my @additional_field_values = $debit_type ? $debit_type->get_additional_field_values_for_template : (); > > $template->param( > debit_type => $debit_type, > branches_loop => \@branches_loop, >- additional_fields => \@additional_fields, > additional_field_values => @additional_field_values, > ); > } elsif ( $op eq 'cud-add_validate' ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >index 3c3168fa189..4b8b8a50c1d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/debit_types.tt >@@ -170,6 +170,9 @@ > <th>System</th> > <th>Code</th> > <th>Description</th> >+ [% IF additional_fields.size %] >+ <th>Additional fields</th> >+ [% END %] > <th>Default amount</th> > <th>Available for</th> > <th>Library limitations</th> >@@ -183,6 +186,17 @@ > <td>[% debit_type.is_system | html %]</td> > <td>[% debit_type.code | html %]</td> > <td>[%- PROCESS debit_type_description debit_type = debit_type -%]</td> >+ [% IF additional_fields.size %] >+ <td> >+ [% IF debit_type.additional_field_values.count > 0 %] >+ [% FOREACH additional_field IN debit_type.additional_field_values %] >+ <div><span class="label">[% additional_field.field.name | html %]</span>: [% additional_field.value | html %]</div> >+ [% END %] >+ [% ELSE %] >+ <span>No additional fields</span> >+ [% END %] >+ </td> >+ [% END %] > <td>[% debit_type.default_amount | $Price %]</td> > <td > >[% IF debit_type.can_be_invoiced && debit_type.can_be_sold %] >-- >2.49.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 38457
:
175630
|
175631
|
175633
|
176789
|
176790
|
176791
|
178394
|
178395
|
178396
|
178397
|
178398
|
180494
|
180495
|
180496
|
180497
|
180498
|
180519
|
180520
|
180521
|
180522
|
180523
|
182384
|
182385
| 182386 |
182387
|
182388
|
182575