Fix transaction table, adjust transaction class

* Ensure we also check newly added blocks for unconfirmed tx
* Only list orphaned transactions in the orphaned tab

Fixes #490
This commit is contained in:
Sebastian Grewe 2013-07-21 17:25:09 +02:00
parent 7d801a561c
commit 36a74b0bbf
3 changed files with 4 additions and 4 deletions

View File

@ -235,7 +235,7 @@ class Transaction {
FROM $this->table AS t
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
WHERE
t.type IN ('Credit','Bonus') AND b.confirmations < ? AND b.confirmations > 0
t.type IN ('Credit','Bonus') AND b.confirmations < ? AND b.confirmations >= 0
AND t.account_id = ?
) AS t4,
(
@ -244,7 +244,7 @@ class Transaction {
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
WHERE
(
t.type IN ('Donation','Fee') AND b.confirmations < ? AND b.confirmations > 0
t.type IN ('Donation','Fee') AND b.confirmations < ? AND b.confirmations >= 0
)
AND t.account_id = ?
) AS t5,

View File

@ -62,7 +62,7 @@
{assign var=has_unconfirmed value=false}
{section transaction $TRANSACTIONS}
{if
(($TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus' or $TRANSACTIONS[transaction].type == 'Donation' or $TRANSACTIONS[transaction].type == 'Fee') and $TRANSACTIONS[transaction].confirmations < $GLOBAL.confirmations)
(($TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus' or $TRANSACTIONS[transaction].type == 'Donation' or $TRANSACTIONS[transaction].type == 'Fee') and $TRANSACTIONS[transaction].confirmations < $GLOBAL.confirmations and $TRANSACTIONS[transaction].confirmations >= 0)
}
{assign var=has_unconfirmed value=true}
<tr class="{cycle values="odd,even"}">

View File

@ -68,7 +68,7 @@
<tbody style="font-size:12px;">
{assign var=unconfirmed value=0}
{section transaction $TRANSACTIONS}
{if ($TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus' or $TRANSACTIONS[transaction].type == 'Donation' or $TRANSACTIONS[transaction].type == 'Fee') and $TRANSACTIONS[transaction].confirmations < $GLOBAL.confirmations}
{if ($TRANSACTIONS[transaction].type == 'Credit' or $TRANSACTIONS[transaction].type == 'Bonus' or $TRANSACTIONS[transaction].type == 'Donation' or $TRANSACTIONS[transaction].type == 'Fee') and $TRANSACTIONS[transaction].confirmations < $GLOBAL.confirmations and $TRANSACTIONS[transaction].confirmations >= 0}
{assign var=unconfirmed value=1}
<tr class="{cycle values="odd,even"}">
<td>{$TRANSACTIONS[transaction].id}</td>