add payment complete flag to payment report
This commit is contained in:
@@ -262,14 +262,16 @@ function booking_report_paypal_payments() {
|
|||||||
$total_fees = 0;
|
$total_fees = 0;
|
||||||
|
|
||||||
$header = array('Node Id', 'Name', 'Email', 'Payment Date', 'Gross Payment', 'Currency',
|
$header = array('Node Id', 'Name', 'Email', 'Payment Date', 'Gross Payment', 'Currency',
|
||||||
'Paypal Fee', 'Invoice', 'Payment Status', 'Payer ID', 'Item Name', 'IPN track ID');
|
'Paypal Fee', 'Invoice', 'Payment Status', 'Payer ID', 'Item Name', 'IPN track ID', 'Payment Complete');
|
||||||
$rows = array();
|
$rows = array();
|
||||||
|
|
||||||
//fetch the payment table
|
//fetch the payment table
|
||||||
$query = db_select('booking_payment', 'pa')
|
$query = db_select('booking_payment', 'pa');
|
||||||
->condition('pa.booking_eventid', $event->eid,'=')
|
$query->join('booking_person', 'p', 'pa.booking_person_nid = p.nid');
|
||||||
->fields('pa');
|
$query->fields('pa')
|
||||||
$result = $query->execute();
|
->fields('p', array('booking_payment_complete'))
|
||||||
|
->condition('pa.booking_eventid', $event->eid,'=');
|
||||||
|
$result = $query->execute();
|
||||||
|
|
||||||
//$result = db_query("SELECT * FROM {booking_person} p WHERE p.booking_event_id = :eid",
|
//$result = db_query("SELECT * FROM {booking_person} p WHERE p.booking_event_id = :eid",
|
||||||
// array(':eid' => $event->eid));
|
// array(':eid' => $event->eid));
|
||||||
@@ -287,7 +289,8 @@ function booking_report_paypal_payments() {
|
|||||||
t($person->booking_payment_status),
|
t($person->booking_payment_status),
|
||||||
t($person->booking_payer_id),
|
t($person->booking_payer_id),
|
||||||
t($person->booking_item_name),
|
t($person->booking_item_name),
|
||||||
t($person->booking_ipn_track_id)
|
t($person->booking_ipn_track_id),
|
||||||
|
t($person->booking_payment_complete),
|
||||||
);
|
);
|
||||||
$total_paid += $person->booking_mc_gross;
|
$total_paid += $person->booking_mc_gross;
|
||||||
$total_fees += $person->booking_mc_fee;
|
$total_fees += $person->booking_mc_fee;
|
||||||
|
Reference in New Issue
Block a user