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/payment-activity.php

    r6662 r7434  
    99/** @var \DateTime $start_date */
    1010/** @var \DateTime $end_date */
    11 /** @var string $wordcamp_name */
    12 /** @var array $requests */
    13 /** @var array $payments */
    14 /** @var array $failures */
     11/** @var \DateTime $xrt_date */
     12/** @var string    $wordcamp_name */
     13/** @var array     $requests */
     14/** @var array     $payments */
     15/** @var array     $failures */
    1516
    1617$asterisk2 = false;
     
    3031    </h3>
    3132
    32     <ul>
    33         <?php if ( $requests['vendor_payment_count'] ) : ?>
    34             <li>Vendor payments: <?php echo number_format_i18n( $requests['vendor_payment_count'] ) ?></li>
    35         <?php endif; ?>
    36         <?php if ( $requests['reimbursement_count'] ) : ?>
    37             <li>Reimbursements: <?php echo number_format_i18n( $requests['reimbursement_count'] ) ?></li>
    38         <?php endif; ?>
    39     </ul>
     33    <table class="striped widefat but-not-too-wide">
     34        <tbody>
     35        <tr>
     36            <td>Vendor payments:</td>
     37            <td class="number"><?php echo number_format_i18n( $requests['vendor_payment_count'] ) ?></td>
     38        </tr>
     39        <tr>
     40            <td>Reimbursements:</td>
     41            <td class="number"><?php echo number_format_i18n( $requests['reimbursement_count'] ) ?></td>
     42        </tr>
     43        </tbody>
     44    </table>
    4045
    4146    <table class="striped widefat but-not-too-wide">
     
    8287    </h3>
    8388
    84     <ul>
    85         <?php if ( $payments['vendor_payment_count'] ) : ?>
    86             <li>Vendor payments: <?php echo number_format_i18n( $payments['vendor_payment_count'] ) ?></li>
    87         <?php endif; ?>
    88         <?php if ( $payments['reimbursement_count'] ) : ?>
    89             <li>Reimbursements: <?php echo number_format_i18n( $payments['reimbursement_count'] ) ?></li>
    90         <?php endif; ?>
    91     </ul>
     89    <table class="striped widefat but-not-too-wide">
     90        <tbody>
     91        <tr>
     92            <td>Vendor payments:</td>
     93            <td class="number"><?php echo number_format_i18n( $payments['vendor_payment_count'] ) ?></td>
     94        </tr>
     95        <tr>
     96            <td>Reimbursements:</td>
     97            <td class="number"><?php echo number_format_i18n( $payments['reimbursement_count'] ) ?></td>
     98        </tr>
     99        </tbody>
     100    </table>
    92101
    93102    <table class="striped widefat but-not-too-wide">
     
    95104        <tr>
    96105            <td>Currency</td>
    97             <td>Total Amount Requested</td>
     106            <td>Total Amount Paid</td>
    98107            <td>Estimated Value in USD *</td>
    99108        </tr>
     
    134143    </h3>
    135144
    136     <ul>
    137         <?php if ( $failures['vendor_payment_count'] ) : ?>
    138             <li>Vendor payments: <?php echo number_format_i18n( $failures['vendor_payment_count'] ) ?></li>
    139         <?php endif; ?>
    140         <?php if ( $failures['reimbursement_count'] ) : ?>
    141             <li>Reimbursements: <?php echo number_format_i18n( $failures['reimbursement_count'] ) ?></li>
    142         <?php endif; ?>
    143     </ul>
     145    <table class="striped widefat but-not-too-wide">
     146        <tbody>
     147        <tr>
     148            <td>Vendor payments:</td>
     149            <td class="number"><?php echo number_format_i18n( $failures['vendor_payment_count'] ) ?></td>
     150        </tr>
     151        <tr>
     152            <td>Reimbursements:</td>
     153            <td class="number"><?php echo number_format_i18n( $failures['reimbursement_count'] ) ?></td>
     154        </tr>
     155        </tbody>
     156    </table>
    144157
    145158    <table class="striped widefat but-not-too-wide">
     
    174187
    175188<?php if ( $requests['vendor_payment_count'] || $requests['reimbursement_count'] || $payments['vendor_payment_count'] || $payments['reimbursement_count'] || $failures['vendor_payment_count'] || $failures['reimbursement_count'] ) : ?>
    176     <p class="description">* Estimate based on exchange rates for <?php echo esc_html( $end_date->format( 'M jS, Y' ) ); ?></p>
    177     <?php if ( $asterisk2 ) : ?>
    178         <p class="description">** Currency exchange rate not available.</p>
    179     <?php endif; ?>
     189    <p class="description">
     190        * Estimate based on exchange rates for <?php echo esc_html( $xrt_date->format( 'M jS, Y' ) ); ?>.
     191        <?php if ( $asterisk2 ) : ?>
     192            <br />** Currency exchange rate not available.
     193        <?php endif; ?>
     194    </p>
    180195<?php else : ?>
    181196    <p>
Note: See TracChangeset for help on using the changeset viewer.