Making WordPress.org


Ignore:
Timestamp:
06/06/2016 09:20:12 PM (9 years ago)
Author:
iandunn
Message:

WordCamp Budgets: Include vendor payments with empty dates in CSV export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/wordcamp-budgets-dashboard.php

    r2974 r3305  
    363363    }
    364364
     365    // We don't want to export items with empty dates to JPM, etc
     366    if ( 'Regular CSV' === $args['export_type']['label'] ) {
     367        $include_empty_dates = " OR `{$date_type}` = 0";
     368    } else {
     369        $include_empty_dates = '';
     370    }
     371
    365372    $request_indexes = $wpdb->get_results( $wpdb->prepare( "
    366373        SELECT *
    367374        FROM   `{$table_name}`
    368         WHERE  `{$date_type}` BETWEEN %d AND %d",
     375        WHERE  `{$date_type}` BETWEEN %d AND %d $include_empty_dates",
    369376        $args['start_date'],
    370377        $args['end_date']
Note: See TracChangeset for help on using the changeset viewer.