From 11e57105ef1c3739ef7828c9112bc1d4575a7818 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 --- Koha/MarcOrder.pm | 9 +- .../en/modules/admin/marc_order_accounts.tt | 145 +++++++++++++++--- 2 files changed, 132 insertions(+), 22 deletions(-) diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm index ee47751f5a..3cfc9cdf3e 100644 --- a/Koha/MarcOrder.pm +++ b/Koha/MarcOrder.pm @@ -42,6 +42,7 @@ use C4::Biblio qw( AddBiblio GetMarcFromKohaField TransformHtmlToXml + GetMarcQuantity ); use C4::Items qw( AddItemFromMarc ); use C4::Budgets qw( GetBudgetByCode ); @@ -163,7 +164,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}; @@ -179,7 +180,7 @@ sub import_record_and_create_order_lines { matcher_id => $matcher_id, overlay_action => $overlay_action, agent => $agent, - import_record_id_selected => @import_record_id_selected, + import_record_id_selected => $import_record_id_selected, }); return { @@ -476,7 +477,7 @@ sub add_biblios_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}; @@ -489,7 +490,7 @@ sub add_biblios_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 c5e68e92fc..1ef0c0f117 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' %] @@ -137,19 +134,59 @@ MARC Order Accounts
  • @@ -161,7 +198,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' %] +
  • @@ -183,17 +252,57 @@ MARC Order Accounts Check for embedded item record data?
    1. - + [% IF ( account.parse_items == 1 ) %] + + [% ELSE %] + + [% END %]
    2. - + [% IF ( account.parse_items == 0 ) %] + + [% ELSE %] + + [% END %]
      -
    1. - [% INCLUDE 'tools-item-action.inc' %] +
    2. + +
    -- 2.37.1 (Apple Git-137.1)