|
Lines 82-92
sub chargelostitem {
Link Here
|
| 82 |
|
82 |
|
| 83 |
my $lost_control_pref = C4::Context->preference('LostChargesControl'); |
83 |
my $lost_control_pref = C4::Context->preference('LostChargesControl'); |
| 84 |
my $lost_control_branch; |
84 |
my $lost_control_branch; |
| 85 |
if ( $lost_control_pref eq 'PatronLibrary' ) { |
85 |
if ( defined $lost_control_pref && $lost_control_pref eq 'PatronLibrary' ) { |
| 86 |
$lost_control_branch = $patron->branchcode; |
86 |
$lost_control_branch = $patron->branchcode; |
| 87 |
} elsif ( $lost_control_pref eq 'PickupLibrary' ) { |
87 |
} elsif ( defined $lost_control_pref && $lost_control_pref eq 'PickupLibrary' ) { |
| 88 |
$lost_control_branch = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; |
88 |
$lost_control_branch = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; |
| 89 |
} else { # $lost_control_pref eq 'ItemHomeLibrary' |
89 |
} else { # $lost_control_pref eq 'ItemHomeLibrary' or undefined |
| 90 |
$lost_control_branch = |
90 |
$lost_control_branch = |
| 91 |
( C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ) |
91 |
( C4::Context->preference('HomeOrHoldingBranch') eq 'homebranch' ) |
| 92 |
? $item->homebranch |
92 |
? $item->homebranch |
| 93 |
- |
|
|