Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit c71b0276 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat: #78

Übergeordneter de2c041f
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -45,3 +45,16 @@
.quiqqer-erp-backend-temporaryErp-summary-total-title {
width: calc(100% - 800px);
}
.quiqqer-erp-backend-temporaryErp-priceFactors {
background: #fff;
border: 1px solid #DEDEDE;
bottom: 80px;
box-shadow: 0 4px 8px 0 rgb(0 0 0 / 12%), 0 2px 4px 0 rgb(0 0 0 / 8%);
display: none;
height: 90px;
position: absolute;
right: 10px;
width: 400px;
z-index: 1000;
}
......@@ -37,7 +37,9 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
Binds: [
'$onInject',
'$refreshArticleSelect',
'openSummary'
'openSummary',
'showPriceFactors',
'hidePriceFactors'
],
initialize: function (options) {
......@@ -45,6 +47,8 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
this.$NettoSum = null;
this.$BruttoSum = null;
this.$PriceFactors = null;
this.$PFFX = null;
this.addEvents({
onInject: this.$onInject
......@@ -69,10 +73,16 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
labelGross : QUILocale.get(lg, 'article.summary.tpl.labelGross'),
labelSums : QUILocale.get(lg, 'article.summary.tpl.labelSums'),
labelVat : QUILocale.get(lg, 'article.summary.tpl.labelVat'),
})
}),
events : {
mouseenter: this.showPriceFactors,
mouseleave: this.hidePriceFactors
}
});
this.$Elm.addEvent('click', this.openSummary);
this.$PriceFactors = new Element('div.quiqqer-erp-backend-temporaryErp-priceFactors').inject(this.$Elm);
this.$PFFX = moofx(this.$PriceFactors);
this.$NettoSum = this.$Elm.getElement(
'.quiqqer-erp-backend-temporaryErp-summary-total .netto-value'
......@@ -235,7 +245,6 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
let calc = calculated.calculations;
this.getCurrencyFormatter().then((Formatter) => {
if (this.getAttribute('showPosSummary')) {
if (!(ArticleInstance instanceof Article)) {
ArticleInstance = List.getSelectedArticle();
......@@ -295,6 +304,43 @@ define('package/quiqqer/erp/bin/backend/controls/articles/ArticleSummary', [
this.$VAT.set('html', vatText);
}
});
},
showPriceFactors: function () {
const ArticleList = this.getAttribute('List');
let priceFactors = ArticleList.getPriceFactors();
let html = '<ul>';
for (let i = 0, len = priceFactors.length; i < len; i++) {
html = html + '<li>' + priceFactors[i].title + ' (<b>' + priceFactors[i].valueText + '</b>)</li>';
}
html = html + '</ul>';
this.$PriceFactors.set('html', html);
this.$PriceFactors.setStyle('opacity', 0);
this.$PriceFactors.setStyle('display', 'block');
this.$PriceFactors.setStyle('bottom', 70);
this.$PFFX.animate({
bottom : 80,
opacity: 1
}, {
duration: 300
});
},
hidePriceFactors: function () {
this.$PFFX.animate({
bottom : 70,
opacity: 0
}, {
duration: 300,
callback: () => {
this.$PriceFactors.setStyle('display', 'none');
}
});
}
});
});
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren