commit
dea1e753bd
@ -61,7 +61,7 @@ if (! empty($users)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create transaction record
|
// Create transaction record
|
||||||
if ($transaction->addTransaction($aUserData['id'], $dBalance, 'Debit_AP', NULL, $aUserData['coin_address'])) {
|
if ($transaction->addTransaction($aUserData['id'], $dBalance - $config['txfee'], 'Debit_AP', NULL, $aUserData['coin_address']) && $transaction->addTransaction($aUserData['id'], $config['txfee'], 'TXFee', NULL, $aUserData['coin_address'])) {
|
||||||
// Notify user via mail
|
// Notify user via mail
|
||||||
$aMailData['email'] = $user->getUserEmail($user->getUserName($aUserData['id']));
|
$aMailData['email'] = $user->getUserEmail($user->getUserName($aUserData['id']));
|
||||||
$aMailData['subject'] = 'Auto Payout Completed';
|
$aMailData['subject'] = 'Auto Payout Completed';
|
||||||
|
|||||||
@ -147,7 +147,7 @@ class Transaction {
|
|||||||
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
|
LEFT JOIN " . $this->block->getTableName() . " AS b ON t.block_id = b.id
|
||||||
WHERE (
|
WHERE (
|
||||||
( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR
|
( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR
|
||||||
t.type IN ('Donation_PPS','Fee_PPS')
|
t.type IN ('Donation_PPS','Fee_PPS','TXFee')
|
||||||
)
|
)
|
||||||
) AS t3");
|
) AS t3");
|
||||||
if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $this->config['confirmations'], $this->config['confirmations']) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch())
|
if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $this->config['confirmations'], $this->config['confirmations']) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch())
|
||||||
@ -194,7 +194,7 @@ class Transaction {
|
|||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR
|
( t.type IN ('Donation','Fee') AND b.confirmations >= ? ) OR
|
||||||
( t.type IN ('Donation_PPS', 'Fee_PPS') )
|
( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') )
|
||||||
)
|
)
|
||||||
AND t.account_id = ?
|
AND t.account_id = ?
|
||||||
) AS t3,
|
) AS t3,
|
||||||
@ -216,7 +216,7 @@ class Transaction {
|
|||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
( t.type IN ('Donation','Fee') AND b.confirmations < ? ) OR
|
( t.type IN ('Donation','Fee') AND b.confirmations < ? ) OR
|
||||||
( t.type IN ('Donation_PPS', 'Fee_PPS') )
|
( t.type IN ('Donation_PPS', 'Fee_PPS', 'TXFee') )
|
||||||
)
|
)
|
||||||
AND t.account_id = ?
|
AND t.account_id = ?
|
||||||
) AS t5
|
) AS t5
|
||||||
|
|||||||
@ -42,7 +42,7 @@ if ($user->isAuthenticated()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set balance to 0, add to paid out, insert to ledger
|
// Set balance to 0, add to paid out, insert to ledger
|
||||||
if ($continue == true && $transaction->addTransaction($_SESSION['USERDATA']['id'], $dBalance, 'Debit_MP', NULL, $sCoinAddress)) {
|
if ($continue == true && $transaction->addTransaction($_SESSION['USERDATA']['id'], $dBalance - $config['txfee'], 'Debit_MP', NULL, $sCoinAddress) && $transaction->addTransaction($_SESSION['USERDATA']['id'], $config['txfee'], 'TXFee', NULL, $sCoinAddress) ) {
|
||||||
$_SESSION['POPUP'][] = array('CONTENT' => 'Transaction completed', 'TYPE' => 'success');
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Transaction completed', 'TYPE' => 'success');
|
||||||
$aMailData['email'] = $user->getUserEmail($user->getUserName($_SESSION['USERDATA']['id']));
|
$aMailData['email'] = $user->getUserEmail($user->getUserName($_SESSION['USERDATA']['id']));
|
||||||
$aMailData['amount'] = $dBalance;
|
$aMailData['amount'] = $dBalance;
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
or $TRANSACTIONS[transaction].type == 'Donation_PPS'
|
or $TRANSACTIONS[transaction].type == 'Donation_PPS'
|
||||||
or $TRANSACTIONS[transaction].type == 'Debit_AP'
|
or $TRANSACTIONS[transaction].type == 'Debit_AP'
|
||||||
or $TRANSACTIONS[transaction].type == 'Debit_MP'
|
or $TRANSACTIONS[transaction].type == 'Debit_MP'
|
||||||
|
or $TRANSACTIONS[transaction].type == 'TXFee'
|
||||||
)}
|
)}
|
||||||
<tr class="{cycle values="odd,even"}">
|
<tr class="{cycle values="odd,even"}">
|
||||||
<td>{$TRANSACTIONS[transaction].id}</td>
|
<td>{$TRANSACTIONS[transaction].id}</td>
|
||||||
|
|||||||
1
sql/issue_203_transactions_upgrade.sql
Normal file
1
sql/issue_203_transactions_upgrade.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `transactions` CHANGE `type` `type` ENUM( 'Credit', 'Debit_MP', 'Debit_AP', 'Donation', 'Fee', 'Orphan_Credit', 'Orphan_Fee', 'Orphan_Donation', 'Credit_PPS', 'Fee_PPS', 'Donation_PPS', 'TXFee' ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ;
|
||||||
Loading…
Reference in New Issue
Block a user