[FIX] Also exclude TXFee records for last ID
This commit is contained in:
parent
038d398344
commit
55190b7d08
@ -36,7 +36,7 @@ class Transaction extends Base {
|
||||
public function setArchived($account_id, $txid) {
|
||||
// Fetch last archived transaction for user, we must exclude our Debits though! There might be unarchived/archived
|
||||
// records before our last payout
|
||||
$stmt = $this->mysqli->prepare("SELECT IFNULL(MAX(id), 0) AS id FROM $this->table WHERE archived = 1 AND account_id = ? AND type NOT IN ('Debit_MP','Debit_AP')");
|
||||
$stmt = $this->mysqli->prepare("SELECT IFNULL(MAX(id), 0) AS id FROM $this->table WHERE archived = 1 AND account_id = ? AND type NOT IN ('Debit_MP','Debit_AP','TXFee')");
|
||||
if ($this->checkStmt($stmt) && $stmt->bind_param('i', $account_id) && $stmt->execute() && $result = $stmt->get_result())
|
||||
$last_id = $result->fetch_object()->id;
|
||||
$this->debug->append('Found last archived transaction: ' . $last_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user