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

(-)a/Koha/MarcOrder.pm (-50 / +61 lines)
Lines 241-247 sub _create_basket_for_file { Link Here
241
241
242
    my $basketno = NewBasket(
242
    my $basketno = NewBasket(
243
        $vendor_id, 0, $basketname, q{},
243
        $vendor_id, 0, $basketname, q{},
244
        q{} . q{}
244
        q{}, q{}, q{}, q{}, 0, 'ordering'
245
    );
245
    );
246
246
247
    return $basketno;
247
    return $basketno;
Lines 608-613 sub add_items_from_import_record { Link Here
608
    });
608
    });
609
609
610
    Used by the cronjob to detect whether a file matches the account and should be processed
610
    Used by the cronjob to detect whether a file matches the account and should be processed
611
    This method only checks the first record in the file.
611
612
612
=cut
613
=cut
613
614
Lines 1229-1248 sub _create_item_fields_from_syspref { Link Here
1229
    my $marc_fields_to_order      = $args->{marc_fields_to_order};
1230
    my $marc_fields_to_order      = $args->{marc_fields_to_order};
1230
    my $budget_id                 = $args->{budget_id};
1231
    my $budget_id                 = $args->{budget_id};
1231
1232
1232
    my @homebranches      = ();
1233
    my @homebranches              = ();
1233
    my @holdingbranches   = ();
1234
    my @holdingbranches           = ();
1234
    my @itypes            = ();
1235
    my @itypes                    = ();
1235
    my @nonpublic_notes   = ();
1236
    my @nonpublic_notes           = ();
1236
    my @public_notes      = ();
1237
    my @public_notes              = ();
1237
    my @locs              = ();
1238
    my @locs                      = ();
1238
    my @ccodes            = ();
1239
    my @ccodes                    = ();
1239
    my @notforloans       = ();
1240
    my @notforloans               = ();
1240
    my @uris              = ();
1241
    my @uris                      = ();
1241
    my @copynos           = ();
1242
    my @copynos                   = ();
1242
    my @budget_codes      = ();
1243
    my @budget_codes              = ();
1243
    my @itemprices        = ();
1244
    my @itemprices                = ();
1244
    my @replacementprices = ();
1245
    my @replacementprices         = ();
1245
    my @itemcallnumbers   = ();
1246
    my @itemcallnumbers           = ();
1247
    my @coded_location_qualifiers = ();
1248
    my @barcodes                  = ();
1249
    my @enumchrons                = ();
1246
1250
1247
    foreach my $infoset (@$marc_item_fields_to_order) {
1251
    foreach my $infoset (@$marc_item_fields_to_order) {
1248
        my $quantity = $infoset->{quantity} || 1;
1252
        my $quantity = $infoset->{quantity} || 1;
Lines 1264-1311 sub _create_item_fields_from_syspref { Link Here
1264
                $item_budget_id = $budget_id;
1268
                $item_budget_id = $budget_id;
1265
            }
1269
            }
1266
1270
1267
            push @homebranches,      $infoset->{homebranch};
1271
            push @homebranches,              $infoset->{homebranch};
1268
            push @holdingbranches,   $infoset->{holdingbranch};
1272
            push @holdingbranches,           $infoset->{holdingbranch};
1269
            push @itypes,            $infoset->{itype};
1273
            push @itypes,                    $infoset->{itype};
1270
            push @nonpublic_notes,   $infoset->{nonpublic_note};
1274
            push @nonpublic_notes,           $infoset->{nonpublic_note};
1271
            push @public_notes,      $infoset->{public_note};
1275
            push @public_notes,              $infoset->{public_note};
1272
            push @locs,              $infoset->{loc};
1276
            push @locs,                      $infoset->{loc};
1273
            push @ccodes,            $infoset->{ccode};
1277
            push @ccodes,                    $infoset->{ccode};
1274
            push @notforloans,       $infoset->{notforloan};
1278
            push @notforloans,               $infoset->{notforloan};
1275
            push @uris,              $infoset->{uri};
1279
            push @uris,                      $infoset->{uri};
1276
            push @copynos,           $infoset->{copyno};
1280
            push @copynos,                   $infoset->{copyno};
1277
            push @budget_codes,      $item_budget_id;
1281
            push @budget_codes,              $item_budget_id;
1278
            push @itemprices,        $infoset->{price};
1282
            push @itemprices,                $infoset->{price};
1279
            push @replacementprices, $infoset->{replacementprice};
1283
            push @replacementprices,         $infoset->{replacementprice};
1280
            push @itemcallnumbers,   $infoset->{itemcallnumber};
1284
            push @itemcallnumbers,           $infoset->{itemcallnumber};
1285
            push @coded_location_qualifiers, $infoset->{coded_location_qualifier};
1286
            push @barcodes,                  $infoset->{barcode};
1287
            push @enumchrons,                $infoset->{enumchron};
1281
        }
1288
        }
