1
0
mirror of synced 2024-11-24 14:26:06 +03:00

Добавлена поддержка копроративных клиентов и их компаний при работе с пользовательскими полями

This commit is contained in:
Андрей Артаханов 2019-12-16 20:08:57 +03:00
parent 29fd360e4f
commit 170e0b8f34

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(
'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(
'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(
'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`'
)
);
}