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

(-)a/C4/Circulation.pm (-43 / +62 lines)
Lines 94-99 BEGIN { Link Here
94
	push @EXPORT, qw(
94
	push @EXPORT, qw(
95
		&AddReturn
95
		&AddReturn
96
        &MarkIssueReturned
96
        &MarkIssueReturned
97
        &GetCircControlBranch
97
	);
98
	);
98
99
99
	# subs to deal with transfers
100
	# subs to deal with transfers
Lines 375-381 sub TooMany { Link Here
375
    my $dbh             = C4::Context->dbh;
376
    my $dbh             = C4::Context->dbh;
376
	my $branch;
377
	my $branch;
377
	# Get which branchcode we need
378
	# Get which branchcode we need
378
	$branch = _GetCircControlBranch($item,$borrower);
379
	$branch = GetCircControlBranch($item,$borrower);
379
	my $type = (C4::Context->preference('item-level_itypes')) 
380
	my $type = (C4::Context->preference('item-level_itypes')) 
380
  			? $item->{'itype'}         # item-level
381
  			? $item->{'itype'}         # item-level
381
			: $item->{'itemtype'};     # biblio-level
382
			: $item->{'itemtype'};     # biblio-level
Lines 432-444 sub TooMany { Link Here
432
        push @bind_params, $borrower->{'borrowernumber'};
433
        push @bind_params, $borrower->{'borrowernumber'};
433
        my $rule_branch = $issuing_rule->{branchcode};
434
        my $rule_branch = $issuing_rule->{branchcode};
434
        if ($rule_branch ne "*") {
435
        if ($rule_branch ne "*") {
436
            # FIXME: This code replicates the behavior of GetCircControlBranch, 
437
            # but returns only the relevent field, rather than the value. It would be better
438
            # to allow GetCircControl to be able to return the revelent field so we aren't repeating
439
            # ourselves here. Or, possibly create GetCircControlBranchField which GetCircControlBranch 
440
            # would then use, and we could also call here.
435
            if (C4::Context->preference('CircControl') eq 'PickupLibrary') {
441
            if (C4::Context->preference('CircControl') eq 'PickupLibrary') {
436
                $count_query .= " AND issues.branchcode = ? ";
442
                $count_query .= " AND issues.branchcode = ? ";
437
                push @bind_params, $branch;
443
                push @bind_params, $branch;
438
            } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
444
            } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
439
                ; # if branch is the patron's home branch, then count all loans by patron
445
                ; # if branch is the patron's home branch, then count all loans by patron
440
            } else {
446
            } else {
441
                $count_query .= " AND items.homebranch = ? ";
447
                my $branchfield = C4::Context->preference('HomeOrHoldingBranch') || 'homebranch';
448
                $count_query .= " AND items.$branchfield = ? ";
442
                push @bind_params, $branch;
449
                push @bind_params, $branch;
443
            }
450
            }
444
        }
451
        }
Lines 462-474 sub TooMany { Link Here
462
                                  WHERE borrowernumber = ? ";
469
                                  WHERE borrowernumber = ? ";
463
        push @bind_params, $borrower->{borrowernumber};
470
        push @bind_params, $borrower->{borrowernumber};
464
471
472
        # FIXME: As above, this code replicates the behavior of GetCircControlBranch. 
465
        if (C4::Context->preference('CircControl') eq 'PickupLibrary') {
473
        if (C4::Context->preference('CircControl') eq 'PickupLibrary') {
466
            $branch_count_query .= " AND issues.branchcode = ? ";
474
            $branch_count_query .= " AND issues.branchcode = ? ";
467
            push @bind_params, $branch;
475
            push @bind_params, $branch;
468
        } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
476
        } elsif (C4::Context->preference('CircControl') eq 'PatronLibrary') {
469
            ; # if branch is the patron's home branch, then count all loans by patron
477
            ; # if branch is the patron's home branch, then count all loans by patron
470
        } else {
478
        } else {
471
            $branch_count_query .= " AND items.homebranch = ? ";
479
            my $branchfield = C4::Context->preference('HomeOrHoldingBranch') || 'homebranch';
480
            $branch_count_query .= " AND items.$branchfield = ? ";
472
            push @bind_params, $branch;
481
            push @bind_params, $branch;
473
        }
482
        }
474
        my $branch_count_sth = $dbh->prepare($branch_count_query);
483
        my $branch_count_sth = $dbh->prepare($branch_count_query);
Lines 715-721 sub CanBookBeIssued { Link Here
715
    unless ( $duedate ) {
724
    unless ( $duedate ) {
716
        my $issuedate = $now->clone();
725
        my $issuedate = $now->clone();
717
726
718
        my $branch = _GetCircControlBranch($item,$borrower);
727
        my $branch = GetCircControlBranch($item,$borrower);
719
        my $itype = ( C4::Context->preference('item-level_itypes') ) ? $item->{'itype'} : $biblioitem->{'itemtype'};
728
        my $itype = ( C4::Context->preference('item-level_itypes') ) ? $item->{'itype'} : $biblioitem->{'itemtype'};
720
        $duedate = CalcDateDue( $issuedate, $itype, $branch, $borrower );
729
        $duedate = CalcDateDue( $issuedate, $itype, $branch, $borrower );
721
730
Lines 1097-1103 sub CanBookBeReturned { Link Here
1097
sub checkHighHolds {
1106
sub checkHighHolds {
1098
    my ( $item, $borrower ) = @_;
1107
    my ( $item, $borrower ) = @_;
1099
    my $biblio = GetBiblioFromItemNumber( $item->{itemnumber} );
1108
    my $biblio = GetBiblioFromItemNumber( $item->{itemnumber} );
1100
    my $branch = _GetCircControlBranch( $item, $borrower );
1109
    my $branch = GetCircControlBranch( $item, $borrower );
1101
    my $dbh    = C4::Context->dbh;
1110
    my $dbh    = C4::Context->dbh;
1102
    my $sth    = $dbh->prepare(
1111
    my $sth    = $dbh->prepare(
1103
'select count(borrowernumber) as num_holds from reserves where biblionumber=?'
1112
'select count(borrowernumber) as num_holds from reserves where biblionumber=?'
Lines 1188-1194 sub AddIssue { Link Here
1188
	if ($borrower and $barcode and $barcodecheck ne '0'){#??? wtf
1197
	if ($borrower and $barcode and $barcodecheck ne '0'){#??? wtf
1189
		# find which item we issue
1198
		# find which item we issue
1190
		my $item = GetItem('', $barcode) or return;	# if we don't get an Item, abort.
1199
		my $item = GetItem('', $barcode) or return;	# if we don't get an Item, abort.
1191
		my $branch = _GetCircControlBranch($item,$borrower);
1200
		my $branch = GetCircControlBranch($item,$borrower);
1192
		
1201
		
1193
		# get actual issuing if there is one
1202
		# get actual issuing if there is one
1194
		my $actualissue = GetItemIssue( $item->{itemnumber});
1203
		my $actualissue = GetItemIssue( $item->{itemnumber});
Lines 1774-1802 sub AddReturn { Link Here
1774
    if ($doreturn) {
1783
    if ($doreturn) {
1775
    my $datedue = $issue->{date_due};
1784
    my $datedue = $issue->{date_due};
1776
        $borrower or warn "AddReturn without current borrower";
1785
        $borrower or warn "AddReturn without current borrower";
1777
		my $circControlBranch;
1778
        if ($dropbox) {
1786
        if ($dropbox) {
1779
            # define circControlBranch only if dropbox mode is set
1780
            # don't allow dropbox mode to create an invalid entry in issues (issuedate > today)
1787
            # don't allow dropbox mode to create an invalid entry in issues (issuedate > today)
1781
            # FIXME: check issuedate > returndate, factoring in holidays
1788
            # FIXME: check issuedate > returndate, factoring in holidays
1782
            #$circControlBranch = _GetCircControlBranch($item,$borrower) unless ( $item->{'issuedate'} eq C4::Dates->today('iso') );;
1789
            $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $today ) == -1 ? 1 : 0;
1783
            $circControlBranch = _GetCircControlBranch($item,$borrower);
1784
        $issue->{'overdue'} = DateTime->compare($issue->{'date_due'}, $today ) == -1 ? 1 : 0;
1785
        }
1790
        }
1786
1791
1787
        if ($borrowernumber) {
1792
        if ($borrowernumber) {
1788
            if( C4::Context->preference('CalculateFinesOnReturn') && $issue->{'overdue'}){
1793
            my $circ_control_branchcode =
1789
            # we only need to calculate and change the fines if we want to do that on return
1794
              GetCircControlBranch( $item, $borrower, $issue );
1790
            # Should be on for hourly loans
1795
1791
                my $control = C4::Context->preference('CircControl');
1796
            if ( $issue->{'overdue'} ) {
1792
                my $control_branchcode =
1793
                    ( $control eq 'ItemHomeLibrary' ) ? $item->{homebranch}
1794
                  : ( $control eq 'PatronLibrary' )   ? $borrower->{branchcode}
1795
                  :                                     $issue->{branchcode};
1796
1797
1797
                my ( $amount, $type, $unitcounttotal ) =
1798
                my ( $amount, $type, $unitcounttotal ) =
1798
                  C4::Overdues::CalcFine( $item, $borrower->{categorycode},
1799
                  C4::Overdues::CalcFine( $item, $borrower->{categorycode},
1799
                    $control_branchcode, $datedue, $today );
1800
                    $circ_control_branchcode, $datedue, $today );
1800
1801
1801
                $type ||= q{};
1802
                $type ||= q{};
1802
1803
Lines 1810-1816 sub AddReturn { Link Here
1810
            }
1811
            }
1811
1812
1812
            MarkIssueReturned( $borrowernumber, $item->{'itemnumber'},
1813
            MarkIssueReturned( $borrowernumber, $item->{'itemnumber'},
1813
                $circControlBranch, '', $borrower->{'privacy'} );
1814
                $circ_control_branchcode, '', $borrower->{'privacy'} );
1814
1815
1815
            # FIXME is the "= 1" right?  This could be the borrower hash.
1816
            # FIXME is the "= 1" right?  This could be the borrower hash.
1816
            $messages->{'WasReturned'} = 1;
1817
            $messages->{'WasReturned'} = 1;
Lines 2019-2025 Should only be called for overdue returns Link Here
2019
sub _debar_user_on_return {
2020
sub _debar_user_on_return {
2020
    my ( $borrower, $item, $dt_due, $dt_today ) = @_;
2021
    my ( $borrower, $item, $dt_due, $dt_today ) = @_;
2021
2022
2022
    my $branchcode = _GetCircControlBranch( $item, $borrower );
2023
    my $branchcode = GetCircControlBranch( $item, $borrower );
2023
    my $calendar = Koha::Calendar->new( branchcode => $branchcode );
2024
    my $calendar = Koha::Calendar->new( branchcode => $branchcode );
2024
2025
2025
    # $deltadays is a DateTime::Duration object
2026
    # $deltadays is a DateTime::Duration object
Lines 2215-2254 sub _FixAccountForLostAndReturned { Link Here
2215
    return;
2216
    return;
2216
}
2217
}
2217
2218
2218
=head2 _GetCircControlBranch
2219
=head2 GetCircControlBranch
2219
2220
   my $circ_control_branch = _GetCircControlBranch($iteminfos, $borrower);
2221
2220
2222
Internal function : 
2221
   my $circ_control_branch = GetCircControlBranch( $item, $borrower[, $issue ] );
2223
2222
2224
Return the library code to be used to determine which circulation
2223
Return the library code to be used to determine which circulation
2225
policy applies to a transaction.  Looks up the CircControl and
2224
policy applies to a transaction.  Looks up the CircControl and
2226
HomeOrHoldingBranch system preferences.
2225
HomeOrHoldingBranch system preferences.
2227
2226
2228
C<$iteminfos> is a hashref to iteminfo. Only {homebranch or holdingbranch} is used.
2227
C<$item> is a hashref for an item. Only {homebranch or holdingbranch} is used.
2228
2229
C<$borrower> is a hashref for a borrower. Only {branchcode} is used.
2230
2231
C<$issue> is a hashref for an issue. Only {branchcode} is used.
2229
2232
2230
C<$borrower> is a hashref to borrower. Only {branchcode} is used.
2233
If CircControl is set to "PickupLibrary", GetCircControlBranch returns the currently logged in library branchcode.
2234
If there is no currently logged in branch, the branchcode returned will be either the item's home or holding branch
2235
as controlled by the system preference HomeOrHoldingBranch.
2236
2237
If CircControl is set to 'PatronLibrary', GetCircControlBranch returns the patron's home library branchcode.
2238
2239
If CircControl is set to 'ItemHomeLibrary', and $issue is defined, it will return the branchcode for the issue, 
2240
othereise it uses the system preference HomeOrHoldingBranch to return either the item's homebranch or its holdingbranch.
2231
2241
2232
=cut
2242
=cut
2233
2243
2234
sub _GetCircControlBranch {
2244
sub GetCircControlBranch {
2235
    my ($item, $borrower) = @_;
2245
    my ( $item, $borrower, $issue ) = @_;
2236
    my $circcontrol = C4::Context->preference('CircControl');
2246
    my $circcontrol = C4::Context->preference('CircControl');
2237
    my $branch;
2247
    my $branch;
2238
2248
2239
    if ($circcontrol eq 'PickupLibrary' and (C4::Context->userenv and C4::Context->userenv->{'branch'}) ) {
2249
    if ( $circcontrol eq 'PickupLibrary' ) {
2240
        $branch= C4::Context->userenv->{'branch'};
2250
        if ( C4::Context->userenv && C4::Context->userenv->{branch} ) 
2241
    } elsif ($circcontrol eq 'PatronLibrary') {
2251
        {
2242
        $branch=$borrower->{branchcode};
2252
            $branch = C4::Context->userenv->{branch};
2243
    } else {
2253
        } else {
2244
        my $branchfield = C4::Context->preference('HomeOrHoldingBranch') || 'homebranch';
2254
            $branch = $item->{ C4::Context->preference('HomeOrHoldingBranch') }
2245
        $branch = $item->{$branchfield};
2255
              || $item->{homebranch};
2246
        # default to item home branch if holdingbranch is used
2247
        # and is not defined
2248
        if (!defined($branch) && $branchfield eq 'holdingbranch') {
2249
            $branch = $item->{homebranch};
2250
        }
2256
        }
2251
    }
2257
    }
2258
    elsif ( $circcontrol eq 'PatronLibrary' ) {
2259
        $branch = $borrower->{branchcode};
2260
    }
2261
    elsif ( $circcontrol eq 'ItemHomeLibrary' ) {
2262
        if ($issue) {
2263
            $branch = $issue->{branchcode};
2264
        }
2265
        else {
2266
            $branch = $item->{ C4::Context->preference('HomeOrHoldingBranch') }
2267
              || $item->{homebranch};
2268
        }
2269
    }
2270
2252
    return $branch;
2271
    return $branch;
2253
}
2272
}
2254
2273
Lines 2468-2474 sub CanBookBeRenewed { Link Here
2468
    my $item        = GetItem($itemnumber)                                  or return;
2487
    my $item        = GetItem($itemnumber)                                  or return;
2469
    my $itemissue   = GetItemIssue($itemnumber)                             or return;
2488
    my $itemissue   = GetItemIssue($itemnumber)                             or return;
2470
2489
2471
    my $branchcode  = _GetCircControlBranch($item, $borrower);
2490
    my $branchcode  = GetCircControlBranch( $item, $borrower );
2472
2491
2473
    my $issuingrule = GetIssuingRule($borrower->{categorycode}, $item->{itype}, $branchcode);
2492
    my $issuingrule = GetIssuingRule($borrower->{categorycode}, $item->{itype}, $branchcode);
2474
2493
Lines 2631-2637 sub GetRenewCount { Link Here
2631
    $renewcount = $data->{'renewals'} if $data->{'renewals'};
2650
    $renewcount = $data->{'renewals'} if $data->{'renewals'};
2632
    $sth->finish;
2651
    $sth->finish;
2633
    # $item and $borrower should be calculated
2652
    # $item and $borrower should be calculated
2634
    my $branchcode = _GetCircControlBranch($item, $borrower);
2653
    my $branchcode = GetCircControlBranch($item, $borrower);
2635
    
2654
    
2636
    my $issuingrule = GetIssuingRule($borrower->{categorycode}, $item->{itype}, $branchcode);
2655
    my $issuingrule = GetIssuingRule($borrower->{categorycode}, $item->{itype}, $branchcode);
2637
    
2656
    
(-)a/C4/Reserves.pm (-1 / +1 lines)
Lines 863-869 sub CheckReserves { Link Here
863
                if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
863
                if ( $res->{'priority'} && $res->{'priority'} < $priority ) {
864
                    my $borrowerinfo=C4::Members::GetMember(borrowernumber => $res->{'borrowernumber'});
864
                    my $borrowerinfo=C4::Members::GetMember(borrowernumber => $res->{'borrowernumber'});
865
                    my $iteminfo=C4::Items::GetItem($itemnumber);
865
                    my $iteminfo=C4::Items::GetItem($itemnumber);
866
                    my $branch=C4::Circulation::_GetCircControlBranch($iteminfo,$borrowerinfo);
866
                    my $branch=C4::Circulation::GetCircControlBranch($iteminfo,$borrowerinfo);
867
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});
867
                    my $branchitemrule = C4::Circulation::GetBranchItemRule($branch,$iteminfo->{'itype'});
868
                    next if ($branchitemrule->{'holdallowed'} == 0);
868
                    next if ($branchitemrule->{'holdallowed'} == 0);
869
                    next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $borrowerinfo->{'branchcode'}));
869
                    next if (($branchitemrule->{'holdallowed'} == 1) && ($branch ne $borrowerinfo->{'branchcode'}));
(-)a/misc/cronjobs/fines.pl (-7 / +6 lines)
Lines 32-37 use 5.010; Link Here
32
32
33
use C4::Context;
33
use C4::Context;
34
use C4::Overdues;
34
use C4::Overdues;
35
use C4::Circulation qw( GetCircControlBranch );
36
use C4::Items qw( GetItem );
35
use Getopt::Long;
37
use Getopt::Long;
36
use Carp;
38
use Carp;
37
use File::Spec;
39
use File::Spec;
Lines 75-81 my @borrower_fields = Link Here
75
my @item_fields  = qw(itemnumber barcode date_due);
77
my @item_fields  = qw(itemnumber barcode date_due);
76
my @other_fields = qw(type days_overdue fine);
78
my @other_fields = qw(type days_overdue fine);
77
my $libname      = C4::Context->preference('LibraryName');
79
my $libname      = C4::Context->preference('LibraryName');
78
my $control      = C4::Context->preference('CircControl');
79
my $mode         = C4::Context->preference('finesMode');
80
my $mode         = C4::Context->preference('finesMode');
80
my $delim = "\t";    # ?  C4::Context->preference('delimiter') || "\t";
81
my $delim = "\t";    # ?  C4::Context->preference('delimiter') || "\t";
81
82
Lines 100-112 for my $overdue ( @{$overdues} ) { Link Here
100
"ERROR in Getoverdues : issues.borrowernumber IS NULL.  Repair 'issues' table now!  Skipping record.\n";
101
"ERROR in Getoverdues : issues.borrowernumber IS NULL.  Repair 'issues' table now!  Skipping record.\n";
101
        next;
102
        next;
102
    }
103
    }
103
    my $borrower = BorType( $overdue->{borrowernumber} );
104
    my $branchcode =
105
        ( $control eq 'ItemHomeLibrary' ) ? $overdue->{homebranch}
106
      : ( $control eq 'PatronLibrary' )   ? $borrower->{branchcode}
107
      :                                     $overdue->{branchcode};
108
104
109
# In final case, CircControl must be PickupLibrary. (branchcode comes from issues table here).
105
    my $borrower   = BorType( $overdue->{borrowernumber} );
106
    my $item       = GetItem( $overdue->{itemnumber} );
107
    my $branchcode = GetCircControlBranch( $item, $borrower, $overdue );
108
110
    if ( !exists $is_holiday{$branchcode} ) {
109
    if ( !exists $is_holiday{$branchcode} ) {
111
        $is_holiday{$branchcode} = set_holiday( $branchcode, $today );
110
        $is_holiday{$branchcode} = set_holiday( $branchcode, $today );
112
    }
111
    }
(-)a/reserve/request.pl (-1 / +1 lines)
Lines 436-442 foreach my $biblionumber (@biblionumbers) { Link Here
436
                }
436
                }
437
            }
437
            }
438
438
439
            my $branch = C4::Circulation::_GetCircControlBranch($item, $borrowerinfo);
439
            my $branch = C4::Circulation::GetCircControlBranch($item, $borrowerinfo);
440
440
441
            my $branchitemrule = GetBranchItemRule( $branch, $item->{'itype'} );
441
            my $branchitemrule = GetBranchItemRule( $branch, $item->{'itype'} );
442
            my $policy_holdallowed = 1;
442
            my $policy_holdallowed = 1;
(-)a/t/db_dependent/Circulation.t (-14 / +20 lines)
Lines 1-6 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Test::More tests => 16;
3
use Test::More tests => 17;
4
4
5
BEGIN {
5
BEGIN {
6
    use_ok('C4::Circulation');
6
    use_ok('C4::Circulation');
Lines 26-34 is( Link Here
26
    'CircControl changed to PickupLibrary'
26
    'CircControl changed to PickupLibrary'
27
);
27
);
28
is(
28
is(
29
    C4::Circulation::_GetCircControlBranch($item, $borrower),
29
    GetCircControlBranch($item, $borrower),
30
    $item->{$HomeOrHoldingBranch},
30
    $item->{$HomeOrHoldingBranch},
31
    '_GetCircControlBranch returned item branch (no userenv defined)'
31
    'GetCircControlBranch returned item branch (no userenv defined)'
32
);
32
);
33
33
34
# No userenv, PatronLibrary
34
# No userenv, PatronLibrary
Lines 39-47 is( Link Here
39
    'CircControl changed to PatronLibrary'
39
    'CircControl changed to PatronLibrary'
40
);
40
);
41
is(
41
is(
42
    C4::Circulation::_GetCircControlBranch($item, $borrower),
42
    GetCircControlBranch($item, $borrower),
43
    $borrower->{branchcode},
43
    $borrower->{branchcode},
44
    '_GetCircControlBranch returned borrower branch'
44
    'GetCircControlBranch returned borrower branch'
45
);
45
);
46
46
47
# No userenv, ItemHomeLibrary
47
# No userenv, ItemHomeLibrary
Lines 53-60 is( Link Here
53
);
53
);
54
is(
54
is(
55
    $item->{$HomeOrHoldingBranch},
55
    $item->{$HomeOrHoldingBranch},
56
    C4::Circulation::_GetCircControlBranch($item, $borrower),
56
    GetCircControlBranch($item, $borrower),
57
    '_GetCircControlBranch returned item branch'
57
    'GetCircControlBranch returned item branch'
58
);
59
60
# No userenv, ItemHomeLibrary, with issue
61
is(
62
    GetCircControlBranch($item, $borrower, { branchcode => 'EXAMPLE_BRANCHCODE' }),
63
    'EXAMPLE_BRANCHCODE',
64
    'GetCircControlBranch returned issuing branch'
58
);
65
);
59
66
60
diag('Now, set a userenv');
67
diag('Now, set a userenv');
Lines 70-78 is( Link Here
70
    'CircControl changed to PickupLibrary'
77
    'CircControl changed to PickupLibrary'
71
);
78
);
72
is(
79
is(
73
    C4::Circulation::_GetCircControlBranch($item, $borrower),
80
    GetCircControlBranch($item, $borrower),
74
    'CurrentBranch',
81
    'CurrentBranch',
75
    '_GetCircControlBranch returned current branch'
82
    'GetCircControlBranch returned current branch'
76
);
83
);
77
84
78
# Userenv set, PatronLibrary
85
# Userenv set, PatronLibrary
Lines 83-91 is( Link Here
83
    'CircControl changed to PatronLibrary'
90
    'CircControl changed to PatronLibrary'
84
);
91
);
85
is(
92
is(
86
    C4::Circulation::_GetCircControlBranch($item, $borrower),
93
    GetCircControlBranch($item, $borrower),
87
    $borrower->{branchcode},
94
    $borrower->{branchcode},
88
    '_GetCircControlBranch returned borrower branch'
95
    'GetCircControlBranch returned borrower branch'
89
);
96
);
90
97
91
# Userenv set, ItemHomeLibrary
98
# Userenv set, ItemHomeLibrary
Lines 96-104 is( Link Here
96
    'CircControl changed to ItemHomeLibrary'
103
    'CircControl changed to ItemHomeLibrary'
97
);
104
);
98
is(
105
is(
99
    C4::Circulation::_GetCircControlBranch($item, $borrower),
106
    GetCircControlBranch($item, $borrower),
100
    $item->{$HomeOrHoldingBranch},
107
    $item->{$HomeOrHoldingBranch},
101
    '_GetCircControlBranch returned item branch'
108
    'GetCircControlBranch returned item branch'
102
);
109
);
103
110
104
# Reset initial configuration
111
# Reset initial configuration
105
- 

Return to bug 10374