Mod to not show free signups?

Discussion in 'Customization & add-ons' started by XUnleash, Dec 1, 2007.

  1. XUnleash

    XUnleash aMember Pro Customer

    Joined:
    Aug 29, 2006
    Messages:
    34
    In the main admin panel, it shows # of completed payments.. but includes free signups. Is there a way to modify this so that completed payments includes only payments > 0.0?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    in /amember/admin/index.php you need to modify this:
    $q = $db->query("SELECT FROM_DAYS(TO_DAYS(tm_added)) as date,
    count(payment_id) as added_count, sum(amount) as added_amount
    FROM {$db->config[prefix]}payments p
    WHERE tm_added BETWEEN '$beg_tm' AND '$end_tm'
    GROUP BY date
    ");

    to
    $q = $db->query("SELECT FROM_DAYS(TO_DAYS(tm_added)) as date,
    count(payment_id) as added_count, sum(amount) as added_amount
    FROM {$db->config[prefix]}payments p
    WHERE tm_added BETWEEN '$beg_tm' AND '$end_tm' and amount >0
    GROUP BY date
    ");

    and this:
    $q = $db->query("SELECT FROM_DAYS(TO_DAYS(tm_completed)) as date,
    count(payment_id) as completed_count, sum(amount) as completed_amount
    FROM {$db->config[prefix]}payments p
    WHERE tm_completed BETWEEN '$beg_tm' AND '$end_tm'
    AND completed>0
    GROUP BY date
    ");

    to
    $q = $db->query("SELECT FROM_DAYS(TO_DAYS(tm_completed)) as date,
    count(payment_id) as completed_count, sum(amount) as completed_amount
    FROM {$db->config[prefix]}payments p
    WHERE tm_completed BETWEEN '$beg_tm' AND '$end_tm' and amount >0
    AND completed>0
    GROUP BY date
    ");

Share This Page