* Use fragment_product_list in voucher redemption view (Z#23246929)
* Formatting
* Fix usage in templates
* Review comments
* handle form prefix in fragment_product_list.html
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Add API-endpoint for event-meta-properties
* Add new doc-file to index, fix spelling and description
* Fix logentry
* Fix logentry again
* validate and add tests
* add meta_properties from organizer only
* fix choices validation
* filter unknown keys from choices due to django-formsets
* Apply batched suggestions from code review
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
* add safe-guard normalization to None to to_representation
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* update tests to check for error-messages as well
* fix flake8
* fix permission tests
* Make ObjectListField more flexibel for re-use
* fix validation result
* Improve validation
* Change to I18nField for validation
* update MetaPropertyDictField
* fix docs for i18n strings
* make label_child configurable if MetaPropertyDictField should contain non-localized stuff
* undo test changes in events test
* fix flake8
* Apply batched suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* improve code formatting
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
Co-authored-by: Richard Schreiber <wiffbi@gmail.com>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* Delete PayPal integration v1
Leaving only migrations behind
* Try to fix CI
* Fix tests some more
* Rename more plugin name instances in tests and docs
---------
Co-authored-by: Martin Gross <martin@pc-coholic.de>
* Money representation in templates: Allow more precision
When rendering money in templates, we used to have the following logic:
- When the decimal places fit the currency, render with Babel
- When they don't, e.g. we stored 123.67 JPY, even though there are no
fractional Yens, render without Babel with a custom format, but render
the fractional Yens because we'd rather *show* wrong data and make the
bug obvious than hide it.
However, we only did that up to a prevision of two places, we never
showed more. This is still sufficient for core pretix, but we have
plugins that need to operate in fractional cents. Also, we CAN render
everything through babel for consistent formatting.
There is one **risk**: This might cause weird results on SQLite. Since
SQLite has no concept of precise decimal math, results of in-SQL
computations can sometimes experience floating point errors and show
with A LOT of decimal palces. This used to be invisible since the UI
performed the rounding. With this PR – not any more. We'll need to see
how annoying it is, but it should only affect development mode.
This PR also fixes a bug in tax_rate_format that for some reason did not
do what it was supposed to do, even though I tested it back then, weird.
Might even be a Python version thing?
* Update src/pretix/base/templatetags/money.py
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Apply suggestion from @pajowu
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Fix typing stuff
* Fix precision issue
---------
Co-authored-by: pajowu <engelhardt@pretix.eu>
* Allow to set payment term per sales channel
* Apply suggestion from @luelista
Co-authored-by: luelista <weller@rami.io>
---------
Co-authored-by: luelista <weller@rami.io>
* Fix sendmail/scheduled-mails placeholders
* Add event_or_subevent to context
* Add placeholders to tests
* fix and improve test
* Revert "fix and improve test"
This reverts commit 874a11e982.
* undo placeholder-tests
* add test
* move payment into pending on PENDING_REVIEW webhook
* mark approved payment as pending
* extend BasePaymentProvider to gate aborting pending payments on a payment per payment basis
* add timeout to paypal after which a pending payment can be canceled
* formatting
* add missing negation
* cleanup abort_pending_allowed methods
* Apply suggestions from code review
Co-authored-by: pajowu <pajowu@pajowu.de>
* check all capture elements
* rename method and change defaults
* remove left over Constant
* flake8 .
---------
Co-authored-by: pajowu <pajowu@pajowu.de>
* initial implementation
* factor out _resolve_base_date
* add js to prevent illegal inputs
* fix tests
* Update src/pretix/base/reldate.py
Co-authored-by: Raphael Michel <michel@pretix.eu>
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move js includes of to fragment_js.html
* add type annotations
* moves logic from RelativeDateWrapper into RelativeDate and adds BaseChoice for configuring which models attributes support which relationship
* fix tests
* test upgrade behaviour
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* move reldate.js include in correct file
* add OptionAttrsSelect to allow select options with their own attributes per value
* add a little bit of information to the tests for future reference
* rewrite reldate.js use data-attributes
* general cleanup
* add test for order.subevents cases
* use correct choice format
* remove order.subevent variants
* various cleanup
* Apply suggestions from code review
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* remove empty docstrings
* add depreciation warning
* change event listener to pretix:bind-forms
---------
Co-authored-by: Raphael Michel <michel@pretix.eu>
Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
* store the state of the payment regardless of the state
control.html shows the banner that the payment is in review depending on payment.info
* handle capture ressource
* Update src/pretix/plugins/paypal2/views.py
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
* add test
* cleanup logic regarding uninteresting resource_type
* store payment.info during _execute_payment asap
---------
Co-authored-by: Phin Wolkwitz <wolkwitz@pretix.eu>
* Fix crash in rebooking if addon has hidden_if_item_available
* Move get_grouped_items into its own file and rename to prepare_item_list_for_shop
(but keep a reference under original name for plugin compatibility)
* Make Item[Variation].unavailability_reason helper functions next to get_grouped_items
* Use current_unavailability_reason attribute instead of unavailability_reason()
* Add test case for:
Order has product with addon 1; Addon 1 is hidden if Addon 2 is available; When order is changed, Addon 1 should not be removable
* Fix special case if addon product is now set to require a voucher (vouchers for addons are not supported)
---------
Co-authored-by: Kara Engelhardt <engelhardt@pretix.eu>