View | Details | Raw Unified | Return to bug 34355
Collapse All | Expand All

(-)a/Koha/MarcOrder.pm (-3 / +4 lines)
Lines 48-53 use C4::Biblio qw( Link Here
48
    AddBiblio
48
    AddBiblio
49
    GetMarcFromKohaField
49
    GetMarcFromKohaField
50
    TransformHtmlToXml
50
    TransformHtmlToXml
51
    GetMarcQuantity
51
);
52
);
52
use C4::Items qw( AddItemFromMarc );
53
use C4::Items qw( AddItemFromMarc );
53
use C4::Budgets qw( GetBudgetByCode );
54
use C4::Budgets qw( GetBudgetByCode );
Lines 169-175 sub import_record_and_create_order_lines { Link Here
169
    my ( $self, $args ) = @_;
170
    my ( $self, $args ) = @_;
170
171
171
    my $import_batch_id           = $args->{import_batch_id};
172
    my $import_batch_id           = $args->{import_batch_id};
172
    my @import_record_id_selected = $args->{import_record_id_selected} || ();
173
    my $import_record_id_selected = $args->{import_record_id_selected} || ();
173
    my $matcher_id                = $args->{matcher_id};
174
    my $matcher_id                = $args->{matcher_id};
174
    my $overlay_action            = $args->{overlay_action};
175
    my $overlay_action            = $args->{overlay_action};
175
    my $import_record             = $args->{import_record};
176
    my $import_record             = $args->{import_record};
Lines 474-480 sub add_biblio_from_import_record { Link Here
474
    my ($args) = @_;
475
    my ($args) = @_;
475
476
476
    my $import_batch_id           = $args->{import_batch_id};
477
    my $import_batch_id           = $args->{import_batch_id};
477
    my @import_record_id_selected = $args->{import_record_id_selected} || ();
478
    my $import_record_id_selected = $args->{import_record_id_selected} || ();
478
    my $matcher_id                = $args->{matcher_id};
479
    my $matcher_id                = $args->{matcher_id};
479
    my $overlay_action            = $args->{overlay_action};
480
    my $overlay_action            = $args->{overlay_action};
480
    my $import_record             = $args->{import_record};
481
    my $import_record             = $args->{import_record};
Lines 487-493 sub add_biblio_from_import_record { Link Here
487
            record_result       => 0,
488
            record_result       => 0,
488
            duplicates_in_batch => 0,
489
            duplicates_in_batch => 0,
489
            skip                => 1
490
            skip                => 1
490
        } if not grep { $_ eq $import_record->import_record_id } @import_record_id_selected;
491
        } if not grep { $_ eq $import_record->import_record_id } @{$import_record_id_selected};
491
    }
492
    }
492
493
493
    my $marcrecord   = $import_record->get_marc_record || die "Couldn't translate marc information";
494
    my $marcrecord   = $import_record->get_marc_record || die "Couldn't translate marc information";
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt (-19 / +127 lines)
Lines 7-15 Link Here
7
<title>
7
<title>
8
MARC Order Accounts
8
MARC Order Accounts
9
</title>
9
</title>
10
<style>
11
    #fileuploadstatus,#fileuploadfailed,#fileuploadcancel { display : none; }
12
</style>
13
[% INCLUDE 'doc-head-close.inc' %]
10
[% INCLUDE 'doc-head-close.inc' %]
14
</head>
11
</head>
15
<body id="admin_marc_order_acct" class="admin">
12
<body id="admin_marc_order_acct" class="admin">
Lines 137-155 MARC Order Accounts Link Here
137
                                <li>
134
                                <li>
138
                                        <label for='record_type'>Record type:</label>
135
                                        <label for='record_type'>Record type:</label>
139
                                        <select name='record_type' id='record_type'>
136
                                        <select name='record_type' id='record_type'>
140
                                            <option value='biblio' selected='selected'>Bibliographic</option>
137
                                            [% IF ( account.record_type == 'biblio' ) %]
141
                                            <option value='auth'>Authority</option>
138
                                                <option value="biblio" selected="selected">
139
                                            [% ELSE %]
140
                                                <option value="biblio">
141
                                            [% END %]
142
                                                Bibliographic</option>
143
                                            [% IF ( account.record_type == 'auth' ) %]
144
                                                <option value="auth" selected="selected">
145
                                            [% ELSE %]
146
                                                <option value="auth">
147
                                            [% END %]
148
                                                Authority</option>
142
                                        </select>
149
                                        </select>
143
                                    </li>
