commit
d20efb3caa
@ -142,7 +142,9 @@ class Transaction {
|
|||||||
(
|
(
|
||||||
SELECT sum(t.amount) AS credit
|
SELECT sum(t.amount) AS credit
|
||||||
FROM $this->table AS t
|
FROM $this->table AS t
|
||||||
|
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
|
||||||
WHERE t.type = 'Credit'
|
WHERE t.type = 'Credit'
|
||||||
|
AND b.confirmations >= " . $this->config['confirmations'] . "
|
||||||
) AS t1,
|
) AS t1,
|
||||||
(
|
(
|
||||||
SELECT sum(t.amount) AS debit
|
SELECT sum(t.amount) AS debit
|
||||||
@ -152,7 +154,9 @@ class Transaction {
|
|||||||
(
|
(
|
||||||
SELECT sum(t.amount) AS other
|
SELECT sum(t.amount) AS other
|
||||||
FROM " . $this->table . " AS t
|
FROM " . $this->table . " AS t
|
||||||
|
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
|
||||||
WHERE t.type IN ('Donation','Fee')
|
WHERE t.type IN ('Donation','Fee')
|
||||||
|
AND b.confirmations >= " . $this->config['confirmations'] . "
|
||||||
) AS t3");
|
) AS t3");
|
||||||
if ($this->checkStmt($stmt) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch())
|
if ($this->checkStmt($stmt) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch())
|
||||||
return $dBalance;
|
return $dBalance;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user