View | Details | Raw Unified | Return to bug 6427
Collapse All | Expand All

(-)a/C4/Members.pm (-8 / +7 lines)
Lines 1229-1252 sub GetMemberAccountBalance { Link Here
1229
1229
1230
    unless ( C4::Context->preference('ManInvInNoissuesCharge') ) {
1230
    unless ( C4::Context->preference('ManInvInNoissuesCharge') ) {
1231
        my $dbh           = C4::Context->dbh;
1231
        my $dbh           = C4::Context->dbh;
1232
        my $man_inv_types = $dbh->selectcol_arrayref(
1232
        my $man_inv_types = $dbh->selectcol_arrayref(q{
1233
            qq{SELECT authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'}
1233
            SELECT authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'
1234
        );
1234
        });
1235
        push( @not_fines, @$man_inv_types );
1235
        push( @not_fines, @$man_inv_types );
1236
    }
1236
    }
1237
1237
1238
    my $fines =
1238
    my $other_charges =
1239
      Koha::Database->new()->schema->resultset('AccountDebit')->search(
1239
      Koha::Database->new()->schema->resultset('AccountDebit')->search(
1240
        {
1240
        {
1241
            borrowernumber => $borrowernumber,
1241
            borrowernumber => $borrowernumber,
1242
            type           => { -not_in => \@not_fines }
1242
            type           => { -in => \@not_fines }
1243
        }
1243
        }
1244
      )->get_column('amount_outstanding')->sum();
1244
      )->get_column('amount_outstanding')->sum();
1245
1245
1246
    return (
1246
    return (
1247
        $borrower->account_balance(),
1247
        $borrower->account_balance(),
1248
        $fines,
1248
        $borrower->account_balance() - $other_charges,
1249
        $borrower->account_balance() - $fines
1249
        $other_charges
1250
    );
1250
    );
1251
}
1251
}
1252
1252
1253
- 

Return to bug 6427