Exemple #1
0
    def __init__(self,
                 store,
                 aID,
                 name,
                 currency=0,
                 balance=0.0,
                 mintId=None,
                 currNick=False):
        ORMObject.__init__(self)
        self.IsFrozen = True
        self.Store = store
        self.ID = aID
        self._Name = name
        self._Transactions = None
        self._RecurringTransactions = []
        self._preTransactions = []
        # Make sure that Currency and Balance are not None (bug #653716)
        self.Currency = currency or 0
        self.Balance = balance or 0.0
        self.MintId = mintId or None
        self.ShowCurrencyNick = currNick or False
        self.IsFrozen = False

        Publisher.subscribe(self.onTransactionAmountChanged,
                            "ormobject.updated.Transaction.Amount")
Exemple #2
0
    def __init__(self,
                 store,
                 aID,
                 name,
                 currency=0,
                 balance=0.0,
                 mintId=None,
                 currNick=False):
        ORMObject.__init__(self)
        self.IsFrozen = True
        self.Store = store
        self.ID = aID
        self._Name = name
        self._Transactions = None
        self._RecurringTransactions = []
        self._preTransactions = []
        # Make sure that Currency and Balance are not None (bug #653716)
        self.Currency = currency or 0
        self.Balance = balance or 0.0
        self.MintId = mintId
        self.ShowCurrencyNick = currNick or False
        self.IsFrozen = False

        Publisher.subscribe(self.onTransactionAmountChanged,
                            "ormobject.updated.Transaction.Amount")
Exemple #3
0
    def __init__(self, tID, parent, amount, description, date):
        ORMObject.__init__(self)
        self.IsFrozen = True

        self.ID = tID
        self.LinkedTransaction = None
        self.Parent = parent
        self.Date = date
        self.Tags = set()
        self.Description = description
        self.Amount = amount
        self.RecurringParent = None

        self.IsFrozen = False
Exemple #4
0
    def __init__(self, store, aID, name, currency=0, balance=0.0, mintId=None):
        ORMObject.__init__(self)
        self.IsFrozen = True
        self.Store = store
        self.ID = aID
        self._Name = name
        self._Transactions = None
        self._RecurringTransactions = []
        self._preTransactions = []
        self.Currency = currency
        self.Balance = balance
        self.MintId = mintId
        self.IsFrozen = False

        Publisher.subscribe(self.onTransactionAmountChanged, "ormobject.updated.Transaction.Amount")
Exemple #5
0
 def __init__(self, tID, parent, amount, description, date, repeatType, repeatEvery=1, repeatOn=None, endDate=None, source=None, lastTransacted=None):
     Transaction.__init__(self, tID, parent, amount, description, date)
     ORMObject.__init__(self)
     
     # If the transaction recurs weekly and repeatsOn isn't specified, use the starting date.
     if repeatType == self.WEEKLY and repeatOn is None:
         todaydaynumber = date.weekday()
         repeatOn = [int(i==todaydaynumber) for i in range(7)]
     
     self.IsFrozen = True
     self.RepeatType = repeatType
     self.RepeatEvery = repeatEvery
     self.RepeatOn = repeatOn
     self.EndDate = endDate
     self.Source = source
     self.LastTransacted = lastTransacted
     self.IsFrozen = False