diff --git a/workflow/engine/classes/class.pmTable.php b/workflow/engine/classes/class.pmTable.php index c7067c7c0..0d1748964 100755 --- a/workflow/engine/classes/class.pmTable.php +++ b/workflow/engine/classes/class.pmTable.php @@ -289,6 +289,14 @@ class PmTable $columnNode->setAttribute( 'size', $column->field_size ); } + if ($column->field_type == 'DECIMAL') { + if ($column->field_size > 2) { + $columnNode->setAttribute( 'scale', 2 ); + } else { + $columnNode->setAttribute( 'scale', 1 ); + } + } + $columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') ); // only define the primaryKey attribute if it is defined diff --git a/workflow/engine/methods/cases/cases_SaveData.php b/workflow/engine/methods/cases/cases_SaveData.php index d6eac639e..0a0a719e4 100644 --- a/workflow/engine/methods/cases/cases_SaveData.php +++ b/workflow/engine/methods/cases/cases_SaveData.php @@ -206,7 +206,7 @@ try { die(); } } - $idPmtable = $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable']; + $idPmtable = isset($oForm->fields[$id]->pmconnection->pmtable) && $oForm->fields[$id]->pmconnection->pmtable != '' ? $oForm->fields[$id]->pmconnection->pmtable : $oForm->fields[$id]->owner->tree->children[0]->attributes['pmtable']; if (!($oAdditionalTables->updateDataInTable($idPmtable, $newValues ))) { //<--This is to know if it is a new registry on the PM Table @@ -289,13 +289,13 @@ try { $oFolder = new AppFolder(); //***Validating the file allowed extensions*** - $res = G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]); - if($res->status == 0){ - $message = $res->message; - G::SendMessageText( $message, "ERROR" ); - $backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] ); - G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] ); - die(); + $res = G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]); + if($res->status == 0){ + $message = $res->message; + G::SendMessageText( $message, "ERROR" ); + $backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] ); + G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] ); + die(); } //--- Validate Filesize of $_FILE diff --git a/workflow/engine/templates/pmTables/edit.js b/workflow/engine/templates/pmTables/edit.js index c4453ba1a..ce00cce91 100644 --- a/workflow/engine/templates/pmTables/edit.js +++ b/workflow/engine/templates/pmTables/edit.js @@ -1008,7 +1008,7 @@ function editorFieldsEnableDisable(fieldTypeValue, fieldNull, fieldPrimaryKey, f var swI = 1; //Date - if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIME") { + if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIMESTAMP" || fieldTypeValue == "TIME") { swSize = 0; //Disable swPK = 0; swAI = 0;