Bugzilla – Attachment 175633 Details for
Bug 38457
Add custom field in debit type to allow for external finance system codes to be added
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.84 KB, created by
Martin Renvoize (ashimema)
on 2024-12-17 17:07:21 UTC
(
hide
)
Description:
Bug 38457: Add additional fields to debit display
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-12-17 17:07:21 UTC
Size:
3.84 KB
patch
obsolete
>From ad017572f800cd2e3f6fe4cd6f16d3605d47cec9 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 >--- > 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 925cbc78272..fee74815e77 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); >@@ -68,13 +71,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, > ); > } >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 f9486e7251e..9be54630ac3 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 >@@ -172,6 +172,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> >@@ -185,6 +188,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 %] > <i class="fa fa-id-card"></i> Invoicing, <i class="fa fa-shopping-cart"></i> Sale >-- >2.47.1
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