feat: add fullname field to transaction reports and update report template
This commit is contained in:
parent
4c64cfabd2
commit
ad7998ebbf
@ -302,6 +302,10 @@ switch ($action) {
|
|||||||
$stype = _post('stype');
|
$stype = _post('stype');
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_transactions');
|
$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 != '') {
|
if ($stype != '') {
|
||||||
$d->where('type', $stype);
|
$d->where('type', $stype);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{Lang::T('Username')}</th>
|
<th>{Lang::T('Username')}</th>
|
||||||
|
<th>{Lang::T('Fullname')}</th>
|
||||||
<th>{Lang::T('Type')}</th>
|
<th>{Lang::T('Type')}</th>
|
||||||
<th>{Lang::T('Plan Name')}</th>
|
<th>{Lang::T('Plan Name')}</th>
|
||||||
<th>{Lang::T('Plan Price')}</th>
|
<th>{Lang::T('Plan Price')}</th>
|
||||||
@ -50,6 +51,7 @@
|
|||||||
{foreach $d as $ds}
|
{foreach $d as $ds}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$ds['username']}</td>
|
<td>{$ds['username']}</td>
|
||||||
|
<td>{$ds['fullname']}</td>
|
||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td>{$ds['plan_name']}</td>
|
<td>{$ds['plan_name']}</td>
|
||||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user