* Webhooks: Add vouchers (Z#23203072)
This also requires more consistent usage of webhook types to avoid
vouchers not being known to the external system.
* Update src/pretix/api/webhooks.py
Co-authored-by: luelista <weller@rami.io>
* Fix shredder test
---------
Co-authored-by: luelista <weller@rami.io>
* Orders API: Add check_quotas to orders/change and PATCH/POST orderpositions query params
* Refs #5323: Checkstyle fix
Forgot tu run fkale8 after implementing unit tests oops
* Refs #5323: Fix unit tests and fix of the previous ones
* Refs #5323: PR review
Add a registry for datasync providers and an associated sync queue, to be used by
plugins that transfer data from pretix orders to external systems.
Additionally, provide a generic data mapping interface to be used in settings pages
of such plugins, to let users configure which information from pretix to fill into
which data fields of the external system.
---------
Co-authored-by: Raphael Michel <michel@rami.io>
* Widget: deprecate v1 and redirect to v2
* Make redirect permanent
* remove v1 files
* do not redirect, just serve version_min
* add version-comment to delivered css/js-file
* fix tests
If two discounts match the same products, the first one wins. Therefore,
the one we want to win in the test must always come last, otherwise the
test is not actually testing anything. In this case, this is highlighted
by the fact that the test does not pass in diffrent orders of discounts
unless we subtract a second from the date, because we compare with <=,
not <.
* Add event date fields, add preliminary range check
* Remove function, use filtered queryset for subevent id limit
* Improve and fix date range check
* Add formfields
* Add tests
* Improve tests
* Add new fields to API and documentation
* Add migration
* Change description according to suggestion
* Change discount apply signature, remove unnecessary query
* Rename new fields, simplify range check
* Rename fields in template
* Apply suggestions from code review
Co-authored-by: Raphael Michel <michel@rami.io>
---------
Co-authored-by: Raphael Michel <michel@rami.io>
* API: Allow to add a fee to an order (#4806)
* Fix example in docs
* Consistent order of examples
* Add create_fees to example
* docs: None -> null
* docs: update fee_type options
---------
Co-authored-by: Mira Weller <weller@rami.io>
* Do not apply vouchers on "free price" items where more than minimum price is selected
* Do apply vouchers on "free price" items if exactly the minimum price is selected
* Update cart.py
* Add test cases, fix bug in adjacent test
* Fix code style
---------
Co-authored-by: Raphael Michel <michel@rami.io>
* Allow plugins to add data to the order API (Z#23179688)
* Update src/pretix/api/serializers/media.py
Co-authored-by: Richard Schreiber <schreiber@rami.io>
* Fix failing test
---------
Co-authored-by: Richard Schreiber <schreiber@rami.io>
When dates are ambiguous, use the event's locale to infer whether the
day or month comes first. Since regions follow certain date format
conventions, this helps make more accurate guesses.
* Invoice renderer: Group invoice lines even with addons (Z#23173618)
* Add unit test
* Update src/pretix/base/invoice.py
Co-authored-by: Mira <weller@rami.io>
---------
Co-authored-by: Mira Weller <weller@rami.io>
Lloyds Bank (UK) CSV files include a trailing comma in the header row
but not in the data rows, causing the `csvimport.parse` function to
skip the data rows. This occurs because the header length exceeds the
row length, making them unequal to `hint.cols`.
This commit adjusts the length check to allow a range of acceptable row
lengths, from the index of the last non-empty column in the header to
`hint.cols`. This ensures compatibility with headers containing one or
more trailing commas without affecting rows with correctly labelled columns.
The solution avoids breaking changes by leaving underlying data structures
untouched. Alternative approaches, such as dropping trailing commas before
parsing or removing empty elements after parsing, were avoided due to
potential risks. Specifically, trailing columns might contain data that
banks provide but fail to label in the header row.