1
0
mirror of synced 2024-11-21 21:06:07 +03:00

Merge pull request #78 from azgalot/master

Поддержка корпоративных клиентов и их компаний при работе с польз. полями
This commit is contained in:
Alex Lushpai 2019-12-17 14:15:57 +03:00 committed by GitHub
commit 73b5b8e1df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,9 +78,12 @@ trait CustomFields
); );
} }
if (empty($entity) || !in_array($entity, ['customer', 'order'])) { if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`' sprintf(
'Parameter `entity` must contain a data & value must be %s',
'`order`, `customer`, `customer_corporate` or `company`'
)
); );
} }
@ -108,9 +111,12 @@ trait CustomFields
); );
} }
if (empty($entity) || !in_array($entity, ['customer', 'order'])) { if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`' sprintf(
'Parameter `entity` must contain a data & value must be %s',
'`order`, `customer`, `customer_corporate` or `company`'
)
); );
} }
@ -138,9 +144,12 @@ trait CustomFields
); );
} }
if (empty($entity) || !in_array($entity, ['customer', 'order'])) { if (empty($entity) || !in_array($entity, ['customer', 'order', 'customer_corporate', 'company'])) {
throw new \InvalidArgumentException( throw new \InvalidArgumentException(
'Parameter `entity` must contain a data & value must be `order` or `customer`' sprintf(
'Parameter `entity` must contain a data & value must be %s',
'`order`, `customer`, `customer_corporate` or `company`'
)
); );
} }