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

(-)a/C4/Accounts.pm (-16 / +8 lines)
Lines 299-320 sub manualinvoice { Link Here
299
}
299
}
300
300
301
sub getcharges {
301
sub getcharges {
302
    my ( $borrowerno, $accountno ) = @_;
302
    my ( $borrowerno, $timestamp, $accountno ) = @_;
303
    my $dbh = C4::Context->dbh;
303
    my $dbh        = C4::Context->dbh;
304
304
    my $timestamp2 = $timestamp - 1;
305
    my @params;
305
    my $query      = "";
306
306
    my $sth = $dbh->prepare(
307
    my $query = "SELECT * FROM accountlines WHERE borrowernumber = ?";
307
            "SELECT * FROM accountlines WHERE borrowernumber=? AND accountno = ?"
308
    push( @params, $borrowerno );
308
          );
309
309
    $sth->execute( $borrowerno, $accountno );
310
    if ( $accountno ) {
311
        $query .= " AND accountno = ?";
312
        push( @params, $accountno );
313
    }
314
310
315
    my $sth = $dbh->prepare( $query );
316
    $sth->execute( @params );
317
	
318
    my @results;
311
    my @results;
319
    while ( my $data = $sth->fetchrow_hashref ) {
312
    while ( my $data = $sth->fetchrow_hashref ) {
320
        push @results,$data;
313
        push @results,$data;
321
- 

Return to bug 12768