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

(-)a/C4/Accounts.pm (-18 lines)
Lines 39-45 BEGIN { Link Here
39
    @EXPORT = qw(
39
    @EXPORT = qw(
40
      &manualinvoice
40
      &manualinvoice
41
      &getnextacctno
41
      &getnextacctno
42
      &getcharges
43
      &chargelostitem
42
      &chargelostitem
44
      &ReversePayment
43
      &ReversePayment
45
      &purge_zero_balance_fees
44
      &purge_zero_balance_fees
Lines 280-302 sub manualinvoice { Link Here
280
    return 0;
279
    return 0;
281
}
280
}
282
281
283
sub getcharges {
284
    my ( $borrowerno, $timestamp, $accountno ) = @_;
285
    my $dbh        = C4::Context->dbh;
286
    my $timestamp2 = $timestamp - 1;
287
    my $query      = "";
288
    my $sth = $dbh->prepare(
289
            "SELECT * FROM accountlines WHERE borrowernumber=? AND accountno = ?"
290
          );
291
    $sth->execute( $borrowerno, $accountno );
292
293
    my @results;
294
    while ( my $data = $sth->fetchrow_hashref ) {
295
        push @results,$data;
296
    }
297
    return (@results);
298
}
299
300
#FIXME: ReversePayment should be replaced with a Void Payment feature
282
#FIXME: ReversePayment should be replaced with a Void Payment feature
301
sub ReversePayment {
283
sub ReversePayment {
302
    my ($accountlines_id) = @_;
284
    my ($accountlines_id) = @_;
(-)a/C4/ILSDI/Services.pm (-4 / +4 lines)
Lines 425-435 sub GetPatronInfo { Link Here
425
425
426
    # Fines management
426
    # Fines management
427
    if ( $cgi->param('show_fines') && $cgi->param('show_fines') eq "1" ) {
427
    if ( $cgi->param('show_fines') && $cgi->param('show_fines') eq "1" ) {
428
        my @charges;
428
429
        for ( my $i = 1 ; my @charge = getcharges( $borrowernumber, undef, $i ) ; $i++ ) {
429
        my $account_lines = $patron->account->lines;
430
            push( @charges, @charge );
430
        while (my $line = $account_lines->next ) {
431
            push @{ $borrower->{fines}{fine} }, $line->unblessed;
431
        }
432
        }
432
        $borrower->{'fines'}->{'fine'} = \@charges;
433
    }
433
    }
434
434
435
    # Reserves management
435
    # Reserves management
(-)a/t/db_dependent/Accounts.t (-2 lines)
Lines 44-50 can_ok( 'C4::Accounts', Link Here
44
        getnextacctno
44
        getnextacctno
45
        chargelostitem
45
        chargelostitem
46
        manualinvoice
46
        manualinvoice
47
        getcharges
48
        ReversePayment
47
        ReversePayment
49
        purge_zero_balance_fees )
48
        purge_zero_balance_fees )
50
);
49
);
51
- 

Return to bug 21681