[ADDED] More checks for amounts
This commit is contained in:
parent
792be3e3e0
commit
cbf98b4655
@ -57,13 +57,19 @@ $notfound=0;
|
|||||||
$mask = "| %-15.15s | %-34.34s | %20.20s | %10.10s | %-64.64s |" . PHP_EOL;
|
$mask = "| %-15.15s | %-34.34s | %20.20s | %10.10s | %-64.64s |" . PHP_EOL;
|
||||||
printf($mask, 'Username', 'Address', 'Amount', 'Status', 'TXID');
|
printf($mask, 'Username', 'Address', 'Amount', 'Status', 'TXID');
|
||||||
|
|
||||||
|
var_dump($aListTransactions);
|
||||||
// Loop through our DB records
|
// Loop through our DB records
|
||||||
foreach ($aAllDebitTxs as $aDebitTx) {
|
foreach ($aAllDebitTxs as $aDebitTx) {
|
||||||
$bFound = false;
|
$bFound = false;
|
||||||
$txid = 'n/a';
|
$txid = 'n/a';
|
||||||
foreach($aListTransactions as $key => $aTransaction) {
|
foreach($aListTransactions as $key => $aTransaction) {
|
||||||
// Search for match NOT by txid
|
if (isset($aTransaction['address']) &&
|
||||||
if (isset($aTransaction['address']) && $aTransaction['address'] == $aDebitTx['coin_address'] && ((string)$aTransaction['amount'] == (string)($aDebitTx['amount'] * -1) || (string)$aTransaction['amount'] == (string)($aDebitTx['amount'] * -1 - $config['txfee_manual']) || (string)$aTransaction['amount'] == (string)($aDebitTx['amount'] * -1 - $config['txfee_auto']) )) {
|
$aTransaction['address'] == $aDebitTx['coin_address'] &&
|
||||||
|
((string)($aTransaction['amount'] + $aTransaction['fee']) == (string)($aDebitTx['amount'] * -1) || // Check against transaction - Fee total
|
||||||
|
(string)($aTransaction['amount'] + $config['txfee_manual']) == (string)($aDebitTx['amount'] * -1) || // Check against txfee_manual deducted
|
||||||
|
(string)($aTransaction['amount'] + $config['txfee_auto']) == (string)($aDebitTx['amount'] * -1) || // Check against txfee_auto deducted
|
||||||
|
(string)$aTransaction['amount'] == (string)($aDebitTx['amount'] * -1)) // Check against actual value
|
||||||
|
) {
|
||||||
unset($aListTransactions[$key]);
|
unset($aListTransactions[$key]);
|
||||||
$found++;
|
$found++;
|
||||||
$bFound = true;
|
$bFound = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user