150
                                    </li>
144
                                    <li>
151
                                    <li>
145
                                        <label for="encoding">Character encoding: </label>
152
                                        <label for="encoding">Character encoding: </label>
146
                                        <select name="encoding" id="encoding">
153
                                        <select name="encoding" id="encoding">
147
                                            <option value="UTF-8" selected="selected">UTF-8 (Default)</option>
154
                                            [% IF ( account.encoding == 'UTF-8' ) %]
148
                                            <option value="MARC-8">MARC 8</option>
155
                                                <option value="UTF-8" selected="selected">
149
                                            <option value="ISO_5426">ISO 5426</option>
156
                                            [% ELSE %]
150
                                            <option value="ISO_6937">ISO 6937</option>
157
                                                <option value="UTF-8">
151
                                            <option value="ISO_8859-1">ISO 8859-1</option>
158
                                            [% END %]
152
                                            <option value="EUC-KR">EUC-KR</option>
159
                                                UTF-8 (Default)</option>
160
                                            [% IF ( account.encoding == 'MARC-8' ) %]
161
                                                <option value="MARC-8" selected="selected">
162
                                            [% ELSE %]
163
                                                <option value="MARC-8">
164
                                            [% END %]
165
                                                MARC 8</option>
166
                                            [% IF ( account.encoding == 'ISO_5426' ) %]
167
                                                <option value="ISO_5426" selected="selected">
168
                                            [% ELSE %]
169
                                                <option value="ISO_5426">
170
                                            [% END %]
171
                                                ISO 5426</option>
172
                                            [% IF ( account.encoding == 'ISO_6937' ) %]
173
                                                <option value="ISO_6937" selected="selected">
174
                                            [% ELSE %]
175
                                                <option value="ISO_6937">
176
                                            [% END %]
177
                                                ISO 6937</option>
178
                                            [% IF ( account.encoding == 'ISO_8859-1' ) %]
179
                                                <option value="ISO_8859-1" selected="selected">
180
                                            [% ELSE %]
181
                                                <option value="ISO_8859-1">
182
                                            [% END %]
183
                                                ISO 8859-1</option>
184
                                            [% IF ( account.encoding == 'EUC-KR' ) %]
185
                                                <option value="EUC-KR" selected="selected">
186
                                            [% ELSE %]
187
                                                <option value="EUC-KR">
188
                                            [% END %]
189
                                                EUC-KR</option>
153
                                        </select>
190
                                        </select>
154
                                    </li>
191
                                    </li>
155
                            </ol>
192
                            </ol>
Lines 161-167 MARC Order Accounts Link Here
161
                                    <label for="matcher">Record matching rule:</label>
198
                                    <label for="matcher">Record matching rule:</label>
162
                                    <select name="matcher" id="matcher">
199
                                    <select name="matcher" id="matcher">
163
                                        [% FOREACH available_matcher IN available_matchers %]
200
                                        [% FOREACH available_matcher IN available_matchers %]
164
                                            [% IF available_matcher.id == account.matcher_id %]
201
                                            [% IF available_matcher.matcher_id == account.matcher_id %]
165
                                                <option value="[% available_matcher.matcher_id | html %]" selected="selected">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option>
202
                                                <option value="[% available_matcher.matcher_id | html %]" selected="selected">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option>
166
                                            [% ELSE %]
203
                                            [% ELSE %]
167
                                                <option value="[% available_matcher.matcher_id | html %]">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option>
204
                                                <option value="[% available_matcher.matcher_id | html %]">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option>
Lines 171-181 MARC Order Accounts Link Here
171
                                </li>
208
                                </li>
172
                                <li>
209
                                <li>
173
                                    <label for="overlay_action">Action if matching record found: </label>
210
                                    <label for="overlay_action">Action if matching record found: </label>
174
                                    [% INCLUDE 'tools-overlay-action.inc' %]
211
                                    <select name="overlay_action" id="overlay_action">
212
                                        [% IF ( account.overlay_action == 'replace' ) %]
213
                                            <option value="replace"  selected="selected">
214
                                        [% ELSE %]
215
                                            <option value="replace">
216
                                        [% END %]
217
                                            Replace existing record with incoming record</option>
218
                                        [% IF ( account.overlay_action == 'create_new' ) %]
219
                                            <option value="create_new" selected="selected">
220
                                        [% ELSE %]
221
                                            <option value="create_new">
222
                                        [% END %]
223
                                            Add incoming record</option>
224
                                        [% IF ( account.overlay_action == 'ignore' ) %]
