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

(-)a/Koha/Acquisition/Utils.pm (-9 / +2 lines)
Lines 31-42 Koha::Acquisition::Utils - Additional Koha functions for dealing with orders and Link Here
31
31
32
my $data = Koha::Acquisition::Utils::GetMarcFieldsToOrderValues('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', etc.]);
32
my $data = Koha::Acquisition::Utils::GetMarcFieldsToOrderValues('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', etc.]);
33
33
34
This subroutine accepts a syspref ( MarcFieldsToOrder ),
35
a marc record, and an arrayref of fields to retrieve.
36
37
The return value is a hashref of key value pairs, where the keys are the field list parameters,
34
The return value is a hashref of key value pairs, where the keys are the field list parameters,
38
and the values are extracted from the MARC record based on the key to MARC field mapping from the
35
and the values are extracted from the MARC record based on the key to MARC field mapping from the
39
given system preference.
36
system preference MarcFieldsToOrder.
40
37
41
=cut
38
=cut
42
39
Lines 71-82 sub GetMarcFieldsToOrderValues { Link Here
71
68
72
my $data = GetMarcItemFieldsToOrderValues('MarcItemFieldsToOrder', $marcrecord, ['homebranch', 'holdingbranch', 'itype', 'nonpublic_note', 'public_note', 'loc', 'ccode', 'notforloan', 'uri', 'copyno', 'price', 'replacementprice', 'itemcallnumber', 'quantity', 'budget_code']);
69
my $data = GetMarcItemFieldsToOrderValues('MarcItemFieldsToOrder', $marcrecord, ['homebranch', 'holdingbranch', 'itype', 'nonpublic_note', 'public_note', 'loc', 'ccode', 'notforloan', 'uri', 'copyno', 'price', 'replacementprice', 'itemcallnumber', 'quantity', 'budget_code']);
73
70
74
This subroutine accepts a syspref ( MarcItemFieldsToOrder ),
75
a marc record, and an arrayref of fields to retrieve.
76
77
The return value is a hashref of key value pairs, where the keys are the field list parameters,
71
The return value is a hashref of key value pairs, where the keys are the field list parameters,
78
and the values are extracted from the MARC record based on the key to MARC field mapping from the
72
and the values are extracted from the MARC record based on the key to MARC field mapping from the
79
given system preference.
73
system preference MarcFieldsToOrder.
80
74
81
The largest difference between GetMarcFieldsToOrderValues and GetMarcItemFieldsToOrderValues is that the former deals
75
The largest difference between GetMarcFieldsToOrderValues and GetMarcItemFieldsToOrderValues is that the former deals
82
with singular marc fields, while the latter works on multiple matching marc fields and returns -1 if it cannot
76
with singular marc fields, while the latter works on multiple matching marc fields and returns -1 if it cannot
83
- 

Return to bug 20817