Lines 270-275
Koha::CirculationRules->set_rules(
Link Here
|
270 |
itemtype => undef, |
270 |
itemtype => undef, |
271 |
rules => { |
271 |
rules => { |
272 |
reservesallowed => 25, |
272 |
reservesallowed => 25, |
|
|
273 |
} |
274 |
} |
275 |
); |
276 |
|
277 |
Koha::CirculationRules->set_rules( |
278 |
{ |
279 |
categorycode => undef, |
280 |
branchcode => undef, |
281 |
itemtype => undef, |
282 |
onsite_checkout => undef, |
283 |
rules => { |
273 |
issuelength => 14, |
284 |
issuelength => 14, |
274 |
lengthunit => 'days', |
285 |
lengthunit => 'days', |
275 |
renewalsallowed => 1, |
286 |
renewalsallowed => 1, |
Lines 778-783
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
778 |
categorycode => undef, |
789 |
categorycode => undef, |
779 |
branchcode => undef, |
790 |
branchcode => undef, |
780 |
itemtype => undef, |
791 |
itemtype => undef, |
|
|
792 |
onsite_checkout => undef, |
781 |
rules => { |
793 |
rules => { |
782 |
norenewalbefore => '7', |
794 |
norenewalbefore => '7', |
783 |
no_auto_renewal_after => '9', |
795 |
no_auto_renewal_after => '9', |
Lines 794-799
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
794 |
categorycode => undef, |
806 |
categorycode => undef, |
795 |
branchcode => undef, |
807 |
branchcode => undef, |
796 |
itemtype => undef, |
808 |
itemtype => undef, |
|
|
809 |
onsite_checkout => undef, |
797 |
rules => { |
810 |
rules => { |
798 |
norenewalbefore => '7', |
811 |
norenewalbefore => '7', |
799 |
no_auto_renewal_after => '10', |
812 |
no_auto_renewal_after => '10', |
Lines 810-815
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
810 |
categorycode => undef, |
823 |
categorycode => undef, |
811 |
branchcode => undef, |
824 |
branchcode => undef, |
812 |
itemtype => undef, |
825 |
itemtype => undef, |
|
|
826 |
onsite_checkout => undef, |
813 |
rules => { |
827 |
rules => { |
814 |
norenewalbefore => '7', |
828 |
norenewalbefore => '7', |
815 |
no_auto_renewal_after => '11', |
829 |
no_auto_renewal_after => '11', |
Lines 826-831
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
826 |
categorycode => undef, |
840 |
categorycode => undef, |
827 |
branchcode => undef, |
841 |
branchcode => undef, |
828 |
itemtype => undef, |
842 |
itemtype => undef, |
|
|
843 |
onsite_checkout => undef, |
829 |
rules => { |
844 |
rules => { |
830 |
norenewalbefore => '10', |
845 |
norenewalbefore => '10', |
831 |
no_auto_renewal_after => '11', |
846 |
no_auto_renewal_after => '11', |
Lines 842-847
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
842 |
categorycode => undef, |
857 |
categorycode => undef, |
843 |
branchcode => undef, |
858 |
branchcode => undef, |
844 |
itemtype => undef, |
859 |
itemtype => undef, |
|
|
860 |
onsite_checkout => undef, |
845 |
rules => { |
861 |
rules => { |
846 |
norenewalbefore => '10', |
862 |
norenewalbefore => '10', |
847 |
no_auto_renewal_after => undef, |
863 |
no_auto_renewal_after => undef, |
Lines 859-864
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
859 |
categorycode => undef, |
875 |
categorycode => undef, |
860 |
branchcode => undef, |
876 |
branchcode => undef, |
861 |
itemtype => undef, |
877 |
itemtype => undef, |
|
|
878 |
onsite_checkout => undef, |
862 |
rules => { |
879 |
rules => { |
863 |
norenewalbefore => '7', |
880 |
norenewalbefore => '7', |
864 |
no_auto_renewal_after => '15', |
881 |
no_auto_renewal_after => '15', |
Lines 876-881
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
876 |
categorycode => undef, |
893 |
categorycode => undef, |
877 |
branchcode => undef, |
894 |
branchcode => undef, |
878 |
itemtype => undef, |
895 |
itemtype => undef, |
|
|
896 |
onsite_checkout => undef, |
879 |
rules => { |
897 |
rules => { |
880 |
norenewalbefore => '10', |
898 |
norenewalbefore => '10', |
881 |
no_auto_renewal_after => undef, |
899 |
no_auto_renewal_after => undef, |
Lines 907-912
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
907 |
categorycode => undef, |
925 |
categorycode => undef, |
908 |
branchcode => undef, |
926 |
branchcode => undef, |
909 |
itemtype => undef, |
927 |
itemtype => undef, |
|
|
928 |
onsite_checkout => undef, |
910 |
rules => { |
929 |
rules => { |
911 |
norenewalbefore => '10', |
930 |
norenewalbefore => '10', |
912 |
no_auto_renewal_after => '11', |
931 |
no_auto_renewal_after => '11', |
Lines 997-1002
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
997 |
categorycode => undef, |
1016 |
categorycode => undef, |
998 |
branchcode => undef, |
1017 |
branchcode => undef, |
999 |
itemtype => undef, |
1018 |
itemtype => undef, |
|
|
1019 |
onsite_checkout => undef, |
1000 |
rules => { |
1020 |
rules => { |
1001 |
norenewalbefore => 10, |
1021 |
norenewalbefore => 10, |
1002 |
no_auto_renewal_after => 11, |
1022 |
no_auto_renewal_after => 11, |
Lines 1060-1065
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1060 |
categorycode => undef, |
1080 |
categorycode => undef, |
1061 |
branchcode => undef, |
1081 |
branchcode => undef, |
1062 |
itemtype => undef, |
1082 |
itemtype => undef, |
|
|
1083 |
onsite_checkout => undef, |
1063 |
rules => { |
1084 |
rules => { |
1064 |
norenewalbefore => '7', |
1085 |
norenewalbefore => '7', |
1065 |
no_auto_renewal_after => '', |
1086 |
no_auto_renewal_after => '', |
Lines 1075-1080
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1075 |
categorycode => undef, |
1096 |
categorycode => undef, |
1076 |
branchcode => undef, |
1097 |
branchcode => undef, |
1077 |
itemtype => undef, |
1098 |
itemtype => undef, |
|
|
1099 |
onsite_checkout => undef, |
1078 |
rules => { |
1100 |
rules => { |
1079 |
norenewalbefore => '10', |
1101 |
norenewalbefore => '10', |
1080 |
no_auto_renewal_after => '5', |
1102 |
no_auto_renewal_after => '5', |
Lines 1096-1101
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1096 |
categorycode => undef, |
1118 |
categorycode => undef, |
1097 |
branchcode => undef, |
1119 |
branchcode => undef, |
1098 |
itemtype => undef, |
1120 |
itemtype => undef, |
|
|
1121 |
onsite_checkout => undef, |
1099 |
rules => { |
1122 |
rules => { |
1100 |
norenewalbefore => '10', |
1123 |
norenewalbefore => '10', |
1101 |
no_auto_renewal_after => '15', |
1124 |
no_auto_renewal_after => '15', |
Lines 1114-1119
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1114 |
categorycode => undef, |
1137 |
categorycode => undef, |
1115 |
branchcode => undef, |
1138 |
branchcode => undef, |
1116 |
itemtype => undef, |
1139 |
itemtype => undef, |
|
|
1140 |
onsite_checkout => undef, |
1117 |
rules => { |
1141 |
rules => { |
1118 |
norenewalbefore => '10', |
1142 |
norenewalbefore => '10', |
1119 |
no_auto_renewal_after => '', |
1143 |
no_auto_renewal_after => '', |
Lines 1131-1136
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1131 |
categorycode => undef, |
1155 |
categorycode => undef, |
1132 |
branchcode => undef, |
1156 |
branchcode => undef, |
1133 |
itemtype => undef, |
1157 |
itemtype => undef, |
|
|
1158 |
onsite_checkout => undef, |
1134 |
rules => { |
1159 |
rules => { |
1135 |
norenewalbefore => '10', |
1160 |
norenewalbefore => '10', |
1136 |
no_auto_renewal_after => '15', |
1161 |
no_auto_renewal_after => '15', |
Lines 1153-1158
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1153 |
categorycode => undef, |
1178 |
categorycode => undef, |
1154 |
branchcode => undef, |
1179 |
branchcode => undef, |
1155 |
itemtype => undef, |
1180 |
itemtype => undef, |
|
|
1181 |
onsite_checkout => undef, |
1156 |
rules => { |
1182 |
rules => { |
1157 |
norenewalbefore => undef, |
1183 |
norenewalbefore => undef, |
1158 |
renewalsallowed => 0, |
1184 |
renewalsallowed => 0, |
Lines 1170-1175
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1170 |
categorycode => undef, |
1196 |
categorycode => undef, |
1171 |
branchcode => undef, |
1197 |
branchcode => undef, |
1172 |
itemtype => undef, |
1198 |
itemtype => undef, |
|
|
1199 |
onsite_checkout => undef, |
1173 |
rules => { |
1200 |
rules => { |
1174 |
unseen_renewals_allowed => 2, |
1201 |
unseen_renewals_allowed => 2, |
1175 |
renewalsallowed => 10, |
1202 |
renewalsallowed => 10, |
Lines 1186-1191
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1186 |
categorycode => undef, |
1213 |
categorycode => undef, |
1187 |
branchcode => undef, |
1214 |
branchcode => undef, |
1188 |
itemtype => undef, |
1215 |
itemtype => undef, |
|
|
1216 |
onsite_checkout => undef, |
1189 |
rules => { |
1217 |
rules => { |
1190 |
norenewalbefore => undef, |
1218 |
norenewalbefore => undef, |
1191 |
renewalsallowed => 0, |
1219 |
renewalsallowed => 0, |
Lines 1431-1436
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1431 |
branchcode => undef, |
1459 |
branchcode => undef, |
1432 |
rules => { |
1460 |
rules => { |
1433 |
reservesallowed => 25, |
1461 |
reservesallowed => 25, |
|
|
1462 |
} |
1463 |
} |
1464 |
); |
1465 |
Koha::CirculationRules->set_rules( |
1466 |
{ |
1467 |
categorycode => undef, |
1468 |
itemtype => undef, |
1469 |
branchcode => undef, |
1470 |
onsite_checkout => undef, |
1471 |
rules => { |
1434 |
issuelength => 14, |
1472 |
issuelength => 14, |
1435 |
lengthunit => 'days', |
1473 |
lengthunit => 'days', |
1436 |
renewalsallowed => 1, |
1474 |
renewalsallowed => 1, |
Lines 2058-2063
subtest 'AddReturn + CumulativeRestrictionPeriods' => sub {
Link Here
|
2058 |
categorycode => undef, |
2096 |
categorycode => undef, |
2059 |
itemtype => undef, |
2097 |
itemtype => undef, |
2060 |
branchcode => undef, |
2098 |
branchcode => undef, |
|
|
2099 |
onsite_checkout => undef, |
2061 |
rules => { |
2100 |
rules => { |
2062 |
issuelength => 1, |
2101 |
issuelength => 1, |
2063 |
firstremind => 1, # 1 day of grace |
2102 |
firstremind => 1, # 1 day of grace |
Lines 2164-2169
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2164 |
categorycode => '*', |
2203 |
categorycode => '*', |
2165 |
itemtype => '*', |
2204 |
itemtype => '*', |
2166 |
branchcode => '*', |
2205 |
branchcode => '*', |
|
|
2206 |
onsite_checkout => '*', |
2167 |
rules => { |
2207 |
rules => { |
2168 |
issuelength => 1, |
2208 |
issuelength => 1, |
2169 |
firstremind => 0, # 0 day of grace |
2209 |
firstremind => 0, # 0 day of grace |
Lines 2196-2201
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2196 |
categorycode => '*', |
2236 |
categorycode => '*', |
2197 |
itemtype => '*', |
2237 |
itemtype => '*', |
2198 |
branchcode => '*', |
2238 |
branchcode => '*', |
|
|
2239 |
onsite_checkout => '*', |
2199 |
rules => { |
2240 |
rules => { |
2200 |
issuelength => 1, |
2241 |
issuelength => 1, |
2201 |
firstremind => undef, # 0 day of grace |
2242 |
firstremind => undef, # 0 day of grace |
Lines 2252-2257
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2252 |
categorycode => undef, |
2293 |
categorycode => undef, |
2253 |
branchcode => undef, |
2294 |
branchcode => undef, |
2254 |
itemtype => undef, |
2295 |
itemtype => undef, |
|
|
2296 |
onsite_checkout => undef, |
2255 |
rules => { |
2297 |
rules => { |
2256 |
suspension_chargeperiod => 3, |
2298 |
suspension_chargeperiod => 3, |
2257 |
firstremind => 1, |
2299 |
firstremind => 1, |
Lines 2276-2281
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2276 |
categorycode => undef, |
2318 |
categorycode => undef, |
2277 |
branchcode => undef, |
2319 |
branchcode => undef, |
2278 |
itemtype => undef, |
2320 |
itemtype => undef, |
|
|
2321 |
onsite_checkout => undef, |
2279 |
rules => { |
2322 |
rules => { |
2280 |
finedays => 2, |
2323 |
finedays => 2, |
2281 |
suspension_chargeperiod => 1, |
2324 |
suspension_chargeperiod => 1, |
Lines 2445-2450
subtest 'AddReturn | is_overdue' => sub {
Link Here
|
2445 |
categorycode => undef, |
2488 |
categorycode => undef, |
2446 |
itemtype => undef, |
2489 |
itemtype => undef, |
2447 |
branchcode => undef, |
2490 |
branchcode => undef, |
|
|
2491 |
onsite_checkout => undef, |
2448 |
rules => { |
2492 |
rules => { |
2449 |
issuelength => 6, |
2493 |
issuelength => 6, |
2450 |
lengthunit => 'days', |
2494 |
lengthunit => 'days', |
Lines 3395-3402
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
3395 |
branchcode => undef, |
3439 |
branchcode => undef, |
3396 |
itemtype => undef, |
3440 |
itemtype => undef, |
3397 |
rules => { |
3441 |
rules => { |
3398 |
maxissueqty => 1, |
|
|
3399 |
reservesallowed => 25, |
3442 |
reservesallowed => 25, |
|
|
3443 |
} |
3444 |
} |
3445 |
); |
3446 |
|
3447 |
Koha::CirculationRules->set_rules( |
3448 |
{ |
3449 |
categorycode => undef, |
3450 |
branchcode => undef, |
3451 |
itemtype => undef, |
3452 |
onsite_checkout => undef, |
3453 |
rules => { |
3454 |
maxissueqty => 1, |
3400 |
issuelength => 14, |
3455 |
issuelength => 14, |
3401 |
lengthunit => 'days', |
3456 |
lengthunit => 'days', |
3402 |
renewalsallowed => 1, |
3457 |
renewalsallowed => 1, |
Lines 3442-3447
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
3442 |
branchcode => $idr_lib->branchcode, |
3497 |
branchcode => $idr_lib->branchcode, |
3443 |
rules => { |
3498 |
rules => { |
3444 |
reservesallowed => 25, |
3499 |
reservesallowed => 25, |
|
|
3500 |
} |
3501 |
} |
3502 |
); |
3503 |
Koha::CirculationRules->set_rules( |
3504 |
{ |
3505 |
categorycode => '*', |
3506 |
itemtype => '*', |
3507 |
branchcode => $idr_lib->branchcode, |
3508 |
onsite_checkout => '*', |
3509 |
rules => { |
3445 |
issuelength => 14, |
3510 |
issuelength => 14, |
3446 |
lengthunit => 'days', |
3511 |
lengthunit => 'days', |
3447 |
renewalsallowed => 10, |
3512 |
renewalsallowed => 10, |
Lines 4200-4205
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddReturn' => sub {
Link Here
|
4200 |
categorycode => undef, |
4265 |
categorycode => undef, |
4201 |
itemtype => undef, |
4266 |
itemtype => undef, |
4202 |
branchcode => undef, |
4267 |
branchcode => undef, |
|
|
4268 |
onsite_checkout => undef, |
4203 |
rules => { |
4269 |
rules => { |
4204 |
issuelength => 14, |
4270 |
issuelength => 14, |
4205 |
lengthunit => 'days', |
4271 |
lengthunit => 'days', |
Lines 4394-4399
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddIssue' => sub {
Link Here
|
4394 |
categorycode => undef, |
4460 |
categorycode => undef, |
4395 |
itemtype => undef, |
4461 |
itemtype => undef, |
4396 |
branchcode => undef, |
4462 |
branchcode => undef, |
|
|
4463 |
onsite_checkout => undef, |
4397 |
rules => { |
4464 |
rules => { |
4398 |
issuelength => 14, |
4465 |
issuelength => 14, |
4399 |
lengthunit => 'days', |
4466 |
lengthunit => 'days', |