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


Python MethodUtil.rmbupper方法代码示例

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


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

示例1: index

# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import rmbupper [as 别名]
def index(req):
    numbers = 49962.01
    upp = mth.rmbupper(numbers)
    print(upp)
    return upp
开发者ID:KGPython,项目名称:scm,代码行数:7,代码来源:test.py

示例2: balanceArticle

# 需要导入模块: from base.utils import MethodUtil [as 别名]
# 或者: from base.utils.MethodUtil import rmbupper [as 别名]
def balanceArticle(request):
    grpCode = request.session.get('s_grpcode')       #用户所属单位
    s_suppname = request.session.get('s_suppname')   #用户所属单
    grpName = Constants.SCM_UNIT[grpCode]
    contracttype = request.session.get("s_contracttype")   #经营方式
    paytypeid = str(int(request.session.get("s_paytypeid")))   #经营方式

    sheetId = request.GET.get('sheetid','')
    queryAction = request.POST.get('actionTxt','')
    #更新确认状态
    if queryAction == 'check':
        balanceObj = Billhead0.objects.get(sheetid__contains=sheetId,grpcode=grpCode)
        balanceObj.status='Y'
        balanceObj.save()

    #结算通知单汇总      ,beginsdate,endsdate
    balance = Billhead0.objects.values("shopid","venderid","vendername","sheetid","paytype","begindate","enddate"
                                               ,"editdate","curdxvalue","payablemoney","kxinvoice","kxmoney","kxcash",
                                               "premoney","editor","checker","paychecker","contracttype","beginsdate","endsdate","advance")\
                                       .get(sheetid__contains=sheetId)
    #结算通知明细
    balanceItems = Billheaditem0.objects.values("inshopid","refsheettype","refsheetid","managedeptid","payabledate",
                                                "costvalue","costtaxvalue","costtaxrate","salevalue","dkrate","invoicesheetid")\
                                        .filter(sheetid__contains=sheetId).exclude(costvalue=0)\
                                        .order_by("inshopid","refsheettype","refsheetid")

    itemList = []
    itemShopId = None
    for item in balanceItems:
        shopid = item["inshopid"]
        if itemShopId != shopid:
            vlist = []
            itemList.append([shopid,vlist])

        vlist.append(item)
        itemShopId = item["inshopid"]

    itemList = sorted(itemList)

    #本期帐扣发票金额
    if balance.get('kxinvoice'):
        cfpkx = balance.get('kxinvoice')
    else:
        cfpkx = decimal.Decimal(0.0)

    #帐扣扣项 帐扣金额
    zkkx = balance.get('kxmoney')-balance.get('kxcash')

     #本期应付金额
    if balance.get('curdxvalue'):
        curdxValue = balance.get('curdxvalue')
    else:
        curdxValue = decimal.Decimal(0.0)

    if balance.get('payablemoney'):
        payableMoney = balance.get('payablemoney')
    else:
        payableMoney= decimal.Decimal(0.0)

    #预付款余额
    if balance.get('premoney'):
        premoney = balance.get('premoney')
    else:
        premoney = decimal.Decimal(0.0)

    if curdxValue == 0:
        invoicePay =payableMoney-cfpkx#应开票金额
        realPay = payableMoney-zkkx-premoney#实付金额
    else:
        invoicePay = curdxValue-cfpkx
        realPay = curdxValue-zkkx-premoney

    #实付金额大写
    realPayUpper = mtu.rmbupper(float(round(realPay,2)))
    #打印日期
    printDate = datetime.date.today()
    ssum1 = decimal.Decimal(0.0)
    ssum2 = decimal.Decimal(0.0)
    ssum3 = decimal.Decimal(0.0)
    try:
        conn = mtu.getMysqlConn()
        cur = conn.cursor()
        sql = """select InShopID,sum(CostValue) AS CostValue,SUM(CostTaxValue) AS CostTaxValue,sum(salevalue) AS SaleValue
                 from billheaditem0 where SheetID ='{sheetId}' group by InShopID""".format(sheetId=sheetId)
        cur.execute(sql)
        slist = cur.fetchall()
        sdict = {}
        for row in slist:
            ssum1 += row["CostValue"]
            ssum2 += (row["CostValue"]-row["CostTaxValue"])
            ssum3 += row["SaleValue"]
            sdict[row["InShopID"]] = [ row["CostValue"],(row["CostValue"]-row["CostTaxValue"]),row["SaleValue"]]
    except Exception as e:
        print(e)

    #应结金额总额
    totalCostValue = decimal.Decimal(0.0)
    #税金总额
    totalCostTax = decimal.Decimal(0.0)
    mdept = []
#.........这里部分代码省略.........
开发者ID:KGPython,项目名称:scm,代码行数:103,代码来源:views.py


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