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 |
- |
|
|