225
                                            <option value="ignore" selected="selected">
226
                                        [% ELSE %]
227
                                            <option value="ignore">
228
                                        [% END %]
229
                                            Ignore incoming record (its items may still be processed)</option>
230
                                    </select>
175
                                </li>
231
                                </li>
176
                                <li>
232
                                <li>
177
                                    <label for="nomatch_action">Action if no match is found: </label>
233
                                    <label for="nomatch_action">Action if no match is found: </label>
178
                                    [% INCLUDE 'tools-nomatch-action.inc' %]
234
                                    <select name="nomatch_action" id="nomatch_action">
235
                                        [% IF ( account.nomatch_action == 'create_new' ) %]
236
                                            <option value="create_new" selected="selected">
237
                                        [% ELSE %]
238
                                            <option value="create_new">
239
                                        [% END %]
240
                                            Add incoming record</option>
241
                                        [% IF ( account.nomatch_action == 'ignore' ) %]
242
                                            <option value="ignore" selected="selected">
243
                                        [% ELSE %]
244
                                            <option value="ignore">
245
                                        [% END %]
246
                                            Ignore incoming record</option>
247
                                    </select>
179
                                </li>
248
                                </li>
180
                            </ol>
249
                            </ol>
181
                        </fieldset>
250
                        </fieldset>
Lines 183-199 MARC Order Accounts Link Here
183
                            <legend>Check for embedded item record data?</legend>
252
                            <legend>Check for embedded item record data?</legend>
184
                            <ol>
253
                            <ol>
185
                                <li class="radio">
254
                                <li class="radio">
186
                                    <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
255
                                    [% IF ( account.parse_items == 1 || !account ) %]
256
                                        <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" />
257
                                    [% ELSE %]
258
                                        <input type="radio" id="parse_itemsyes" name="parse_items" value="1" />
259
                                    [% END %]
187
                                    <label for="parse_itemsyes">Yes</label>
260
                                    <label for="parse_itemsyes">Yes</label>
188
                                </li>
261
                                </li>
189
                                <li class="radio">
262
                                <li class="radio">
190
                                    <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
263
                                    [% IF ( account.parse_items == 0 ) %]
264
                                        <input type="radio" id="parse_itemsno" name="parse_items" value="0" checked="checked" />
265
                                    [% ELSE %]
266
                                        <input type="radio" id="parse_itemsno" name="parse_items" value="0" />
267
                                    [% END %]
191
                                    <label for="parse_itemsno">No</label>
268
                                    <label for="parse_itemsno">No</label>
192
                                </li>
269
                                </li>
193
                            </ol>
270
                            </ol>
194
                            <ol>
271
                            <ol>
195
                                <li><label for="item_action">How to process items: </label>
272
                                <li>
196
                                    [% INCLUDE 'tools-item-action.inc' %]
273
                                    <label for="item_action">How to process items: </label>
274
                                    <select name="item_action" id="item_action">
275
                                    [% IF ( account.item_action == 'always_add' ) %]
276
                                        <option value="always_add" selected="selected">
277
                                    [% ELSE %]
278
                                        <option value="always_add">
279
                                    [% END %]
280
                                        Always add items</option>
281
                                    [% IF ( account.item_action == 'add_only_for_matches' ) %]
282
                                        <option value="add_only_for_matches" selected="selected">
283
                                    [% ELSE %]
284
                                        <option value="add_only_for_matches">
285
                                    [% END %]
286
                                        Add items only if matching bib was found</option>
287
                                    [% IF ( account.item_action == 'add_only_for_new' ) %]
288
                                        <option value="add_only_for_new" selected="selected">
289
                                    [% ELSE %]
290
                                        <option value="add_only_for_new">
291
                                    [% END %]
292
                                        Add items only if no matching bib was found</option>
293
                                    [% IF ( account.item_action == 'replace' ) %]
294
                                        <option value="replace" selected="selected">
295
                                    [% ELSE %]
296
                                        <option value="replace">
297
                                    [% END %]
298
                                        Replace items if matching bib was found (only for existing items)</option>
299
                                    [% IF ( account.item_action == 'ignore' ) %]
300
                                        <option value="ignore" selected="selected">
301
                                    [% ELSE %]
302
                                        <option value="ignore">
303
                                    [% END %]
304
                                        Ignore items</option>
305
                                    </select>
197
                                </li>
306
                                </li>
198
                            </ol>
307
                            </ol>
199
                        </fieldset>
308
                        </fieldset>
200
- 

Return to bug 34355