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 311-333 sub manualinvoice { Link Here
311
    return 0;
310
    return 0;
312
}
311
}
313
312
314
sub getcharges {
315
    my ( $borrowerno, $timestamp, $accountno ) = @_;
316
    my $dbh        = C4::Context->dbh;
317
    my $timestamp2 = $timestamp - 1;
318
    my $query      = "";
319
    my $sth = $dbh->prepare(
320
            "SELECT * FROM accountlines WHERE borrowernumber=? AND accountno = ?"
321
          );
322
    $sth->execute( $borrowerno, $accountno );
323
324
    my @results;
325
    while ( my $data = $sth->fetchrow_hashref ) {
326
        push @results,$data;
327
    }
328
    return (@results);
329
}
330
331
#FIXME: ReversePayment should be replaced with a Void Payment feature
313
#FIXME: ReversePayment should be replaced with a Void Payment feature
332
sub ReversePayment {
314
sub ReversePayment {
333
    my ($accountlines_id) = @_;
315
    my ($accountlines_id) = @_;
(-)a/C4/ILSDI/Services.pm (-4 / +7 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 = Koha::Account::Lines->search({
430
            push( @charges, @charge );
430
            borrowernumber => $patron->borrowernumber,
431
        });
432
433
        while (my $line = $account_lines->next ) {
434
            push @{ $borrower->{fines}{fine} }, $line->unblessed;
431
        }
435
        }
432
        $borrower->{'fines'}->{'fine'} = \@charges;
433
    }
436
    }
434
437
435
    # Reserves management
438
    # 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