//$detail_line = tep_db_fetch_array($payment_method_query ) ;

should be commented out. Otherwise in current month you will loose first payment type to be reported.

In for loop this query fetch is still in place. No need to declare before it.

In the package you will see updated file. Also I have used grey row background instead of pure black.

Thanks for the creator of this usefull contrib. All credits goes to original author.

More...