Resulta que en el actual importador de datos de vTiger 8.3 hay un bug para cuando se traspasan presupuestos, pedidos o facturas que es un error de INVALID_ID_ATRIBUTE : el id especificado es invalido.
Pues bien se trata de aplicar un parche de actualización en la api de vTiger CRM para poder soportar la compatiblidad de importación de estos datos y que no tenga que dar un error 500 durante el proceso de importacion y que cortase la importación.
Las opciones para "parchear" las api de vTiger son estas:
Option 1: Modify include\Webservices\Utils.php
Replace the vtws_getIdComponents function with the following:
function vtws_getIdComponents($elementid){
return explode("x", $elementid);
}
Option 2: Modify include\Webservices\LineItem\VtigerInventoryOperation.php
In the constructFocusObject method, add a conditional check for id:
Original:
public function constructFocusObject($element) {
$focus = CRMEntity::getInstance($this->getMeta()->getTabName());
$fields = $focus->column_fields;
foreach ($fields as $fieldName => $fieldValue) {
$fieldValue = $element[$fieldName];
if (is_array($fieldValue)) {
$focus->column_fields[$fieldName] = $fieldValue;
} else if ($fieldValue !== null) {
$focus->column_fields[$fieldName] = decode_html($fieldValue);
}
}
$ids = vtws_getIdComponents($element['id']);
$focus->id = $ids[1];
return $focus;
}
Updated:
public function constructFocusObject($element) {
$focus = CRMEntity::getInstance($this->getMeta()->getTabName());
$fields = $focus->column_fields;
foreach ($fields as $fieldName => $fieldValue) {
$fieldValue = $element[$fieldName];
if (is_array($fieldValue)) {
$focus->column_fields[$fieldName] = $fieldValue;
} else if ($fieldValue !== null) {
$focus->column_fields[$fieldName] = decode_html($fieldValue);
}
}
if ($element['id']) {
$ids = vtws_getIdComponents($element['id']);
$focus->id = $ids[1];
}
return $focus;
}
jaloed24jaloed24
January 8 -1
Option 3: Modify include\Webservices\LineItem\VtigerInventoryOperation.php
comment line 32
//$this->triggerBeforeSaveEvents($sanitizedData, $eventManager);