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

(-)a/Koha/Schema/Result/Issuingrule.pm (+8 lines)
Lines 215-220 __PACKAGE__->table("issuingrules"); Link Here
215
  extra: {list => ["no","yes","bib_only","item_only"]}
215
  extra: {list => ["no","yes","bib_only","item_only"]}
216
  is_nullable: 0
216
  is_nullable: 0
217
217
218
=head2 note
219
220
  data_type: 'varchar'
221
  is_nullable: 1
222
  size: 100
223
218
=cut
224
=cut
219
225
220
__PACKAGE__->add_columns(
226
__PACKAGE__->add_columns(
Lines 294-299 __PACKAGE__->add_columns( Link Here
294
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
300
    extra => { list => ["no", "yes", "bib_only", "item_only"] },
295
    is_nullable => 0,
301
    is_nullable => 0,
296
  },
302
  },
303
  "note",
304
  { data_type => "varchar", is_nullable => 1, size => 100 },
297
);
305
);
298
306
299
=head1 PRIMARY KEY
307
=head1 PRIMARY KEY
(-)a/admin/smart-rules.pl (+2 lines)
Lines 160-165 elsif ($op eq 'add') { Link Here
160
    my $article_requests = $input->param('article_requests') || 'no';
160
    my $article_requests = $input->param('article_requests') || 'no';
161
    my $overduefinescap = $input->param('overduefinescap') || undef;
161
    my $overduefinescap = $input->param('overduefinescap') || undef;
162
    my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on';
162
    my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on';
163
    my $note = $input->param('note');
163
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price";
164
    $debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price";
164
165
165
    my $params = {
166
    my $params = {
Lines 192-197 elsif ($op eq 'add') { Link Here
192
        overduefinescap               => $overduefinescap,
193
        overduefinescap               => $overduefinescap,
193
        cap_fine_to_replacement_price => $cap_fine_to_replacement_price,
194
        cap_fine_to_replacement_price => $cap_fine_to_replacement_price,
194
        article_requests              => $article_requests,
195
        article_requests              => $article_requests,
196
        note                          => $note,
195
    };
197
    };
196
198
197
    my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype, branchcode => $br});
199
    my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype, branchcode => $br});
(-)a/installer/data/mysql/atomicupdate/bug_12365_-_add_note_column_to_issuingrules.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if( CheckVersion( $DBversion ) ) {
3
    unless( column_exists( 'issuingrules', 'note' ) ) {
4
        $dbh->do(q|ALTER TABLE issuingrules ADD note varchar(100) default NULL AFTER article_requests|);
5
    }
6
7
    SetVersion( $DBversion );
8
    print "Upgrade to $DBversion done (Bug 12365: Add column issuingrules.note)\n";
9
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 886-891 CREATE TABLE `issuingrules` ( -- circulation and fine rules Link Here
886
  onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf
886
  onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf
887
  opacitemholds char(1) NOT NULL default 'N', -- allow opac users to place specific items on hold
887
  opacitemholds char(1) NOT NULL default 'N', -- allow opac users to place specific items on hold
888
  article_requests enum('no','yes','bib_only','item_only') NOT NULL DEFAULT 'no', -- allow article requests to be placed,
888
  article_requests enum('no','yes','bib_only','item_only') NOT NULL DEFAULT 'no', -- allow article requests to be placed,
889
  `note` varchar(100) default NULL, -- description of rule, reason for setting rule
889
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
890
  PRIMARY KEY  (`branchcode`,`categorycode`,`itemtype`),
890
  KEY `categorycode` (`categorycode`),
891
  KEY `categorycode` (`categorycode`),
891
  KEY `itemtype` (`itemtype`)
892
  KEY `itemtype` (`itemtype`)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-1 / +5 lines)
Lines 194-199 $(document).ready(function() { Link Here
194
                <th>Item level holds</th>
194
                <th>Item level holds</th>
195
                <th>Article requests</th>
195
                <th>Article requests</th>
196
                <th>Rental discount (%)</th>
196
                <th>Rental discount (%)</th>
197
                <th>Note</th>
197
                <th>Actions</th>
198
                <th>Actions</th>
198
            </tr>
199
            </tr>
199
            </thead>
200
            </thead>
Lines 298-303 $(document).ready(function() { Link Here
298
                                                            [% END %]
299
                                                            [% END %]
299
                                                        </td>
300
                                                        </td>
300
							<td>[% rule.rentaldiscount %]</td>
301
							<td>[% rule.rentaldiscount %]</td>
302
            <td>[% rule.note %]</td>
301
                                                        <td class="actions">
303
                                                        <td class="actions">
302
                                                          <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
304
                                                          <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
303
                                                          <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype %]&amp;categorycode=[% rule.categorycode %]&amp;branch=[% rule.current_branch %]"><i class="fa fa-trash"></i> Delete</a>
305
                                                          <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&amp;itemtype=[% rule.itemtype %]&amp;categorycode=[% rule.categorycode %]&amp;branch=[% rule.current_branch %]"><i class="fa fa-trash"></i> Delete</a>
Lines 397-402 $(document).ready(function() { Link Here
397
                        </select>
399
                        </select>
398
                    </td>
400
                    </td>
399
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
401
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
402
                    <td><input type="text" name="note" id="note" size="15" value=""></td>
400
                    <td class="actions">
403
                    <td class="actions">
401
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
404
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
402
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
405
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
Lines 434-439 $(document).ready(function() { Link Here
434
                      <th>Article requests</th>
437
                      <th>Article requests</th>
435
                      <th>Rental discount (%)</th>
438
                      <th>Rental discount (%)</th>
436
                      <th>&nbsp;</th>
439
                      <th>&nbsp;</th>
440
                      <th>Note</th>
441
                      <th colspan="2">&nbsp;</th>
437
                    </tr>
442
                    </tr>
438
                  </tfoot>
443
                  </tfoot>
439
                </tbody>
444
                </tbody>
440
- 

Return to bug 12365