mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fix #1279 -- Incorrect initial price value in widget in German locale
This commit is contained in:
@@ -234,7 +234,7 @@ Vue.component('pricebox', {
|
|||||||
+ '<div v-if="free_price">'
|
+ '<div v-if="free_price">'
|
||||||
+ '{{ $root.currency }} '
|
+ '{{ $root.currency }} '
|
||||||
+ '<input type="number" class="pretix-widget-pricebox-price-input" placeholder="0" '
|
+ '<input type="number" class="pretix-widget-pricebox-price-input" placeholder="0" '
|
||||||
+ ' :min="display_price" :value="display_price" :name="field_name"'
|
+ ' :min="display_price_nonlocalized" :value="display_price_nonlocalized" :name="field_name"'
|
||||||
+ ' step="any">'
|
+ ' step="any">'
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '<small class="pretix-widget-pricebox-tax" v-if="price.rate != \'0.00\' && price.gross != \'0.00\'">'
|
+ '<small class="pretix-widget-pricebox-tax" v-if="price.rate != \'0.00\' && price.gross != \'0.00\'">'
|
||||||
@@ -255,6 +255,13 @@ Vue.component('pricebox', {
|
|||||||
return floatformat(parseFloat(this.price.gross), 2);
|
return floatformat(parseFloat(this.price.gross), 2);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
display_price_nonlocalized: function () {
|
||||||
|
if (this.$root.display_net_prices) {
|
||||||
|
return parseFloat(this.price.net).toFixed(2);
|
||||||
|
} else {
|
||||||
|
return parseFloat(this.price.gross).toFixed(2);
|
||||||
|
}
|
||||||
|
},
|
||||||
original_line: function () {
|
original_line: function () {
|
||||||
return this.$root.currency + " " + floatformat(parseFloat(this.original_price), 2);
|
return this.$root.currency + " " + floatformat(parseFloat(this.original_price), 2);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user