Pages: [1]   Go Down
  Print  
Author Topic: Fix for Aurora: Received Income for every e-payment processor  (Read 337 times)
bprasetio
Global Moderator
Hero Member
*****
Offline Offline

Posts: 834


View Profile
« on: March 13, 2011, 05:41:50 PM »

Hello,

When you activate e-payment processors other than AlertPay and PayPal, the payment received from them are not listed in your Admin Overall Stat Page. its because the code is just limited to retrieve payment from AlertPay and PayPal only.

So, this code is to fix it, it can list other payment processors that are already received for the payment.

first, you need to find the code within admin2/stats.php file  
Quote
$total_ap=$Db1->querySingle("SELECT SUM(cost) AS total FROM ledger WHERE proc='Alertpay'","total");
$total_pp=$Db1->querySingle("SELECT SUM(cost) AS total FROM ledger WHERE proc='Paypal'","total");

Replace with this code:
Quote
$procsql=$Db1->query("SELECT proc, SUM(cost) AS total FROM ledger WHERE status=1 GROUP BY proc ORDER BY proc");
$proclist="";
while ($totalprocs=$Db1->fetch_array($procsql)) {
   $proclist.="
            <tr>
               <td class=\"tableHead\">Total $totalprocs[proc] Income</td>
               <td colspan=2 align=\"right\">$ ". number_format($totalprocs[total], 2) ."</td>
            </tr>
";
}

then find this code:
Quote
<tr>
               <td class=\"tableHead\">Total Alertpay Income</td>
               <td colspan=2 align=\"right\">$ $total_ap</td>
            </tr>
<tr>
               <td class=\"tableHead\">Total Paypal Income</td>
               <td colspan=2 align=\"right\">$ $total_pp</td>
            </tr>


Replace it with this code:
Quote
            $proclist
« Last Edit: March 13, 2011, 06:20:22 PM by bprasetio » Logged

Presenting MyGPT Group:

[WTS] Task Summary Addon
Upgrade to an SDR 3
cARRIE
Administrator
Hero Member
*****
Offline Offline

Posts: 1458



View Profile WWW
« Reply #1 on: March 13, 2011, 06:54:04 PM »

Nice job BP!  Smiley
Logged

757jterrell
Administrator
Hero Member
*****
Offline Offline

Posts: 1637



View Profile WWW
« Reply #2 on: March 17, 2011, 05:51:51 PM »

Excellent Idea,  I just added it to the SDR 3
Logged

Addons
Full Member
***
Offline Offline

Posts: 158


View Profile
« Reply #3 on: May 05, 2011, 05:30:11 PM »

great work  Cheesy

fixed...
Logged

Get a SDR 3 NOW at http://ptcfactory.info

The best and most up to date Aurora script in the market!!
Pages: [1]   Go Up
  Print  
 
Jump to: