Beispiel #1
0
def invoice(project, user, customer, company, phase):
    invoice = Invoice(company, customer, project, phase, user)
    for key, value in INVOICE.items():
        setattr(invoice, key, value)

    for line in LINES:
        invoice.default_line_group.lines.append(TaskLine(**line))
    for discount in DISCOUNTS:
        invoice.discounts.append(DiscountLine(**discount))
    invoice.mentions = [TaskMention(label="1", title="t1", full_text="text")]

    invoice.address = customer.address

    return invoice
def invoice(project, user, customer, company, phase):
    invoice = Invoice(
        company,
        customer,
        project,
        phase,
        user,
    )
    for key, value in INVOICE.items():
        setattr(invoice, key, value)

    for line in LINES:
        invoice.default_line_group.lines.append(TaskLine(**line))
    for discount in DISCOUNTS:
        invoice.discounts.append(DiscountLine(**discount))
    invoice.mentions = [TaskMention(label='1', title='t1', full_text='text')]

    invoice.address = customer.address

    return invoice