Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
fmido88 authored Jul 10, 2023
1 parent 8239d88 commit fccbc67
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion classes/transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ public static function get_user_balance($userid) {
} else if ($source == self::SOURCE_MOODLE) {

// Get the balance from the last transaction.
$record = $DB->get_records('enrol_wallet_transactions', ['userid' => $userid], 'timecreated DESC,id DESC', 'balance', 0, 1);
$sort = 'timecreated DESC,id DESC';
$record = $DB->get_records('enrol_wallet_transactions', ['userid' => $userid], $sort, 'balance', 0, 1);

// Getting the balance from last transaction.
$key = array_key_first($record);
Expand Down

0 comments on commit fccbc67

Please sign in to comment.