extra: {list => ["no","yes","bib_only","item_only"]}
is_nullable: 0
+=head2 note
+
+ data_type: 'varchar'
+ is_nullable: 1
+ size: 100
+
=cut
__PACKAGE__->add_columns(
extra => { list => ["no", "yes", "bib_only", "item_only"] },
is_nullable => 0,
},
+ "note",
+ { data_type => "varchar", is_nullable => 1, size => 100 },
);
=head1 PRIMARY KEY
my $article_requests = $input->param('article_requests') || 'no';
my $overduefinescap = $input->param('overduefinescap') || undef;
my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on';
+ my $note = $input->param('note');
$debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price";
my $params = {
overduefinescap => $overduefinescap,
cap_fine_to_replacement_price => $cap_fine_to_replacement_price,
article_requests => $article_requests,
+ note => $note,
};
my $issuingrule = Koha::IssuingRules->find({categorycode => $bor, itemtype => $itemtype, branchcode => $br});
--- /dev/null
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ unless( column_exists( 'issuingrules', 'note' ) ) {
+ $dbh->do(q|ALTER TABLE issuingrules ADD note varchar(100) default NULL AFTER article_requests|);
+ }
+
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 12365: Add column issuingrules.note)\n";
+}
onshelfholds tinyint(1) NOT NULL default 0, -- allow holds for items that are on shelf
opacitemholds char(1) NOT NULL default 'N', -- allow opac users to place specific items on hold
article_requests enum('no','yes','bib_only','item_only') NOT NULL DEFAULT 'no', -- allow article requests to be placed,
+ `note` varchar(100) default NULL, -- description of rule, reason for setting rule
PRIMARY KEY (`branchcode`,`categorycode`,`itemtype`),
KEY `categorycode` (`categorycode`),
KEY `itemtype` (`itemtype`)
<th>Item level holds</th>
<th>Article requests</th>
<th>Rental discount (%)</th>
+ <th>Note</th>
<th>Actions</th>
</tr>
</thead>
<span>Item only</span>
[% END %]
</td>
- <td>[% rule.rentaldiscount | html %]</td>
+ <td>[% rule.rentaldiscount | html %]</td>
+ <td>[% rule.note | html %]</td>
<td class="actions">
<a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
<a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype | html %]&categorycode=[% rule.categorycode | html %]&branch=[% rule.current_branch | html %]"><i class="fa fa-trash"></i> Delete</a>
</select>
</td>
<td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
+ <td><input type="text" name="note" id="note" size="15" value=""></td>
<td class="actions">
<input type="hidden" name="branch" value="[% current_branch | html %]"/>
<button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
<th>Item level holds</th>
<th>Article requests</th>
<th>Rental discount (%)</th>
+ <th>Note</th>
<th> </th>
</tr>
</tfoot>