You are here

function pay_activity::balance in Pay 6

Same name and namespace in other branches
  1. 7 includes/handlers/pay_activity.inc \pay_activity::balance()

The transaction balance as of this payment's completion.

File

includes/handlers/pay_activity.inc, line 99
A base class for payment activities.

Class

pay_activity
@file A base class for payment activities.

Code

function balance() {
  return (double) db_result(db_query("SELECT t.total - SUM(a.transaction_total)\n      FROM {pay_activity} a\n      INNER JOIN {pay_transaction} t USING (pxid)\n      WHERE t.pxid = %d AND a.paid <= %d", $this->pxid, $this->paid));
}