diff --git a/src/QUI/ERP/Manufacturers.php b/src/QUI/ERP/Manufacturers.php index 33073a2773693f8cf6f72b8719251f3f5e993272..9b64886880b24533794d355e73474581f4c65e65 100644 --- a/src/QUI/ERP/Manufacturers.php +++ b/src/QUI/ERP/Manufacturers.php @@ -159,11 +159,11 @@ public static function createManufacturer( $Address->save(); - if (!$User->getAttribute('firstname') || $User->getAttribute('firstname') === '') { + if (empty($User->getAttribute('firstname'))) { $User->setAttribute('firstname', $address['firstname']); } - if (!$User->getAttribute('lastname') || $User->getAttribute('lastname') === '') { + if (empty($User->getAttribute('lastname'))) { $User->setAttribute('lastname', $address['lastname']); } } @@ -183,7 +183,7 @@ public static function createManufacturer( // Set random password and activate $User->setPassword(QUI\Security\Password::generateRandom(), $SystemUser); - $User->activate(false, $SystemUser); + $User->activate('', $SystemUser); return $User; } diff --git a/src/QUI/ERP/Process.php b/src/QUI/ERP/Process.php index cddd76a58a778a62ae2392246211a90ba053afb5..dcf28e61e83561d79cce22d272768cf3b3ea1620 100644 --- a/src/QUI/ERP/Process.php +++ b/src/QUI/ERP/Process.php @@ -31,19 +31,8 @@ class Process */ const PROCESS_ACTIVE_DATE = '2024-08-01 00:00:00'; - /** - * @var string - */ protected string $processId; - - /** - * @var null|array - */ protected ?array $transactions = null; - - /** - * @var null|QUI\ERP\Comments - */ protected ?Comments $History = null; /** @@ -166,7 +155,11 @@ class_exists('QUI\ERP\Accounting\Invoice\Invoice') $groups[$uuid][] = $Entity; if (class_exists('QUI\ERP\SalesOrders\Handler')) { - $salesOrder = $Entity->getPaymentData('salesOrder'); + $salesOrder = $Entity->getPaymentDataEntry('salesOrder'); + + if (empty($salesOrder)) { + $salesOrder = $Entity->getCustomDataEntry('salesOrder'); + } if ($salesOrder) { try { diff --git a/src/QUI/ERP/Processes.php b/src/QUI/ERP/Processes.php index ecb9a8666ff47268397e785bf7d9f8922b0111a2..a7c66bb3ba39ea276c879d7039b22a4c2da10956 100644 --- a/src/QUI/ERP/Processes.php +++ b/src/QUI/ERP/Processes.php @@ -43,6 +43,7 @@ public function getEntity($entityHash, $entityPlugin = false): ErpEntityInterfac if ($entityPlugin === false || $entityPlugin === 'quiqqer/booking') { try { // @todo quiqqer/booking + // @phpstan-ignore-next-line } catch (\Exception) { } } @@ -70,6 +71,7 @@ public function getEntity($entityHash, $entityPlugin = false): ErpEntityInterfac if ($entityPlugin === false || $entityPlugin === 'quiqqer/delivery-notes') { try { // @todo quiqqer/delivery-notes + // @phpstan-ignore-next-line } catch (\Exception) { } }