Allow to exclude free products from invoices

This commit is contained in:
Raphael Michel
2017-07-14 12:07:29 +02:00
parent 0ab6ac569e
commit 6ea798e55b
7 changed files with 66 additions and 3 deletions

View File

@@ -92,6 +92,17 @@ def test_address_vat_id(env):
assert inv.invoice_to == "Acme Company\nSherlock Holmes\n221B Baker Street\n12345 London\nUK\nVAT-ID: UK1234567"
@pytest.mark.django_db
def test_positions_skip_free(env):
event, order = env
event.settings.invoice_include_free = False
op1 = order.positions.first()
op1.price = Decimal('0.00')
op1.save()
inv = generate_invoice(order)
assert inv.lines.count() == 2
@pytest.mark.django_db
def test_positions(env):
event, order = env