1282
    }
1289
    }
1283
1290
1284
    my $item_fields = {
1291
    my $item_fields = {
1285
        quantity          => scalar(@homebranches),
1292
        quantity                  => scalar(@homebranches),
1286
        homebranches      => \@homebranches,
1293
        homebranches              => \@homebranches,
1287
        holdingbranches   => \@holdingbranches,
1294
        holdingbranches           => \@holdingbranches,
1288
        itypes            => \@itypes,
1295
        itypes                    => \@itypes,
1289
        nonpublic_notes   => \@nonpublic_notes,
1296
        nonpublic_notes           => \@nonpublic_notes,
1290
        public_notes      => \@public_notes,
1297
        public_notes              => \@public_notes,
1291
        locs              => \@locs,
1298
        locs                      => \@locs,
1292
        ccodes            => \@ccodes,
1299
        ccodes                    => \@ccodes,
1293
        notforloans       => \@notforloans,
1300
        notforloans               => \@notforloans,
1294
        uris              => \@uris,
1301
        uris                      => \@uris,
1295
        copynos           => \@copynos,
1302
        copynos                   => \@copynos,
1296
        budget_codes      => \@budget_codes,
1303
        budget_codes              => \@budget_codes,
1297
        itemprices        => \@itemprices,
1304
        itemprices                => \@itemprices,
1298
        replacementprices => \@replacementprices,
1305
        replacementprices         => \@replacementprices,
1299
        itemcallnumbers   => \@itemcallnumbers,
1306
        itemcallnumbers           => \@itemcallnumbers,
1300
        c_quantity        => $marc_fields_to_order->{quantity},
1307
        coded_location_qualifiers => \@coded_location_qualifiers,
1301
        c_budget_code     => $marc_fields_to_order->{budget_code},
1308
        barcodes                  => \@barcodes,
1302
        c_price           => $marc_fields_to_order->{price},
1309
        enumchrons                => \@enumchrons,
1303
        c_discount        => $marc_fields_to_order->{discount},
1310
        c_quantity                => $marc_fields_to_order->{quantity},
1304
        c_sort1           => $marc_fields_to_order->{sort1},
1311
        c_budget_code             => $marc_fields_to_order->{budget_code},
1305
        c_sort2           => $marc_fields_to_order->{sort2},
1312
        c_price                   => $marc_fields_to_order->{price},
1313
        c_discount                => $marc_fields_to_order->{discount},
1314
        c_sort1                   => $marc_fields_to_order->{sort1},
1315
        c_sort2                   => $marc_fields_to_order->{sort2},
1306
    };
1316
    };
1307
1317
1308
    return $item_fields;
1318
    return $item_fields;
1309
}
1319
}
1310
1320
1321
1311
1;
1322
1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-item-action.inc (-35 / +39 lines)
Lines 1-37 Link Here
1
        [% IF item_action_ignore AND num_items == 0 %]
1
[% IF account.item_action == 'ignore' AND num_items == 0 %]
2
            No items were found during staging
2
    No items were found during staging
3
            <input type ="hidden" name="item_action" value="ignore">
3
    <input type ="hidden" name="item_action" value="ignore">
4
[% ELSE %]
5
    [% IF ( class_name ) %]
6
        <select name="item_action" id="item_action" class="[% class_name | html %]">
7
    [% ELSE %]
8
        <select name="item_action" id="item_action">
9
    [% END %]
10
        [% IF ( account.item_action == 'always_add' ) %]
11
            <option value="always_add" selected="selected">
4
        [% ELSE %]
12
        [% ELSE %]
5
            <select name="item_action" id="item_action">
13
            <option value="always_add">
6
            [% IF ( item_action_always_add ) %]
7
                <option value="always_add" selected="selected">
8
            [% ELSE %]
9
                <option value="always_add">
10
            [% END %]
11
                Always add items</option>
