GnuCash  5.6-150-g038405b370+
Public Member Functions
python.gnucash_business.Invoice Class Reference
Inheritance diagram for python.gnucash_business.Invoice:
python.gnucash_business.Bill

Public Member Functions

def __init__ (self, book=None, id=None, currency=None, owner=None, date_opened=None, instance=None)
 

Detailed Description

Definition at line 143 of file gnucash_business.py.

Constructor & Destructor Documentation

◆ __init__()

def python.gnucash_business.Invoice.__init__ (   self,
  book = None,
  id = None,
  currency = None,
  owner = None,
  date_opened = None,
  instance = None 
)
Invoice Constructor

You must provide a book, id, currency and owner
(Customer, Job, Employee, Vendor) or an existing swig proxy object
in the keyword argument instance.

Optionally, you may provide a date the invoice is opened on
(datetime.date or datetime.datetime), otherwise today's date is used.

Definition at line 145 of file gnucash_business.py.

145  date_opened=None, instance=None):
146  """Invoice Constructor
147 
148  You must provide a book, id, currency and owner
149  (Customer, Job, Employee, Vendor) or an existing swig proxy object
150  in the keyword argument instance.
151 
152  Optionally, you may provide a date the invoice is opened on
153  (datetime.date or datetime.datetime), otherwise today's date is used.
154  """
155  if instance == None:
156  if book==None or id==None or currency==None or owner==None:
157  raise Exception(
158  "you must call Invoice.__init__ "
159  "with either a book, id, currency and owner, or an existing"
160  "low level swig proxy in the argument instance")
161  GnuCashCoreClass.__init__(self, book)
162  self.BeginEdit()
163  self.SetID(id)
164  self.SetCurrency(currency)
165  self.SetOwner(owner)
166  if date_opened == None:
167  date_opened = datetime.date.today()
168  self.SetDateOpened(date_opened)
169  self.CommitEdit()
170  else:
171  GnuCashCoreClass.__init__(self, instance=instance)
172 

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