BUG 8250 "Grid Report Table not being saved" SOLVED
* the problem was happening when are saving more than one pm report tables, and mixed for normal and grids But it is fixed now!
This commit is contained in:
@@ -624,8 +624,6 @@ class AdditionalTables extends BaseAdditionalTables {
|
||||
|
||||
switch ($row['ADD_TAB_TYPE']) { //switching by report table type
|
||||
case 'NORMAL':
|
||||
$caseData = array_change_key_case($caseData, CASE_UPPER);
|
||||
|
||||
// parsing empty values to null
|
||||
foreach ($caseData as $i => $v) {
|
||||
$caseData[$i] = $v === '' ? NULL : $v;
|
||||
@@ -633,7 +631,7 @@ class AdditionalTables extends BaseAdditionalTables {
|
||||
|
||||
if (is_array($records) && count($records) > 0) { // if the record already exists on the report table
|
||||
foreach ($records as $record) { //update all records
|
||||
$record->fromArray($caseData, BasePeer::TYPE_FIELDNAME);
|
||||
$record->fromArray(array_change_key_case($caseData, CASE_UPPER), BasePeer::TYPE_FIELDNAME);
|
||||
if ($record->validate()) {
|
||||
$record->save();
|
||||
}
|
||||
@@ -641,7 +639,7 @@ class AdditionalTables extends BaseAdditionalTables {
|
||||
}
|
||||
else { // there are not any record for this application on the table, then create it
|
||||
eval('$obj = new ' . $className . '();');
|
||||
$obj->fromArray($caseData, BasePeer::TYPE_FIELDNAME);
|
||||
$obj->fromArray(array_change_key_case($caseData, CASE_UPPER), BasePeer::TYPE_FIELDNAME);
|
||||
$obj->setAppUid($appUid);
|
||||
$obj->setAppNumber($appNumber);
|
||||
$obj->save();
|
||||
|
||||
Reference in New Issue
Block a user