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

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

Return to bug 6427