You are here

function commerce_gc_balance_total_statuses in Commerce GC 7

Get all statuses in a particular state

Parameters

type $states:

Return value

type

3 calls to commerce_gc_balance_total_statuses()
commerce_gc_balance_total_status_names in ./commerce_gc.module
Get a list of statuses, by name, that are eligible to be counted as part of a giftcard's transaction balance.
commerce_gc_cron in ./commerce_gc.module
Implements hook_cron().
commerce_gc_giftcard_balance in ./commerce_gc.module
Compute the balance for a particular giftcard coupon.

File

./commerce_gc.module, line 126
Provides Giftcard coupon bundle, Giftcard Transaction entity and basic user interface elements.

Code

function commerce_gc_balance_total_statuses() {
  $names = array();
  foreach (commerce_gc_transaction_statuses() as $name => $status) {
    if (!empty($status['total'])) {
      $names[] = $name;
    }
  }
  return $names;
}