Making WordPress.org

Changeset 3305


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.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins
Files:
2 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']
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php

    r3195 r3305  
    981981            }
    982982
     983            $due_date = get_post_meta( $post->ID, '_camppayments_due_by', true );
     984
     985            if ( $due_date ) {
     986                $due_date = date( 'Y-m-d', absint( $due_date ) );
     987            }
     988
    983989            if ( 'null-select-one' === $currency ) {
    984990                $currency = '';
     
    10021008                $date_vendor_paid,
    10031009                date( 'Y-m-d', get_post_time( 'U', true, $post->ID ) ),
    1004                 date( 'Y-m-d', absint( get_post_meta( $post->ID, '_camppayments_due_by', true ) ) ),
     1010                $due_date,
    10051011                get_post_meta( $post->ID, '_camppayments_payment_amount', true ),
    10061012                $currency,
Note: See TracChangeset for help on using the changeset viewer.