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 2184-2189
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2184 |
categorycode => undef, |
2222 |
categorycode => undef, |
2185 |
branchcode => undef, |
2223 |
branchcode => undef, |
2186 |
itemtype => undef, |
2224 |
itemtype => undef, |
|
|
2225 |
onsite_checkout => undef, |
2187 |
rules => { |
2226 |
rules => { |
2188 |
suspension_chargeperiod => 3, |
2227 |
suspension_chargeperiod => 3, |
2189 |
firstremind => 1, |
2228 |
firstremind => 1, |
Lines 2208-2213
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2208 |
categorycode => undef, |
2247 |
categorycode => undef, |
2209 |
branchcode => undef, |
2248 |
branchcode => undef, |
2210 |
itemtype => undef, |
2249 |
itemtype => undef, |
|
|
2250 |
onsite_checkout => undef, |
2211 |
rules => { |
2251 |
rules => { |
2212 |
finedays => 2, |
2252 |
finedays => 2, |
2213 |
suspension_chargeperiod => 1, |
2253 |
suspension_chargeperiod => 1, |
Lines 2377-2382
subtest 'AddReturn | is_overdue' => sub {
Link Here
|
2377 |
categorycode => undef, |
2417 |
categorycode => undef, |
2378 |
itemtype => undef, |
2418 |
itemtype => undef, |
2379 |
branchcode => undef, |
2419 |
branchcode => undef, |
|
|
2420 |
onsite_checkout => undef, |
2380 |
rules => { |
2421 |
rules => { |
2381 |
issuelength => 6, |
2422 |
issuelength => 6, |
2382 |
lengthunit => 'days', |
2423 |
lengthunit => 'days', |
Lines 2872-2879
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
2872 |
branchcode => undef, |
2913 |
branchcode => undef, |
2873 |
itemtype => undef, |
2914 |
itemtype => undef, |
2874 |
rules => { |
2915 |
rules => { |
2875 |
maxissueqty => 1, |
|
|
2876 |
reservesallowed => 25, |
2916 |
reservesallowed => 25, |
|
|
2917 |
} |
2918 |
} |
2919 |
); |
2920 |
|
2921 |
Koha::CirculationRules->set_rules( |
2922 |
{ |
2923 |
categorycode => undef, |
2924 |
branchcode => undef, |
2925 |
itemtype => undef, |
2926 |
onsite_checkout => undef, |
2927 |
rules => { |
2928 |
maxissueqty => 1, |
2877 |
issuelength => 14, |
2929 |
issuelength => 14, |
2878 |
lengthunit => 'days', |
2930 |
lengthunit => 'days', |
2879 |
renewalsallowed => 1, |
2931 |
renewalsallowed => 1, |
Lines 2919-2924
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
2919 |
branchcode => $idr_lib->branchcode, |
2971 |
branchcode => $idr_lib->branchcode, |
2920 |
rules => { |
2972 |
rules => { |
2921 |
reservesallowed => 25, |
2973 |
reservesallowed => 25, |
|
|
2974 |
} |
2975 |
} |
2976 |
); |
2977 |
Koha::CirculationRules->set_rules( |
2978 |
{ |
2979 |
categorycode => '*', |
2980 |
itemtype => '*', |
2981 |
branchcode => $idr_lib->branchcode, |
2982 |
onsite_checkout => '*', |
2983 |
rules => { |
2922 |
issuelength => 14, |
2984 |
issuelength => 14, |
2923 |
lengthunit => 'days', |
2985 |
lengthunit => 'days', |
2924 |
renewalsallowed => 10, |
2986 |
renewalsallowed => 10, |
Lines 3678-3683
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddReturn' => sub {
Link Here
|
3678 |
categorycode => undef, |
3740 |
categorycode => undef, |
3679 |
itemtype => undef, |
3741 |
itemtype => undef, |
3680 |
branchcode => undef, |
3742 |
branchcode => undef, |
|
|
3743 |
onsite_checkout => undef, |
3681 |
rules => { |
3744 |
rules => { |
3682 |
issuelength => 14, |
3745 |
issuelength => 14, |
3683 |
lengthunit => 'days', |
3746 |
lengthunit => 'days', |
Lines 3871-3876
subtest 'Tests for NoRefundOnLostReturnedItemsAge with AddIssue' => sub {
Link Here
|
3871 |
categorycode => undef, |
3934 |
categorycode => undef, |
3872 |
itemtype => undef, |
3935 |
itemtype => undef, |
3873 |
branchcode => undef, |
3936 |
branchcode => undef, |
|
|
3937 |
onsite_checkout => undef, |
3874 |
rules => { |
3938 |
rules => { |
3875 |
issuelength => 14, |
3939 |
issuelength => 14, |
3876 |
lengthunit => 'days', |
3940 |
lengthunit => 'days', |