def credit_str(self):

        return format_currency(self.credit)
    def balance_str(self):

        return format_currency(self.balance)
    def str_value(self, node):

        return format_currency(self.compute(node))
    def debit_str(self):

        return format_currency(self.debit)
Beispiel #5
0
 def debit_str(self):
     return format_currency(self._debit)
Beispiel #6
0
    def amount_str(self):

        return format_currency(self._amount)
Beispiel #7
0
 def balance_str(self):
     return format_currency(self.balance)
Beispiel #8
0
 def credit_str(self):
     return format_currency(self._credit)
    def str_value(self, node):

        return format_currency(self.compute(node))
    def amount_str(self):

        return format_currency(self._amount)
    yaml_file = "systeme-base-bilan-tableau.yml"
    # yaml_file = 'systeme-base-resultat-tableau.yml'
    yaml_loader = Results.YamlLoader(yaml_file)
    table = yaml_loader.table

    computation_visitor = table.compute(account_chart)
    for column in table:
        print("\n" + column.title)
        for row in column:
            if not isinstance(row, Results.EmptyRow):
                title_width = 80
                title = "  " * row.level + row.title[: title_width - 2 * row.level]
                value = computation_visitor[row]
                if row.show and value:
                    string_format = "{:" + str(title_width) + "} {}"
                    print(string_format.format(title, format_currency(value)))
                else:
                    string_format = "{:" + str(title_width) + "}"
                    print(string_format.format(title))

if False:
    from FinancialSimulator.Accounting import Results

    # yaml_file = 'systeme-abrege-resultat-tableau.yml'
    # yaml_file = 'systeme-base-bilan-tableau.yml'
    yaml_file = "systeme-base-resultat-tableau.yml"
    yaml_loader = Results.YamlLoader(yaml_file)
    table = yaml_loader.table

    computation_visitor = table.compute(account_chart, set_evaluator=True)
    evaluator = computation_visitor.evaluator