Lines 2655-2663
sub PrepareItemrecordDisplay {
Link Here
|
2655 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
2655 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
2656 |
&& $defaultvalues |
2656 |
&& $defaultvalues |
2657 |
&& $defaultvalues->{'callnumber'} ) { |
2657 |
&& $defaultvalues->{'callnumber'} ) { |
2658 |
if( $itemrecord and $defaultvalues and not $itemrecord->field($subfield) ){ |
2658 |
|
2659 |
$defaultvalue = $defaultvalues->{callnumber}; |
2659 |
$defaultvalue = $defaultvalues->{callnumber}; |
2660 |
} |
|
|
2661 |
} |
2660 |
} |
2662 |
if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) |
2661 |
if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) |
2663 |
&& $defaultvalues |
2662 |
&& $defaultvalues |
Lines 2670-2678
sub PrepareItemrecordDisplay {
Link Here
|
2670 |
&& $defaultvalues |
2669 |
&& $defaultvalues |
2671 |
&& $defaultvalues->{'location'} ) { |
2670 |
&& $defaultvalues->{'location'} ) { |
2672 |
|
2671 |
|
2673 |
if ( $itemrecord and $defaultvalues and not $itemrecord->field($subfield) ) { |
|
|
2674 |
$defaultvalue = $defaultvalues->{location}; |
2672 |
$defaultvalue = $defaultvalues->{location}; |
2675 |
} |
|
|
2676 |
} |
2673 |
} |
2677 |
if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { |
2674 |
if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { |
2678 |
my @authorised_values; |
2675 |
my @authorised_values; |
Lines 2701-2707
sub PrepareItemrecordDisplay {
Link Here
|
2701 |
$authorised_lib{$branchcode} = $branchname; |
2698 |
$authorised_lib{$branchcode} = $branchname; |
2702 |
} |
2699 |
} |
2703 |
} |
2700 |
} |
2704 |
$defaultvalue = C4::Context->userenv->{branch}; |
2701 |
$defaultvalue = $defaultvalues->{branchcode} || C4::Context->userenv->{branch}; |
2705 |
|
2702 |
|
2706 |
#----- itemtypes |
2703 |
#----- itemtypes |
2707 |
} elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { |
2704 |
} elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { |
Lines 2727-2732
sub PrepareItemrecordDisplay {
Link Here
|
2727 |
$authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'}; |
2724 |
$authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'}; |
2728 |
} |
2725 |
} |
2729 |
|
2726 |
|
|
|
2727 |
$defaultvalue = $default_source; |
2728 |
|
2730 |
#---- "true" authorised value |
2729 |
#---- "true" authorised value |
2731 |
} else { |
2730 |
} else { |
2732 |
$authorised_values_sth->execute( |
2731 |
$authorised_values_sth->execute( |
2733 |
- |
|
|