Commit c60717c1 authored by Patrick Kimber's avatar Patrick Kimber

revert - Is the customer for this invoice (or credit note) setup for on-account postings?

parent 3cdecb65
Pipeline #138616456 passed with stage
in 5 minutes and 12 seconds
......@@ -514,14 +514,6 @@ class Invoice(TimedCreateModifyDeleteVersionModel):
]
return result
def on_account(self):
result = False
try:
result = bool(self.contact.invoicecontact.on_account)
except InvoiceContact.DoesNotExist:
pass
return result
def time_analysis(self):
"""Time analysis by user and ticket for an invoice.
......
......@@ -526,22 +526,6 @@ def test_number_prefix():
).save()
@pytest.mark.django_db
def test_on_account():
"""Is the customer setup for on-account postings?"""
contact = ContactFactory()
InvoiceContactFactory(contact=contact, on_account=True)
invoice = InvoiceFactory(contact=contact)
assert invoice.on_account() is True
@pytest.mark.django_db
def test_on_account_not():
"""Is the customer setup for on-account postings?"""
invoice = InvoiceFactory(contact=ContactFactory())
assert invoice.on_account() is False
@pytest.mark.django_db
def test_on_account_invoices():
date_before = date(2019, 3, 10)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment