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

(-)a/Koha/Schema/Result/Issuingrule.pm (-2 / +16 lines)
Lines 174-179 __PACKAGE__->table("issuingrules"); Link Here
174
  is_nullable: 0
174
  is_nullable: 0
175
  size: 1
175
  size: 1
176
176
177
=head2 article_requests
178
179
  data_type: 'enum'
180
  default_value: 'no'
181
  extra: {list => ["no","yes","bib_only","item_only"]}
182
  is_nullable: 0
183
177
=cut
184
=cut
178
185
179
__PACKAGE__->add_columns(
186
__PACKAGE__->add_columns(
Lines 234-239 __PACKAGE__->add_columns( Link Here
234
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
241
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
235
  "opacitemholds",
242
  "opacitemholds",
236
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
243
  { data_type => "char", default_value => "N", is_nullable => 0, size => 1 },
244
  "article_requests",
245
  {
246
    data_type => "enum",
247
    default_value => "no",
248
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
249
    is_nullable => 0,
250
  },
237
);
251
);
238
252
239
=head1 PRIMARY KEY
253
=head1 PRIMARY KEY
Lines 253-260 __PACKAGE__->add_columns( Link Here
253
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
267
__PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype");
254
268
255
269
256
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-12-19 07:00:40
270
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-07-28 11:06:46
257
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CE8yuYC5QgPHI2GOjiT28w
271
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7NYRxVqqaOboCYmWvs1cyw
258
272
259
273
260
# You can replace this text with custom content, and it will be preserved on regeneration
274
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/admin/smart-rules.pl (+2 lines)
Lines 127-132 elsif ($op eq 'add') { Link Here
127
    my $hardduedatecompare = $input->param('hardduedatecompare');
127
    my $hardduedatecompare = $input->param('hardduedatecompare');
128
    my $rentaldiscount = $input->param('rentaldiscount');
128
    my $rentaldiscount = $input->param('rentaldiscount');
129
    my $opacitemholds = $input->param('opacitemholds') || 0;
129
    my $opacitemholds = $input->param('opacitemholds') || 0;
130
    my $article_requests = $input->param('article_requests') || 'no';
130
    my $overduefinescap = $input->param('overduefinescap') || undef;
131
    my $overduefinescap = $input->param('overduefinescap') || undef;
131
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty";
132
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty";
132
133
Lines 155-160 elsif ($op eq 'add') { Link Here
155
        rentaldiscount     => $rentaldiscount,
156
        rentaldiscount     => $rentaldiscount,
156
        onshelfholds       => $onshelfholds,
157
        onshelfholds       => $onshelfholds,
157
        opacitemholds      => $opacitemholds,
158
        opacitemholds      => $opacitemholds,
159
        article_requests   => $article_requests,
158
        overduefinescap    => $overduefinescap,
160
        overduefinescap    => $overduefinescap,
159
    };
161
    };
160
162
(-)a/installer/data/mysql/atomicupdate/bug_14610.sql (+2 lines)
Lines 28-30 ALTER TABLE `article_requests` ADD FOREIGN KEY ( `biblionumber` ) REFERENCES Link Here
28
ALTER TABLE  `article_requests` ADD FOREIGN KEY (  `itemnumber` ) REFERENCES  `koha_kohaqa`.`items` (
28
ALTER TABLE  `article_requests` ADD FOREIGN KEY (  `itemnumber` ) REFERENCES  `koha_kohaqa`.`items` (
29
        `itemnumber`
29
        `itemnumber`
30
        ) ON DELETE SET NULL ON UPDATE CASCADE ;
30
        ) ON DELETE SET NULL ON UPDATE CASCADE ;
31
32
ALTER TABLE  `issuingrules` ADD  `article_requests` ENUM(  'no',  'yes',  'bib_only',  'item_only' ) NOT NULL DEFAULT  'no';
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-1 / +21 lines)
Lines 158-163 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
158
                <th>Holds allowed (count)</th>
158
                <th>Holds allowed (count)</th>
159
                <th>On shelf holds allowed</th>
159
                <th>On shelf holds allowed</th>
160
                <th>Item level holds</th>
160
                <th>Item level holds</th>
161
                <th>Article requests</th>
161
                <th>Rental discount (%)</th>
162
                <th>Rental discount (%)</th>
162
                <th colspan="2">&nbsp;</th>
163
                <th colspan="2">&nbsp;</th>
163
            </tr>
164
            </tr>
Lines 222-227 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
222
							<td>[% rule.reservesallowed %]</td>
223
							<td>[% rule.reservesallowed %]</td>
223
                                                        <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
224
                                                        <td>[% IF rule.onshelfholds %]Yes[% ELSE %]No[% END %]</td>
224
                                                        <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
225
                                                        <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
226
                                                        <td>
227
                                                            [% IF rule.article_requests == 'no' %]
228
                                                                No
229
                                                            [% ELSIF rule.article_requests == 'yes' %]
230
                                                                Yes
231
                                                            [% ELSIF rule.article_requests == 'bib_only' %]
232
                                                                Record only
233
                                                            [% ELSIF rule.article_requests == 'item_only' %]
234
                                                                Item only
235
                                                            [% END %]
236
                                                        </td>
225
							<td>[% rule.rentaldiscount %]</td>
237
							<td>[% rule.rentaldiscount %]</td>
226
                            <td><a href="#" class="editrule">Edit</a></td>
238
                            <td><a href="#" class="editrule">Edit</a></td>
227
							<td>
239
							<td>
Lines 292-297 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
292
                            <option value="F">Force</option>
304
                            <option value="F">Force</option>
293
                        </select>
305
                        </select>
294
                    </td>
306
                    </td>
307
                    <td>
308
                        <select id="article_requests" name="article_requests">
309
                            <option value="no">No</option>
310
                            <option value="yes">Yes</option>
311
                            <option value="bib_only">Record only</option>
312
                            <option value="item_only">Item only</option>
313
                        </select>
314
                    </td>
295
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
315
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
296
                    <td colspan="2">
316
                    <td colspan="2">
297
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
317
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
Lines 320-325 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidde Link Here
320
                      <th>Holds allowed (count)</th>
340
                      <th>Holds allowed (count)</th>
321
                      <th>On shelf holds allowed</th>
341
                      <th>On shelf holds allowed</th>
322
                      <th>Item level holds</th>
342
                      <th>Item level holds</th>
343
                      <th>Article requests</th>
323
                      <th>Rental discount (%)</th>
344
                      <th>Rental discount (%)</th>
324
                      <th colspan="2">&nbsp;</th>
345
                      <th colspan="2">&nbsp;</th>
325
                    </tr>
346
                    </tr>
326
- 

Return to bug 14610