分销销售订单生成采购订单携带供应商付款条件

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:1

分销销售订单生成采购订单携带供应商付款条件

分销购销销售订单审核自动生成采购订单时,供应商是单据转换插件做的,因此想要携带供应商的付款条件,需要二开单据转换插件处理: ```python import clr clr.AddReference('System') clr.AddReference('Kingdee.BOS') clr.AddReference('Kingdee.BOS.Core') clr.AddReference("Kingdee.BOS.App") clr.AddReference('Kingdee.BOS.ServiceHelper') clr.AddReference('Kingdee.BOS.DataEntity') clr.AddReference("Kingdee.BOS.App.Core") clr.AddReference('Kingdee.BOS.ServiceHelper') clr.AddReference("Kingdee.BOS.Contracts") from Kingdee.BOS import * from Kingdee.BOS.Core.Metadata import * from System import * from System import StringComparison from Kingdee.BOS.Core.Metadata.ConvertElement.PlugIn.Args import * from Kingdee.BOS.App.Data import * from System.Collections.Generic import * from Kingdee.BOS.ServiceHelper import * from Kingdee.BOS.Core.Metadata import SelectorItemInfo from Kingdee.BOS.Core.SqlBuilder import QueryBuilderParemeter from Kingdee.BOS.Orm.DataEntity import * from Kingdee.BOS.Contracts import * from Kingdee.BOS.App.Core import * def AfterConvert(e): supplierIdField = e.TargetBusinessInfo.GetField("FSupplierId") billHeads =e.Result.FindByEntityKey("FBillHead") viewService = ViewService() for billHead in billHeads: supplier = billHead["SupplierId"] supplierFinance = supplier["supplierFinance"] if supplier != None: supplierFinance = supplier["supplierFinance"] if supplierFinance != None and supplierFinance.Count >0: if supplierFinance[0]["PayCondition"] != None: payConditionId = supplierFinance[0]["PayCondition_Id"] POOrderFinance = billHead.DataEntity["POOrderFinance"][0] POOrderFinance["PayConditionId_Id"] = payConditionId payConditionField = e.TargetBusinessInfo.GetField("FPayConditionId") payCondition = viewService.LoadSingle(this.Context, payConditionId, payConditionField.RefFormDynamicObjectType) POOrderFinance["PayConditionId"] = payCondition ``` ![image.webp](/download/0100d16db9cd0a394166987ccb6b327bec4c.webp) 注册后上移到倒数第二,否则不会自动生成付款计划 **其他更多文章入口:**[https://vip.kingdee.com/link/s/lbRPP](https://vip.kingdee.com/link/s/lbRPP)

分销销售订单生成采购订单携带供应商付款条件

分销购销销售订单审核自动生成采购订单时,供应商是单据转换插件做的,因此想要携带供应商的付款条件,需要二开单据转换插件处理:```pytho...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息