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

(-)a/circ/returns.pl (-14 / +15 lines)
Lines 634-652 $template->param( Link Here
634
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
634
    AudioAlerts        => C4::Context->preference("AudioAlerts"),
635
);
635
);
636
636
637
my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!?
637
if ( $barcode ) {
638
if ( $item_from_barcode ) {
638
    my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!?
639
    $itemnumber = $item_from_barcode->itemnumber;
639
    if ( $item_from_barcode ) {
640
    my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
640
        $itemnumber = $item_from_barcode->itemnumber;
641
    if ( $holdingBranch and $collectionBranch ) {
641
        my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
642
        $holdingBranch //= '';
642
        if ( $holdingBranch and $collectionBranch ) {
643
        $collectionBranch //= $returnbranch;
643
            $holdingBranch //= '';
644
        if ( ! ( $holdingBranch eq $collectionBranch ) ) {
644
            $collectionBranch //= $returnbranch;
645
            $template->param(
645
            if ( ! ( $holdingBranch eq $collectionBranch ) ) {
646
              collectionItemNeedsTransferred => 1,
646
                $template->param(
647
              collectionBranch => $collectionBranch,
647
                  collectionItemNeedsTransferred => 1,
648
              itemnumber => $itemnumber,
648
                  collectionBranch => $collectionBranch,
649
            );
649
                  itemnumber => $itemnumber,
650
                );
651
            }
650
        }
652
        }
651
    }
653
    }
652
}
654
}
653
- 

Return to bug 24106