Files
.circleci
assets
bin
data
inc
lang
patches
tests
views
admin-pages
base
broadcast
checkout
customers
dashboard-statistics
filter.php
widget-countries.php
widget-forms.php
widget-most-visited-sites.php
widget-mrr-growth.php
widget-new-accounts.php
widget-revenue.php
widget-tax-by-code.php
widget-tax-by-day.php
widget-tax-graph.php
widget-taxes.php
dashboard-widgets
domain
dynamic-styles
email
emails
events
invoice
legacy
limitations
memberships
payments
settings
shortcodes
sites
system-info
taxes
ui
wizards
about.php
admin-notices.php
classes.php
phpcs.xml
.gitignore
.phpcs.xml.dist
LICENSE
autoload.php
composer.json
composer.lock
constants.php
loco.xml
phpunit.xml.dist
readme.txt
sunrise.php
uninstall.php
wp-multisite-waas.php
wp-multisite-waas/views/dashboard-statistics/widget-tax-by-day.php
2024-11-30 18:24:12 -07:00

101 lines
2.2 KiB
PHP

<?php
/**
* Total widget view.
*
* @since 2.0.0
*/
?>
<div class="wu-styling">
<div class="wu-widget-inset">
<?php
$data = array();
$slug = 'taxes_by_day';
$headers = array(
__('Day', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Total Sales', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
__('Net Profit', 'wp-ultimo'),
);
foreach ($taxes_by_day as $day => $tax_line) {
$line = array(
date_i18n(get_option('date_format'), strtotime($day)),
$tax_line['order_count'],
wu_format_currency($tax_line['total']),
wu_format_currency($tax_line['tax_total']),
wu_format_currency($tax_line['net_profit'])
);
$data[] = $line;
} // end foreach;
$page->render_csv_button(array(
'headers' => $headers,
'data' => $data,
'slug' => $slug
));
?>
<table class="wp-list-table widefat fixed striped wu-border-none">
<thead>
<tr>
<th class="wu-w-1/3"><?php _e('Day', 'wp-ultimo'); ?></th>
<th><?php _e('Orders', 'wp-ultimo'); ?></th>
<th><?php _e('Total Sales', 'wp-ultimo'); ?></th>
<th><?php _e('Tax Total', 'wp-ultimo'); ?></th>
<th><?php _e('Net Profit', 'wp-ultimo'); ?></th>
</tr>
</thead>
<tbody>
<?php if ($taxes_by_day) : ?>
<?php foreach ($taxes_by_day as $day => $tax_line) : ?>
<tr>
<td>
<?php echo date_i18n(get_option('date_format'), strtotime($day)); ?>
</td>
<td>
<?php echo $tax_line['order_count']; ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['tax_total']); ?>
</td>
<td>
<?php echo wu_format_currency($tax_line['net_profit']); ?>
</td>
</tr>
<?php endforeach; ?>
<?php else : ?>
<tr>
<td colspan="4">
<?php _e('No Taxes found.', 'wp-ultimo'); ?>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>