ability to import number field type

This commit is contained in:
yuri
2017-12-13 15:21:15 +02:00
parent 11376e3a09
commit f6fcfeae06
@@ -64,6 +64,11 @@ class NextNumber extends \Espo\Core\Hooks\Base
foreach ($fieldDefs as $fieldName => $defs) {
if (isset($defs['type']) && $defs['type'] === 'number') {
if (!empty($options['import'])) {
if ($entity->has($fieldName)) {
continue;
}
}
if (!$entity->isNew()) {
if ($entity->isAttributeChanged($fieldName)) {
$entity->set($fieldName, $entity->getFetched($fieldName));