Making WordPress.org


Ignore:
Timestamp:
07/12/2018 12:22:11 AM (8 years ago)
Author:
coreymckrill
Message:

WordCamp Reports: Update Ticket Revenue report, other minor changes

  • Show ticket revenue results split out by payment method (instead of WPCS vs non-WPCS).
  • Minor HTML markup changes on several reports.
  • Minor code cleanup changes on several reports.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-reports/views/html/ticket-revenue.php

    r6662 r7434  
    99/** @var \DateTime $start_date */
    1010/** @var \DateTime $end_date */
    11 /** @var string $wordcamp_name */
    12 /** @var array $data */
     11/** @var \DateTime $xrt_date */
     12/** @var string    $wordcamp_name */
     13/** @var array     $data */
     14/** @var array     $total */
    1315
    1416$asterisk2 = false;
    15 $groups    = 0;
    1617?>
    1718
    1819<?php foreach ( $data as $key => $group ) : ?>
    1920    <?php if ( empty( $group['gross_revenue_by_currency'] ) ) continue; ?>
    20     <?php if ( 'total' === $key && $groups < 2 ) continue; ?>
    2121
    2222    <h3>
     
    3636    <?php endif; ?>
    3737
    38     <ul>
    39         <li>Tickets sold: <?php echo number_format_i18n( $group['tickets_sold'] ); ?></li>
    40         <li>Tickets refunded: <?php echo number_format_i18n( $group['tickets_refunded'] ); ?></li>
    41     </ul>
     38    <table class="striped widefat but-not-too-wide">
     39        <tbody>
     40        <tr>
     41            <td>Tickets sold:</td>
     42            <td class="number"><?php echo number_format_i18n( $group['tickets_sold'] ); ?></td>
     43        </tr>
     44        <tr>
     45            <td>Tickets refunded:</td>
     46            <td class="number"><?php echo number_format_i18n( $group['tickets_refunded'] ); ?></td>
     47        </tr>
     48        </tbody>
     49    </table>
    4250
    4351    <table class="striped widefat but-not-too-wide">
     
    8391        </tbody>
    8492    </table>
    85     <?php $groups ++; ?>
    8693<?php endforeach; ?>
    8794
    8895<?php if ( ! empty( $total['net_revenue_by_currency'] ) ) : ?>
    8996    <p class="description">
    90         * Estimate based on exchange rates for <?php echo esc_html( $end_date->format( 'M jS, Y' ) ); ?>
     97        * Estimate based on exchange rates for <?php echo esc_html( $xrt_date->format( 'M jS, Y' ) ); ?>.
    9198        <?php if ( $asterisk2 ) : ?>
    9299            <br />** Currency exchange rate not available.
Note: See TracChangeset for help on using the changeset viewer.