Bug 28924: (QA follow-up): Don't define charge values as 0
Sponsored-by: Cuyahoga County Public Library <https://cuyahogalibrary.org/> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
b3b7f82fef
commit
08328a5d3a
|
|
@ -870,7 +870,6 @@ sub CanBookBeIssued {
|
|||
|
||||
# Check the debt of this patrons guarantees
|
||||
my $no_issues_charge_guarantees = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{limit};
|
||||
$no_issues_charge_guarantees = undef unless looks_like_number($no_issues_charge_guarantees);
|
||||
if ( defined $no_issues_charge_guarantees ) {
|
||||
if ( $patron_borrowing_status->{NoIssuesChargeGuarantees}->{overlimit} && !$inprocess && !$allowfineoverride ) {
|
||||
$issuingimpossible{DEBT_GUARANTEES} = $patron_borrowing_status->{NoIssuesChargeGuarantees}->{charge};
|
||||
|
|
@ -889,7 +888,6 @@ sub CanBookBeIssued {
|
|||
|
||||
# Check the debt of this patrons guarantors *and* the guarantees of those guarantors
|
||||
my $no_issues_charge_guarantors = $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{limit};
|
||||
$no_issues_charge_guarantors = undef unless looks_like_number($no_issues_charge_guarantors);
|
||||
if ( defined $no_issues_charge_guarantors ) {
|
||||
if ( $patron_borrowing_status->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit}
|
||||
&& !$inprocess
|
||||
|
|
|
|||
|
|
@ -2916,7 +2916,7 @@ If any blockers are found, these are returned in a hash
|
|||
=cut
|
||||
|
||||
sub can_borrow {
|
||||
my ( $self ) = @_;
|
||||
my ($self) = @_;
|
||||
|
||||
my $status = { can_borrow => 1 };
|
||||
|
||||
|
|
@ -2948,17 +2948,15 @@ sub is_patron_inside_charge_limits {
|
|||
my ( $self, $args ) = @_;
|
||||
|
||||
my $borrowernumber = $args->{borrowernumber};
|
||||
my $patron = $args->{patron} || Koha::Patrons->find( { borrowernumber => $borrowernumber } );
|
||||
my $patron = $self || Koha::Patrons->find( { borrowernumber => $borrowernumber } );
|
||||
my $patron_category = $patron->category;
|
||||
my $patron_charge_limits = {};
|
||||
|
||||
my $no_issues_charge = $patron_category->noissuescharge || C4::Context->preference('noissuescharge') || 0;
|
||||
my $no_issues_charge = $patron_category->noissuescharge || C4::Context->preference('noissuescharge');
|
||||
my $no_issues_charge_guarantees =
|
||||
$patron_category->noissueschargeguarantees || C4::Context->preference('NoIssuesChargeGuarantees') || 0;
|
||||
my $no_issues_charge_guarantors_with_guarantees =
|
||||
$patron_category->noissueschargeguarantorswithguarantees
|
||||
|| C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees')
|
||||
|| 0;
|
||||
$patron_category->noissueschargeguarantees || C4::Context->preference('NoIssuesChargeGuarantees');
|
||||
my $no_issues_charge_guarantors_with_guarantees = $patron_category->noissueschargeguarantorswithguarantees
|
||||
|| C4::Context->preference('NoIssuesChargeGuarantorsWithGuarantees');
|
||||
|
||||
my $non_issues_charges = $patron->account->non_issues_charges;
|
||||
my $guarantees_non_issues_charges = 0;
|
||||
|
|
|
|||
|
|
@ -614,7 +614,6 @@ if ( $patron ) {
|
|||
if ($no_issues_charge_guarantors) {
|
||||
if ( $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{overlimit} ) {
|
||||
$template->param(
|
||||
noissues => 1,
|
||||
charges_guarantors_guarantees => $patron_charge_limits->{NoIssuesChargeGuarantorsWithGuarantees}->{charge}
|
||||
);
|
||||
$noissues = 1 unless C4::Context->preference("allowfineoverride");
|
||||
|
|
@ -622,7 +621,6 @@ if ( $patron ) {
|
|||
}
|
||||
|
||||
my $no_issues_charge_guarantees = $patron_charge_limits->{NoIssuesChargeGuarantees}->{limit};
|
||||
$no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees );
|
||||
if ( defined $no_issues_charge_guarantees ) {
|
||||
if ( $patron_charge_limits->{NoIssuesChargeGuarantees}->{overlimit} ) {
|
||||
$template->param(
|
||||
|
|
|
|||
Loading…
Reference in New Issue