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

Public Member Functions

def __init__ (self, book=None, invoice=None, date=None, instance=None)
 
def test_type (self, invoice)
 

Detailed Description

Definition at line 191 of file gnucash_business.py.

Constructor & Destructor Documentation

◆ __init__()

def python.gnucash_business.Entry.__init__ (   self,
  book = None,
  invoice = None,
  date = None,
  instance = None 
)
Invoice Entry constructor

You must provide a book or be initizing this with an existing
swig proxy object via the instance keyword argument.

The optional invoice argument can be set to a Bill or Invoice
that you would like to associate the entry with. You might as well
assign one now, as an Entry can't exist without one, but you can
always use Invoice.AddEntry or Bill.AddEntry later on.

By default, the entry will be set to today's date unless you
override with the date argument.

Definition at line 192 of file gnucash_business.py.

192  def __init__(self, book=None, invoice=None, date=None, instance=None):
193  """Invoice Entry constructor
194 
195  You must provide a book or be initizing this with an existing
196  swig proxy object via the instance keyword argument.
197 
198  The optional invoice argument can be set to a Bill or Invoice
199  that you would like to associate the entry with. You might as well
200  assign one now, as an Entry can't exist without one, but you can
201  always use Invoice.AddEntry or Bill.AddEntry later on.
202 
203  By default, the entry will be set to today's date unless you
204  override with the date argument.
205  """
206  if instance == None:
207  if book==None:
208  raise Exception(
209  "you must call Entry.__init__ with either a "
210  "book or an existing "
211  "low level swig proxy in the argument instance")
212  GnuCashCoreClass.__init__(self, book)
213 
214  if date == None:
215  date = datetime.date.today()
216  self.SetDate(date)
217  if invoice != None:
218  invoice.AddEntry(self)
219  else:
220  GnuCashCoreClass.__init__(self, instance=instance)
221 

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