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 / +4 lines)
Lines 193-198 $(document).ready(function() { Link Here
193
                <th>Item level holds</th>
193
                <th>Item level holds</th>
194
                <th>Article requests</th>
194
                <th>Article requests</th>
195
                <th>Rental discount (%)</th>
195
                <th>Rental discount (%)</th>
196
                <th>Note</th>
196
                <th>Actions</th>
197
                <th>Actions</th>
197
            </tr>
198
            </tr>
198
            </thead>
199
            </thead>
Lines 292-297 $(document).ready(function() { Link Here
292
                                                            [% END %]
293
                                                            [% END %]
293
                                                        </td>
294
                                                        </td>
294
							<td>[% rule.rentaldiscount %]</td>
295
							<td>[% rule.rentaldiscount %]</td>
296
            <td>[% rule.note %]</td>
295
                                                        <td class="actions">
297
                                                        <td class="actions">
296
                                                          <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
298
                                                          <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
297
                                                          <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>
299
                                                          <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 385-390 $(document).ready(function() { Link Here
385
                        </select>
387
                        </select>
386
                    </td>
388
                    </td>
387
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
389
                    <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
390
                    <td><input type="text" name="note" id="note" size="15" value=""></td>
388
                    <td class="actions">
391
                    <td class="actions">
389
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
392
                        <input type="hidden" name="branch" value="[% current_branch %]"/>
390
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
393
                        <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
Lines 420-425 $(document).ready(function() { Link Here
420
                      <th>Item level holds</th>
423
                      <th>Item level holds</th>
421
                      <th>Article requests</th>
424
                      <th>Article requests</th>
422
                      <th>Rental discount (%)</th>
425
                      <th>Rental discount (%)</th>
426
                      <th>Note</th>
423
                      <th colspan="2">&nbsp;</th>
427
                      <th colspan="2">&nbsp;</th>
424
                    </tr>
428
                    </tr>
425
                  </tfoot>
429
                  </tfoot>
426
- 

Return to bug 12365