Lines 28-33
use C4::Letters;
Link Here
|
28 |
use C4::Log qw( logaction ); |
28 |
use C4::Log qw( logaction ); |
29 |
use C4::Stats qw( UpdateStats ); |
29 |
use C4::Stats qw( UpdateStats ); |
30 |
use C4::Overdues qw(GetFine); |
30 |
use C4::Overdues qw(GetFine); |
|
|
31 |
use C4::Context; |
31 |
|
32 |
|
32 |
use Koha::Patrons; |
33 |
use Koha::Patrons; |
33 |
use Koha::Account::Lines; |
34 |
use Koha::Account::Lines; |
Lines 702-732
my $non_issues_charges = $self->non_issues_charges
Link Here
|
702 |
|
703 |
|
703 |
Calculates amount immediately owing by the patron - non-issue charges. |
704 |
Calculates amount immediately owing by the patron - non-issue charges. |
704 |
|
705 |
|
705 |
Charges exempt from non-issue are: |
706 |
Charges can be set as exempt from non-issue by editing the debit type in the Debit Types area of System Preferences. |
706 |
* Res (holds) if HoldsInNoissuesCharge syspref is set to false |
|
|
707 |
* Rent (rental) if RentalsInNoissuesCharge syspref is set to false |
708 |
* Manual invoices if ManInvInNoissuesCharge syspref is set to false |
709 |
|
707 |
|
710 |
=cut |
708 |
=cut |
711 |
|
709 |
|
712 |
sub non_issues_charges { |
710 |
sub non_issues_charges { |
713 |
my ($self) = @_; |
711 |
my ($self) = @_; |
714 |
|
712 |
|
715 |
#NOTE: With bug 23049 these preferences could be moved to being attached |
713 |
my @blocking_debit_types = Koha::Account::DebitTypes->search({ restricts_checkouts => 1 }, { columns => 'code' })->get_column('code'); |
716 |
#to individual debit types to give more flexability and specificity. |
|
|
717 |
my @not_fines; |
718 |
push @not_fines, 'RESERVE' |
719 |
unless C4::Context->preference('HoldsInNoissuesCharge'); |
720 |
push @not_fines, ( 'RENT', 'RENT_DAILY', 'RENT_RENEW', 'RENT_DAILY_RENEW' ) |
721 |
unless C4::Context->preference('RentalsInNoissuesCharge'); |
722 |
unless ( C4::Context->preference('ManInvInNoissuesCharge') ) { |
723 |
my @man_inv = Koha::Account::DebitTypes->search({ is_system => 0 })->get_column('code'); |
724 |
push @not_fines, @man_inv; |
725 |
} |
726 |
|
714 |
|
727 |
return $self->lines->search( |
715 |
return $self->lines->search( |
728 |
{ |
716 |
{ |
729 |
debit_type_code => { -not_in => \@not_fines } |
717 |
debit_type_code => { -in => \@blocking_debit_types } |
730 |
}, |
718 |
}, |
731 |
)->total_outstanding; |
719 |
)->total_outstanding; |
732 |
} |
720 |
} |