Lines 255-260
Koha::CirculationRules->set_rules(
Link Here
|
255 |
categorycode => undef, |
255 |
categorycode => undef, |
256 |
branchcode => undef, |
256 |
branchcode => undef, |
257 |
itemtype => undef, |
257 |
itemtype => undef, |
|
|
258 |
checkout_type => undef, |
258 |
rules => { |
259 |
rules => { |
259 |
reservesallowed => 25, |
260 |
reservesallowed => 25, |
260 |
issuelength => 14, |
261 |
issuelength => 14, |
Lines 762-767
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
762 |
categorycode => undef, |
763 |
categorycode => undef, |
763 |
branchcode => undef, |
764 |
branchcode => undef, |
764 |
itemtype => undef, |
765 |
itemtype => undef, |
|
|
766 |
checkout_type => undef, |
765 |
rules => { |
767 |
rules => { |
766 |
norenewalbefore => '7', |
768 |
norenewalbefore => '7', |
767 |
no_auto_renewal_after => '9', |
769 |
no_auto_renewal_after => '9', |
Lines 778-783
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
778 |
categorycode => undef, |
780 |
categorycode => undef, |
779 |
branchcode => undef, |
781 |
branchcode => undef, |
780 |
itemtype => undef, |
782 |
itemtype => undef, |
|
|
783 |
checkout_type => undef, |
781 |
rules => { |
784 |
rules => { |
782 |
norenewalbefore => '7', |
785 |
norenewalbefore => '7', |
783 |
no_auto_renewal_after => '10', |
786 |
no_auto_renewal_after => '10', |
Lines 794-799
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
794 |
categorycode => undef, |
797 |
categorycode => undef, |
795 |
branchcode => undef, |
798 |
branchcode => undef, |
796 |
itemtype => undef, |
799 |
itemtype => undef, |
|
|
800 |
checkout_type => undef, |
797 |
rules => { |
801 |
rules => { |
798 |
norenewalbefore => '7', |
802 |
norenewalbefore => '7', |
799 |
no_auto_renewal_after => '11', |
803 |
no_auto_renewal_after => '11', |
Lines 810-815
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
810 |
categorycode => undef, |
814 |
categorycode => undef, |
811 |
branchcode => undef, |
815 |
branchcode => undef, |
812 |
itemtype => undef, |
816 |
itemtype => undef, |
|
|
817 |
checkout_type => undef, |
813 |
rules => { |
818 |
rules => { |
814 |
norenewalbefore => '10', |
819 |
norenewalbefore => '10', |
815 |
no_auto_renewal_after => '11', |
820 |
no_auto_renewal_after => '11', |
Lines 826-831
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
826 |
categorycode => undef, |
831 |
categorycode => undef, |
827 |
branchcode => undef, |
832 |
branchcode => undef, |
828 |
itemtype => undef, |
833 |
itemtype => undef, |
|
|
834 |
checkout_type => undef, |
829 |
rules => { |
835 |
rules => { |
830 |
norenewalbefore => '10', |
836 |
norenewalbefore => '10', |
831 |
no_auto_renewal_after => undef, |
837 |
no_auto_renewal_after => undef, |
Lines 843-848
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
843 |
categorycode => undef, |
849 |
categorycode => undef, |
844 |
branchcode => undef, |
850 |
branchcode => undef, |
845 |
itemtype => undef, |
851 |
itemtype => undef, |
|
|
852 |
checkout_type => undef, |
846 |
rules => { |
853 |
rules => { |
847 |
norenewalbefore => '7', |
854 |
norenewalbefore => '7', |
848 |
no_auto_renewal_after => '15', |
855 |
no_auto_renewal_after => '15', |
Lines 860-865
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
860 |
categorycode => undef, |
867 |
categorycode => undef, |
861 |
branchcode => undef, |
868 |
branchcode => undef, |
862 |
itemtype => undef, |
869 |
itemtype => undef, |
|
|
870 |
checkout_type => undef, |
863 |
rules => { |
871 |
rules => { |
864 |
norenewalbefore => '10', |
872 |
norenewalbefore => '10', |
865 |
no_auto_renewal_after => undef, |
873 |
no_auto_renewal_after => undef, |
Lines 893-898
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
893 |
categorycode => undef, |
901 |
categorycode => undef, |
894 |
branchcode => undef, |
902 |
branchcode => undef, |
895 |
itemtype => undef, |
903 |
itemtype => undef, |
|
|
904 |
checkout_type => undef, |
896 |
rules => { |
905 |
rules => { |
897 |
norenewalbefore => '10', |
906 |
norenewalbefore => '10', |
898 |
no_auto_renewal_after => '11', |
907 |
no_auto_renewal_after => '11', |
Lines 985-990
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
985 |
categorycode => undef, |
994 |
categorycode => undef, |
986 |
branchcode => undef, |
995 |
branchcode => undef, |
987 |
itemtype => undef, |
996 |
itemtype => undef, |
|
|
997 |
checkout_type => undef, |
988 |
rules => { |
998 |
rules => { |
989 |
norenewalbefore => 10, |
999 |
norenewalbefore => 10, |
990 |
no_auto_renewal_after => 11, |
1000 |
no_auto_renewal_after => 11, |
Lines 1051-1056
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1051 |
categorycode => undef, |
1061 |
categorycode => undef, |
1052 |
branchcode => undef, |
1062 |
branchcode => undef, |
1053 |
itemtype => undef, |
1063 |
itemtype => undef, |
|
|
1064 |
checkout_type => undef, |
1054 |
rules => { |
1065 |
rules => { |
1055 |
norenewalbefore => '7', |
1066 |
norenewalbefore => '7', |
1056 |
no_auto_renewal_after => '', |
1067 |
no_auto_renewal_after => '', |
Lines 1066-1071
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1066 |
categorycode => undef, |
1077 |
categorycode => undef, |
1067 |
branchcode => undef, |
1078 |
branchcode => undef, |
1068 |
itemtype => undef, |
1079 |
itemtype => undef, |
|
|
1080 |
checkout_type => undef, |
1069 |
rules => { |
1081 |
rules => { |
1070 |
norenewalbefore => '10', |
1082 |
norenewalbefore => '10', |
1071 |
no_auto_renewal_after => '5', |
1083 |
no_auto_renewal_after => '5', |
Lines 1087-1092
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1087 |
categorycode => undef, |
1099 |
categorycode => undef, |
1088 |
branchcode => undef, |
1100 |
branchcode => undef, |
1089 |
itemtype => undef, |
1101 |
itemtype => undef, |
|
|
1102 |
checkout_type => undef, |
1090 |
rules => { |
1103 |
rules => { |
1091 |
norenewalbefore => '10', |
1104 |
norenewalbefore => '10', |
1092 |
no_auto_renewal_after => '15', |
1105 |
no_auto_renewal_after => '15', |
Lines 1105-1110
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1105 |
categorycode => undef, |
1118 |
categorycode => undef, |
1106 |
branchcode => undef, |
1119 |
branchcode => undef, |
1107 |
itemtype => undef, |
1120 |
itemtype => undef, |
|
|
1121 |
checkout_type => undef, |
1108 |
rules => { |
1122 |
rules => { |
1109 |
norenewalbefore => '10', |
1123 |
norenewalbefore => '10', |
1110 |
no_auto_renewal_after => '', |
1124 |
no_auto_renewal_after => '', |
Lines 1122-1127
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1122 |
categorycode => undef, |
1136 |
categorycode => undef, |
1123 |
branchcode => undef, |
1137 |
branchcode => undef, |
1124 |
itemtype => undef, |
1138 |
itemtype => undef, |
|
|
1139 |
checkout_type => undef, |
1125 |
rules => { |
1140 |
rules => { |
1126 |
norenewalbefore => '10', |
1141 |
norenewalbefore => '10', |
1127 |
no_auto_renewal_after => '15', |
1142 |
no_auto_renewal_after => '15', |
Lines 1144-1149
subtest "CanBookBeRenewed tests" => sub {
Link Here
|
1144 |
categorycode => undef, |
1159 |
categorycode => undef, |
1145 |
branchcode => undef, |
1160 |
branchcode => undef, |
1146 |
itemtype => undef, |
1161 |
itemtype => undef, |
|
|
1162 |
checkout_type => undef, |
1147 |
rules => { |
1163 |
rules => { |
1148 |
norenewalbefore => undef, |
1164 |
norenewalbefore => undef, |
1149 |
renewalsallowed => 0, |
1165 |
renewalsallowed => 0, |
Lines 1390-1395
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1390 |
categorycode => undef, |
1406 |
categorycode => undef, |
1391 |
itemtype => undef, |
1407 |
itemtype => undef, |
1392 |
branchcode => undef, |
1408 |
branchcode => undef, |
|
|
1409 |
checkout_type => undef, |
1393 |
rules => { |
1410 |
rules => { |
1394 |
reservesallowed => 25, |
1411 |
reservesallowed => 25, |
1395 |
issuelength => 14, |
1412 |
issuelength => 14, |
Lines 1457-1462
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1457 |
categorycode => undef, |
1474 |
categorycode => undef, |
1458 |
itemtype => undef, |
1475 |
itemtype => undef, |
1459 |
branchcode => undef, |
1476 |
branchcode => undef, |
|
|
1477 |
checkout_type => undef, |
1460 |
rules => { |
1478 |
rules => { |
1461 |
onshelfholds => 0, |
1479 |
onshelfholds => 0, |
1462 |
} |
1480 |
} |
Lines 1471-1476
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1471 |
categorycode => undef, |
1489 |
categorycode => undef, |
1472 |
itemtype => undef, |
1490 |
itemtype => undef, |
1473 |
branchcode => undef, |
1491 |
branchcode => undef, |
|
|
1492 |
checkout_type => undef, |
1474 |
rules => { |
1493 |
rules => { |
1475 |
onshelfholds => 0, |
1494 |
onshelfholds => 0, |
1476 |
} |
1495 |
} |
Lines 1485-1490
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1485 |
categorycode => undef, |
1504 |
categorycode => undef, |
1486 |
itemtype => undef, |
1505 |
itemtype => undef, |
1487 |
branchcode => undef, |
1506 |
branchcode => undef, |
|
|
1507 |
checkout_type => undef, |
1488 |
rules => { |
1508 |
rules => { |
1489 |
onshelfholds => 1, |
1509 |
onshelfholds => 1, |
1490 |
} |
1510 |
} |
Lines 1499-1504
subtest "AllowRenewalIfOtherItemsAvailable tests" => sub {
Link Here
|
1499 |
categorycode => undef, |
1519 |
categorycode => undef, |
1500 |
itemtype => undef, |
1520 |
itemtype => undef, |
1501 |
branchcode => undef, |
1521 |
branchcode => undef, |
|
|
1522 |
checkout_type => undef, |
1502 |
rules => { |
1523 |
rules => { |
1503 |
onshelfholds => 1, |
1524 |
onshelfholds => 1, |
1504 |
} |
1525 |
} |
Lines 2019-2024
subtest 'AddReturn + CumulativeRestrictionPeriods' => sub {
Link Here
|
2019 |
categorycode => undef, |
2040 |
categorycode => undef, |
2020 |
itemtype => undef, |
2041 |
itemtype => undef, |
2021 |
branchcode => undef, |
2042 |
branchcode => undef, |
|
|
2043 |
checkout_type => undef, |
2022 |
rules => { |
2044 |
rules => { |
2023 |
issuelength => 1, |
2045 |
issuelength => 1, |
2024 |
firstremind => 1, # 1 day of grace |
2046 |
firstremind => 1, # 1 day of grace |
Lines 2125-2130
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2125 |
categorycode => '*', |
2147 |
categorycode => '*', |
2126 |
itemtype => '*', |
2148 |
itemtype => '*', |
2127 |
branchcode => '*', |
2149 |
branchcode => '*', |
|
|
2150 |
checkout_type => '*', |
2128 |
rules => { |
2151 |
rules => { |
2129 |
issuelength => 1, |
2152 |
issuelength => 1, |
2130 |
firstremind => 0, # 0 day of grace |
2153 |
firstremind => 0, # 0 day of grace |
Lines 2181-2186
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2181 |
categorycode => undef, |
2204 |
categorycode => undef, |
2182 |
branchcode => undef, |
2205 |
branchcode => undef, |
2183 |
itemtype => undef, |
2206 |
itemtype => undef, |
|
|
2207 |
checkout_type => undef, |
2184 |
rules => { |
2208 |
rules => { |
2185 |
suspension_chargeperiod => 3, |
2209 |
suspension_chargeperiod => 3, |
2186 |
firstremind => 1, |
2210 |
firstremind => 1, |
Lines 2205-2210
subtest 'AddReturn + suspension_chargeperiod' => sub {
Link Here
|
2205 |
categorycode => undef, |
2229 |
categorycode => undef, |
2206 |
branchcode => undef, |
2230 |
branchcode => undef, |
2207 |
itemtype => undef, |
2231 |
itemtype => undef, |
|
|
2232 |
checkout_type => undef, |
2208 |
rules => { |
2233 |
rules => { |
2209 |
finedays => 2, |
2234 |
finedays => 2, |
2210 |
suspension_chargeperiod => 1, |
2235 |
suspension_chargeperiod => 1, |
Lines 2362-2367
subtest 'AddReturn | is_overdue' => sub {
Link Here
|
2362 |
categorycode => undef, |
2387 |
categorycode => undef, |
2363 |
itemtype => undef, |
2388 |
itemtype => undef, |
2364 |
branchcode => undef, |
2389 |
branchcode => undef, |
|
|
2390 |
checkout_type => undef, |
2365 |
rules => { |
2391 |
rules => { |
2366 |
issuelength => 6, |
2392 |
issuelength => 6, |
2367 |
lengthunit => 'days', |
2393 |
lengthunit => 'days', |
Lines 3048-3053
subtest 'CanBookBeIssued | is_overdue' => sub {
Link Here
|
3048 |
categorycode => undef, |
3074 |
categorycode => undef, |
3049 |
branchcode => undef, |
3075 |
branchcode => undef, |
3050 |
itemtype => undef, |
3076 |
itemtype => undef, |
|
|
3077 |
checkout_type => undef, |
3051 |
rules => { |
3078 |
rules => { |
3052 |
maxissueqty => 1, |
3079 |
maxissueqty => 1, |
3053 |
reservesallowed => 25, |
3080 |
reservesallowed => 25, |
Lines 3094-3099
subtest 'ItemsDeniedRenewal preference' => sub {
Link Here
|
3094 |
categorycode => '*', |
3121 |
categorycode => '*', |
3095 |
itemtype => '*', |
3122 |
itemtype => '*', |
3096 |
branchcode => $idr_lib->branchcode, |
3123 |
branchcode => $idr_lib->branchcode, |
|
|
3124 |
checkout_type => '*', |
3097 |
rules => { |
3125 |
rules => { |
3098 |
reservesallowed => 25, |
3126 |
reservesallowed => 25, |
3099 |
issuelength => 14, |
3127 |
issuelength => 14, |