/**
  * Build all the reports data
  *
  * @access public
  * @since  1.0
  * @return array $reports_data All the data for donor reports
  */
 public function reports_data()
 {
     $reports_data = array();
     $gateways = give_get_payment_gateways();
     $stats = new Give_Payment_Stats();
     foreach ($gateways as $gateway_id => $gateway) {
         $complete_count = give_count_sales_by_gateway($gateway_id, 'publish');
         $pending_count = give_count_sales_by_gateway($gateway_id, array('pending', 'failed'));
         $reports_data[] = array('ID' => $gateway_id, 'label' => $gateway['admin_label'], 'complete_sales' => give_format_amount($complete_count, false), 'pending_sales' => give_format_amount($pending_count, false), 'total_sales' => give_format_amount($complete_count + $pending_count, false), 'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, 0, 0, $gateway_id))));
     }
     return $reports_data;
 }
 /**
  * Build all the reports data
  *
  * @access public
  * @since  1.5
  * @return array $reports_data All the data for donor reports
  */
 public function reports_data()
 {
     $reports_data = array();
     $gateways = give_get_payment_gateways();
     foreach ($gateways as $gateway_id => $gateway) {
         $complete_count = give_count_sales_by_gateway($gateway_id, 'publish');
         $pending_count = give_count_sales_by_gateway($gateway_id, array('pending', 'failed'));
         $reports_data[] = array('ID' => $gateway_id, 'label' => $gateway['admin_label'], 'complete_sales' => give_format_amount($complete_count, false), 'pending_sales' => give_format_amount($pending_count, false), 'total_sales' => give_format_amount($complete_count + $pending_count, false));
     }
     return $reports_data;
 }