Beispiel #1
0
}
if (isset($_REQUEST['return_id'])) {
    $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
}
// handle Create $module then Cancel
//if (empty($_REQUEST['return_id'])) {
//$xtpl->assign("RETURN_ACTION", 'index');
//}
$xtpl->assign("JAVASCRIPT", get_set_focus_js() . get_validate_record_js() . get_chooser_js());
$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("NAME", $focus->name);
$xtpl->assign("START_DATE", $focus->start_date);
$xtpl->assign("END_DATE", $focus->end_date);
if ($focus->is_fiscal_year == 1) {
    $xtpl->assign("FISCAL_YEAR_CHECKED", "checked");
    $xtpl->assign("FISCAL_OPTIONS_DISABLED", "disabled");
}
global $timedate;
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
$xtpl->assign("USER_DATEFORMAT", '(' . $timedate->get_user_date_format() . ')');
$fiscal_year_dom = TimePeriod::get_fiscal_year_dom();
array_unshift($fiscal_year_dom, '');
if (isset($focus->parent_id)) {
    $xtpl->assign("FISCAL_OPTIONS", get_select_options_with_id($fiscal_year_dom, $focus->parent_id));
} else {
    $xtpl->assign("FISCAL_OPTIONS", get_select_options_with_id($fiscal_year_dom, ''));
}
$xtpl->assign("THEME", SugarThemeRegistry::current()->__toString());
$xtpl->parse("main");
$xtpl->out("main");