Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VirtueMart
EU Sales Reports for VirtueMart
Commits
3e7b61a4
Commit
3e7b61a4
authored
Nov 12, 2016
by
Reinhold Kainhofer
Browse files
V0.8: Add summary line to the EU Sales report
parent
8466a160
Changes
3
Hide whitespace changes
Inline
Side-by-side
language/en-GB/en-GB.plg_vmextended_eurecap.ini
View file @
3e7b61a4
...
...
@@ -71,4 +71,7 @@ VMEXT_EU_RECAP_ORDERS="Orders"
VMEXT_EU_RECAP_ORDERTOTALS
=
"Total revenue"
VMEXT_EU_RECAP_ORDERTAXES
=
"Taxes"
VMEXT_EU_RECAP_CANCELLED
=
"EU Sales Report settings cancelled."
\ No newline at end of file
VMEXT_EU_RECAP_CANCELLED
=
"EU Sales Report settings cancelled."
VMEXT_EU_RECAP_SUMMARY
=
"Total"
VMEXT_EU_RECAP_ORDERCOUNT
=
"%d Order(s)"
\ No newline at end of file
language/en-GB/en-GB.plg_vmextended_eurecap.sys.ini
View file @
3e7b61a4
...
...
@@ -71,4 +71,7 @@ VMEXT_EU_RECAP_ORDERS="Orders"
VMEXT_EU_RECAP_ORDERTOTALS
=
"Total revenue"
VMEXT_EU_RECAP_ORDERTAXES
=
"Taxes"
VMEXT_EU_RECAP_CANCELLED
=
"EU Sales Report settings cancelled."
\ No newline at end of file
VMEXT_EU_RECAP_CANCELLED
=
"EU Sales Report settings cancelled."
VMEXT_EU_RECAP_SUMMARY
=
"Total"
VMEXT_EU_RECAP_ORDERCOUNT
=
"%d Order(s)"
\ No newline at end of file
views/eurecap/tmpl/default.php
View file @
3e7b61a4
...
...
@@ -22,6 +22,9 @@ if (!class_exists('CurrencyDisplay'))
require
(
VMPATH_ADMIN
.
DS
.
'helpers'
.
DS
.
'currencydisplay.php'
);
$myCurrencyDisplay
=
CurrencyDisplay
::
getInstance
();
$totalOrders
=
0
;
$totalRevenue
=
0
;
$totalTax
=
0
;
?>
...
...
@@ -134,6 +137,7 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
$orders
=
array_combine
(
$oids
,
$onrs
);
$links
=
array
();
foreach
(
$orders
as
$oid
=>
$onr
)
{
$totalOrders
+=
1
;
$orderlink
=
JROUTE
::
_
(
'index.php?option=com_virtuemart&view=orders&task=edit&virtuemart_order_id='
.
$oid
,
FALSE
);
$links
[]
=
JHtml
::
_
(
'link'
,
JRoute
::
_
(
$orderlink
,
FALSE
),
$onr
,
array
(
'title'
=>
$onr
));
}
...
...
@@ -141,11 +145,15 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
?>
</td>
<td
align=
"right"
>
<?php
echo
$myCurrencyDisplay
->
priceDisplay
(
$r
[
'sum_order_total'
]);
?>
<?php
$totalRevenue
+=
$r
[
'sum_order_total'
];
echo
$myCurrencyDisplay
->
priceDisplay
(
$r
[
'sum_order_total'
]);
?>
</td>
<?php
if
(
$this
->
include_taxed_orders
)
{
?>
<td
align=
"right"
>
<?php
echo
$myCurrencyDisplay
->
priceDisplay
(
$r
[
'sum_order_tax'
]);
?>
<?php
$totalTax
+=
$r
[
'sum_order_tax'
];
echo
$myCurrencyDisplay
->
priceDisplay
(
$r
[
'sum_order_tax'
]);
?>
</td>
<?php
}
?>
</tr>
...
...
@@ -155,6 +163,22 @@ $myCurrencyDisplay = CurrencyDisplay::getInstance();
?>
</tbody>
<tfoot>
<tr
style=
"border-top: 2px solid;"
>
<th
align=
"center"
></th>
<th
align=
"center"
></th>
<th
align=
"left"
>
<?php
echo
vmText
::
_
(
'VMEXT_EU_RECAP_SUMMARY'
);
?>
</th>
<th
align=
"left"
></th>
<th
align=
"left"
>
<?php
echo
vmText
::
sprintf
(
'VMEXT_EU_RECAP_ORDERCOUNT'
,
$totalOrders
);
?>
</th>
<th
align=
"right"
>
<?php
echo
$myCurrencyDisplay
->
priceDisplay
(
$totalRevenue
);
?>
</th>
<?php
if
(
$this
->
include_taxed_orders
)
{
?>
<th
align=
"right"
>
<?php
echo
$myCurrencyDisplay
->
priceDisplay
(
$totalTax
);
?>
</th>
<?php
}
?>
</tr>
<tr>
<td
colspan=
"10"
>
<?php
if
(
$this
->
pagination
)
echo
$this
->
pagination
->
getListFooter
();
?>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment