电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

复制单据重取汇率

来源:金蝶云社区作者:金蝶2024-09-235

复制单据重取汇率

@[TOC](目录) ### pytho案例(以采购退料单为例) ```python import clr clr.AddReference('System') clr.AddReference('mscorlib') clr.AddReference('Kingdee.BOS.Core') clr.AddReference('Kingdee.K3.SCM.ServiceHelper') from System import * from Kingdee.BOS.Core.Metadata import CreateFrom from Kingdee.K3.SCM.ServiceHelper import * def AfterCreateNewData(e): if this.View.OpenParameter.CreateFrom == CreateFrom.Copy: SetExchangeRate() def SetExchangeRate(): locCurr = this.View.Model.GetValue("FLocalCurrId") exchangeType = this.View.Model.GetValue("FExchangeTypeId") setCurr = this.View.Model.GetValue("FSettleCurrId") if locCurr == None or exchangeType == None or setCurr == None: return locCurrId = Convert.ToInt64(locCurr["Id"]) exchangeTypeId = Convert.ToInt64(exchangeType["Id"]) setCurrId = Convert.ToInt64(setCurr["Id"]) billdate = Convert.ToDateTime(this.View.Model.GetValue("FDate")) if locCurrId == setCurrId or billdate == DateTime.MinValue: this.View.Model.SetValue("FExchangeRate", 1) else: rateNDec = CommonServiceHelper.GetExchangeRateAndDecimal(this.Context, setCurrId, locCurrId, exchangeTypeId, billdate, billdate) this.View.Model.SetValue("FExchangeRate", rateNDec.Key) this.View.GetFieldEditor("FExchangeRate", 0).Scale = Convert.ToInt16(rateNDec.Value) this.View.InvokeFieldUpdateService("FExchangeRate", 0) def AfterCopyData(e): exchangeRate = Convert.ToDecimal(this.View.Model.GetValue("FExchangeRate")) currencyObj = this.View.Model.GetValue("FSettleCurrId") iAmountDigits = 2 if currencyObj != None: iAmountDigits = Convert.ToInt16(currencyObj["Am

复制单据重取汇率

@[TOC](目录)### pytho案例(以采购退料单为例)```pythonimport clrclr.AddReference('System')clr.AddReference('mscorlib')clr.AddRef...
点击下载文档文档为doc格式

声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

已经是第一篇
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信