Example #1
0
    def getValues(self):
        # Grab the raw values we will need to parse.
        date = helpers.wxdate2pydate(self.dateCtrl.Value)
        desc = self.descCtrl.Value
        amount = self.amountCtrl.Value

        # Parse the amount.
        try:
            amount = self.CurrentAccount.ParseAmount(amount)
        except ValueError:
            if amount == "":
                baseStr = _("No amount entered in the 'Amount' field.")
            else:
                baseStr = _("'%s' is not a valid amount.") % amount

            dlg = wx.MessageDialog(
                self.Parent,
                baseStr + " " + _("Please enter a number such as 12.34 or -20."),
                _("Invalid Transaction Amount"),
                wx.OK | wx.ICON_ERROR,
            )
            dlg.ShowModal()
            return

        return amount, desc, date
Example #2
0
    def GetSettings(self):
        repeatType = self.repeatsCombo.GetSelection()
        repeatEvery = self.everySpin.GetValue()

        if self.endsNeverRadio.GetValue():
            end = None
        else:
            end = helpers.wxdate2pydate(self.endDateCtrl.GetValue())

        return repeatType, repeatEvery, end
Example #3
0
    def GetSettings(self):
        repeatType = self.repeatsCombo.GetSelection()
        repeatEvery = self.everySpin.GetValue()

        if self.endsNeverRadio.GetValue():
            end = None
        else:
            end = helpers.wxdate2pydate(self.endDateCtrl.GetValue())

        return repeatType, repeatEvery, end
Example #4
0
    def getValues(self):
        # Grab the raw values we will need to parse.
        date = helpers.wxdate2pydate(self.dateCtrl.Value)
        desc = self.descCtrl.Value
        amount = self.amountCtrl.Value

        # Parse the amount.
        try:
            amount = self.CurrentAccount.ParseAmount(amount)
        except ValueError:
            if amount == "":
                baseStr = _("No amount entered in the 'Amount' field.")
            else:
                baseStr = _("'%s' is not a valid amount.") % amount

            dlg = wx.MessageDialog(
                self.Parent, baseStr + " " +
                _("Please enter a number such as 12.34 or -20."),
                _("Invalid Transaction Amount"), wx.OK | wx.ICON_ERROR)
            dlg.ShowModal()
            return

        return amount, desc, date
Example #5
0
 def getDateRange(self):
     return [helpers.wxdate2pydate(date) for date in (self.startDate.Value, self.endDate.Value)]
Example #6
0
 def getDateRange(self):
     return [helpers.wxdate2pydate(date) for date in (self.startDate.Value, self.endDate.Value)]