应收票据背书应收票据结算单携带票据二开字段(含源码实列) 原创
金蝶云社区-yl
yl
20人赞赏了该文章 1,174次浏览 未经作者许可,禁止转载编辑于2019年09月18日 10:42:35

        

应收票据列表背书携带票据上出票人为事列:

  1. 先继承应收票据背书动态表单插件Kingdee.K3.FIN.CN.Business.PlugIn.BillReceivable.BillRecOperEndorseEdit

  2. 重写创建应收票据结算单方法protected override DynamicObject CreateBillRecSettleEntry(DynamicObject dynamicObject, int iRow = 0)在此方法设置出票人信息即可


             /// <summary>
            /// 创建票据结算单表体
            /// </summary>
            /// <param name="dynamicObject">票据结算单信息</param>
            /// <param name="iRow">票据界面行号</param>
            /// <returns></returns>
            protected override DynamicObject CreateBillRecSettleEntry(DynamicObject dynamicObject, int iRow = 0)
            {

                DynamicObject obj = base.CreateBillRecSettleEntry(dynamicObject, iRow);
                DynamicObjectCollection collection = obj["CN_BILLRECSETTLEENTRY"] as DynamicObjectCollection;

                //this.DyBillReceivable这个是应收票据实体  应收票据上字段信息都有 
                //以设置出票人为列
                collection[0]["FDRAWER"] = Convert.ToString(this.DyBillReceivable["DRAWER"]);

                return obj;
            }

  3. 停用背书标准产品插件Kingdee.K3.FIN.CN.Business.PlugIn.BillReceivable.BillRecOperEndorseEdit  启用二开插件即可以下源码实列



    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Kingdee.BOS.Orm.DataEntity;
    using Kingdee.K3.FIN.CN.Business.PlugIn.BillReceivable;


    namespace test001
    {
        /// <summary>
        ///
        /// </summary>
        public class Class1: BillRecOperEndorseEdit
        {
            /// <summary>
            /// 创建票据结算单表体
            /// </summary>
            /// <param name="dynamicObject">票据结算单信息</param>
            /// <param name="iRow">票据界面行号</param>
            /// <returns></returns>
            protected override DynamicObject CreateBillRecSettleEntry(DynamicObject dynamicObject, int iRow = 0)
            {

                DynamicObject obj = base.CreateBillRecSettleEntry(dynamicObject, iRow);
                DynamicObjectCollection collection = obj["CN_BILLRECSETTLEENTRY"] as DynamicObjectCollection;

                //this.DyBillReceivable这个是应收票据实体 
                //以设置出票人为列
                collection[0]["FDRAWER"] = Convert.ToString(this.DyBillReceivable["DRAWER"]);

                return obj;
            }

        }
    }

     

  4.  有什么问题可以一起交流, 如果需要源码工程留下邮箱发给你

图标赞 20
20人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!