12
            [% IF ( item_action_add_only_for_matches ) %]
13
                <option value="add_only_for_matches" selected="selected">
14
            [% ELSE %]
15
                <option value="add_only_for_matches">
16
            [% END %]
17
                Add items only if matching bib was found</option>
18
            [% IF ( item_action_add_only_for_new ) %]
19
                <option value="add_only_for_new" selected="selected">
20
            [% ELSE %]
21
                <option value="add_only_for_new">
22
            [% END %]
23
                Add items only if no matching bib was found</option>
24
            [% IF ( item_action_replace ) %]
25
                <option value="replace" selected="selected">
26
            [% ELSE %]
27
                <option value="replace">
28
            [% END %]
29
                Replace items if matching bib was found (only for existing items)</option>
30
            [% IF ( item_action_ignore ) %]
31
                <option value="ignore" selected="selected">
32
            [% ELSE %]
33
                <option value="ignore">
34
            [% END %]
35
                Ignore items</option>
36
            </select>
37
        [% END %]
14
        [% END %]
15
            Always add items</option>
16
        [% IF ( account.item_action == 'add_only_for_matches' ) %]
17
            <option value="add_only_for_matches" selected="selected">
18
        [% ELSE %]
19
            <option value="add_only_for_matches">
20
        [% END %]
21
            Add items only if matching bib was found</option>
22
        [% IF ( account.item_action == 'add_only_for_new' ) %]
23
            <option value="add_only_for_new" selected="selected">
24
        [% ELSE %]
25
            <option value="add_only_for_new">
26
        [% END %]
27
            Add items only if no matching bib was found</option>
28
        [% IF ( account.item_action == 'replace' ) %]
29
            <option value="replace" selected="selected">
30
        [% ELSE %]
31
            <option value="replace">
32
        [% END %]
33
            Replace items if matching bib was found (only for existing items)</option>
34
        [% IF ( account.item_action == 'ignore' ) %]
35
            <option value="ignore" selected="selected">
36
        [% ELSE %]
37
            <option value="ignore">
38
        [% END %]
39
        Ignore items</option>
40
    </select>
41
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-nomatch-action.inc (-14 / +18 lines)
Lines 1-14 Link Here
1
          <select name="nomatch_action" id="nomatch_action">
1
[% IF ( class_name ) %]
2
            [% IF ( nomatch_action_create_new ) %]
2
    <select name="nomatch_action" id="nomatch_action" class="[% class_name | html %]">
3
                <option value="create_new" selected="selected">
3
[% ELSE %]
4
            [% ELSE %]
4
    <select name="nomatch_action" id="nomatch_action">
5
                <option value="create_new">
5
[% END %]
6
            [% END %]
6
    [% IF ( account.nomatch_action == 'create_new' ) %]
7
                Add incoming record</option>
7
        <option value="create_new" selected="selected">
8
            [% IF ( nomatch_action_ignore ) %]
8
    [% ELSE %]
9
                <option value="ignore" selected="selected">
9
        <option value="create_new">
10
            [% ELSE %]
10
    [% END %]
11
                <option value="ignore">
11
        Add incoming record</option>
12
            [% END %]
12
    [% IF ( account.nomatch_action == 'ignore' ) %]
13
                Ignore incoming record</option>
13
        <option value="ignore" selected="selected">
14
        </select>
14
    [% ELSE %]
15
        <option value="ignore">
16
    [% END %]
17
        Ignore incoming record</option>
18
    </select>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-overlay-action.inc (-20 / +24 lines)
Lines 1-20 Link Here
1
          <select name="overlay_action" id="overlay_action">
1
[% IF ( class_name ) %]
2
            [% IF ( overlay_action_replace ) %]
2
    <select name="overlay_action" id="overlay_action" class="[% class_name | html %]">
3
                <option value="replace"  selected="selected">
3
[% ELSE %]
4
            [% ELSE %]
4
    <select name="overlay_action" id="overlay_action">
5
                <option value="replace">
5
[% END %]
6
            [% END %]
6
    [% IF ( account.overlay_action == 'replace' ) %]
7
                Replace existing record with incoming record</option>
7
        <option value="replace"  selected="selected">
8
            [% IF ( overlay_action_create_new ) %]
8
    [% ELSE %]
9
                <option value="create_new" selected="selected">
9
        <option value="replace">
10
            [% ELSE %]
