if ( !is_user_logged_in() && (!current_user_can(‘administrator’) || !current_user_can(‘shop_manager’) ) ){
wp_redirect( site_url() ); exit;
}

![]() |
India Cultural Center and Temple 12005 Highway 64 E., Eads, TN 38028-9314 Phone: (901) 202-6070; E-mail: [email protected] A not-for-profit, section 501(c)(3); Tax Id: 58-1522313 |
2017 Dwiteeya Kumbhabhishekam Account Receivables Report
[insert_php]echo date(“F j, Y”);[/insert_php]
Sponsorship | Sponsors | Pledged | Paid | Balance |
---|---|---|---|---|
” . str_replace(‘$’, ‘$ ‘, ($page->name)) . “ | ” . ($page->count) . “ | $ ” . number_format($page->pledged) . “ | $ ” . number_format( $payments[$page->id] ) . “ | $ ” . number_format( $page->pledged – $payments[$page->id] ) . “ |
Totals | ” . $grand_total_pledge_count . “ | $ ” . number_format($grand_total_pledged) . “ | $ ” . number_format( $grand_total_paid ) . “ | $ ” . number_format( $grand_total_balance ) . “ |
SELECT first_name as FirstName, last_name as LastName, Email, Phone, f.name as Sponsorship,
sum(amount) as Pledged,
(select sum(actual_amount) from civicrm_pledge_payment where pledge_id=a.id and status_id=1) as Paid,
sum(amount)-(select sum(actual_amount) from civicrm_pledge_payment where pledge_id=a.id and status_id=1) as Balance
FROM civicrm_contact c, civicrm_pledge a, civicrm_financial_type f, civicrm_email e, civicrm_phone ph
WHERE c.id=a.contact_id and a.financial_type_id=f.id and status_id !=3 and create_date>='” . $pledged_date .”‘
and c.id=e.contact_id and c.id=ph.contact_id and e.is_primary=1 and ph.is_primary=1
and f.id in(“. $fi_types. “)
GROUP BY a.contact_id, f.id
ORDER BY display_name, f.name, Balance desc
“;
$_SESSION[“sponsors_query”] = $query;
[/insert_php]