diff --git a/bin/frontend/controls/frontendUsers/BusinessType.js b/bin/frontend/controls/frontendUsers/BusinessType.js index cf454eb6bdee3bbdbf9397060c3764df46457667..7994cfda27ec4e16677c791c777ca072a363162f 100644 --- a/bin/frontend/controls/frontendUsers/BusinessType.js +++ b/bin/frontend/controls/frontendUsers/BusinessType.js @@ -97,6 +97,7 @@ define('package/quiqqer/erp/bin/frontend/controls/frontendUsers/BusinessType', [ height : size.height }, { callback: function () { + Node.style.height = null; resolve(); } }); diff --git a/src/QUI/ERP/Accounting/Article.php b/src/QUI/ERP/Accounting/Article.php index 7b5e8785a2144216bdbd85c4d5fc3e04c6ad4a34..5a35b3f651b6997eb7bb4d3d5801fbada50660f6 100644 --- a/src/QUI/ERP/Accounting/Article.php +++ b/src/QUI/ERP/Accounting/Article.php @@ -145,6 +145,8 @@ public function __construct($attributes = []) { $defaults = [ 'id', + 'uuid', + 'productSetParentUuid', 'articleNo', 'gtin', 'title', @@ -252,6 +254,26 @@ public function getId() return 0; } + /** + * Return the Article UUID + * + * @return string|null + */ + public function getUuid(): ?string + { + return !empty($this->attributes['uuid']) ? $this->attributes['uuid'] : null; + } + + /** + * Return the UUID of a parent article, if this article is part of a product set. + * + * @return string|null + */ + public function getProductSetParentUuid(): ?string + { + return !empty($this->attributes['productSetParentUuid']) ? $this->attributes['productSetParentUuid'] : null; + } + /** * Return the Article Number * @@ -699,6 +721,8 @@ public function toArray(): array return [ // article data 'id' => $this->getId(), + 'uuid' => $this->getUuid(), + 'productSetParentUuid' => $this->getProductSetParentUuid(), 'title' => $this->getTitle(), 'articleNo' => $this->getArticleNo(), 'gtin' => $this->getGTIN(), diff --git a/src/QUI/ERP/FrontendUsers/createAddressBegin.html b/src/QUI/ERP/FrontendUsers/createAddressBegin.html index 8b5e5436302488bba81bfc9a914a48540bd834ca..eb661897e17ad1ee6b7b0ac3b93f50cc955eb5c4 100644 --- a/src/QUI/ERP/FrontendUsers/createAddressBegin.html +++ b/src/QUI/ERP/FrontendUsers/createAddressBegin.html @@ -25,6 +25,7 @@ name="company" class="quiqqer-frontendUsers-userdata-field" autocomplete="organization" + placeholder="{locale group='quiqqer/erp' var='control.profile.CustomerData.company'}" {$r} /> </label> diff --git a/src/QUI/ERP/FrontendUsers/createAddressEnd.html b/src/QUI/ERP/FrontendUsers/createAddressEnd.html index df5994ea296e74865c721de542a603b0e0b8d75f..d32c977847a6a305243637b240c3cfe944f39dcf 100644 --- a/src/QUI/ERP/FrontendUsers/createAddressEnd.html +++ b/src/QUI/ERP/FrontendUsers/createAddressEnd.html @@ -9,6 +9,7 @@ name="vatId" class="quiqqer-frontendUsers-userdata-field" value="{$User->getAttribute('quiqqer.erp.euVatId')|escape:'html'}" + placeholder="{locale group='quiqqer/order' var='vatId'}" /> </label> {/if} diff --git a/src/QUI/ERP/FrontendUsers/editAddressBegin.html b/src/QUI/ERP/FrontendUsers/editAddressBegin.html index 426f34d403731f32602f802627f9af92a872678d..0d380627263bbeceac8f685c3be51e728b3652e7 100644 --- a/src/QUI/ERP/FrontendUsers/editAddressBegin.html +++ b/src/QUI/ERP/FrontendUsers/editAddressBegin.html @@ -26,6 +26,7 @@ class="quiqqer-frontendUsers-userdata-field" autocomplete="organization" value="{$Address->getAttribute('company')|escape:'html'}" + placeholder="{locale group='quiqqer/erp' var='control.profile.CustomerData.company'}" {$r} /> </label> diff --git a/src/QUI/ERP/FrontendUsers/editAddressEnd.html b/src/QUI/ERP/FrontendUsers/editAddressEnd.html index df5994ea296e74865c721de542a603b0e0b8d75f..d32c977847a6a305243637b240c3cfe944f39dcf 100644 --- a/src/QUI/ERP/FrontendUsers/editAddressEnd.html +++ b/src/QUI/ERP/FrontendUsers/editAddressEnd.html @@ -9,6 +9,7 @@ name="vatId" class="quiqqer-frontendUsers-userdata-field" value="{$User->getAttribute('quiqqer.erp.euVatId')|escape:'html'}" + placeholder="{locale group='quiqqer/order' var='vatId'}" /> </label> {/if} diff --git a/src/QUI/ERP/User.php b/src/QUI/ERP/User.php index 74d3d2dd5b8ee360a0e33b24bbd0fcb1f84bc0ac..193fdcca01cf76ba19d6adcd0724ae8ef1fa0f67 100644 --- a/src/QUI/ERP/User.php +++ b/src/QUI/ERP/User.php @@ -463,6 +463,17 @@ public function isCompany() */ public function isNetto() { + try { + $Package = QUI::getPackage('quiqqer/erp'); + $Config = $Package->getConfig(); + + if ($Config->getValue('general', 'businessType') === 'B2B') { + return QUI\ERP\Utils\User::IS_NETTO_USER; + } + } catch (QUI\Exception $Exception) { + } + + if ($this->existsAttribute('erp.isNettoUser')) { return (int)$this->getAttribute('erp.isNettoUser') === QUI\ERP\Utils\User::IS_NETTO_USER; } diff --git a/src/QUI/ERP/Utils/User.php b/src/QUI/ERP/Utils/User.php index 99094fea159fa74f2024838e9ea38d8cb2bc83bb..912bb92c75c5b1d9e00fee1c86493d2610216cf0 100644 --- a/src/QUI/ERP/Utils/User.php +++ b/src/QUI/ERP/Utils/User.php @@ -68,6 +68,18 @@ public static function getBruttoNettoUserStatus(UserInterface $User): int return self::$userBruttoNettoStatus[$uid]; } + try { + $Package = QUI::getPackage('quiqqer/erp'); + $Config = $Package->getConfig(); + + if ($Config->getValue('general', 'businessType') === 'B2B') { + self::$userBruttoNettoStatus[$uid] = QUI\ERP\Utils\User::IS_NETTO_USER; + return self::$userBruttoNettoStatus[$uid]; + } + } catch (QUI\Exception $Exception) { + } + + if (QUI::getUsers()->isSystemUser($User)) { self::$userBruttoNettoStatus[$uid] = self::IS_NETTO_USER; @@ -75,7 +87,11 @@ public static function getBruttoNettoUserStatus(UserInterface $User): int } if ($User instanceof QUI\ERP\User && $User->hasBruttoNettoStatus()) { - self::$userBruttoNettoStatus[$uid] = $User->isNetto(); + if ($User->isNetto()) { + self::$userBruttoNettoStatus[$uid] = self::IS_NETTO_USER; + } else { + self::$userBruttoNettoStatus[$uid] = self::IS_BRUTTO_USER; + } return self::$userBruttoNettoStatus[$uid]; }