diff --git a/composer.json b/composer.json index 8165b1d527f3df9dd0d08069c2d2168a9160c19e..b46b73d20f7afe9fe99cf575a59c16ec05a30d51 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "php": "^8", "quiqqer/core": "^2", "quiqqer/utils": "^2", - "quiqqer/watcher": "^2", "quiqqer/translator": "^2", "quiqqer/employee": "^2", "quiqqer/customer": "^2", @@ -32,6 +31,9 @@ "quiqqer/erp-accounting-templates": "^2", "quiqqer/areas": "^2" }, + "suggest": { + "quiqqer/watcher": "QUIQQER Watcher module (kind of logger)" + }, "autoload": { "psr-4": { "QUI\\ERP\\": "src/QUI/ERP" diff --git a/src/QUI/ERP/Accounting/Article.php b/src/QUI/ERP/Accounting/Article.php index 12b9b58e5d9225472e14939ac9042bf161ba8fa8..457140cd369f5b636f01dd8b7c4b95f820a8a902 100644 --- a/src/QUI/ERP/Accounting/Article.php +++ b/src/QUI/ERP/Accounting/Article.php @@ -567,7 +567,7 @@ public function getQuantityUnit(QUI\Locale $Locale = null): string if (isset($options['entries'][$unitId])) { $titles = $options['entries'][$unitId]['title']; - if ($titles[$current]) { + if (!empty($titles[$current])) { return $titles[$current]; } } diff --git a/src/QUI/ERP/Defaults.php b/src/QUI/ERP/Defaults.php index 0d0ac20515ad215ff3ae6185ff162ce207ea2ccd..de420bbcd24205dacaaa08e694c51fe75f1236a3 100644 --- a/src/QUI/ERP/Defaults.php +++ b/src/QUI/ERP/Defaults.php @@ -201,7 +201,7 @@ public static function getTimestampFormat(bool|string $lang = false): int|string return self::$timestampFormat[$lang]; } - self::$timestampFormat[$lang] = '%c'; + self::$timestampFormat[$lang] = 'MMM dd, yyyy, hh:mm:ss'; try { $Package = QUI::getPackage('quiqqer/erp'); @@ -237,7 +237,7 @@ public static function getDateFormat(bool|string $lang = false): string return self::$dateFormat[$lang]; } - self::$dateFormat[$lang] = '%D'; + self::$dateFormat[$lang] = 'MMM dd, yyyy'; try { $Package = QUI::getPackage('quiqqer/erp'); @@ -249,6 +249,7 @@ public static function getDateFormat(bool|string $lang = false): string } $value = $Config->get('dateFormat', $lang); + $value = trim($value); if (!empty($value)) { self::$dateFormat[$lang] = $value;