成本计算获取等级品自定义权重
【应用场景】
二开插件重写成本计算过程中等级品权重获取,支持版本 PT-151005 [8.2.0.20231109]
【实现步骤】
1.继承AbstractCostCalPlugIn类,重写ReCalVarietalProductWeight方法
using Kingdee.K3.FIN.CB.App.Core.CostCal.Object; using Kingdee.K3.FIN.CB.App.Core.CostCal.Parameters; using Kingdee.K3.FIN.Core; using Kingdee.K3.FIN.Core.Object.CostCal; using System.Collections.Generic; namespace Kingdee.K3.FIN.CB.App.Core.PlugIn { /// <summary> /// 成本计算的插件 /// </summary> public class CostCalPlugIn:AbstractCostCalPlugIn { /// <summary> /// 重算等级品权重 /// </summary> /// <param name="seqs">产品序列对象</param> /// <param name="varetials">等级品</param> /// <param name="productingParameter">在产品计算参数类</param> /// <param name="weights">等级品权重</param> public override void ReCalVarietalProductWeight(List<ProductSeq> seqs, List<VarietalProduct> varetials, ProductingParameter productingParameter,Dictionary<ProductSeq, decimal> weights) { //按实际业务场景重新对等级品权重赋值 decimal allcoefc = 100; foreach (var seq in seqs) { //废品 if (seq.StockState == AcctgStockState.Waster) { //设置权重 allcoefc = 50; weights[seq] = seq.Qty * allcoefc; seq.Allcoefc = allcoefc; } //不良品 else if (seq.StockState == AcctgStockState.Badness) { //设置权重 allcoefc = 80; weights[seq] = seq.Qty * allcoefc; seq.Allcoefc = allcoefc; } else { //设置权重 allcoefc = 100; weights[seq] = seq.Qty * allcoefc; seq.Allcoefc = allcoefc; } } } } }
2.在数据库配置二开插件
通过 SELECT * FROM T_HS_APPPLUGIN WHERE FNUMBER='CBJS' 找到配置内码
再去T_HS_APPPLUGINENTRY表配置好二开插件
成本计算获取等级品自定义权重
【应用场景】 二开插件重写成本计算过程中等级品权重获取,支持版本 PT-151005 [8.2.0.20231109]【实现步骤】1.继承AbstractCostCalPlugIn...
点击下载文档
上一篇:实际工时归集,不能删除以前期间的单据下一篇:成本计算二开等级品计算
本文2024-09-23 02:16:46发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-151367.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章