fix company-required check for good now :P

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2018-02-20 19:11:33 +01:00
parent eabc78c84f
commit b9653c5abd

View File

@@ -97,7 +97,7 @@ class Customers extends ApiCommand implements ResourceEntity
$name = $this->getParam('name', true, '');
$firstname = $this->getParam('firstname', true, '');
$company_required = (! empty($name) && empty($firstname)) || (empty($name) && ! empty($firstname)) || (empty($name) && empty($firstname));
$company = $this->getParam('company', $company_required, '');
$company = $this->getParam('company', ($company_required ? false : true), '');
$street = $this->getParam('street', true, '');
$zipcode = $this->getParam('zipcode', true, '');
$city = $this->getParam('city', true, '');