uc_payment_balance
Drupal 7 uc_payment_balance($order)
Returns the balance of payments on an order.
7 calls to uc_payment_balance()
File
- sites/
all/ modules/ ubercart/ payment/ uc_payment/ uc_payment.module, line 487 - Defines the payment API that lets payment modules interact with Ubercart.
Code
function uc_payment_balance($order) {
$total = $order->order_total;
$payments = uc_payment_load_payments($order->order_id);
if ($payments === FALSE) {
return $total;
}
foreach ($payments as $payment) {
$total -= $payment->amount;
}
return $total;
}

