function uc_recurring_get_all_fees in UC Recurring Payments and Subscriptions 7.2
Same name and namespace in other branches
- 6.2 uc_recurring.module \uc_recurring_get_all_fees()
Get all fees is the system.
1 call to uc_recurring_get_all_fees()
- uc_recurring_admin in ./
uc_recurring.admin.inc - Displays a table for the administration of recurring fees.
File
- ./
uc_recurring.module, line 919 - Allows you to add a recurring fee to a product/SKU to handle subscription type services.
Code
function uc_recurring_get_all_fees($pager = FALSE, $order = '') {
$fees = array();
//$sql = "SELECT ru.*, u.name FROM {uc_recurring_users} ru LEFT JOIN {users} u ON u.uid=ru.uid" . $order;
$query = db_select('uc_recurring_users', 'ru');
if ($pager) {
$query
->extend('PagerDefault');
}
// add the order header
$query
->extend('TableSort')
->orderByHeader($order)
->fields('ru')
->fields('u', array(
'name',
))
->join('users', 'u', 'u.uid = ru.uid');
$result = $query
->execute();
foreach ($result as $fee) {
$fees[$fee->rfid] = $fee;
$fee->data = unserialize($fee->data);
}
return $fees;
}