From 85bf6d9a3d1d3ba065c713532bf96c63116ce271 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 3 Oct 2019 09:36:24 +0100 Subject: [PATCH] Bug 23049: Use a filtered table instead of two tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test Plan * Apply this patch and comment on new page design. Signed-off-by: Séverine QUEUNE --- admin/debit_types.pl | 7 +-- .../prog/en/modules/admin/debit_types.tt | 53 ++++++++++------------ 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/admin/debit_types.pl b/admin/debit_types.pl index 3b1dc0f..56bd5fd 100755 --- a/admin/debit_types.pl +++ b/admin/debit_types.pl @@ -134,14 +134,9 @@ elsif ( $op eq 'delete_confirmed' ) { } if ( $op eq 'list' ) { - my $defaults = Koha::Account::DebitType::defaults; - my $system_types = - Koha::Account::DebitTypes->search( { code => { 'in' => $defaults } } ); - my $debit_types = Koha::Account::DebitTypes->search( - { code => { 'not_in' => $defaults } } ); + my $debit_types = Koha::Account::DebitTypes->search(); $template->param( debit_types => $debit_types, - system_types => $system_types ); } 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 c963881..1746564 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 @@ -152,10 +152,10 @@

Account debit types

-

Custom types

[% IF debit_types.count %] + @@ -166,6 +166,7 @@ [% FOREACH debit_type IN debit_types %] + @@ -205,25 +206,6 @@ There are no account debit types defined. Create new debit type [% END %] -

System types

-
System Account type code Description Default amount
[% debit_type.is_system | html %] [% debit_type.code | html %] [% debit_type.description | html %] [% debit_type.default_amount | $Price %]
- - - - - - - - [% FOREACH system_type IN system_types %] - - - - - - - [% END %] - -
Account type codeDescriptionDefault amountCan be added manually
[% system_type.code | html %][% system_type.description | html %][% system_type.default_amount | $Price %][% IF system_type.can_be_added_manually %]Yes[% ELSE %]No[% END %]
[% END %] @@ -241,23 +223,34 @@ [% END %] -- 2.7.4