GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
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
 
 bank
 
 currency
 
 income
 
 receivable
 
 customer
 
 vendor
 
 employee
 
 job
 
 invoice
 
- Data Fields inherited from test_book.BookSession
 ses
 
 book
 
 table
 
 currency
 

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

Definition at line 18 of file test_business.py.

◆ currency

test_business.BusinessSession.currency

Definition at line 20 of file test_business.py.

◆ customer

test_business.BusinessSession.customer

Definition at line 28 of file test_business.py.

◆ employee

test_business.BusinessSession.employee

Definition at line 30 of file test_business.py.

◆ income

test_business.BusinessSession.income

Definition at line 21 of file test_business.py.

◆ invoice

test_business.BusinessSession.invoice

Definition at line 33 of file test_business.py.

◆ job

test_business.BusinessSession.job

Definition at line 31 of file test_business.py.

◆ receivable

test_business.BusinessSession.receivable

Definition at line 24 of file test_business.py.

◆ today

test_business.BusinessSession.today

Definition at line 16 of file test_business.py.

◆ vendor

test_business.BusinessSession.vendor

Definition at line 29 of file test_business.py.


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