Skip to content
Snippets Groups Projects
Commit e4252134 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V0.3: Prevent division by 0 in the summary line

parent 6445c2a4
Branches master
Tags V0.3
No related merge requests found
BASE=taxreport BASE=taxreport
PLUGINTYPE=vmextended PLUGINTYPE=vmextended
VERSION=0.2 VERSION=0.3
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
# $(BASE)/ # $(BASE)/
......
File added
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<authorUrl>http://www.open-tools.net/</authorUrl> <authorUrl>http://www.open-tools.net/</authorUrl>
<copyright>Copyright (C) 2015 Reinhold Kainhofer. All rights reserved.</copyright> <copyright>Copyright (C) 2015 Reinhold Kainhofer. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license> <license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license>
<version>0.2</version> <version>0.3</version>
<releaseDate>2015-04-01</releaseDate> <releaseDate>2015-04-01</releaseDate>
<releaseType>Initial Release</releaseType> <releaseType>Initial Release</releaseType>
<downloadUrl>http://www.open-tools.net</downloadUrl> <downloadUrl>http://www.open-tools.net</downloadUrl>
......
...@@ -74,7 +74,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance(); ...@@ -74,7 +74,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
<tr> <tr>
<th align="center"></th> <th align="center"></th>
<th align="left"><?php echo vmText::_('VMEXT_TAXREPORT_SUMMARY'); ?></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 if ($sum_revenue > 0) echo round($sum_tax/$sum_revenue*100, 4) . " %"; ?></th>
<th align="center"><?php echo $nr_orders; ?></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_revenue); ?></th>
<th align="right"><?php echo $myCurrencyDisplay->priceDisplay($sum_tax); ?></th> <th align="right"><?php echo $myCurrencyDisplay->priceDisplay($sum_tax); ?></th>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment