$delete = FALSE;
        }
        $psealf = new PayStubEntryAccountListFactory();
        foreach ($ids as $id) {
            $psealf->getByIdAndCompanyId($id, $current_company->getId());
            foreach ($psealf as $psea_obj) {
                $psea_obj->setDeleted($delete);
                if ($psea_obj->isValid()) {
                    $psea_obj->Save();
                }
            }
        }
        Redirect::Page(URLBuilder::getURL(NULL, 'PayStubEntryAccountList.php'));
        break;
    default:
        BreadCrumb::setCrumb($title);
        $psealf = new PayStubEntryAccountListFactory();
        $psealf->getByCompanyId($current_company->getId());
        $pager = new Pager($psealf);
        $status_options = $psealf->getOptions('status');
        $type_options = $psealf->getOptions('type');
        foreach ($psealf as $psea_obj) {
            $rows[] = array('id' => $psea_obj->getId(), 'status_id' => $psea_obj->getStatus(), 'status' => $status_options[$psea_obj->getStatus()], 'type_id' => $psea_obj->getType(), 'type' => $type_options[$psea_obj->getType()], 'name' => $psea_obj->getName(), 'ps_order' => $psea_obj->getOrder(), 'debit_account' => $psea_obj->getDebitAccount(), 'credit_account' => $psea_obj->getCreditAccount(), 'deleted' => $psea_obj->getDeleted());
        }
        $smarty->assign_by_ref('rows', $rows);
        $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('pay_stub/PayStubEntryAccountList.tpl');