Skip to content
Code-Schnipsel Gruppen Projekte
Commit 0456f010 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next' into 'master'

Next

See merge request !5
Übergeordnete eaaa2633 42796342
Keine zugehörigen Branchen gefunden
Tags 1.3.0
3 Merge Requests!43Update 'next-3.x' with latest changes from 'main',!32Add QUIQQER Tooling,!5Next
Pipeline-Nr. 4553 bestanden
werden angezeigt mit 46 Ergänzungen und 44 Löschungen
include:
- project: 'quiqqer/stabilization/semantic-release'
file: '/ci-templates/.gitlab-ci.yml'
\ No newline at end of file
GPL-3.0+
PCSG QEL-1.0
\ No newline at end of file
......@@ -12,10 +12,11 @@
* @param integer $shippingId
* @return array
*/
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_activate',
function ($shippingId) {
$Shipping = new Factory();
$Shipping = new Factory();
$ShippingEntry = $Shipping->getChild($shippingId);
$ShippingEntry->activate();
......
......@@ -16,7 +16,7 @@
'package_quiqqer_shipping_ajax_backend_articleList_getShippingPriceFactor',
function ($shippingId) {
$Shipping = Shipping::getInstance()->getShippingEntry($shippingId);
return [
'title' => $Shipping->getTitle(),
'price' => $Shipping->getPrice()
......
......@@ -4,8 +4,8 @@
* This file contains package_quiqqer_shipping_ajax_backend_create
*/
use \QUI\ERP\Shipping\Types\Factory;
use \QUI\ERP\Shipping\Shipping;
use QUI\ERP\Shipping\Shipping;
use QUI\ERP\Shipping\Types\Factory;
/**
* Create a new shipping method
......@@ -17,7 +17,7 @@
function ($shippingType) {
$Type = Shipping::getInstance()->getShippingType($shippingType);
$Factory = new Factory();
$Factory = new Factory();
$Shipping = $Factory->createChild([
'shipping_type' => $Type->getType()
]);
......
......@@ -4,7 +4,7 @@
* This file contains package_quiqqer_shipping_ajax_backend_deactivate
*/
use \QUI\ERP\Shipping\Types\Factory;
use QUI\ERP\Shipping\Types\Factory;
/**
* Deactivate a shipping
......@@ -15,7 +15,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_deactivate',
function ($shippingId) {
$factory = new Factory();
$factory = new Factory();
$Shipping = $factory->getChild($shippingId);
$Shipping->deactivate();
......
......@@ -16,7 +16,7 @@
'package_quiqqer_shipping_ajax_backend_getShippingList',
function () {
$shippingEntries = Shipping::getInstance()->getShippingList();
$result = [];
$result = [];
foreach ($shippingEntries as $ShippingEntry) {
/* @var $ShippingEntry ShippingEntry */
......@@ -25,7 +25,7 @@ function () {
$current = QUI::getLocale()->getCurrent();
\usort($result, function ($a, $b) use ($current) {
usort($result, function ($a, $b) use ($current) {
$aTitle = $a['title'][$current];
$bTitle = $b['title'][$current];
......
......@@ -4,8 +4,7 @@
* This file contains package_quiqqer_shipping_ajax_backend_create
*/
use \QUI\ERP\Shipping\Rules\Factory;
use QUI\ERP\Shipping\Rules\Factory;
/**
* Create a new shipping method
......@@ -15,9 +14,9 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_create',
function ($rules) {
$rules = \json_decode($rules, true);
$rules = json_decode($rules, true);
$Factory = new Factory();
$Rule = $Factory->createChild($rules);
$Rule = $Factory->createChild($rules);
return $Rule->getId();
},
......
......@@ -5,7 +5,6 @@
*/
use QUI\ERP\Shipping\Rules\Factory;
use QUI\ExceptionStack;
/**
* Delete the shipping rule(s)
......@@ -15,10 +14,10 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_delete',
function ($ruleIds) {
$ruleIds = \json_decode($ruleIds, true);
$ruleIds = json_decode($ruleIds, true);
$Factory = new Factory();
if (!\is_array($ruleIds)) {
if (!is_array($ruleIds)) {
$ruleIds = [$ruleIds];
}
......
......@@ -14,7 +14,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_getList',
function ($options) {
$options = \json_decode($options, true);
$options = json_decode($options, true);
if (!is_array($options)) {
$options = [];
......@@ -44,8 +44,8 @@ function ($options) {
}
$Factory = QUI\ERP\Shipping\Rules\Factory::getInstance();
$Grid = new Grid();
$query = $Grid->parseDBParams($options);
$Grid = new Grid();
$query = $Grid->parseDBParams($options);
if (!isset($query['order'])) {
$query['order'] = 'priority DESC';
......@@ -68,8 +68,8 @@ function ($options) {
$count = $Factory->countChildren($query);
return [
'data' => $result,
'page' => (int)$options['page'],
'data' => $result,
'page' => (int)$options['page'],
'total' => $count
];
},
......
......@@ -12,12 +12,12 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_getRules',
function ($ruleIds) {
$ruleIds = \json_decode($ruleIds, true);
$Rules = QUI\ERP\Shipping\Rules\Factory::getInstance();
$ruleIds = json_decode($ruleIds, true);
$Rules = QUI\ERP\Shipping\Rules\Factory::getInstance();
$result = [];
if (!\is_array($ruleIds)) {
if (!is_array($ruleIds)) {
$ruleIds = [];
}
......@@ -30,7 +30,7 @@ function ($ruleIds) {
}
// sort by priority
\usort($result, function ($a, $b) {
usort($result, function ($a, $b) {
if (!isset($a['priority'])) {
$a['priority'] = 0;
}
......
......@@ -14,9 +14,9 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_settings_getUnitFieldSetting',
function () {
$result = [];
$result = [];
$Shipping = \QUI\ERP\Shipping\Shipping::getInstance();
$ids = $Shipping->getShippingRuleUnitFieldIds();
$ids = $Shipping->getShippingRuleUnitFieldIds();
foreach ($ids as $id) {
try {
......@@ -26,7 +26,7 @@ function () {
$result[] = $Field->getAttributes();
}
} catch (QUI\Exception $Exception) {
QUI\System\Log::writeDebugException($Exception);;
QUI\System\Log::writeDebugException($Exception);
}
}
......
......@@ -4,7 +4,7 @@
* This file contains package_quiqqer_shipping_ajax_backend_rules_update
*/
use \QUI\ERP\Shipping\Rules\Factory;
use QUI\ERP\Shipping\Rules\Factory;
/**
* Update a shipping method
......@@ -14,7 +14,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_rules_update',
function ($ruleId, $data) {
$data = \json_decode($data, true);
$data = json_decode($data, true);
$Factory = new Factory();
/* @var $Rule QUI\ERP\Shipping\Rules\ShippingRule */
......
......@@ -4,8 +4,8 @@
* This file contains package_quiqqer_shipping_ajax_backend_shippingStatus_getNotificationText
*/
use QUI\ERP\Shipping\ShippingStatus\Handler;
use QUI\ERP\Order\Handler as OrderHandler;
use QUI\ERP\Shipping\ShippingStatus\Handler;
/**
* Get status change notification text for a specific order
......
......@@ -14,16 +14,16 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_shippingStatus_list',
function () {
$Grid = new QUI\Utils\Grid();
$Grid = new QUI\Utils\Grid();
$Handler = Handler::getInstance();
$list = $Handler->getShippingStatusList();
$list = $Handler->getShippingStatusList();
$result = \array_map(function ($Status) {
/* @var $Status \QUI\ERP\Shipping\ShippingStatus\Status */
return $Status->toArray(QUI::getLocale());
}, $list);
\usort($result, function ($a, $b) {
usort($result, function ($a, $b) {
if ($a['id'] == $b['id']) {
return 0;
}
......
......@@ -18,7 +18,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_shippingStatus_update',
function ($id, $color, $title, $notification) {
$id = (int)$id;
$id = (int)$id;
$Handler = Handler::getInstance();
$Handler->updateShippingStatus(
......
......@@ -15,7 +15,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_shipping_ajax_backend_update',
function ($shippingId, $data) {
$Factory = new Factory();
$Factory = new Factory();
$ShippingEntry = $Factory->getChild($shippingId);
$data = \json_decode($data, true);
......
......@@ -102,9 +102,9 @@ abstract public function getWorkingTitle();
*/
public function getIcon()
{
return QUI\ERP\Shipping\Shipping::getInstance()->getHost().
URL_OPT_DIR
.'quiqqer/shipping/bin/images/shipping/default.png';
return QUI\ERP\Shipping\Shipping::getInstance()->getHost() .
URL_OPT_DIR
. 'quiqqer/shipping/bin/images/shipping/default.png';
}
/**
......@@ -115,8 +115,8 @@ public function getIcon()
public function toArray()
{
return [
'name' => $this->getName(),
'title' => $this->getTitle(),
'name' => $this->getName(),
'title' => $this->getTitle(),
'description' => $this->getDescription()
];
}
......
......@@ -6,8 +6,6 @@
namespace QUI\ERP\Shipping\Api;
use QUI;
/**
* Shipping provider
*
......
......@@ -36,7 +36,7 @@ public function toArray($Locale = null)
return [
'title' => $this->getTitle($Locale),
'type' => $this->getType()
'type' => $this->getType()
];
}
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren