From 905a82d29e89280682b0c15343c8c15164412748 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Mon, 21 Oct 2024 09:52:03 +0000 Subject: [PATCH] Bug 34355: (QA follow-up) Migrate vendor dropdown to a kohaSelect --- admin/marc_order_accounts.pl | 15 +--- .../en/modules/admin/marc_order_accounts.tt | 75 +++++++++++++++---- 2 files changed, 63 insertions(+), 27 deletions(-) diff --git a/admin/marc_order_accounts.pl b/admin/marc_order_accounts.pl index ce5899900bf..c95efe312dd 100755 --- a/admin/marc_order_accounts.pl +++ b/admin/marc_order_accounts.pl @@ -55,18 +55,8 @@ $op ||= 'display'; if ( $op eq 'acct_form' ) { $template->param( acct_form => 1 ); - my @vendors = Koha::Acquisition::Booksellers->search( - undef, - { - columns => [ 'name', 'id' ], - order_by => { -asc => 'name' } - } - )->as_list; my $budgets = GetBudgets(); - $template->param( - vendors => \@vendors, - budgets => $budgets - ); + $template->param( budgets => $budgets ); my @matchers = C4::Matcher::GetMatcherList(); $template->param( available_matchers => \@matchers ); @@ -127,7 +117,8 @@ sub show_account { if ($acct_id) { my $acct = Koha::MarcOrderAccounts->find($acct_id); if ($acct) { - $template->param( account => $acct ); + my $vendor = Koha::Acquisition::Booksellers->find( $acct->vendor_id ); + $template->param( vendor => $vendor, account => $acct ); } } return; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt index eda9b144475..11e9aef075e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt @@ -34,8 +34,9 @@ MARC Order Accounts
-
+
+ [% INCLUDE 'messages.inc' %] [% IF display %]
@@ -95,19 +96,15 @@ MARC Order Accounts
  1. - + [% IF (vendor) %] + [% END %]
  2. - [% FOREACH budget IN budgets %] [% IF account.budget_id == budget.budget_id %] @@ -144,7 +141,7 @@ MARC Order Accounts
    1. - [% IF ( account.record_type == 'biblio' ) %]
    2. - [% IF ( account.encoding == 'UTF-8' ) %]