GnuCash  5.6-150-g038405b370+
Public Member Functions
test_business.TestBusiness Class Reference
Inheritance diagram for test_business.TestBusiness:
test_business.BusinessSession test_book.BookSession

Public Member Functions

def test_equal (self)
 
def test_employee_name (self)
 
def test_post (self)
 
def test_owner (self)
 
def test_commodities (self)
 
def test_invoice_transaction (self)
 
def test_invoice_payment (self)
 
- Public Member Functions inherited from test_business.BusinessSession
def setUp (self)
 
- Public Member Functions inherited from test_book.BookSession
def setUp (self)
 

Additional Inherited Members

- Data Fields inherited from test_business.BusinessSession
 today
 
 bank
 
 income
 
 receivable
 
 customer
 
 vendor
 
 employee
 
 job
 
 invoice
 
- Data Fields inherited from test_book.BookSession
 ses
 
 book
 
 table
 
 currency
 

Detailed Description

Definition at line 46 of file test_business.py.

Member Function Documentation

◆ test_invoice_payment()

def test_business.TestBusiness.test_invoice_payment (   self)
Test that you can pay an invoice into a transfer account (this also tests conversion of Python lists to GList).

Definition at line 86 of file test_business.py.

86  def test_invoice_payment(self):
87  """
88  Test that you can pay an invoice into a transfer account (this also tests conversion of Python lists to GList).
89  """
90  self.receivable.RecomputeBalance()
91  self.assertTrue( int(self.receivable.GetBalance().to_double()) == 100 )
92  lots = [self.invoice.GetPostedLot()]
93  self.customer.ApplyPayment(None, lots, self.receivable, self.bank, GncNumeric(100), GncNumeric(1), self.invoice.GetDatePosted(), "Paid into bank account.", "1234", False)
94  self.receivable.RecomputeBalance()
95  self.assertTrue( self.receivable.GetBalance().to_fraction().numerator == 0 )
96 
The primary numeric class for representing amounts and values.
Definition: gnc-numeric.hpp:60

◆ test_invoice_transaction()

def test_business.TestBusiness.test_invoice_transaction (   self)
Test that you can get the posted transaction from a posted invoice and that you can get the invoice back from the transaction.

Definition at line 77 of file test_business.py.

77  def test_invoice_transaction(self):
78  """
79  Test that you can get the posted transaction from a posted invoice and that you can get the invoice back from the transaction.
80  """
81  posted_transaction = self.invoice.GetPostedTxn()
82  self.assertTrue( posted_transaction != None )
83  invoice_from_transaction = posted_transaction.GetInvoiceFromTxn()
84  self.assertTrue( invoice_from_transaction != None and invoice_from_transaction.GetID() == self.invoice.GetID() )
85 

The documentation for this class was generated from the following file: