mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-03 01:34:53 +02:00
feat: add fullname field to transaction reports and update report template
This commit is contained in:
parent
4c64cfabd2
commit
ad7998ebbf
2 changed files with 7 additions and 1 deletions
|
@ -279,7 +279,7 @@ switch ($action) {
|
|||
try {
|
||||
$d = Paginator::findMany($query, ['q' => $q]);
|
||||
} catch (Exception $e) {
|
||||
r2(getUrl('reports/activation/'), 'e','Database query failed: ' . $e->getMessage());
|
||||
r2(getUrl('reports/activation/'), 'e', 'Database query failed: ' . $e->getMessage());
|
||||
$d = [];
|
||||
}
|
||||
|
||||
|
@ -302,6 +302,10 @@ switch ($action) {
|
|||
$stype = _post('stype');
|
||||
|
||||
$d = ORM::for_table('tbl_transactions');
|
||||
$d->left_outer_join('tbl_customers', 'tbl_transactions.username = tbl_customers.username')
|
||||
->select('tbl_transactions.*')
|
||||
->select('tbl_customers.fullname', 'fullname')
|
||||
->order_by_desc('tbl_transactions.id');
|
||||
if ($stype != '') {
|
||||
$d->where('type', $stype);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th>{Lang::T('Username')}</th>
|
||||
<th>{Lang::T('Fullname')}</th>
|
||||
<th>{Lang::T('Type')}</th>
|
||||
<th>{Lang::T('Plan Name')}</th>
|
||||
<th>{Lang::T('Plan Price')}</th>
|
||||
|
@ -50,6 +51,7 @@
|
|||
{foreach $d as $ds}
|
||||
<tr>
|
||||
<td>{$ds['username']}</td>
|
||||
<td>{$ds['fullname']}</td>
|
||||
<td>{$ds['type']}</td>
|
||||
<td>{$ds['plan_name']}</td>
|
||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue