View | Details | Raw Unified | Return to bug 14695
Collapse All | Expand All

(-)a/Koha/Schema/Result/Issuingrule.pm (-2 / +10 lines)
Lines 159-164 __PACKAGE__->table("issuingrules"); Link Here
159
  default_value: 0
159
  default_value: 0
160
  is_nullable: 0
160
  is_nullable: 0
161
161
162
=head2 holds_per_record
163
164
  data_type: 'smallint'
165
  default_value: 1
166
  is_nullable: 0
167
162
=head2 branchcode
168
=head2 branchcode
163
169
164
  data_type: 'varchar'
170
  data_type: 'varchar'
Lines 241-246 __PACKAGE__->add_columns( Link Here
241
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
247
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
242
  "reservesallowed",
248
  "reservesallowed",
243
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
249
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
250
  "holds_per_record",
251
  { data_type => "smallint", default_value => 1, is_nullable => 0 },
244
  "branchcode",
252
  "branchcode",
245
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
253
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
246
  "overduefinescap",
254
  "overduefinescap",
Lines 268-275 __PACKAGE__->add_columns( Link Here
268
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
276
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
269
277
270
278
271
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-22 14:50:45
279
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-05 09:16:16
272
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jTYQaXLtBrSIGEqpFlgIfg
280
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5KeKXqpCaxR99RwWTEEHEQ
273
281
274
282
275
# You can replace this text with custom content, and it will be preserved on regeneration
283
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/admin/smart-rules.pl (+2 lines)
Lines 120-125 elsif ($op eq 'add') { Link Here
120
    $norenewalbefore = undef if $norenewalbefore =~ /^\s*$/;
120
    $norenewalbefore = undef if $norenewalbefore =~ /^\s*$/;
121
    my $auto_renew = $input->param('auto_renew') eq 'yes' ? 1 : 0;
121
    my $auto_renew = $input->param('auto_renew') eq 'yes' ? 1 : 0;
122
    my $reservesallowed  = $input->param('reservesallowed');
122
    my $reservesallowed  = $input->param('reservesallowed');
123
    my $holds_per_record  = $input->param('holds_per_record');
123
    my $onshelfholds     = $input->param('onshelfholds') || 0;
124
    my $onshelfholds     = $input->param('onshelfholds') || 0;
124
    $maxissueqty =~ s/\s//g;
125
    $maxissueqty =~ s/\s//g;
125
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
126
    $maxissueqty = undef if $maxissueqty !~ /^\d+/;
Lines 156-161 elsif ($op eq 'add') { Link Here
156
        norenewalbefore        => $norenewalbefore,
157
        norenewalbefore        => $norenewalbefore,
157
        auto_renew             => $auto_renew,
158
        auto_renew             => $auto_renew,
158
        reservesallowed        => $reservesallowed,
159
        reservesallowed        => $reservesallowed,
160
        holds_per_record       => $holds_per_record,
159
        issuelength            => $issuelength,
161
        issuelength            => $issuelength,
160
        lengthunit             => $lengthunit,
162
        lengthunit             => $lengthunit,
161
        hardduedate            => $hardduedate,
163
        hardduedate            => $hardduedate,
(-)a/installer/data/mysql/atomicupdate/bug_14695.sql (+1 lines)
Line 0 Link Here
1
ALTER TABLE `issuingrules` ADD `holds_per_record` SMALLINT( 6 ) NOT NULL DEFAULT  '1' AFTER  `reservesallowed`;
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 1187-1192 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
1187
  `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit
1187
  `norenewalbefore` int(4) default NULL, -- no renewal allowed until X days or hours before due date. In the unit set in issuingrules.lengthunit
1188
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1188
  `auto_renew` BOOLEAN default FALSE, -- automatic renewal
1189
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1189
  `reservesallowed` smallint(6) NOT NULL default "0", -- how many holds are allowed
1190
  `holds_per_record` SMALLINT( 6 ) NOT NULL DEFAULT  '1', -- how many holds are allowed for a single patron per record
1190
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1191
  `branchcode` varchar(10) NOT NULL default '', -- the branch this rule is for (branches.branchcode)
1191
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
1192
  overduefinescap decimal(28,6) default NULL, -- the maximum amount of an overdue fine
1192
  onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf
1193
  onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-1 / +4 lines)
Lines 158-163 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
158
                <th>No renewal before</th>
158
                <th>No renewal before</th>
159
                <th>Automatic renewal</th>
159
                <th>Automatic renewal</th>
160
                <th>Holds allowed (count)</th>
160
                <th>Holds allowed (count)</th>
161
                <th>Holds per record (count)</th>
161
                <th>On shelf holds allowed</th>
162
                <th>On shelf holds allowed</th>
162
                <th>Item level holds</th>
163
                <th>Item level holds</th>
163
                <th>Rental discount (%)</th>
164
                <th>Rental discount (%)</th>
Lines 229-234 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
229
                                [% END %]
230
                                [% END %]
230
                            </td>
231
                            </td>
231
							<td>[% rule.reservesallowed %]</td>
232
							<td>[% rule.reservesallowed %]</td>
233
                            <td>[% rule.holds_per_record %]</td>
232
                                                        <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
234
                                                        <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
233
                                                        <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
235
                                                        <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
234
							<td>[% rule.rentaldiscount %]</td>
236
							<td>[% rule.rentaldiscount %]</td>
Lines 295-300 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
295
                        </select>
297
                        </select>
296
                    </td>
298
                    </td>
297
                    <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
299
                    <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
300
                    <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td>
298
                    <td>
301
                    <td>
299
                        <select name="onshelfholds" id="onshelfholds">
302
                        <select name="onshelfholds" id="onshelfholds">
300
                            <option value="0" selected>No</option>
303
                            <option value="0" selected>No</option>
Lines 336-341 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
336
                      <th>No renewal before</th>
339
                      <th>No renewal before</th>
337
                      <th>Automatic renewal</th>
340
                      <th>Automatic renewal</th>
338
                      <th>Holds allowed (count)</th>
341
                      <th>Holds allowed (count)</th>
342
                      <th>Holds per record (count)</th>
339
                      <th>On shelf holds allowed</th>
343
                      <th>On shelf holds allowed</th>
340
                      <th>Item level holds</th>
344
                      <th>Item level holds</th>
341
                      <th>Rental discount (%)</th>
345
                      <th>Rental discount (%)</th>
342
- 

Return to bug 14695