foreach ($clf as $c_obj) { $c_obj->setDeleted($delete); if ($c_obj->isValid()) { $c_obj->Save(); } } } } Redirect::Page(URLBuilder::getURL(NULL, 'CurrencyList.php')); break; default: BreadCrumb::setCrumb($title); $clf = new CurrencyListFactory(); $clf->getByCompanyId($current_company->getId(), $current_user_prefs->getItemsPerPage(), $page, NULL, $sort_array); $pager = new Pager($clf); $iso_code_options = $clf->getISOCodesArray(); $base_currency = FALSE; foreach ($clf as $c_obj) { if ($c_obj->getBase() === TRUE) { $base_currency = TRUE; } $rows[] = array('id' => $c_obj->GetId(), 'status_id' => $c_obj->getStatus(), 'name' => $c_obj->getName(), 'iso_code' => $c_obj->getISOCode(), 'currency_name' => Option::getByKey($c_obj->getISOCode(), $iso_code_options), 'conversion_rate' => $c_obj->getConversionRate(), 'auto_update' => $c_obj->getAutoUpdate(), 'is_base' => $c_obj->getBase(), 'is_default' => $c_obj->getDefault(), 'deleted' => $c_obj->getDeleted()); } $smarty->assign_by_ref('currencies', $rows); $smarty->assign_by_ref('base_currency', $base_currency); $smarty->assign_by_ref('sort_column', $sort_column); $smarty->assign_by_ref('sort_order', $sort_order); $smarty->assign_by_ref('paging_data', $pager->getPageVariables()); break; } $smarty->display('currency/CurrencyList.tpl');