Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reorganize transactions list in the admin section

  • Loading branch information...
commit 8ad4f9cfe1722e82f9bc8ab8fdd507ae3d6f97f2 1 parent e906bdc
@molawson authored
View
16 includes/stripe-options-transactions.php
@@ -42,8 +42,10 @@ function retrievePage() {
$time_format = get_option( 'time_format' );
- // - variables -
+ // all Stripe transactions are in USD
+ setlocale(LC_MONETARY, 'en_US');
+ // - variables -
$custom = get_post_custom( get_the_ID() );
$id = ( $my_query->post->ID );
$public = $custom["wp-stripe-public"][0];
@@ -55,8 +57,9 @@ function retrievePage() {
$cleandate = date('d M', $date);
$cleantime = date('H:i', $date);
$amount = $custom["wp-stripe-amount"][0];
+ $paid = money_format( '%n', $amount );
$fee = ($custom["wp-stripe-fee"][0])/100;
- $net = round($amount - $fee,2);
+ $net = money_format( '%n', $amount - $fee );
$type = $custom["wp-stripe-type"][0];
echo '<tr>';
@@ -82,16 +85,17 @@ function retrievePage() {
// Received
- $received = '<span class="stripe-netamount"> + ' . $net . '</span> (-' . $fee . ')';
+ $received = '<span class="stripe-netamount">' . $net . '</span>';
// Content
echo '<td>' . $dotlive . $dotpublic . '</td>';
echo '<td>' . $person . '</td>';
- echo '<td>' . $type . '</td>';
- echo '<td>' . $received . '</td>';
- echo '<td>' . $cleandate . ' - ' . $cleantime . '</td>';
echo '<td class="stripe-comment">"' . $content . '"</td>';
+ echo '<td>' . $cleandate . ' - ' . $cleantime . '</td>';
+ echo '<td>' . $type . '</td>';
+ echo '<td style="text-align: right;">' . $paid . '</td>';
+ echo '<td style="text-align: right;">' . $received . '</td>';
echo '</tr>';
View
8 includes/stripe-options.php
@@ -231,11 +231,11 @@ function wp_stripe_options_page() {
<th style="width:44px;"><div class="dot-stripe-live"></div><div class="dot-stripe-public"></div></th>
<th style="width:180px;">Person</th>
- <th style="width:60px;">Type</th>
- <th style="width:100px;">Net Amount (Fee)</th>
- <th style="width:80px;">Date</th>
-
<th>Comment</th>
+ <th style="width:100px;">Date</th>
+ <th style="width:60px;">Type</th>
+ <th style="width:80px; text-align: right;">Paid</th>
+ <th style="width:80px; text-align: right;">Net</th>
</tr></thead>
Please sign in to comment.
Something went wrong with that request. Please try again.