|
Lines 26-34
use Koha::CirculationRules;
Link Here
|
| 26 |
sub Get { |
26 |
sub Get { |
| 27 |
my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; |
27 |
my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; |
| 28 |
|
28 |
|
| 29 |
$branchcode = undef if $branchcode eq q{}; |
29 |
$branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; |
| 30 |
$categorycode = undef if $categorycode eq q{}; |
30 |
$categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; |
| 31 |
$itemtype = undef if $itemtype eq q{}; |
31 |
$itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; |
| 32 |
|
32 |
|
| 33 |
my $rule = Koha::CirculationRules->get_effective_rule( |
33 |
my $rule = Koha::CirculationRules->get_effective_rule( |
| 34 |
{ |
34 |
{ |
|
Lines 45-53
sub Get {
Link Here
|
| 45 |
sub Search { |
45 |
sub Search { |
| 46 |
my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; |
46 |
my ( $self, $branchcode, $categorycode, $itemtype, $rule_name ) = @_; |
| 47 |
|
47 |
|
| 48 |
$branchcode = undef if $branchcode eq q{}; |
48 |
$branchcode = undef if $branchcode eq q{} or $branchcode eq q{*}; |
| 49 |
$categorycode = undef if $categorycode eq q{}; |
49 |
$categorycode = undef if $categorycode eq q{} or $branchcode eq q{*}; |
| 50 |
$itemtype = undef if $itemtype eq q{}; |
50 |
$itemtype = undef if $itemtype eq q{} or $branchcode eq q{*}; |
| 51 |
|
51 |
|
| 52 |
my $rule = Koha::CirculationRules->search( |
52 |
my $rule = Koha::CirculationRules->search( |
| 53 |
{ |
53 |
{ |