diff --git a/language/en-GB/en-GB.plg_vmextended_taxreport.ini b/language/en-GB/en-GB.plg_vmextended_taxreport.ini index e63715ca25723b83a86234777a46b443e315435c..384333b49a58e18c5027f509e5c2ab4ec25cda93 100644 --- a/language/en-GB/en-GB.plg_vmextended_taxreport.ini +++ b/language/en-GB/en-GB.plg_vmextended_taxreport.ini @@ -13,3 +13,5 @@ VMEXT_TAXREPORT_TAXRATE="Tax Rate" VMEXT_TAXREPORT_ORDERS="Orders" VMEXT_TAXREPORT_ORDERREVENUENET="Net revenue" VMEXT_TAXREPORT_ORDERTAXES="Taxes" + +VMEXT_TAXREPORT_SUMMARY="Tax Total" diff --git a/language/en-GB/en-GB.plg_vmextended_taxreport.sys.ini b/language/en-GB/en-GB.plg_vmextended_taxreport.sys.ini index e63715ca25723b83a86234777a46b443e315435c..384333b49a58e18c5027f509e5c2ab4ec25cda93 100644 --- a/language/en-GB/en-GB.plg_vmextended_taxreport.sys.ini +++ b/language/en-GB/en-GB.plg_vmextended_taxreport.sys.ini @@ -13,3 +13,5 @@ VMEXT_TAXREPORT_TAXRATE="Tax Rate" VMEXT_TAXREPORT_ORDERS="Orders" VMEXT_TAXREPORT_ORDERREVENUENET="Net revenue" VMEXT_TAXREPORT_ORDERTAXES="Taxes" + +VMEXT_TAXREPORT_SUMMARY="Tax Total" diff --git a/releases/plg_vmextended_taxreport_v0.2.zip b/releases/plg_vmextended_taxreport_v0.2.zip index f0da977bf3c416300abb0e9d2c27cb45789a5a0f..1e73e829782e6a0dd00470ba4ad0ff2f5d78c436 100644 Binary files a/releases/plg_vmextended_taxreport_v0.2.zip and b/releases/plg_vmextended_taxreport_v0.2.zip differ diff --git a/views/taxreport/tmpl/default.php b/views/taxreport/tmpl/default.php index 0f3aaccca0769250d20db790f422976f4756214e..85e32a361afe0eb61abf0e67dca26488152f0ff0 100644 --- a/views/taxreport/tmpl/default.php +++ b/views/taxreport/tmpl/default.php @@ -48,20 +48,37 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance(); <tbody> <?php $i = 0; + $nr_taxes = 0; + $nr_orders = 0; + $sum_revenue = 0.0; + $sum_tax = 0.0; + $tax_rate = 0; foreach ($this->report as $r) { ?> <tr class="row<?php echo $i;?>"> <td align="center"><?php echo $r['country']; ?></td> <td align="left"><?php echo $r['taxrule']; ?></td> - <td align="center"><?php echo round($r['taxrate'], 4) . " %"; ?></td> + <td align="center"><?php echo round($r['taxrate'], 2) . " %"; ?></td> <td align="center"><?php echo $r['ordercount']; ?></td> <td align="right"><?php echo $myCurrencyDisplay->priceDisplay($r['sum_revenue_net']); ?></td> <td align="right"><?php echo $myCurrencyDisplay->priceDisplay($r['sum_order_tax']); ?></td> </tr> <?php + ++$nr_taxes; + $nr_orders += $r['ordercount']; + $sum_revenue += $r['sum_revenue_net']; + $sum_tax += $r['sum_order_tax']; $i = 1-$i; } ?> </tbody> <tfoot> + <tr> + <th align="center"></th> + <th align="left"><?php echo vmText::_('VMEXT_TAXREPORT_SUMMARY'); ?></th> + <th align="center"><?php echo round($sum_tax/$sum_revenue*100, 4) . " %"; ?></th> + <th align="center"><?php echo $nr_orders; ?></th> + <th align="right"><?php echo $myCurrencyDisplay->priceDisplay($sum_revenue); ?></th> + <th align="right"><?php echo $myCurrencyDisplay->priceDisplay($sum_tax); ?></th> + </tr> <tr> <td colspan="10"> <?php if ($this->pagination) echo $this->pagination->getListFooter(); ?>