| Lines 236-257
          sub manualinvoice {
      
      
        Link Here | 
        
          | 236 | } | 236 | } | 
        
          | 237 |  | 237 |  | 
        
          | 238 | sub getcharges { | 238 | sub getcharges { | 
          
            
              | 239 |     my ( $borrowerno, $accountno ) = @_; | 239 |     my ( $borrowerno, $timestamp, $accountno ) = @_; | 
            
              | 240 |     my $dbh = C4::Context->dbh; | 240 |     my $dbh        = C4::Context->dbh; | 
            
              | 241 |  | 241 |     my $timestamp2 = $timestamp - 1; | 
            
              | 242 |     my @params; | 242 |     my $query      = ""; | 
            
              | 243 |  | 243 |     my $sth = $dbh->prepare( | 
            
              | 244 |     my $query = "SELECT * FROM accountlines WHERE borrowernumber = ?"; | 244 |             "SELECT * FROM accountlines WHERE borrowernumber=? AND accountno = ?" | 
            
              | 245 |     push( @params, $borrowerno ); | 245 |           ); | 
            
              | 246 |  | 246 |     $sth->execute( $borrowerno, $accountno ); | 
            
              | 247 |     if ( $accountno ) { |  |  | 
            
              | 248 |         $query .= " AND accountno = ?"; | 
            
              | 249 |         push( @params, $accountno ); | 
            
              | 250 |     } | 
        
          | 251 |  | 247 |  | 
            
              | 252 |     my $sth = $dbh->prepare( $query ); |  |  | 
            
              | 253 |     $sth->execute( @params ); | 
            
              | 254 | 	 | 
        
          | 255 |     my @results; | 248 |     my @results; | 
        
          | 256 |     while ( my $data = $sth->fetchrow_hashref ) { | 249 |     while ( my $data = $sth->fetchrow_hashref ) { | 
        
          | 257 |         push @results,$data; | 250 |         push @results,$data; | 
            
              | 258 | -  |  |  |