diff --git a/system/controllers/reports.php b/system/controllers/reports.php index 4562ab6e..e18e1f87 100644 --- a/system/controllers/reports.php +++ b/system/controllers/reports.php @@ -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); } diff --git a/ui/ui/admin/reports/period-view.tpl b/ui/ui/admin/reports/period-view.tpl index d310248e..4283013c 100644 --- a/ui/ui/admin/reports/period-view.tpl +++ b/ui/ui/admin/reports/period-view.tpl @@ -37,6 +37,7 @@ {Lang::T('Username')} + {Lang::T('Fullname')} {Lang::T('Type')} {Lang::T('Plan Name')} {Lang::T('Plan Price')} @@ -50,6 +51,7 @@ {foreach $d as $ds} {$ds['username']} + {$ds['fullname']} {$ds['type']} {$ds['plan_name']} {Lang::moneyFormat($ds['price'])}