small changes

This commit is contained in:
TLRZ Seyfferth
2018-01-11 14:57:10 +01:00
parent 49146a8ba6
commit 2c3f00d476
4 changed files with 65 additions and 41 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
accounting.settings = {
currency: {
symbol: "€",
format: "%v%s",
format: "%v %s",
decimal: ",",
thousand: ".",
precision: 2
@@ -11,10 +11,10 @@ accounting.settings = {
thousand: ".",
decimal : ","
}
}
};
$(document).ready(function(){
$('.tabs').tabs();
$('.fixed-action-btn').floatingActionButton();
})
});
+4
View File
@@ -50,6 +50,10 @@ InventoryArticle.prototype = {
get StepSize() {
singlePack = this.article.Portions == 1;
return singlePack ? 1 : 0.05;
},
get PortionPrecision() {
singlePack = this.article.Portions == 1;
return singlePack ? 0 : 2;
}
};
+7 -4
View File
@@ -1,8 +1,9 @@
Vue.filter('currency', function(money){
return accounting.formatMoney(money);
});
Vue.filter('number', function(number){
return accounting.formatNumber(number);
Vue.filter('number', function(number, precision = 2){
return accounting.formatNumber(number, precision);
});
var app = new Vue({
@@ -73,8 +74,10 @@ var app = new Vue({
M.updateTextFields();
});
},
bonArticle: function(article) {
resetBon: function(article) {
this.bon.forEach(function (item){
item.count = 0;
});
},
bonned: function (items) {
return items.filter(function (item) {