Lines 684-689
sub GetBranchcodesWithOverdueRules {
Link Here
|
684 |
WHERE delay1 IS NOT NULL |
684 |
WHERE delay1 IS NOT NULL |
685 |
ORDER BY branchcode |
685 |
ORDER BY branchcode |
686 |
|); |
686 |
|); |
|
|
687 |
unless ( $branchcodes->[0] ) { |
688 |
my $default_rule = Koha::OverdueRules->search({ branchcode => undef }, {})->next; |
689 |
if ($default_rule){ |
690 |
warn "default rule"; |
691 |
} |
692 |
return Koha::Libraries->search({}, { order_by => 'branchname' })->get_column('branchcode'); |
693 |
} |
687 |
if ( defined $branchcodes->[0] && $branchcodes->[0] eq '' ) { |
694 |
if ( defined $branchcodes->[0] && $branchcodes->[0] eq '' ) { |
688 |
# If a default rule exists, all branches should be returned |
695 |
# If a default rule exists, all branches should be returned |
689 |
return Koha::Libraries->search({}, { order_by => 'branchname' })->get_column('branchcode'); |
696 |
return Koha::Libraries->search({}, { order_by => 'branchname' })->get_column('branchcode'); |
Lines 766-771
sub GetOverduesForBranch {
Link Here
|
766 |
sub GetOverdueMessageTransportTypes { |
773 |
sub GetOverdueMessageTransportTypes { |
767 |
my ( $branchcode, $categorycode, $letternumber ) = @_; |
774 |
my ( $branchcode, $categorycode, $letternumber ) = @_; |
768 |
return unless $categorycode and $letternumber; |
775 |
return unless $categorycode and $letternumber; |
|
|
776 |
$branchcode = undef if ($branchcode eq ''); |
769 |
my $rule = Koha::OverdueRules->search( |
777 |
my $rule = Koha::OverdueRules->search( |
770 |
{ |
778 |
{ |
771 |
branchcode => $branchcode, |
779 |
branchcode => $branchcode, |