|
Lines 261-266
Koha::CirculationRules->set_rules(
Link Here
|
| 261 |
categorycode => undef, |
261 |
categorycode => undef, |
| 262 |
branchcode => undef, |
262 |
branchcode => undef, |
| 263 |
itemtype => undef, |
263 |
itemtype => undef, |
|
|
264 |
checkout_type => undef, |
| 264 |
rules => { |
265 |
rules => { |
| 265 |
reservesallowed => 25, |
266 |
reservesallowed => 25, |
| 266 |
issuelength => 14, |
267 |
issuelength => 14, |
|
Lines 768-773
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 768 |
categorycode => undef, |
769 |
categorycode => undef, |
| 769 |
branchcode => undef, |
770 |
branchcode => undef, |
| 770 |
itemtype => undef, |
771 |
itemtype => undef, |
|
|
772 |
checkout_type => undef, |
| 771 |
rules => { |
773 |
rules => { |
| 772 |
norenewalbefore => '7', |
774 |
norenewalbefore => '7', |
| 773 |
no_auto_renewal_after => '9', |
775 |
no_auto_renewal_after => '9', |
|
Lines 784-789
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 784 |
categorycode => undef, |
786 |
categorycode => undef, |
| 785 |
branchcode => undef, |
787 |
branchcode => undef, |
| 786 |
itemtype => undef, |
788 |
itemtype => undef, |
|
|
789 |
checkout_type => undef, |
| 787 |
rules => { |
790 |
rules => { |
| 788 |
norenewalbefore => '7', |
791 |
norenewalbefore => '7', |
| 789 |
no_auto_renewal_after => '10', |
792 |
no_auto_renewal_after => '10', |
|
Lines 800-805
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 800 |
categorycode => undef, |
803 |
categorycode => undef, |
| 801 |
branchcode => undef, |
804 |
branchcode => undef, |
| 802 |
itemtype => undef, |
805 |
itemtype => undef, |
|
|
806 |
checkout_type => undef, |
| 803 |
rules => { |
807 |
rules => { |
| 804 |
norenewalbefore => '7', |
808 |
norenewalbefore => '7', |
| 805 |
no_auto_renewal_after => '11', |
809 |
no_auto_renewal_after => '11', |
|
Lines 816-821
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 816 |
categorycode => undef, |
820 |
categorycode => undef, |
| 817 |
branchcode => undef, |
821 |
branchcode => undef, |
| 818 |
itemtype => undef, |
822 |
itemtype => undef, |
|
|
823 |
checkout_type => undef, |
| 819 |
rules => { |
824 |
rules => { |
| 820 |
norenewalbefore => '10', |
825 |
norenewalbefore => '10', |
| 821 |
no_auto_renewal_after => '11', |
826 |
no_auto_renewal_after => '11', |
|
Lines 832-837
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 832 |
categorycode => undef, |
837 |
categorycode => undef, |
| 833 |
branchcode => undef, |
838 |
branchcode => undef, |
| 834 |
itemtype => undef, |
839 |
itemtype => undef, |
|
|
840 |
checkout_type => undef, |
| 835 |
rules => { |
841 |
rules => { |
| 836 |
norenewalbefore => '10', |
842 |
norenewalbefore => '10', |
| 837 |
no_auto_renewal_after => undef, |
843 |
no_auto_renewal_after => undef, |
|
Lines 849-854
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 849 |
categorycode => undef, |
855 |
categorycode => undef, |
| 850 |
branchcode => undef, |
856 |
branchcode => undef, |
| 851 |
itemtype => undef, |
857 |
itemtype => undef, |
|
|
858 |
checkout_type => undef, |
| 852 |
rules => { |
859 |
rules => { |
| 853 |
norenewalbefore => '7', |
860 |
norenewalbefore => '7', |
| 854 |
no_auto_renewal_after => '15', |
861 |
no_auto_renewal_after => '15', |
|
Lines 866-871
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 866 |
categorycode => undef, |
873 |
categorycode => undef, |
| 867 |
branchcode => undef, |
874 |
branchcode => undef, |
| 868 |
itemtype => undef, |
875 |
itemtype => undef, |
|
|
876 |
checkout_type => undef, |
| 869 |
rules => { |
877 |
rules => { |
| 870 |
norenewalbefore => '10', |
878 |
norenewalbefore => '10', |
| 871 |
no_auto_renewal_after => undef, |
879 |
no_auto_renewal_after => undef, |
|
Lines 899-904
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 899 |
categorycode => undef, |
907 |
categorycode => undef, |
| 900 |
branchcode => undef, |
908 |
branchcode => undef, |
| 901 |
itemtype => undef, |
909 |
itemtype => undef, |
|
|
910 |
checkout_type => undef, |
| 902 |
rules => { |
911 |
rules => { |
| 903 |
norenewalbefore => '10', |
912 |
norenewalbefore => '10', |
| 904 |
no_auto_renewal_after => '11', |
913 |
no_auto_renewal_after => '11', |
|
Lines 991-996
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 991 |
categorycode => undef, |
1000 |
categorycode => undef, |
| 992 |
branchcode => undef, |
1001 |
branchcode => undef, |
| 993 |
itemtype => undef, |
1002 |
itemtype => undef, |
|
|
1003 |
checkout_type => undef, |
| 994 |
rules => { |
1004 |
rules => { |
| 995 |
norenewalbefore => 10, |
1005 |
norenewalbefore => 10, |
| 996 |
no_auto_renewal_after => 11, |
1006 |
no_auto_renewal_after => 11, |
|
Lines 1057-1062
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1057 |
categorycode => undef, |
1067 |
categorycode => undef, |
| 1058 |
branchcode => undef, |
1068 |
branchcode => undef, |
| 1059 |
itemtype => undef, |
1069 |
itemtype => undef, |
|
|
1070 |
checkout_type => undef, |
| 1060 |
rules => { |
1071 |
rules => { |
| 1061 |
norenewalbefore => '7', |
1072 |
norenewalbefore => '7', |
| 1062 |
no_auto_renewal_after => '', |
1073 |
no_auto_renewal_after => '', |
|
Lines 1072-1077
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1072 |
categorycode => undef, |
1083 |
categorycode => undef, |
| 1073 |
branchcode => undef, |
1084 |
branchcode => undef, |
| 1074 |
itemtype => undef, |
1085 |
itemtype => undef, |
|
|
1086 |
checkout_type => undef, |
| 1075 |
rules => { |
1087 |
rules => { |
| 1076 |
norenewalbefore => '10', |
1088 |
norenewalbefore => '10', |
| 1077 |
no_auto_renewal_after => '5', |
1089 |
no_auto_renewal_after => '5', |
|
Lines 1093-1098
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1093 |
categorycode => undef, |
1105 |
categorycode => undef, |
| 1094 |
branchcode => undef, |
1106 |
branchcode => undef, |
| 1095 |
itemtype => undef, |
1107 |
itemtype => undef, |
|
|
1108 |
checkout_type => undef, |
| 1096 |
rules => { |
1109 |
rules => { |
| 1097 |
norenewalbefore => '10', |
1110 |
norenewalbefore => '10', |
| 1098 |
no_auto_renewal_after => '15', |
1111 |
no_auto_renewal_after => '15', |
|
Lines 1111-1116
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1111 |
categorycode => undef, |
1124 |
categorycode => undef, |
| 1112 |
branchcode => undef, |
1125 |
branchcode => undef, |
| 1113 |
itemtype => undef, |
1126 |
itemtype => undef, |
|
|
1127 |
checkout_type => undef, |
| 1114 |
rules => { |
1128 |
rules => { |
| 1115 |
norenewalbefore => '10', |
1129 |
norenewalbefore => '10', |
| 1116 |
no_auto_renewal_after => '', |
1130 |
no_auto_renewal_after => '', |
|
Lines 1128-1133
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1128 |
categorycode => undef, |
1142 |
categorycode => undef, |
| 1129 |
branchcode => undef, |
1143 |
branchcode => undef, |
| 1130 |
itemtype => undef, |
1144 |
itemtype => undef, |
|
|
1145 |
checkout_type => undef, |
| 1131 |
rules => { |
1146 |
rules => { |
| 1132 |
norenewalbefore => '10', |
1147 |
norenewalbefore => '10', |
| 1133 |
no_auto_renewal_after => '15', |
1148 |
no_auto_renewal_after => '15', |
|
Lines 1150-1155
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
| 1150 |
categorycode => undef, |
1165 |
categorycode => undef, |
| 1151 |
branchcode => undef, |
1166 |
branchcode => undef, |
| 1152 |
itemtype => undef, |
1167 |
itemtype => undef, |
|
|
1168 |
checkout_type => undef, |
| 1153 |
rules => { |
1169 |
rules => { |
| 1154 |
norenewalbefore => undef, |
1170 |
norenewalbefore => undef, |
| 1155 |
renewalsallowed => 0, |
1171 |
renewalsallowed => 0, |
|
Lines 1396-1401
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
| 1396 |
categorycode => undef, |
1412 |
categorycode => undef, |
| 1397 |
itemtype => undef, |
1413 |
itemtype => undef, |
| 1398 |
branchcode => undef, |
1414 |
branchcode => undef, |
|
|
1415 |
checkout_type => undef, |
| 1399 |
rules => { |
1416 |
rules => { |
| 1400 |
reservesallowed => 25, |
1417 |
reservesallowed => 25, |
| 1401 |
issuelength => 14, |
1418 |
issuelength => 14, |
|
Lines 1463-1468
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
| 1463 |
categorycode => undef, |
1480 |
categorycode => undef, |
| 1464 |
itemtype => undef, |
1481 |
itemtype => undef, |
| 1465 |
branchcode => undef, |
1482 |
branchcode => undef, |
|
|
1483 |
checkout_type => undef, |
| 1466 |
rules => { |
1484 |
rules => { |
| 1467 |
onshelfholds => 0, |
1485 |
onshelfholds => 0, |
| 1468 |
} |
1486 |
} |
|
Lines 1477-1482
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
| 1477 |
categorycode => undef, |
1495 |
categorycode => undef, |
| 1478 |
itemtype => undef, |
1496 |
itemtype => undef, |
| 1479 |
branchcode => undef, |
1497 |
branchcode => undef, |
|
|
1498 |
checkout_type => undef, |
| 1480 |
rules => { |
1499 |
rules => { |
| 1481 |
onshelfholds => 0, |
1500 |
onshelfholds => 0, |
| 1482 |
} |
1501 |
} |
|
Lines 1491-1496
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
| 1491 |
categorycode => undef, |
1510 |
categorycode => undef, |
| 1492 |
itemtype => undef, |
1511 |
itemtype => undef, |
| 1493 |
branchcode => undef, |
1512 |
branchcode => undef, |
|
|
1513 |
checkout_type => undef, |
| 1494 |
rules => { |
1514 |
rules => { |
| 1495 |
onshelfholds => 1, |
1515 |
onshelfholds => 1, |
| 1496 |
} |
1516 |
} |
|
Lines 1505-1510
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
| 1505 |
categorycode => undef, |
1525 |
categorycode => undef, |
| 1506 |
itemtype => undef, |
1526 |
itemtype => undef, |
| 1507 |
branchcode => undef, |
1527 |
branchcode => undef, |
|
|
1528 |
checkout_type => undef, |
| 1508 |
rules => { |
1529 |
rules => { |
| 1509 |
onshelfholds => 1, |
1530 |
onshelfholds => 1, |
| 1510 |
} |
1531 |
} |
|
Lines 2025-2030
subtest 'AddReturn + CumulativeRestrictionPeriods' => sub {
Link Here
|
| 2025 |
categorycode => undef, |
2046 |
categorycode => undef, |
| 2026 |
itemtype => undef, |
2047 |
itemtype => undef, |
| 2027 |
branchcode => undef, |
2048 |
branchcode => undef, |
|
|
2049 |
checkout_type => undef, |
| 2028 |
rules => { |
2050 |
rules => { |
| 2029 |
issuelength => 1, |
2051 |
issuelength => 1, |
| 2030 |
firstremind => 1, # 1 day of grace |
2052 |
firstremind => 1, # 1 day of grace |
|
Lines 2131-2136
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
| 2131 |
categorycode => '*', |
2153 |
categorycode => '*', |
| 2132 |
itemtype => '*', |
2154 |
itemtype => '*', |
| 2133 |
branchcode => '*', |
2155 |
branchcode => '*', |
|
|
2156 |
checkout_type => '*', |
| 2134 |
rules => { |
2157 |
rules => { |
| 2135 |
issuelength => 1, |
2158 |
issuelength => 1, |
| 2136 |
firstremind => 0, # 0 day of grace |
2159 |
firstremind => 0, # 0 day of grace |
|
Lines 2187-2192
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
| 2187 |
categorycode => undef, |
2210 |
categorycode => undef, |
| 2188 |
branchcode => undef, |
2211 |
branchcode => undef, |
| 2189 |
itemtype => undef, |
2212 |
itemtype => undef, |
|
|
2213 |
checkout_type => undef, |
| 2190 |
rules => { |
2214 |
rules => { |
| 2191 |
suspension_chargeperiod => 3, |
2215 |
suspension_chargeperiod => 3, |
| 2192 |
firstremind => 1, |
2216 |
firstremind => 1, |
|
Lines 2211-2216
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
| 2211 |
categorycode => undef, |
2235 |
categorycode => undef, |
| 2212 |
branchcode => undef, |
2236 |
branchcode => undef, |
| 2213 |
itemtype => undef, |
2237 |
itemtype => undef, |
|
|
2238 |
checkout_type => undef, |
| 2214 |
rules => { |
2239 |
rules => { |
| 2215 |
finedays => 2, |
2240 |
finedays => 2, |
| 2216 |
suspension_chargeperiod => 1, |
2241 |
suspension_chargeperiod => 1, |
|
Lines 2380-2385
subtest 'AddReturn | is_overdue' => sub {
Link Here
|
| 2380 |
categorycode => undef, |
2405 |
categorycode => undef, |
| 2381 |
itemtype => undef, |
2406 |
itemtype => undef, |
| 2382 |
branchcode => undef, |
2407 |
branchcode => undef, |
|
|
2408 |
checkout_type => undef, |
| 2383 |
rules => { |
2409 |
rules => { |
| 2384 |
issuelength => 6, |
2410 |
issuelength => 6, |
| 2385 |
lengthunit => 'days', |
2411 |
lengthunit => 'days', |
|
Lines 3301-3306
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
| 3301 |
categorycode => undef, |
3327 |
categorycode => undef, |
| 3302 |
branchcode => undef, |
3328 |
branchcode => undef, |
| 3303 |
itemtype => undef, |
3329 |
itemtype => undef, |
|
|
3330 |
checkout_type => undef, |
| 3304 |
rules => { |
3331 |
rules => { |
| 3305 |
maxissueqty => 1, |
3332 |
maxissueqty => 1, |
| 3306 |
reservesallowed => 25, |
3333 |
reservesallowed => 25, |
|
Lines 3347-3352
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
| 3347 |
categorycode => '*', |
3374 |
categorycode => '*', |
| 3348 |
itemtype => '*', |
3375 |
itemtype => '*', |
| 3349 |
branchcode => $idr_lib->branchcode, |
3376 |
branchcode => $idr_lib->branchcode, |
|
|
3377 |
checkout_type => '*', |
| 3350 |
rules => { |
3378 |
rules => { |
| 3351 |
reservesallowed => 25, |
3379 |
reservesallowed => 25, |
| 3352 |
issuelength => 14, |
3380 |
issuelength => 14, |