コード例 #1
0
/*
 * Get FORM variables
 */
extract(FormVariables::GetVariables(array('action', 'id', 'user_date_id', 'user_id', 'date', 'udt_data')));
if (isset($udt_data)) {
    if ($udt_data['total_time'] != '') {
        $udt_data['total_time'] = TTDate::parseTimeUnit($udt_data['total_time']);
    }
}
$udtf = new UserDateTotalFactory();
$action = strtolower($action);
switch ($action) {
    case 'submit':
        Debug::Text('Submit!', __FILE__, __LINE__, __METHOD__, 10);
        //Debug::setVerbosity(11);
        $udtf->setId($udt_data['id']);
        $udtf->setUserDateId($udt_data['user_date_id']);
        $udtf->setStatus($udt_data['status_id']);
        $udtf->setType($udt_data['type_id']);
        $udtf->setBranch($udt_data['branch_id']);
        $udtf->setDepartment($udt_data['department_id']);
        if (isset($udt_data['job_id'])) {
            $udtf->setJob($udt_data['job_id']);
        }
        if (isset($udt_data['job_item_id'])) {
            $udtf->setJobItem($udt_data['job_item_id']);
        }
        if (isset($udt_data['quantity'])) {
            $udtf->setQuantity($udt_data['quantity']);
        }
        if (isset($udt_data['bad_quantity'])) {