invoice_entry = Entry(book, invoice_customer)
    invoice_entry.SetInvTaxTable(tax_table)
    invoice_entry.SetInvTaxIncluded(False)
    invoice_entry.SetDescription("excellent product")
    invoice_entry.SetQuantity(GncNumeric(1))
    invoice_entry.SetInvAccount(a3)
    invoice_entry.SetInvPrice(GncNumeric(1))
    invoice_entry.SetDateEntered(datetime.datetime.now())

    invoice_customer.PostToAccount(a2, datetime.date.today(),
                                   datetime.date.today(), "the memo", True,
                                   False)

    new_customer.ApplyPayment(None, None, a2, a6, GncNumeric(100, 100),
                              GncNumeric(1), datetime.date.today(), "", "",
                              True)

    invoice_customer.ApplyPayment(None, a6, GncNumeric(7, 100), GncNumeric(1),
                                  datetime.date.today(), "", "")

    vendor_bill_returns = book.BillLoookupByID("7")
    assert (vendor_bill_returns.GetID() == "7")
    vendor_extract = vendor_bill_returns.GetOwner()
    assert (vendor_extract.GetName() == new_vendor.GetName())
    customer_invoice_returns = book.InvoiceLookupByID("5")
    assert (customer_invoice_returns.GetID() == "5")
    customer_returns = book.CustomerLookupByID("1")
    assert (customer_returns.GetName() == new_customer.GetName())

    s.save()
job_extract = invoice_job.GetOwner()
assert (isinstance(job_extract, Job))
assert (job_extract.GetName() == new_job.GetName())

invoice_entry = Entry(book, invoice_customer)
invoice_entry.SetInvTaxTable(tax_table)
invoice_entry.SetInvTaxIncluded(False)
invoice_entry.SetDescription("excelent product")
invoice_entry.SetQuantity(GncNumeric(1))
invoice_entry.SetInvAccount(a3)
invoice_entry.SetInvPrice(GncNumeric(1))

invoice_customer.PostToAccount(a2, datetime.date.today(),
                               datetime.date.today(), "the memo", True)

new_customer.ApplyPayment(None, a2, a6, GncNumeric(100, 100), GncNumeric(1),
                          datetime.date.today(), "", "")

new_customer.ApplyPayment(invoice_customer, a2, a6, GncNumeric(7, 100),
                          GncNumeric(1), datetime.date.today(), "", "")

vendor_bill_returns = book.BillLoookupByID("7")
assert (vendor_bill_returns.GetID() == "7")
vendor_extract = vendor_bill_returns.GetOwner()
assert (vendor_extract.GetName() == new_vendor.GetName())
customer_invoice_returns = book.InvoiceLookupByID("5")
assert (customer_invoice_returns.GetID() == "5")
customer_returns = book.CustomerLookupByID("1")
assert (customer_returns.GetName() == new_customer.GetName())

s.save()