mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
OrderChangeManager: Prevent creation of 0 € invoices
This commit is contained in:
@@ -1393,6 +1393,15 @@ class OrderChangeManagerTests(TestCase):
|
||||
self.ocm.commit()
|
||||
assert self.order.invoices.count() == 3
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_no_new_invoice_for_free_order(self):
|
||||
generate_invoice(self.order)
|
||||
assert self.order.invoices.count() == 1
|
||||
self.ocm.change_price(self.op1, Decimal('0.00'))
|
||||
self.ocm.change_price(self.op2, Decimal('0.00'))
|
||||
self.ocm.commit()
|
||||
assert self.order.invoices.count() == 2
|
||||
|
||||
@classscope(attr='o')
|
||||
def test_reissue_invoice_disabled(self):
|
||||
self.ocm.reissue_invoice = False
|
||||
|
||||
Reference in New Issue
Block a user