From 1ce1ec7be0b4b094ea275891b1150561c3124d10 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 | 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 44680e088a..b1cb3c2e3a 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 ); @@ -169,7 +170,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}; @@ -474,7 +475,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}; @@ -487,7 +488,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 c5e68e92fc..1dea3287f8 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 || !account ) %] + + [% ELSE %] + + [% END %]
    2. - + [% IF ( account.parse_items == 0 ) %] + + [% ELSE %] + + [% END %]
      -
    1. - [% INCLUDE 'tools-item-action.inc' %] +
    2. + +
    -- 2.37.1 (Apple Git-137.1)