/** * * MemberMouse(TM) (http://www.membermouse.com) * (c) MemberMouse, LLC. All rights reserved. */ $view = new MM_CommissionProfilesView(); $dataGrid = new MM_DataGrid($_REQUEST, "id", "desc", 10); $data = $view->getData($dataGrid); $dataGrid->setTotalRecords($data); $dataGrid->recordName = "commission profile"; $rows = array(); foreach ($data as $key => $item) { $profile = new MM_CommissionProfile($item->id); // Default Flag $defaultDescription = "Any commission profile can be marked as the default commission profile. The default commission profile is used when a customer purchases any product in MemberMouse. The default profile can be overridden by editing a product, going to the Commissions section and selecting another commission profile from the drop down."; if ($profile->isDefault()) { $defaultFlag = MM_Utils::getDefaultFlag("Default Commission Profile\n\n{$defaultDescription}", "", true, 'margin-right:5px;'); } else { $defaultFlag = MM_Utils::getDefaultFlag("Set as Default Commission Profile\n\n{$defaultDescription}", "onclick='mmjs.setDefault(\"" . $item->id . "\")'", false, 'margin-right:5px;'); } if ($profile->initialCommissionEnabled()) { $initialCommission = MM_Utils::getCheckIcon(); } else { $initialCommission = MM_Utils::getCrossIcon(); } if ($profile->rebillCommissionsEnabled()) { $rebillCommissions = MM_Utils::getCheckIcon() . " "; $rebillCommissions .= "<span style='font-family:courier;'>{$profile->getRebillConfigDescription()}</span>"; } else { $rebillCommissions = MM_Utils::getCrossIcon(); }