当前位置: 首页>>代码示例>>Python>>正文


Python C3sMember.afm_num_shares_paid方法代码示例

本文整理汇总了Python中c3smembership.data.model.base.c3smember.C3sMember.afm_num_shares_paid方法的典型用法代码示例。如果您正苦于以下问题:Python C3sMember.afm_num_shares_paid方法的具体用法?Python C3sMember.afm_num_shares_paid怎么用?Python C3sMember.afm_num_shares_paid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在c3smembership.data.model.base.c3smember.C3sMember的用法示例。


在下文中一共展示了C3sMember.afm_num_shares_paid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: stats_view

# 需要导入模块: from c3smembership.data.model.base.c3smember import C3sMember [as 别名]
# 或者: from c3smembership.data.model.base.c3smember.C3sMember import afm_num_shares_paid [as 别名]
def stats_view(request):
    """
    This view lets accountants view statistics:
    how many membership applications, real members, shares, etc.
    """
    # countries_dict = C3sMember.get_countries_list()
    _cl = C3sMember.get_countries_list()
    _cl_sorted = _cl.items()
    # print "die liste: {}".format(_cl_sorted)
    import operator
    _cl_sorted.sort(key=operator.itemgetter(1), reverse=True)
    # print "sortiert: {}".format(_cl_sorted)
    share_information = request.registry.share_information
    return {
        # form submissions
        '_number_of_datasets': C3sMember.get_number(),
        'afm_shares_unpaid': C3sMember.afm_num_shares_unpaid(),
        'afm_shares_paid': C3sMember.afm_num_shares_paid(),
        # shares
        'num_shares_members': share_information.get_share_count(),
        # 'num_shares_mem_norm': Shares.get_sum_norm(),
        # 'num_shares_mem_inv': Shares.get_sum_inv(),

        # memberships
        'num_members_accepted': C3sMember.get_num_members_accepted(),
        'num_non_accepted': C3sMember.get_num_non_accepted(),
        'num_nonmember_listing': C3sMember.nonmember_listing_count(),
        'num_duplicates': len(C3sMember.get_duplicates()),
        # 'num_empty_slots': C3sMember.get_num_empty_slots(),
        # normal persons vs. legal entities
        'num_ms_nat_acc': C3sMember.get_num_mem_nat_acc(),
        'num_ms_jur_acc': C3sMember.get_num_mem_jur_acc(),
        # normal vs. investing memberships
        'num_ms_norm': C3sMember.get_num_mem_norm(),
        'num_ms_inves': C3sMember.get_num_mem_invest(),
        'num_ms_features': C3sMember.get_num_mem_other_features(),
        'num_membership_lost': C3sMember.get_num_membership_lost(),
        # membership_numbers
        'num_memnums': C3sMember.get_num_membership_numbers(),
        'max_memnum': C3sMember.get_highest_membership_number(),
        'next_memnum': C3sMember.get_next_free_membership_number(),

        # countries
        'num_countries': C3sMember.get_num_countries(),
        'countries_list': _cl_sorted,

        # dues stats
        'dues15_stats': DuesInvoiceRepository.get_monthly_stats(2015),
        'dues16_stats': DuesInvoiceRepository.get_monthly_stats(2016),
        'dues17_stats': DuesInvoiceRepository.get_monthly_stats(2017),
        'dues18_stats': DuesInvoiceRepository.get_monthly_stats(2018),
        'dues19_stats': DuesInvoiceRepository.get_monthly_stats(2019),

        # staff figures
        'num_staff': len(Staff.get_all())
    }
开发者ID:C3S,项目名称:c3sMembership,代码行数:58,代码来源:statistics.py


注:本文中的c3smembership.data.model.base.c3smember.C3sMember.afm_num_shares_paid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。