Lines 2165-2171
sub AddReturn {
Link Here
|
2165 |
|
2165 |
|
2166 |
my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch); |
2166 |
my $floatingType = Koha::FloatingMatrix::CheckFloating($item, $branch, $returnbranch); |
2167 |
# Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer |
2167 |
# Transfer to returnbranch if Automatic transfer set or append message NeedsTransfer |
2168 |
if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE' ){ |
2168 |
if ($validTransfer && !$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) and !$resfound and ($branch ne $returnbranch) and not $messages->{'WrongTransfer'} && (not($floatingType) || $floatingType eq 'POSSIBLE' )){ |
2169 |
my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; |
2169 |
my $BranchTransferLimitsType = C4::Context->preference("BranchTransferLimitsType") eq 'itemtype' ? 'effective_itemtype' : 'ccode'; |
2170 |
if ( not($floatingType && $floatingType eq 'POSSIBLE') and |
2170 |
if ( not($floatingType && $floatingType eq 'POSSIBLE') and |
2171 |
(C4::Context->preference("AutomaticItemReturn" ) or |
2171 |
(C4::Context->preference("AutomaticItemReturn" ) or |
Lines 2184-2190
sub AddReturn {
Link Here
|
2184 |
#This elsif-clause copypastes the upper if-clause. This is horrible and I cry, but cannot refactor this mess now :( due to Koha upstream master stuff looming. |
2184 |
#This elsif-clause copypastes the upper if-clause. This is horrible and I cry, but cannot refactor this mess now :( due to Koha upstream master stuff looming. |
2185 |
elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) |
2185 |
elsif (!$is_in_rotating_collection && ($doreturn or $messages->{'NotIssued'}) |
2186 |
and !$resfound and ($branch ne $returnbranch) |
2186 |
and !$resfound and ($branch ne $returnbranch) |
2187 |
and not($messages->{'WrongTransfer'}) |
2187 |
and not $messages->{'WrongTransfer'} |
2188 |
&& $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it. |
2188 |
&& $floatingType){ #So if we would otherwise transfer, but we have a floating rule overriding it. |
2189 |
#We can infer that the transfer was averted because of a floating rule. |
2189 |
#We can infer that the transfer was averted because of a floating rule. |
2190 |
#Make sure we dont log the same floating denial multiple times |
2190 |
#Make sure we dont log the same floating denial multiple times |
2191 |
- |
|
|