- the blank line is now useless
- add an example for the syspref value
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
sub get_infos_syspref {
my ($record, $field_list) = @_;
my $syspref = C4::Context->preference('MarcFieldsToOrder');
- my $yaml = YAML::Load($syspref);
+ $syspref = "$syspref\n\n"; # YAML is anal on ending \n. Surplus does not hurt
+ my $yaml = eval {
+ YAML::Load($syspref);
+ };
+ if ( $@ ) {
+ warn "Unable to parse MarcFieldsToOrder syspref : $@";
+ return ();
+ }
my $r;
for my $field_name ( @$field_list ) {
my @fields = split /\|/, $yaml->{$field_name};
- Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar").
- pref: AcqItemSetSubfieldsWhenReceived
-
- - Set the mapping values for a new order line created from a marcrecord (staged file). In a YAML format, so you have to finished with an empty line.
+ - Set the mapping values for a new order line created from a marcrecord (staged file).
- pref: MarcFieldsToOrder
type: textarea
-
+ - "For example:<br/>price: 947$a|947$c<br/>quantity: 969$h<br/>budget_code: 922$a<rb/>"
Printing:
-
- Use the