mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Order change: Do not set invoice_dirty if invoicing is disabled
This commit is contained in:
@@ -2006,6 +2006,20 @@ class OrderChangeManagerTests(TestCase):
|
||||
).confirm()
|
||||
assert self.order.invoices.count() == 3
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_reissue_invoice_paid_only_after_payment_only_if_enabled(self):
|
||||
self.event.settings.invoice_generate = "False"
|
||||
assert self.order.invoices.count() == 0
|
||||
self.ocm.add_position(self.ticket, None, Decimal('2.00'))
|
||||
self.ocm.commit()
|
||||
assert self.order.invoices.count() == 0
|
||||
self.order.refresh_from_db()
|
||||
assert not self.order.invoice_dirty
|
||||
self.order.payments.create(
|
||||
provider='manual', amount=self.order.total
|
||||
).confirm()
|
||||
assert self.order.invoices.count() == 0
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_reissue_invoice_paid_stays_paid(self):
|
||||
self.event.settings.invoice_generate = "paid"
|
||||
|
||||
Reference in New Issue
Block a user