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:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user