PM-595 Creacion de Dynaforms a traves de PMtables

Creacion de Dynaforms a traves de PMtables
This commit is contained in:
norahmollo
2014-10-16 14:08:25 -04:00
parent 0b55675cab
commit 2f803edbd9
3 changed files with 17 additions and 9 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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;