From 701f458d7f37eebbb83d01cd59c47d90c77e01d4 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Thu, 10 Aug 2023 14:23:18 +0000 Subject: [PATCH] Bug 34355: Fix form rendering issue This patch also fixes the referencing of import_record_id_selected Signed-off-by: Andrew Fuerste Henry Signed-off-by: Nick Clemens --- Koha/MarcOrder.pm | 7 +- .../en/modules/admin/marc_order_accounts.tt | 145 +++++++++++++++--- 2 files changed, 131 insertions(+), 21 deletions(-) diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm index 8373c99c897..2ec28cff59e 100644 --- a/Koha/MarcOrder.pm +++ b/Koha/MarcOrder.pm @@ -48,6 +48,7 @@ use C4::Biblio qw( AddBiblio GetMarcFromKohaField TransformHtmlToXml + GetMarcQuantity ); use C4::Items qw( AddItemFromMarc ); use C4::Budgets qw( GetBudgetByCode ); @@ -171,7 +172,7 @@ sub import_record_and_create_order_lines { my ( $self, $args ) = @_; my $import_batch_id = $args->{import_batch_id}; - my @import_record_id_selected = $args->{import_record_id_selected} || (); + my $import_record_id_selected = $args->{import_record_id_selected} || (); my $matcher_id = $args->{matcher_id}; my $overlay_action = $args->{overlay_action}; my $import_record = $args->{import_record}; @@ -438,7 +439,7 @@ sub add_biblio_from_import_record { my ($args) = @_; my $import_batch_id = $args->{import_batch_id}; - my @import_record_id_selected = $args->{import_record_id_selected} || (); + my $import_record_id_selected = $args->{import_record_id_selected} || (); my $matcher_id = $args->{matcher_id}; my $overlay_action = $args->{overlay_action}; my $import_record = $args->{import_record}; @@ -451,7 +452,7 @@ sub add_biblio_from_import_record { record_result => 0, duplicates_in_batch => 0, skip => 1 - } if not grep { $_ eq $import_record->import_record_id } @import_record_id_selected; + } if not grep { $_ eq $import_record->import_record_id } @{$import_record_id_selected}; } my $marcrecord = $import_record->get_marc_record || die "Couldn't translate marc information"; 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 b81c10b9b51..936247ea87d 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 @@ -7,9 +7,6 @@ MARC Order Accounts - [% INCLUDE 'doc-head-close.inc' %] @@ -138,19 +135,59 @@ MARC Order Accounts
  • @@ -162,7 +199,7 @@ MARC Order Accounts + [% IF ( account.overlay_action == 'replace' ) %] + + [% IF ( account.overlay_action == 'create_new' ) %] + + [% IF ( account.overlay_action == 'ignore' ) %] + +
  • - [% INCLUDE 'tools-nomatch-action.inc' %] +
  • @@ -184,17 +253,57 @@ MARC Order Accounts Check for embedded item record data?
    1. - + [% IF ( account.parse_items == 1 || !account ) %] + + [% ELSE %] + + [% END %]
    2. - + [% IF ( account.parse_items == 0 ) %] + + [% ELSE %] + + [% END %]
      -
    1. - [% INCLUDE 'tools-item-action.inc' %] +
    2. + +
    -- 2.39.5