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

feat: considered manuel usage type

Übergeordneter fa2a78bb
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
...@@ -55,11 +55,11 @@ define('package/quiqqer/discount/bin/controls/Discounts', [ ...@@ -55,11 +55,11 @@ define('package/quiqqer/discount/bin/controls/Discounts', [
* event : on create * event : on create
*/ */
$onCreate: function () { $onCreate: function () {
var self = this; var self = this;
this.setAttributes({ this.setAttributes({
title: QUILocale.get(lg, 'discount.panel.title') title: QUILocale.get(lg, 'discount.panel.title'),
icon : 'fa fa-cart-arrow-down'
}); });
// buttons // buttons
...@@ -311,7 +311,7 @@ define('package/quiqqer/discount/bin/controls/Discounts', [ ...@@ -311,7 +311,7 @@ define('package/quiqqer/discount/bin/controls/Discounts', [
if (parseInt(entry.discount_type) === Discounts.DISCOUNT_TYPE_CURRENCY) { if (parseInt(entry.discount_type) === Discounts.DISCOUNT_TYPE_CURRENCY) {
entry.discountTypeText = ''; entry.discountTypeText = '';
} }
result.data[i] = entry; result.data[i] = entry;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "quiqqer/discount", "name": "quiqqer/discount",
"type": "quiqqer-plugin", "type": "quiqqer-plugin",
"description": "Discounts", "description": "Discounts",
"version": "dev-master", "version": "dev-dev",
"license": "", "license": "",
"authors": [ "authors": [
{ {
......
...@@ -146,6 +146,12 @@ public static function onQuiqqerProductsCalcListProduct( ...@@ -146,6 +146,12 @@ public static function onQuiqqerProductsCalcListProduct(
$userDiscounts = array_filter($userDiscounts, function ($Discount) { $userDiscounts = array_filter($userDiscounts, function ($Discount) {
/* @var $Discount Discount */ /* @var $Discount Discount */
// don't use manuel usage type
if ((int)$Discount->getAttribute('usage_type') === Handler::DISCOUNT_USAGE_TYPE_MANUEL) {
return false;
}
return $Discount->getAttribute('scope') == Handler::DISCOUNT_SCOPE_EVERY_PRODUCT; return $Discount->getAttribute('scope') == Handler::DISCOUNT_SCOPE_EVERY_PRODUCT;
}); });
...@@ -206,6 +212,12 @@ public static function onQuiqqerProductsCalcList( ...@@ -206,6 +212,12 @@ public static function onQuiqqerProductsCalcList(
$userDiscounts = array_filter($userDiscounts, function ($Discount) { $userDiscounts = array_filter($userDiscounts, function ($Discount) {
/* @var $Discount Discount */ /* @var $Discount Discount */
// don't use manuel usage type
if ((int)$Discount->getAttribute('usage_type') === Handler::DISCOUNT_USAGE_TYPE_MANUEL) {
return false;
}
return $Discount->getAttribute('scope') == Handler::DISCOUNT_SCOPE_TOTAL; return $Discount->getAttribute('scope') == Handler::DISCOUNT_SCOPE_TOTAL;
}); });
......
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