From f6fcfeae06fc277fb218c816f47a2f89f2f0ee6c Mon Sep 17 00:00:00 2001 From: yuri Date: Wed, 13 Dec 2017 15:21:15 +0200 Subject: [PATCH] ability to import number field type --- application/Espo/Hooks/Common/NextNumber.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/application/Espo/Hooks/Common/NextNumber.php b/application/Espo/Hooks/Common/NextNumber.php index 13646169b6..68876607f2 100644 --- a/application/Espo/Hooks/Common/NextNumber.php +++ b/application/Espo/Hooks/Common/NextNumber.php @@ -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));