Bugzilla – Attachment 59416 Details for
Bug 15503
Grab Item Information from Order Files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15503 - Fix adding multiple items in multiple biblios.
Bug-15503---Fix-adding-multiple-items-in-multiple-.patch (text/plain), 11.39 KB, created by
Kyle M Hall (khall)
on 2017-01-23 14:04:48 UTC
(
hide
)
Description:
Bug 15503 - Fix adding multiple items in multiple biblios.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2017-01-23 14:04:48 UTC
Size:
11.39 KB
patch
obsolete
>From e941f702b0de1958c05b1124d1a979c48eb71032 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Wed, 31 Aug 2016 11:13:33 +0200 >Subject: [PATCH] Bug 15503 - Fix adding multiple items in multiple biblios. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > acqui/addorderiso2709.pl | 32 ++++++++++++---------- > .../prog/en/modules/acqui/addorderiso2709.tt | 24 ++++++++-------- > 2 files changed, 30 insertions(+), 26 deletions(-) > >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index c97b891..a590d00 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -143,7 +143,9 @@ if ($op eq ""){ > my @sort2 = $input->multi_param('sort2'); > my $matcher_id = $input->param('matcher_id'); > my $active_currency = Koha::Acquisition::Currencies->get_active; >+ my $biblio_count = 0; > for my $biblio (@$biblios){ >+ $biblio_count++; > # Check if this import_record_id was selected > next if not grep { $_ eq $$biblio{import_record_id} } @import_record_id_selected; > my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} ); >@@ -197,19 +199,19 @@ if ($op eq ""){ > } > > # Add items from MarcItemFieldsToOrder >- my @homebranches = $input->multi_param('homebranch'); >+ my @homebranches = $input->multi_param('homebranch_' . $biblio_count); > my $count = scalar @homebranches; >- my @holdingbranches = $input->multi_param('holdingbranch'); >- my @itypes = $input->multi_param('itype'); >- my @nonpublic_notes = $input->multi_param('nonpublic_note'); >- my @public_notes = $input->multi_param('public_note'); >- my @locs = $input->multi_param('loc'); >- my @ccodes = $input->multi_param('ccodes'); >- my @notforloans = $input->multi_param('notforloans'); >- my @uris = $input->multi_param('uri'); >- my @copynos = $input->multi_param('copyno'); >- my @budget_codes = $input->multi_param('budget_code'); >- my @itemprices = $input->multi_param('itemprice'); >+ my @holdingbranches = $input->multi_param('holdingbranch_' . $biblio_count); >+ my @itypes = $input->multi_param('itype_' . $biblio_count); >+ my @nonpublic_notes = $input->multi_param('nonpublic_note_' . $biblio_count); >+ my @public_notes = $input->multi_param('public_note_' . $biblio_count); >+ my @locs = $input->multi_param('loc_' . $biblio_count); >+ my @ccodes = $input->multi_param('ccodes_' . $biblio_count); >+ my @notforloans = $input->multi_param('notforloans_' . $biblio_count); >+ my @uris = $input->multi_param('uri_' . $biblio_count); >+ my @copynos = $input->multi_param('copyno_' . $biblio_count); >+ my @budget_codes = $input->multi_param('budget_code_' . $biblio_count); >+ my @itemprices = $input->multi_param('itemprice_' . $biblio_count); > my $itemcreation = 0; > for (my $i = 0; $i < $count; $i++) { > $itemcreation = 1; >@@ -457,7 +459,6 @@ sub import_biblios_list { > return () unless $batch and $batch->{import_status} =~ /^staged$|^reverted$/; > my $biblios = GetImportRecordsRange($import_batch_id,'','',$batch->{import_status}); > my @list = (); >- my $item_id = 1; > my $item_error = 0; > > my $ccodes = GetKohaAuthorisedValues("items.ccode"); >@@ -473,8 +474,10 @@ sub import_biblios_list { > } > > >- >+ my $biblio_count = 0; > foreach my $biblio (@$biblios) { >+ my $item_id = 1; >+ $biblio_count++; > my $citation = $biblio->{'title'}; > $citation .= " $biblio->{'author'}" if $biblio->{'author'}; > $citation .= " (" if $biblio->{'issn'} or $biblio->{'isbn'}; >@@ -536,6 +539,7 @@ sub import_biblios_list { > > my %itemrecord = ( > 'item_id' => $item_id++, >+ 'biblio_count' => $biblio_count, > 'homebranch' => $item_homebranch, > 'holdingbranch' => $item_holdingbranch, > 'itype' => $item_itype, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index bc333a3..2f1485e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -320,7 +320,7 @@ > <legend>Item Record [% item.item_id %]</legend> > <ol> > <li> >- <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch"> >+ <label for="homebranch_item_[% item.item_id %]">homebranch</label><select id="homebranch_item_[% item.item_id %]" name="homebranch_[% item.biblio_count %]"> > [% FOREACH branchloo IN branchloop %] > [% IF ( branchloo.value ) == ( item.homebranch ) %] > <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> >@@ -331,7 +331,7 @@ > </select> > </li> > >- <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch"> >+ <li><label for="holdingbranch_item_[% item.item_id %]">holdingbranch</label><select id="holdingbranch_item_[% item.item_id %]" name="holdingbranch_[% item.biblio_count %]"> > [% FOREACH branchloo IN branchloop %] > [% IF ( branchloo.value ) == ( item.holdingbranch ) %] > <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> >@@ -341,7 +341,7 @@ > [% END %] > </select> > </li> >- <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype"> >+ <li><label for="itype_item_[% item.item_id %]">itype</label><select id="itype_item_[% item.item_id %]" name="itype_[% item.biblio_count %]"> > [% FOREACH itypeloo IN itypeloop %] > [% IF ( itypeloo.value ) == ( item.itype ) %] > <option value="[% itypeloo.itemtype %]" selected="selected">[% itypeloo.description |html %]</option> >@@ -352,9 +352,9 @@ > </select> > </li> > >- <li><label for="nonpublic_note_item_[% item.item_id %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id %]" name="nonpublic_note" value="[% item.nonpublic_note %]"></li> >- <li><label for="public_note_item_[% item.item_id %]">public_note</label><input type="text" id="public_note_item_[% item.item_id %]" name="public_note" value="[% item.public_note %]"></li> >- <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc"> >+ <li><label for="nonpublic_note_item_[% item.item_id %]">nonpublic_note</label><input type="text" id="nonpublic_note_item_[% item.item_id %]" name="nonpublic_note_[% item.biblio_count %]" value="[% item.nonpublic_note %]"></li> >+ <li><label for="public_note_item_[% item.item_id %]">public_note</label><input type="text" id="public_note_item_[% item.item_id %]" name="public_note_[% item.biblio_count %]" value="[% item.public_note %]"></li> >+ <li><label for="loc_item_[% item.item_id %]">loc</label><select id="loc_item_[% item.item_id %]" name="loc_[% item.biblio_count %]"> > <option value=""> </option> > [% FOREACH locationloo IN locationloop %] > [% IF ( locationloo.code ) == (item.loc) %]<option value="[% locationloo.code %]" selected="selected">[% locationloo.description %]</option>[% ELSE %]<option value="[% locationloo.code %]">[% locationloo.description %]</option>[% END %] >@@ -362,17 +362,17 @@ > </select> > </li> > >- <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode"> >+ <li><label for="ccode_item_[% item.item_id %]">ccode</label><select id="ccode_item_[% item.item_id %]" name="ccode_[% item.biblio_count %]"> > [% FOREACH ccodeloo IN ccodeloop %] > [% IF ( ccodeloo.code ) == (item.ccode) %]<option value="[% ccodeloo.code %]" selected="selected">[% ccodeloo.description %]</option>[% ELSE %]<option value="[% ccodeloo.code %]">[% ccodeloo.description %]</option>[% END %] > [% END %] > </select> > </li> > >- <li><label for="notforloan_item_[% item.item_id %]">notforloan</label><input type="text" id="notforloan_item_[% item.item_id %]" name="notforloan" value="[% item.notforloan %]"></li> >- <li><label for="uri_item_[% item.item_id %]">uri</label><input type="text" id="uri_item_[% item.item_id %]" name="uri" value="[% item.uri %]"></li> >- <li><label for="copyno_item_[% item.item_id %]">copyno</label><input type="text" id="copyno_item_[% item.item_id %]" name="copyno" value="[% item.copyno %]"></li> >- <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code"> >+ <li><label for="notforloan_item_[% item.item_id %]">notforloan</label><input type="text" id="notforloan_item_[% item.item_id %]" name="notforloan_[% item.biblio_count %]" value="[% item.notforloan %]"></li> >+ <li><label for="uri_item_[% item.item_id %]">uri</label><input type="text" id="uri_item_[% item.item_id %]" name="uri_[% item.biblio_count %]" value="[% item.uri %]"></li> >+ <li><label for="copyno_item_[% item.item_id %]">copyno</label><input type="text" id="copyno_item_[% item.item_id %]" name="copyno_[% item.biblio_count %]" value="[% item.copyno %]"></li> >+ <li><label for="budget_code_item_[% item.item_id %]">budget_code</label><select id="budget_code_item_[% item.item_id %]" name="budget_code_[% item.biblio_count %]"> > <option value="">Select a fund</option> > [% FOREACH budget_loo IN budget_loop %] > [% IF ( budget_loo.b_code ) == ( item.budget_code ) %]<option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option> >@@ -381,7 +381,7 @@ > [% END %] > </select> > </li> >- <li><label for="price_item_[% item.item_id %]">price</label><input type="text" id="price_item_[% item.item_id %]" name="itemprice" value="[% item.itemprice %]"></li> >+ <li><label for="price_item_[% item.item_id %]">price</label><input type="text" id="price_item_[% item.item_id %]" name="itemprice_[% item.biblio_count %]" value="[% item.itemprice %]"></li> > </ol> > </fieldset> > [% END %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15503
:
53493
|
54480
|
54660
|
55057
|
55616
|
55617
|
55926
|
55927
|
55928
|
56851
|
56852
|
57123
|
57124
|
57125
|
57715
|
58103
|
58132
|
58164
|
58165
|
58166
|
58376
|
58377
|
59093
|
59097
|
59415
|
59416
|
59417
|
59418
|
59419
|
59420
|
59421
|
59515
|
60025
|
60026
|
60027
|
60028
|
60029
|
60030
|
60031
|
60032
|
60203
|
60204
|
60205
|
60206
|
60207
|
60208
|
60209
|
60210
|
60211