10
    [% END %]
11
                <option value="create_new">
11
        Replace existing record with incoming record</option>
12
            [% END %]
12
    [% IF ( account.overlay_action == 'create_new' ) %]
13
                Add incoming record</option>
13
        <option value="create_new" selected="selected">
14
            [% IF ( overlay_action_ignore ) %]
14
    [% ELSE %]
15
                <option value="ignore" selected="selected">
15
        <option value="create_new">
16
            [% ELSE %]
16
    [% END %]
17
                <option value="ignore">
17
        Add incoming record</option>
18
            [% END %]
18
    [% IF ( account.overlay_action == 'ignore' ) %]
19
                Ignore incoming record (its items may still be processed)</option>
19
        <option value="ignore" selected="selected">
20
        </select>
20
    [% ELSE %]
21
        <option value="ignore">
22
    [% END %]
23
        Ignore incoming record (its items may still be processed)</option>
24
</select>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt (-72 / +8 lines)
Lines 128-133 MARC Order Accounts Link Here
128
                                    <label for="match_field">Match field: </label>
128
                                    <label for="match_field">Match field: </label>
129
                                    <input type="text" name="match_field" id="match_field" size="20" value="[% account.match_field | html %]" />
129
                                    <input type="text" name="match_field" id="match_field" size="20" value="[% account.match_field | html %]" />
130
                                    <div class="hint">(Optional): If you have files from multiple vendors in the same file directory, the match field is the field in the marc record that will be checked to see if the file should be processed by this account.</div>
130
                                    <div class="hint">(Optional): If you have files from multiple vendors in the same file directory, the match field is the field in the marc record that will be checked to see if the file should be processed by this account.</div>
131
                                    <div class="hint">The format for this field is the same as MARCFieldsToOrder - the field and the subfield separated by a dollar sign e.g. 245$a</div>
131
                                </li>
132
                                </li>
132
                                <li>
133
                                <li>
133
                                    <label for="match_value">Match value: </label>
134
                                    <label for="match_value">Match value: </label>
Lines 143-159 MARC Order Accounts Link Here
143
                                        <label for='record_type'>Record type:</label>
144
                                        <label for='record_type'>Record type:</label>
144
                                        <select class="select2" name='record_type' id='record_type'>
145
                                        <select class="select2" name='record_type' id='record_type'>
145
                                            [% IF ( account.record_type == 'biblio' ) %]
146
                                            [% IF ( account.record_type == 'biblio' ) %]
146
                                                <option value="biblio" selected="selected">
147
                                                <option value="biblio" selected="selected">Bibliographic</option>
147
                                            [% ELSE %]
148
                                            [% ELSE %]
148
                                                <option value="biblio">
149
                                                <option value="biblio">Bibliographic</option>
149
                                            [% END %]
150
                                            [% END %]
150
                                                Bibliographic</option>
151
                                            [% IF ( account.record_type == 'auth' ) %]
151
                                            [% IF ( account.record_type == 'auth' ) %]
152
                                                <option value="auth" selected="selected">
152
                                                <option value="auth" selected="selected">Authority</option>
153
                                            [% ELSE %]
153
                                            [% ELSE %]
154
                                                <option value="auth">
154
                                                <option value="auth">Authority</option>
155
                                            [% END %]
155
                                            [% END %]
156
                                                Authority</option>
157
                                        </select>
156
                                        </select>
158
                                    </li>
157
                                    </li>
159
                                    <li>
158
                                    <li>
Lines 216-258 MARC Order Accounts Link Here
216
                                </li>
215
                                </li>
217
                                <li>
216
                                <li>
218
                                    <label for="overlay_action">Action if matching record found: </label>
217
                                    <label for="overlay_action">Action if matching record found: </label>
219
                                    <select class="select2" name="overlay_action" id="overlay_action">
218
                                    [% INCLUDE 'tools-overlay-action.inc' class_name='select2' %]
220
                                        [% IF ( account.overlay_action == 'replace' ) %]
221
                                            <option value="replace"  selected="selected">
222
                                        [% ELSE %]
223
                                            <option value="replace">
224
                                        [% END %]
225
                                            Replace existing record with incoming record</option>
226
                                        [% IF ( account.overlay_action == 'create_new' ) %]
227
                                            <option value="create_new" selected="selected">
228
                                        [% ELSE %]
229
                                            <option value="create_new">
