Order Expired by Expired date

This commit is contained in:
Ibnu Maksum 2024-01-08 15:24:35 +07:00
parent 081dd1b1b9
commit 1d29f8111e
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
2 changed files with 6 additions and 5 deletions

View file

@ -57,7 +57,7 @@ $expire = ORM::for_table('tbl_user_recharges')
->where_lte('expiration', $mdate) ->where_lte('expiration', $mdate)
->offset($paginator['startpoint']) ->offset($paginator['startpoint'])
->limit($paginator['limit']) ->limit($paginator['limit'])
->order_by_desc('id') ->order_by_desc('expiration')
->find_many(); ->find_many();
// Get the total count of expired records for pagination // Get the total count of expired records for pagination
@ -67,7 +67,6 @@ $totalCount = ORM::for_table('tbl_user_recharges')
// Pass the total count and current page to the paginator // Pass the total count and current page to the paginator
$paginator['total_count'] = $totalCount; $paginator['total_count'] = $totalCount;
$paginator['current_page'] = $paginator['current_page'];
// Assign the pagination HTML to the template variable // Assign the pagination HTML to the template variable
$ui->assign('paginator', $paginator); $ui->assign('paginator', $paginator);

View file

@ -119,7 +119,7 @@
{/foreach} {/foreach}
</table> </table>
</div> </div>
&nbsp; {$paginator['contents']} &nbsp; {$paginator['contents']}
</div> </div>
</div> </div>
@ -150,7 +150,9 @@
$.getJSON("./version.json?" + Math.random(), function(data) { $.getJSON("./version.json?" + Math.random(), function(data) {
var localVersion = data.version; var localVersion = data.version;
$('#version').html('Version: ' + localVersion); $('#version').html('Version: ' + localVersion);
$.getJSON("https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" + Math $.getJSON(
"https://raw.githubusercontent.com/hotspotbilling/phpnuxbill/master/version.json?" +
Math
.random(), .random(),
function(data) { function(data) {
var latestVersion = data.version; var latestVersion = data.version;
@ -163,4 +165,4 @@
}); });
</script> </script>
{include file="sections/footer.tpl"} {include file="sections/footer.tpl"}