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

(-)a/circ/returns.pl (-16 / +16 lines)
Lines 164-188 if ( $query->param('reserve_id') ) { Link Here
164
        } # FIXME else?
164
        } # FIXME else?
165
    } else {
165
    } else {
166
        my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef;
166
        my $diffBranchSend = ($userenv_branch ne $diffBranchReturned) ? $diffBranchReturned : undef;
167
167
        # diffBranchSend tells ModReserveAffect whether document is expected in this library or not,
168
        # diffBranchSend tells ModReserveAffect whether document is expected in this library or not,
168
        # i.e., whether to apply waiting status
169
        # i.e., whether to apply waiting status
169
        ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id );
170
        ModReserveAffect( $itemnumber, $borrowernumber, $diffBranchSend, $reserve_id );
170
    }
171
#   check if we have other reserves for this document, if we have a return send the message of transfer
172
    my ( $messages, $nextreservinfo ) = GetOtherReserves($itemnumber);
173
171
174
    my $patron = Koha::Patrons->find( $nextreservinfo );
172
        if ( $diffBranchSend ) {
175
    my $name   = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : '';
173
            ModItemTransfer( $itemnumber, $userenv_branch, $diffBranchSend );
176
    if ( $messages->{'transfert'} ) {
174
177
        $template->param(
175
            my $patron = Koha::Patrons->find( $borrowernumber );
178
            itemtitle      => $biblio->title,
176
            my $name   = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : '';
179
            itemnumber     => $item->itemnumber,
177
            $template->param(
180
            itembiblionumber => $biblio->biblionumber,
178
                itemtitle        => $biblio->title,
181
            iteminfo       => $biblio->author,
179
                itemnumber       => $item->itemnumber,
182
            name           => $name,
180
                itembiblionumber => $biblio->biblionumber,
183
            patron         => $patron,
181
                iteminfo         => $biblio->author,
184
            diffbranch     => 1,
182
                name             => $name,
185
        );
183
                patron           => $patron,
184
                diffbranch       => 1,
185
            );
186
        }
186
    }
187
    }
187
}
188
}
188
189
189
- 

Return to bug 18958