Lines 264-269
Koha::CirculationRules->set_rules(
Link Here
|
264 |
itemtype => undef, |
264 |
itemtype => undef, |
265 |
rules => { |
265 |
rules => { |
266 |
reservesallowed => 25, |
266 |
reservesallowed => 25, |
|
|
267 |
} |
268 |
} |
269 |
); |
270 |
|
271 |
Koha::CirculationRules->set_rules( |
272 |
{ |
273 |
categorycode => undef, |
274 |
branchcode => undef, |
275 |
itemtype => undef, |
276 |
onsite_checkout => undef, |
277 |
rules => { |
267 |
issuelength => 14, |
278 |
issuelength => 14, |
268 |
lengthunit => 'days', |
279 |
lengthunit => 'days', |
269 |
renewalsallowed => 1, |
280 |
renewalsallowed => 1, |
Lines 772-777
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
772 |
categorycode => undef, |
783 |
categorycode => undef, |
773 |
branchcode => undef, |
784 |
branchcode => undef, |
774 |
itemtype => undef, |
785 |
itemtype => undef, |
|
|
786 |
onsite_checkout => undef, |
775 |
rules => { |
787 |
rules => { |
776 |
norenewalbefore => '7', |
788 |
norenewalbefore => '7', |
777 |
no_auto_renewal_after => '9', |
789 |
no_auto_renewal_after => '9', |
Lines 788-793
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
788 |
categorycode => undef, |
800 |
categorycode => undef, |
789 |
branchcode => undef, |
801 |
branchcode => undef, |
790 |
itemtype => undef, |
802 |
itemtype => undef, |
|
|
803 |
onsite_checkout => undef, |
791 |
rules => { |
804 |
rules => { |
792 |
norenewalbefore => '7', |
805 |
norenewalbefore => '7', |
793 |
no_auto_renewal_after => '10', |
806 |
no_auto_renewal_after => '10', |
Lines 804-809
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
804 |
categorycode => undef, |
817 |
categorycode => undef, |
805 |
branchcode => undef, |
818 |
branchcode => undef, |
806 |
itemtype => undef, |
819 |
itemtype => undef, |
|
|
820 |
onsite_checkout => undef, |
807 |
rules => { |
821 |
rules => { |
808 |
norenewalbefore => '7', |
822 |
norenewalbefore => '7', |
809 |
no_auto_renewal_after => '11', |
823 |
no_auto_renewal_after => '11', |
Lines 820-825
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
820 |
categorycode => undef, |
834 |
categorycode => undef, |
821 |
branchcode => undef, |
835 |
branchcode => undef, |
822 |
itemtype => undef, |
836 |
itemtype => undef, |
|
|
837 |
onsite_checkout => undef, |
823 |
rules => { |
838 |
rules => { |
824 |
norenewalbefore => '10', |
839 |
norenewalbefore => '10', |
825 |
no_auto_renewal_after => '11', |
840 |
no_auto_renewal_after => '11', |
Lines 836-841
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
836 |
categorycode => undef, |
851 |
categorycode => undef, |
837 |
branchcode => undef, |
852 |
branchcode => undef, |
838 |
itemtype => undef, |
853 |
itemtype => undef, |
|
|
854 |
onsite_checkout => undef, |
839 |
rules => { |
855 |
rules => { |
840 |
norenewalbefore => '10', |
856 |
norenewalbefore => '10', |
841 |
no_auto_renewal_after => undef, |
857 |
no_auto_renewal_after => undef, |
Lines 853-858
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
853 |
categorycode => undef, |
869 |
categorycode => undef, |
854 |
branchcode => undef, |
870 |
branchcode => undef, |
855 |
itemtype => undef, |
871 |
itemtype => undef, |
|
|
872 |
onsite_checkout => undef, |
856 |
rules => { |
873 |
rules => { |
857 |
norenewalbefore => '7', |
874 |
norenewalbefore => '7', |
858 |
no_auto_renewal_after => '15', |
875 |
no_auto_renewal_after => '15', |
Lines 870-875
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
870 |
categorycode => undef, |
887 |
categorycode => undef, |
871 |
branchcode => undef, |
888 |
branchcode => undef, |
872 |
itemtype => undef, |
889 |
itemtype => undef, |
|
|
890 |
onsite_checkout => undef, |
873 |
rules => { |
891 |
rules => { |
874 |
norenewalbefore => '10', |
892 |
norenewalbefore => '10', |
875 |
no_auto_renewal_after => undef, |
893 |
no_auto_renewal_after => undef, |
Lines 901-906
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
901 |
categorycode => undef, |
919 |
categorycode => undef, |
902 |
branchcode => undef, |
920 |
branchcode => undef, |
903 |
itemtype => undef, |
921 |
itemtype => undef, |
|
|
922 |
onsite_checkout => undef, |
904 |
rules => { |
923 |
rules => { |
905 |
norenewalbefore => '10', |
924 |
norenewalbefore => '10', |
906 |
no_auto_renewal_after => '11', |
925 |
no_auto_renewal_after => '11', |
Lines 991-996
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
991 |
categorycode => undef, |
1010 |
categorycode => undef, |
992 |
branchcode => undef, |
1011 |
branchcode => undef, |
993 |
itemtype => undef, |
1012 |
itemtype => undef, |
|
|
1013 |
onsite_checkout => undef, |
994 |
rules => { |
1014 |
rules => { |
995 |
norenewalbefore => 10, |
1015 |
norenewalbefore => 10, |
996 |
no_auto_renewal_after => 11, |
1016 |
no_auto_renewal_after => 11, |
Lines 1054-1059
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1054 |
categorycode => undef, |
1074 |
categorycode => undef, |
1055 |
branchcode => undef, |
1075 |
branchcode => undef, |
1056 |
itemtype => undef, |
1076 |
itemtype => undef, |
|
|
1077 |
onsite_checkout => undef, |
1057 |
rules => { |
1078 |
rules => { |
1058 |
norenewalbefore => '7', |
1079 |
norenewalbefore => '7', |
1059 |
no_auto_renewal_after => '', |
1080 |
no_auto_renewal_after => '', |
Lines 1069-1074
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1069 |
categorycode => undef, |
1090 |
categorycode => undef, |
1070 |
branchcode => undef, |
1091 |
branchcode => undef, |
1071 |
itemtype => undef, |
1092 |
itemtype => undef, |
|
|
1093 |
onsite_checkout => undef, |
1072 |
rules => { |
1094 |
rules => { |
1073 |
norenewalbefore => '10', |
1095 |
norenewalbefore => '10', |
1074 |
no_auto_renewal_after => '5', |
1096 |
no_auto_renewal_after => '5', |
Lines 1090-1095
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1090 |
categorycode => undef, |
1112 |
categorycode => undef, |
1091 |
branchcode => undef, |
1113 |
branchcode => undef, |
1092 |
itemtype => undef, |
1114 |
itemtype => undef, |
|
|
1115 |
onsite_checkout => undef, |
1093 |
rules => { |
1116 |
rules => { |
1094 |
norenewalbefore => '10', |
1117 |
norenewalbefore => '10', |
1095 |
no_auto_renewal_after => '15', |
1118 |
no_auto_renewal_after => '15', |
Lines 1108-1113
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1108 |
categorycode => undef, |
1131 |
categorycode => undef, |
1109 |
branchcode => undef, |
1132 |
branchcode => undef, |
1110 |
itemtype => undef, |
1133 |
itemtype => undef, |
|
|
1134 |
onsite_checkout => undef, |
1111 |
rules => { |
1135 |
rules => { |
1112 |
norenewalbefore => '10', |
1136 |
norenewalbefore => '10', |
1113 |
no_auto_renewal_after => '', |
1137 |
no_auto_renewal_after => '', |
Lines 1125-1130
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1125 |
categorycode => undef, |
1149 |
categorycode => undef, |
1126 |
branchcode => undef, |
1150 |
branchcode => undef, |
1127 |
itemtype => undef, |
1151 |
itemtype => undef, |
|
|
1152 |
onsite_checkout => undef, |
1128 |
rules => { |
1153 |
rules => { |
1129 |
norenewalbefore => '10', |
1154 |
norenewalbefore => '10', |
1130 |
no_auto_renewal_after => '15', |
1155 |
no_auto_renewal_after => '15', |
Lines 1147-1152
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1147 |
categorycode => undef, |
1172 |
categorycode => undef, |
1148 |
branchcode => undef, |
1173 |
branchcode => undef, |
1149 |
itemtype => undef, |
1174 |
itemtype => undef, |
|
|
1175 |
onsite_checkout => undef, |
1150 |
rules => { |
1176 |
rules => { |
1151 |
norenewalbefore => undef, |
1177 |
norenewalbefore => undef, |
1152 |
renewalsallowed => 0, |
1178 |
renewalsallowed => 0, |
Lines 1395-1400
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1395 |
branchcode => undef, |
1421 |
branchcode => undef, |
1396 |
rules => { |
1422 |
rules => { |
1397 |
reservesallowed => 25, |
1423 |
reservesallowed => 25, |
|
|
1424 |
} |
1425 |
} |
1426 |
); |
1427 |
Koha::CirculationRules->set_rules( |
1428 |
{ |
1429 |
categorycode => undef, |
1430 |
itemtype => undef, |
1431 |
branchcode => undef, |
1432 |
onsite_checkout => undef, |
1433 |
rules => { |
1398 |
issuelength => 14, |
1434 |
issuelength => 14, |
1399 |
lengthunit => 'days', |
1435 |
lengthunit => 'days', |
1400 |
renewalsallowed => 1, |
1436 |
renewalsallowed => 1, |
Lines 2022-2027
subtest 'AddReturn + CumulativeRestrictionPeriods' => sub {
Link Here
|
2022 |
categorycode => undef, |
2058 |
categorycode => undef, |
2023 |
itemtype => undef, |
2059 |
itemtype => undef, |
2024 |
branchcode => undef, |
2060 |
branchcode => undef, |
|
|
2061 |
onsite_checkout => undef, |
2025 |
rules => { |
2062 |
rules => { |
2026 |
issuelength => 1, |
2063 |
issuelength => 1, |
2027 |
firstremind => 1, # 1 day of grace |
2064 |
firstremind => 1, # 1 day of grace |
Lines 2128-2133
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2128 |
categorycode => '*', |
2165 |
categorycode => '*', |
2129 |
itemtype => '*', |
2166 |
itemtype => '*', |
2130 |
branchcode => '*', |
2167 |
branchcode => '*', |
|
|
2168 |
onsite_checkout => '*', |
2131 |
rules => { |
2169 |
rules => { |
2132 |
issuelength => 1, |
2170 |
issuelength => 1, |
2133 |
firstremind => 0, # 0 day of grace |
2171 |
firstremind => 0, # 0 day of grace |
Lines 2160-2165
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2160 |
categorycode => '*', |
2198 |
categorycode => '*', |
2161 |
itemtype => '*', |
2199 |
itemtype => '*', |
2162 |
branchcode => '*', |
2200 |
branchcode => '*', |
|
|
2201 |
onsite_checkout => '*', |
2163 |
rules => { |
2202 |
rules => { |
2164 |
issuelength => 1, |
2203 |
issuelength => 1, |
2165 |
firstremind => undef, # 0 day of grace |
2204 |
firstremind => undef, # 0 day of grace |
Lines 2216-2221
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2216 |
categorycode => undef, |
2255 |
categorycode => undef, |
2217 |
branchcode => undef, |
2256 |
branchcode => undef, |
2218 |
itemtype => undef, |
2257 |
itemtype => undef, |
|
|
2258 |
onsite_checkout => undef, |
2219 |
rules => { |
2259 |
rules => { |
2220 |
suspension_chargeperiod => 3, |
2260 |
suspension_chargeperiod => 3, |
2221 |
firstremind => 1, |
2261 |
firstremind => 1, |
Lines 2240-2245
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2240 |
categorycode => undef, |
2280 |
categorycode => undef, |
2241 |
branchcode => undef, |
2281 |
branchcode => undef, |
2242 |
itemtype => undef, |
2282 |
itemtype => undef, |
|
|
2283 |
onsite_checkout => undef, |
2243 |
rules => { |
2284 |
rules => { |
2244 |
finedays => 2, |
2285 |
finedays => 2, |
2245 |
suspension_chargeperiod => 1, |
2286 |
suspension_chargeperiod => 1, |
Lines 2409-2414
subtest 'AddReturn | is_overdue' => sub {
Link Here
|
2409 |
categorycode => undef, |
2450 |
categorycode => undef, |
2410 |
itemtype => undef, |
2451 |
itemtype => undef, |
2411 |
branchcode => undef, |
2452 |
branchcode => undef, |
|
|
2453 |
onsite_checkout => undef, |
2412 |
rules => { |
2454 |
rules => { |
2413 |
issuelength => 6, |
2455 |
issuelength => 6, |
2414 |
lengthunit => 'days', |
2456 |
lengthunit => 'days', |
Lines 2904-2911
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
2904 |
branchcode => undef, |
2946 |
branchcode => undef, |
2905 |
itemtype => undef, |
2947 |
itemtype => undef, |
2906 |
rules => { |
2948 |
rules => { |
2907 |
maxissueqty => 1, |
|
|
2908 |
reservesallowed => 25, |
2949 |
reservesallowed => 25, |
|
|
2950 |
} |
2951 |
} |
2952 |
); |
2953 |
|
2954 |
Koha::CirculationRules->set_rules( |
2955 |
{ |
2956 |
categorycode => undef, |
2957 |
branchcode => undef, |
2958 |
itemtype => undef, |
2959 |
onsite_checkout => undef, |
2960 |
rules => { |
2961 |
maxissueqty => 1, |
2909 |
issuelength => 14, |
2962 |
issuelength => 14, |
2910 |
lengthunit => 'days', |
2963 |
lengthunit => 'days', |
2911 |
renewalsallowed => 1, |
2964 |
renewalsallowed => 1, |
Lines 2951-2956
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
2951 |
branchcode => $idr_lib->branchcode, |
3004 |
branchcode => $idr_lib->branchcode, |
2952 |
rules => { |
3005 |
rules => { |
2953 |
reservesallowed => 25, |
3006 |
reservesallowed => 25, |
|
|
3007 |
} |
3008 |
} |
3009 |
); |
3010 |
Koha::CirculationRules->set_rules( |
3011 |
{ |
3012 |
categorycode => '*', |
3013 |
itemtype => '*', |
3014 |
branchcode => $idr_lib->branchcode, |
3015 |
onsite_checkout => '*', |
3016 |
rules => { |
2954 |
issuelength => 14, |
3017 |
issuelength => 14, |
2955 |
lengthunit => 'days', |
3018 |
lengthunit => 'days', |
2956 |
renewalsallowed => 10, |
3019 |
renewalsallowed => 10, |
Lines 3710-3715
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddReturn' => sub {
Link Here
|
3710 |
categorycode => undef, |
3773 |
categorycode => undef, |
3711 |
itemtype => undef, |
3774 |
itemtype => undef, |
3712 |
branchcode => undef, |
3775 |
branchcode => undef, |
|
|
3776 |
onsite_checkout => undef, |
3713 |
rules => { |
3777 |
rules => { |
3714 |
issuelength => 14, |
3778 |
issuelength => 14, |
3715 |
lengthunit => 'days', |
3779 |
lengthunit => 'days', |
Lines 3903-3908
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddIssue' => sub {
Link Here
|
3903 |
categorycode => undef, |
3967 |
categorycode => undef, |
3904 |
itemtype => undef, |
3968 |
itemtype => undef, |
3905 |
branchcode => undef, |
3969 |
branchcode => undef, |
|
|
3970 |
onsite_checkout => undef, |
3906 |
rules => { |
3971 |
rules => { |
3907 |
issuelength => 14, |
3972 |
issuelength => 14, |
3908 |
lengthunit => 'days', |
3973 |
lengthunit => 'days', |