Lines 54-59
my $library = $builder->build({
Link Here
|
54 |
my $library2 = $builder->build({ |
54 |
my $library2 = $builder->build({ |
55 |
source => 'Branch', |
55 |
source => 'Branch', |
56 |
}); |
56 |
}); |
|
|
57 |
my $itemtype = $builder->build( |
58 |
{ source => 'Itemtype', |
59 |
value => { notforloan => undef, rentalcharge => 0 } |
60 |
} |
61 |
)->{itemtype}; |
57 |
|
62 |
|
58 |
my $CircControl = C4::Context->preference('CircControl'); |
63 |
my $CircControl = C4::Context->preference('CircControl'); |
59 |
my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch'); |
64 |
my $HomeOrHoldingBranch = C4::Context->preference('HomeOrHoldingBranch'); |
Lines 219-225
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
219 |
homebranch => $branch, |
224 |
homebranch => $branch, |
220 |
holdingbranch => $branch, |
225 |
holdingbranch => $branch, |
221 |
barcode => $barcode, |
226 |
barcode => $barcode, |
222 |
replacementprice => 12.00 |
227 |
replacementprice => 12.00, |
|
|
228 |
itype => $itemtype |
223 |
}, |
229 |
}, |
224 |
$biblionumber |
230 |
$biblionumber |
225 |
); |
231 |
); |
Lines 230-236
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
230 |
homebranch => $branch, |
236 |
homebranch => $branch, |
231 |
holdingbranch => $branch, |
237 |
holdingbranch => $branch, |
232 |
barcode => $barcode2, |
238 |
barcode => $barcode2, |
233 |
replacementprice => 23.00 |
239 |
replacementprice => 23.00, |
|
|
240 |
itype => $itemtype |
234 |
}, |
241 |
}, |
235 |
$biblionumber |
242 |
$biblionumber |
236 |
); |
243 |
); |
Lines 241-247
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
241 |
homebranch => $branch, |
248 |
homebranch => $branch, |
242 |
holdingbranch => $branch, |
249 |
holdingbranch => $branch, |
243 |
barcode => $barcode3, |
250 |
barcode => $barcode3, |
244 |
replacementprice => 23.00 |
251 |
replacementprice => 23.00, |
|
|
252 |
itype => $itemtype |
245 |
}, |
253 |
}, |
246 |
$biblionumber |
254 |
$biblionumber |
247 |
); |
255 |
); |
Lines 394-400
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
394 |
ModItem({ notforloan => 1 }, $biblionumber, $itemnumber); |
402 |
ModItem({ notforloan => 1 }, $biblionumber, $itemnumber); |
395 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber, 1); |
403 |
( $renewokay, $error ) = CanBookBeRenewed($renewing_borrowernumber, $itemnumber, 1); |
396 |
is( $renewokay, 1, 'Can renew, item is marked not for loan, hold does not block'); |
404 |
is( $renewokay, 1, 'Can renew, item is marked not for loan, hold does not block'); |
397 |
ModItem({ notforloan => 0, itype => '' }, $biblionumber, $itemnumber,1); |
405 |
ModItem({ notforloan => 0, itype => $itemtype }, $biblionumber, $itemnumber,1); |
398 |
|
406 |
|
399 |
# FIXME: Add more for itemtype not for loan etc. |
407 |
# FIXME: Add more for itemtype not for loan etc. |
400 |
|
408 |
|
Lines 405-411
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
405 |
homebranch => $branch, |
413 |
homebranch => $branch, |
406 |
holdingbranch => $branch, |
414 |
holdingbranch => $branch, |
407 |
barcode => $barcode5, |
415 |
barcode => $barcode5, |
408 |
replacementprice => 23.00 |
416 |
replacementprice => 23.00, |
|
|
417 |
itype => $itemtype |
409 |
}, |
418 |
}, |
410 |
$biblionumber |
419 |
$biblionumber |
411 |
); |
420 |
); |
Lines 425-431
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
425 |
homebranch => $branch, |
434 |
homebranch => $branch, |
426 |
holdingbranch => $branch, |
435 |
holdingbranch => $branch, |
427 |
barcode => $barcode6, |
436 |
barcode => $barcode6, |
428 |
replacementprice => 23.00 |
437 |
replacementprice => 23.00, |
|
|
438 |
itype => $itemtype |
429 |
}, |
439 |
}, |
430 |
$biblionumber |
440 |
$biblionumber |
431 |
); |
441 |
); |
Lines 436-442
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
436 |
homebranch => $branch, |
446 |
homebranch => $branch, |
437 |
holdingbranch => $branch, |
447 |
holdingbranch => $branch, |
438 |
barcode => $barcode7, |
448 |
barcode => $barcode7, |
439 |
replacementprice => 23.00 |
449 |
replacementprice => 23.00, |
|
|
450 |
itype => $itemtype |
440 |
}, |
451 |
}, |
441 |
$biblionumber |
452 |
$biblionumber |
442 |
); |
453 |
); |
Lines 485-491
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
485 |
homebranch => $branch, |
496 |
homebranch => $branch, |
486 |
holdingbranch => $branch, |
497 |
holdingbranch => $branch, |
487 |
barcode => $barcode4, |
498 |
barcode => $barcode4, |
488 |
replacementprice => 16.00 |
499 |
replacementprice => 16.00, |
|
|
500 |
itype => $itemtype |
489 |
}, |
501 |
}, |
490 |
$biblionumber |
502 |
$biblionumber |
491 |
); |
503 |
); |
Lines 726-732
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
726 |
{ |
738 |
{ |
727 |
homebranch => $branch, |
739 |
homebranch => $branch, |
728 |
holdingbranch => $branch, |
740 |
holdingbranch => $branch, |
729 |
barcode => $barcode3 |
741 |
barcode => $barcode3, |
|
|
742 |
itype => $itemtype |
730 |
}, |
743 |
}, |
731 |
$biblionumber2 |
744 |
$biblionumber2 |
732 |
); |
745 |
); |
Lines 805-811
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
805 |
{ |
818 |
{ |
806 |
homebranch => $branch, |
819 |
homebranch => $branch, |
807 |
holdingbranch => $branch, |
820 |
holdingbranch => $branch, |
808 |
barcode => $barcode |
821 |
barcode => $barcode, |
|
|
822 |
itype => $itemtype |
809 |
}, |
823 |
}, |
810 |
$biblionumber |
824 |
$biblionumber |
811 |
); |
825 |
); |
Lines 861-866
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
861 |
homebranch => $library2->{branchcode}, |
875 |
homebranch => $library2->{branchcode}, |
862 |
holdingbranch => $library2->{branchcode}, |
876 |
holdingbranch => $library2->{branchcode}, |
863 |
barcode => $barcode1, |
877 |
barcode => $barcode1, |
|
|
878 |
itype => $itemtype |
864 |
}, |
879 |
}, |
865 |
$biblionumber |
880 |
$biblionumber |
866 |
); |
881 |
); |
Lines 870-875
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
870 |
homebranch => $library2->{branchcode}, |
885 |
homebranch => $library2->{branchcode}, |
871 |
holdingbranch => $library2->{branchcode}, |
886 |
holdingbranch => $library2->{branchcode}, |
872 |
barcode => $barcode2, |
887 |
barcode => $barcode2, |
|
|
888 |
itype => $itemtype |
873 |
}, |
889 |
}, |
874 |
$biblionumber |
890 |
$biblionumber |
875 |
); |
891 |
); |
Lines 946-951
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
946 |
homebranch => $branch, |
962 |
homebranch => $branch, |
947 |
holdingbranch => $branch, |
963 |
holdingbranch => $branch, |
948 |
barcode => $barcode, |
964 |
barcode => $barcode, |
|
|
965 |
itype => $itemtype |
949 |
}, |
966 |
}, |
950 |
$biblionumber |
967 |
$biblionumber |
951 |
); |
968 |
); |
Lines 976-981
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
976 |
homebranch => $library->{branchcode}, |
993 |
homebranch => $library->{branchcode}, |
977 |
holdingbranch => $library->{branchcode}, |
994 |
holdingbranch => $library->{branchcode}, |
978 |
barcode => $barcode, |
995 |
barcode => $barcode, |
|
|
996 |
itype => $itemtype |
979 |
}, |
997 |
}, |
980 |
$biblionumber, |
998 |
$biblionumber, |
981 |
); |
999 |
); |
982 |
- |
|
|