Ejemplo n.º 1
0
    def __init__(self, parent, period1, period2, *args, **kwargs):

        ANMTableWidget.__init__(self, parent=parent, *args, **kwargs)

        self.period1 = period1
        self.period2 = period2

        try:
            self.data = [account_update_summary(account, \
                                                self.period1, \
                                                self.period2) \
                    for account in session.query(Account).all()]
        except AccountNotConfigured as e:
            raise

        self.header = [_(u"Account N°"), _(u"Account Name"), \
                       _(u"%(period)s budget") \
                         % {'period': self.period1.short_name()}, \
                       _(u"%(period)s budget") \
                         % {'period': self.period2.short_name()}]

        self.setDisplayTotal(True, column_totals={2: None, 3: None}, \
                             label=_(u"TOTALS"))

        self.setSelectionMode(QtGui.QAbstractItemView.NoSelection)

        self.refresh(True)
Ejemplo n.º 2
0
    def __init__(self, parent, period, *args, **kwargs):

        ANMTableWidget.__init__(self, parent=parent, *args, **kwargs)

        self.setDisplayTotal(True, column_totals={4: None}, \
                             label=_(u"TOTALS"))

        self.header = [_(u'Order number'), _(u'Invoice number'), \
                       _(u'Invoice date'), _(u'Provider'), _(u'Amount')]

        self.set_data_for(period)

        self.refresh(True)
Ejemplo n.º 3
0
    def __init__(self, parent, period, *args, **kwargs):

        ANMTableWidget.__init__(self, parent=parent, *args, **kwargs)

        self.header = [_(u"Account No."), _(u"Name"), \
                        _(u"Budget"), _(u"Balance"), \
                        _(u"Go")]

        self.setDisplayTotal(True, column_totals={2: None, 3: None}, \
                             label=_(u"TOTALS"))

        self.set_data_for(period)

        self.refresh(True)