BUG 8888 "Ventana DATA de report table no termina de cargar..." SOLVED

- there was no validations for native & custom date files while data preview for report tables
- validations added and posibles empty strings now are mapped to NULL on db.
This commit is contained in:
Erik Amaru Ortiz
2012-03-30 11:56:09 -04:00
parent 5bdae6af8b
commit 3d490dd933
2 changed files with 21 additions and 0 deletions

View File

@@ -565,6 +565,25 @@ class AdditionalTables extends BaseAdditionalTables {
// getting the case data
$caseData = unserialize($row['APP_DATA']);
// quick fix
// map all empty values as NULL for Database
foreach ($caseData as $dKey => $dValue) {
if (!is_array($dValue)) { // normal fields
if (trim($dValue) === '') {
$caseData[$dKey] = NULL;
}
}
else { // grids
foreach ($caseData[$dKey] as $dIndex => $dRow) {
foreach ($dRow as $k => $v) {
if (trim($v) === '') {
$caseData[$dKey][$dIndex][$k] = NULL;
}
}
}
}
}
if ($type == 'GRID') {
list($gridName, $gridUid) = explode('-', $gridKey);
$gridData = isset($caseData[$gridName]) ? $caseData[$gridName] : array();

View File

@@ -92,6 +92,8 @@ Ext.onReady(function(){
switch (tableDef.FIELDS[i].FLD_TYPE) {
case 'DATE':
columnRenderer = function (value) {
if (!value) return;
if (!value.dateFormat)
return value;
else