GnuCash 7574033+
Loading...
Searching...
No Matches
test_business.BusinessSession Class Reference
Inheritance diagram for test_business.BusinessSession:
test_book.BookSession test_business.TestBusiness

Public Member Functions

 setUp (self)

Data Fields

 today = datetime.today()
 bank = Account(self.book)
 income = Account(self.book)
 receivable = Account(self.book)
 customer = Customer(self.book,'CustomerID',self.currency)
 vendor = Vendor(self.book,'VendorID',self.currency)
 employee = Employee(self.book,'EmployeeID',self.currency)
 job = Job(self.book,'JobID',self.customer)
 invoice = Invoice(self.book,'InvoiceID',self.currency,self.customer)
Data Fields inherited from test_book.BookSession
 ses = Session()
 book = self.ses.get_book()
 table = self.book.get_table()
 currency = self.table.lookup('CURRENCY', 'EUR')

Detailed Description

Definition at line 12 of file test_business.py.

Member Function Documentation

◆ setUp()

test_business.BusinessSession.setUp ( self)

Reimplemented from test_book.BookSession.

Definition at line 13 of file test_business.py.

13 def setUp(self):
14 BookSession.setUp(self)
15
16 self.today = datetime.today()
17
18 self.bank = Account(self.book)
19 self.bank.SetType(ACCT_TYPE_BANK)
20 self.bank.SetCommodity(self.currency)
21 self.income = Account(self.book)
22 self.income.SetType(ACCT_TYPE_INCOME)
23 self.income.SetCommodity(self.currency)
24 self.receivable = Account(self.book)
25 self.receivable.SetType(ACCT_TYPE_RECEIVABLE)
26 self.receivable.SetCommodity(self.currency)
27
28 self.customer = Customer(self.book,'CustomerID',self.currency)
29 self.vendor = Vendor(self.book,'VendorID',self.currency)
30 self.employee = Employee(self.book,'EmployeeID',self.currency)
31 self.job = Job(self.book,'JobID',self.customer)
32
33 self.invoice = Invoice(self.book,'InvoiceID',self.currency,self.customer)
34 self.invoice.SetDateOpened(self.today)
35 entry = Entry(self.book)
36 entry.SetDate(self.today)
37 entry.SetDescription("Some income")
38 entry.SetQuantity(GncNumeric(1))
39 entry.SetInvAccount(self.income)
40 entry.SetInvPrice(GncNumeric(100))
41 self.invoice.AddEntry(entry)
42
43 self.invoice.PostToAccount(self.receivable,
44 self.today, self.today, "", True, False)
45
The primary numeric class for representing amounts and values.
STRUCTS.

Field Documentation

◆ bank

test_business.BusinessSession.bank = Account(self.book)

Definition at line 18 of file test_business.py.

◆ customer

test_business.BusinessSession.customer = Customer(self.book,'CustomerID',self.currency)

Definition at line 28 of file test_business.py.

◆ employee

test_business.BusinessSession.employee = Employee(self.book,'EmployeeID',self.currency)

Definition at line 30 of file test_business.py.

◆ income

test_business.BusinessSession.income = Account(self.book)

Definition at line 21 of file test_business.py.

◆ invoice

test_business.BusinessSession.invoice = Invoice(self.book,'InvoiceID',self.currency,self.customer)

Definition at line 33 of file test_business.py.

◆ job

test_business.BusinessSession.job = Job(self.book,'JobID',self.customer)

Definition at line 31 of file test_business.py.

◆ receivable

test_business.BusinessSession.receivable = Account(self.book)

Definition at line 24 of file test_business.py.

◆ today

test_business.BusinessSession.today = datetime.today()

Definition at line 16 of file test_business.py.

◆ vendor

test_business.BusinessSession.vendor = Vendor(self.book,'VendorID',self.currency)

Definition at line 29 of file test_business.py.


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