From 06ccfd9add55d9dbfc375275fa82ac9ec2bfc7d0 Mon Sep 17 00:00:00 2001 From: RenCurs <34103666+RenCurs@users.noreply.github.com> Date: Fri, 2 Apr 2021 11:58:44 +0300 Subject: [PATCH] Create customer without contact (#189) --- intaro.retailcrm/classes/general/CorporateCustomerBuilder.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intaro.retailcrm/classes/general/CorporateCustomerBuilder.php b/intaro.retailcrm/classes/general/CorporateCustomerBuilder.php index 3176a01d..dc087c67 100644 --- a/intaro.retailcrm/classes/general/CorporateCustomerBuilder.php +++ b/intaro.retailcrm/classes/general/CorporateCustomerBuilder.php @@ -203,6 +203,10 @@ class CorporateCustomerBuilder extends AbstractBuilder implements RetailcrmBuild $this->customerBuilder->setDataCrm($this->dataCrm['contact'])->build(); $this->corporateContact = $this->customerBuilder->getCustomer(); $this->customer = $this->customerBuilder->getCustomer(); + } elseif (isset($this->dataCrm['customer'])) { + $this->customerBuilder->setDataCrm($this->dataCrm['customer'])->build(); + $this->corporateContact = $this->customerBuilder->getCustomer(); + $this->customer = $this->customerBuilder->getCustomer(); } else { $this->corporateContact = null; $this->customer = null;