Updating the doashboard list to match the invoice order by.
$totalInvoices = false;
$filterPending = false;
$filterOverdue = false;
+ $invoices = false;
// For lockedToMember
$lockedToMember = false;
$view = 'editAccount';
break;
case 'list':
+ $orderBy = 'due_date ASC, transaction_time DESC';
// // Get list of pending invoices ( not overdue )
$pendingWhere = 'T.paid <> true AND T.due_date > now()';
$start = 1;
- $pending = $this->getList( $pendingWhere, 'transaction_time', true, 'id', $start, $limit );
+ $this->line_items_post = true;
+ $pending = $this->getList( $pendingWhere, $orderBy, true, 'id', $start, $limit );
+ $this->line_items_post = false;
// /**
// * $pending = array( start, limit, returned, last, list = array...)
// */
// // Get the number of over due invoices
$overDueWhere = 'T.paid <> true AND T.due_date < now()';
$start = 1;
- $overdue = $this->getList( $overDueWhere, 'transaction_time', true, 'id', $start, $limit );
+ $this->line_items_post = true;
+ $overdue = $this->getList( $overDueWhere, $orderBy, true, 'id', $start, $limit );
+ $this->line_items_post = false;
if ( isset( $overdue['returned'] ) ) {
$numberOverdue = $overdue['returned'];
}
<thead>
<tr>
<th style="width: 50px;">ID</th>
- <th>Member Name</th>
- <th>Time</th>
- <th>Due Date</th>
- <th>Balance</th>
- <th>View</th>
+ <th style="width: 150px;">Member Name</th>
+ <th>Invoice For</th>
+ <th style="width: 150px;">Time</th>
+ <th style="width: 70px;">Due Date</th>
+ <th style="width: 100px;">Amount Total</th>
+ <th style="width: 70px;">Balance</th>
+ <th style="width: 50px;">View</th>
</tr>
</thead>
<tbody>
{/if}
<td> {$t.id} </td>
<td> <a href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.member_id}">{$t.member_name}</a> </td>
+ <td>
+ {foreach $t.line_items as $item}
+ {$item.name} {if $item.recurring && $item.recurrence_string}( {$item.recurrence_string} ){/if}
+ {/foreach}
+ </td>
<td> {$t.transaction_time.datetime} </td>
<td> {$t.due_date.date} </td>
+ <td> {$t.amount_total} </td>
<td> {$t.balance} </td>
<td> <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=view&id={$t.id}">View</a> </td>
</tr>
<thead>
<tr>
<th style="width: 50px;">ID</th>
- <th>Member Name</th>
- <th>Time</th>
- <th>Due Date</th>
- <th>Balance</th>
- <th>View</th>
+ <th style="width: 150px;">Member Name</th>
+ <th>Invoice For</th>
+ <th style="width: 150px;">Time</th>
+ <th style="width: 70px;">Due Date</th>
+ <th style="width: 100px;">Amount Total</th>
+ <th style="width: 70px;">Balance</th>
+ <th style="width: 50px;">View</th>
</tr>
</thead>
<tbody>
{/if}
<td> {$t.id} </td>
<td> <a href="{$adminUrl}?page=glm-members-admin-menu-member&glm_action=billing&member={$t.member_id}">{$t.member_name}</a> </td>
+ <td>
+ {foreach $t.line_items as $item}
+ {$item.name} {if $item.recurring && $item.recurrence_string}( {$item.recurrence_string} ){/if}
+ {/foreach}
+ </td>
<td> {$t.transaction_time.datetime} </td>
<td> {$t.due_date.date} </td>
+ <td> {$t.amount_total} </td>
<td> {$t.balance} </td>
<td> <a href="{$thisUrl}?page=glm-members-admin-menu-billing&glm_action=invoices&option=view&id={$t.id}">View</a> </td>
</tr>
<thead>
<tr>
<th style="width: 50px;">ID</th>
- <th>Member Name</th>
+ <th style="width: 150px;">Member Name</th>
<th>Invoice For</th>
<th style="width: 150px;">Time</th>
<th style="width: 70px;">Due Date</th>