mirror of
https://github.com/pretix/pretix.git
synced 2025-12-05 21:32:28 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dba9a56a67 | ||
|
|
15f445cb3d | ||
|
|
c9f6c71c81 | ||
|
|
2032d36ad6 | ||
|
|
ffb4cf08d1 |
@@ -1 +1 @@
|
||||
__version__ = "2.7.0"
|
||||
__version__ = "2.7.1"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import hashlib
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.files.base import ContentFile
|
||||
from django.core.files.base import ContentFile, File
|
||||
from django.core.files.storage import default_storage
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
@@ -35,4 +35,7 @@ class Command(BaseCommand):
|
||||
gs.settings.set('widget_file_{}'.format(lc), 'file://' + newname)
|
||||
gs.settings.set('widget_checksum_{}'.format(lc), checksum)
|
||||
if fname:
|
||||
default_storage.delete(fname)
|
||||
if isinstance(fname, File):
|
||||
default_storage.delete(fname.name)
|
||||
else:
|
||||
default_storage.delete(fname)
|
||||
|
||||
@@ -146,6 +146,12 @@ def get_grouped_items(event, subevent=None, voucher=None, channel='web'):
|
||||
|
||||
display_add_to_cart = display_add_to_cart or item.order_max > 0
|
||||
else:
|
||||
item.original_price = (
|
||||
item.tax(item.original_price, currency=event.currency, include_bundled=True,
|
||||
base_price_is='net' if event.settings.display_net_prices else 'gross') # backwards-compat
|
||||
if item.original_price else None
|
||||
)
|
||||
|
||||
for var in item.available_variations:
|
||||
if voucher and (voucher.allow_ignore_quota or voucher.block_quota):
|
||||
var.cached_availability = (
|
||||
|
||||
@@ -66,6 +66,7 @@ pre[lang=ck], input[lang=ck], textarea[lang=ck], div[lang=ck] { background-image
|
||||
pre[lang=cl], input[lang=cl], textarea[lang=cl], div[lang=cl] { background-image: url(static('pretixbase/img/flags/cl.png')); }
|
||||
pre[lang=cm], input[lang=cm], textarea[lang=cm], div[lang=cm] { background-image: url(static('pretixbase/img/flags/cm.png')); }
|
||||
pre[lang=cn], input[lang=cn], textarea[lang=cn], div[lang=cn] { background-image: url(static('pretixbase/img/flags/cn.png')); }
|
||||
pre[lang=zh-hans], input[lang=zh-hans], textarea[lang=zh-hans], div[lang=zh-hans] { background-image: url(static('pretixbase/img/flags/cn.png')); }
|
||||
pre[lang=co], input[lang=co], textarea[lang=co], div[lang=co] { background-image: url(static('pretixbase/img/flags/co.png')); }
|
||||
pre[lang=cr], input[lang=cr], textarea[lang=cr], div[lang=cr] { background-image: url(static('pretixbase/img/flags/cr.png')); }
|
||||
pre[lang=cs], input[lang=cs], textarea[lang=cs], div[lang=cs] { background-image: url(static('pretixbase/img/flags/cs.png')); }
|
||||
|
||||
@@ -234,7 +234,7 @@ Vue.component('pricebox', {
|
||||
+ '<div v-if="free_price">'
|
||||
+ '{{ $root.currency }} '
|
||||
+ '<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">'
|
||||
+ '</div>'
|
||||
+ '<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);
|
||||
}
|
||||
},
|
||||
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 () {
|
||||
return this.$root.currency + " " + floatformat(parseFloat(this.original_price), 2);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user