Bug 22847: [18.11] Correctly displayed circ rule values for max_holds
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
5f55f0aeed
commit
2c2de412bf
|
|
@ -42,4 +42,24 @@ sub Get {
|
|||
return $rule->rule_value if $rule;
|
||||
}
|
||||
|
||||
sub Search {
|
||||
my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_;
|
||||
|
||||
$branchcode = undef if $branchcode eq q{} or $branchcode eq q{*};
|
||||
$categorycode = undef if $categorycode eq q{} or $branchcode eq q{*};
|
||||
$itemtype = undef if $itemtype eq q{} or $branchcode eq q{*};
|
||||
|
||||
my $rule = Koha::CirculationRules->search(
|
||||
{
|
||||
branchcode => $branchcode,
|
||||
categorycode => $categorycode,
|
||||
itemtype => $itemtype,
|
||||
rule_name => $rule_name,
|
||||
}
|
||||
)->next;
|
||||
|
||||
return $rule->rule_value if $rule;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@
|
|||
<td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty | html %]"/></td>
|
||||
<td><input type="text" name="maxonsiteissueqty" size="3" value="[% default_maxonsiteissueqty | html %]"/></td>
|
||||
<td>
|
||||
[% SET rule_value = CirculationRules.Get( current_branch, '*', undef, 'max_holds' ) %]
|
||||
[% SET rule_value = CirculationRules.Search( current_branch, undef, undef, 'max_holds' ) %]
|
||||
<input name="max_holds" size="3" value="[% rule_value | html %]" />
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Reference in New Issue