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

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

Return to bug 6427