230
                                        [% END %]
231
                                            Add incoming record</option>
232
                                        [% IF ( account.overlay_action == 'ignore' ) %]
233
                                            <option value="ignore" selected="selected">
234
                                        [% ELSE %]
235
                                            <option value="ignore">
236
                                        [% END %]
237
                                            Ignore incoming record (its items may still be processed)</option>
238
                                    </select>
239
                                </li>
219
                                </li>
240
                                <li>
220
                                <li>
241
                                    <label for="nomatch_action">Action if no match is found: </label>
221
                                    <label for="nomatch_action">Action if no match is found: </label>
242
                                    <select class="select2" name="nomatch_action" id="nomatch_action">
222
                                    [% INCLUDE 'tools-nomatch-action.inc' class_name='select2' %]
243
                                        [% IF ( account.nomatch_action == 'create_new' ) %]
244
                                            <option value="create_new" selected="selected">
245
                                        [% ELSE %]
246
                                            <option value="create_new">
247
                                        [% END %]
248
                                            Add incoming record</option>
249
                                        [% IF ( account.nomatch_action == 'ignore' ) %]
250
                                            <option value="ignore" selected="selected">
251
                                        [% ELSE %]
252
                                            <option value="ignore">
253
                                        [% END %]
254
                                            Ignore incoming record</option>
255
                                    </select>
256
                                </li>
223
                                </li>
257
                            </ol>
224
                            </ol>
258
                        </fieldset>
225
                        </fieldset>
Lines 279-316 MARC Order Accounts Link Here
279
                            <ol>
246
                            <ol>
280
                                <li>
247
                                <li>
281
                                    <label for="item_action">How to process items: </label>
248
                                    <label for="item_action">How to process items: </label>
282
                                    <select class="select2" name="item_action" id="item_action">
249
                                    [% INCLUDE 'tools-item-action.inc' class_name='select2' %]
283
                                    [% IF ( account.item_action == 'always_add' ) %]
284
                                        <option value="always_add" selected="selected">
285
                                    [% ELSE %]
286
                                        <option value="always_add">
287
                                    [% END %]
288
                                        Always add items</option>
289
                                    [% IF ( account.item_action == 'add_only_for_matches' ) %]
290
                                        <option value="add_only_for_matches" selected="selected">
291
                                    [% ELSE %]
292
                                        <option value="add_only_for_matches">
293
                                    [% END %]
294
                                        Add items only if matching bib was found</option>
295
                                    [% IF ( account.item_action == 'add_only_for_new' ) %]
296
                                        <option value="add_only_for_new" selected="selected">
297
                                    [% ELSE %]
298
                                        <option value="add_only_for_new">
299
                                    [% END %]
300
                                        Add items only if no matching bib was found</option>
301
                                    [% IF ( account.item_action == 'replace' ) %]
302
                                        <option value="replace" selected="selected">
303
                                    [% ELSE %]
304
                                        <option value="replace">
305
                                    [% END %]
306
                                        Replace items if matching bib was found (only for existing items)</option>
307
                                    [% IF ( account.item_action == 'ignore' ) %]
308
                                        <option value="ignore" selected="selected">
309
                                    [% ELSE %]
310
                                        <option value="ignore">
311
                                    [% END %]
312
                                        Ignore items</option>
313
                                    </select>
314
                                </li>
250
                                </li>
315
                            </ol>
251
                            </ol>
316
                        </fieldset>
252
                        </fieldset>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref (-7 lines)
Lines 138-149 Acquisitions: Link Here
138
              class: email
138
              class: email
139
            - 'when sending acquisitions order and claim notices.'
139
            - 'when sending acquisitions order and claim notices.'
140
            - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
140
            - '<br>If left empty, it will fall back to the first defined address in the following list: library reply-to, library email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
141
        -
142
            - Use the reply-to email address
143
            - pref: SerialsDefaultReplyTo
144
              class: email
145
            - 'when sending serial claim notices.'
146
            - '<br>If left empty, it will fall back to the first defined address in the following list: Library ReplyTo, Library Email, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=ReplytoDefault">ReplytoDefault</a>, <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=KohaAdminEmailAddress">KohaAdminEmailAddress</a>.'
147
        -
141
        -
148
            - pref: MarcOrderingAutomation
142
            - pref: MarcOrderingAutomation
149
              default: no
143
              default: no
150
- 

Return to bug 34355