function uc_payment_balance in Ubercart 7.3
Same name and namespace in other branches
- 8.4 payment/uc_payment/uc_payment.module \uc_payment_balance()
- 5 payment/uc_payment/uc_payment.module \uc_payment_balance()
- 6.2 payment/uc_payment/uc_payment.module \uc_payment_balance()
Returns the balance of payments on an order.
6 calls to uc_payment_balance()
- uc_credit_terminal in payment/
uc_credit/ uc_credit.admin.inc - Displays the credit card terminal page.
- uc_credit_terminal_form in payment/
uc_credit/ uc_credit.admin.inc - Displays the credit card terminal form for administrators.
- uc_order_pane_payment in payment/
uc_payment/ uc_payment_order_pane.inc - Handles the Payment order pane.
- uc_payment_condition_order_balance in payment/
uc_payment/ uc_payment.rules.inc - Condition: Check the current order balance.
- uc_payment_pack_receive_check_form in payment/
uc_payment_pack/ uc_payment_pack.admin.inc - Receives a check for an order and put in a clear date.
1 string reference to 'uc_payment_balance'
- uc_payment_entity_property_info in payment/
uc_payment/ uc_payment.info.inc - Implements hook_entity_property_info().
File
- payment/
uc_payment/ uc_payment.module, line 544
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;
}