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

(-)a/C4/Circulation.pm (+2 lines)
Lines 3452-3457 sub GetTransfersFromTo { Link Here
3452
        FROM   branchtransfers
3452
        FROM   branchtransfers
3453
        WHERE  frombranch=?
3453
        WHERE  frombranch=?
3454
          AND  tobranch=?
3454
          AND  tobranch=?
3455
          AND datecancelled IS NULL
3456
          AND datesent IS NOT NULL
3455
          AND datearrived IS NULL
3457
          AND datearrived IS NULL
3456
    ";
3458
    ";
3457
    my $sth = $dbh->prepare($query);
3459
    my $sth = $dbh->prepare($query);
(-)a/t/db_dependent/Circulation/transfers.t (-1 / +38 lines)
Lines 89-94 my $item_id2 = Koha::Item->new( Link Here
89
        itype          => $itemtype
89
        itype          => $itemtype
90
    },
90
    },
91
)->store->itemnumber;
91
)->store->itemnumber;
92
my $item_id3 = Koha::Item->new(
93
    {
94
        biblionumber   => $biblionumber,
95
        barcode        => 3,
96
        itemcallnumber => 'callnumber3',
97
        homebranch     => $branchcode_1,
98
        holdingbranch  => $branchcode_1,
99
        itype          => $itemtype
100
    },
101
)->store->itemnumber;
102
my $item_id4 = Koha::Item->new(
103
    {
104
        biblionumber   => $biblionumber,
105
        barcode        => 4,
106
        itemcallnumber => 'callnumber4',
107
        homebranch     => $branchcode_1,
108
        holdingbranch  => $branchcode_1,
109
        itype          => $itemtype
110
    },
111
)->store->itemnumber;
92
112
93
#Add transfers
113
#Add transfers
94
ModItemTransfer(
114
ModItemTransfer(
Lines 106-111 ModItemTransfer( Link Here
106
    $branchcode_2
126
    $branchcode_2
107
);
127
);
108
128
129
# Add an "unsent" transfer for tests
130
ModItemTransfer(
131
    $item_id3,
132
    $branchcode_1,
133
    $branchcode_2
134
);
135
my $transfer_requested = Koha::Item::Transfers->search( { itemnumber => $item_id3 }, { rows => 1 })->single;
136
$transfer_requested->set({ daterequested => dt_from_string, datesent => undef })->store;
137
138
# Add a "cancelled" transfer for tests
139
ModItemTransfer(
140
    $item_id4,
141
    $branchcode_1,
142
    $branchcode_2
143
);
144
my $transfer_cancelled = Koha::Item::Transfers->search( { itemnumber => $item_id4 }, { rows => 1 })->single;
145
$transfer_cancelled->set( { daterequested => dt_from_string, datesent => undef, datecancelled => dt_from_string } )->store;
146
109
#Begin Tests
147
#Begin Tests
110
#Test CreateBranchTransferLimit
148
#Test CreateBranchTransferLimit
111
is(
149
is(
112
- 

Return to bug 24446