出纳模块余额取数方法原创
1人赞赏了该文章
598次浏览
编辑于2019年08月02日 18:03:06
每次出纳结账会把当时的余额写入余额表
T_CN_CASHBALANCE(现金余额表表头)
T_CN_CASHBALANCEENTY(现金余额表表体)
T_CN_BANKACNTBAL(银行存款余额表头)
T_CN_BANKACNTBALENTRY(银行存款余额表体)
t_CN_InnerBankBal(内部账户余额表)
t_CN_InnerBankBalEntry(内部账户余额表体)
如果要按日期取余额则需要调用接口
Kingdee.K3.FIN.CN.ServiceHelper.CloseUnCloseServiceHelper
下的方法
/// <summary> /// 获取收付组织距离上一次结账后的余额(现金内部账户余额,报表用) /// </summary> /// <param name="ctx"></param> /// <param name="endDate">结束时间</param> /// <param name="lOrgID">收付组织ID</param> /// <param name="iBusinessType">业务类型,0为现金,1为银行</param> /// <param name="lCurrencyID">币别ID,为0则不添加按币别过滤</param> /// <param name="settleTypeIDList">结算方式ID,为null则不添加按结算方式过滤</param> /// <param name="strDocumentStatus">单据状态</param> /// <returns></returns> public static DynamicObjectCollection GetBalanceAmount(Context ctx, DateTime endDate, long lOrgID, int iBusinessType, long lCurrencyID = 0, List<long> settleTypeIDList = null, string strDocumentStatus = "")
/// <summary> /// 获取结算组织内部账户最新余额(收付组织下开设) /// </summary> /// <param name="ctx"></param> /// <param name="endDate"></param> /// <param name="lSettleOrgIDs">结算组织</param> /// <param name="iBusinessType"></param> /// <param name="lCurrencyID"></param> /// <param name="settleTypeList"></param> /// <param name="strDocumentStatus"></param> /// <returns></returns> public static DynamicObjectCollection GetBalanceAmountBySettleOrg(Context ctx, DateTime endDate, IEnumerable<long> lSettleOrgIDs, int iBusinessType, long lCurrencyID = 0, List<long> settleTypeList = null, string strDocumentStatus = "")
上面接口的iBusinessType参数值可参照下面这个枚举
namespace Kingdee.K3.FIN.Core { // 摘要: // 现金银行业务分类(银行存款流水账单据配置) public enum CashBankBusinessType { // 摘要: // 现金业务 Cash = 0, // // 摘要: // 银行业务 Bank = 1, // // 摘要: // 结算内部账户业务 SettleOrgInnerAcct = 2, // // 摘要: // 收付组织内部账户业务 PayOrgInnerAcct = 3, } }
/// <summary> /// 获取收付组织 内部账户某一期间的余额(资金组织下开设) /// </summary> /// <param name="ctx"></param> /// <param name="endDate">截止日期</param> /// <param name="lPayOrgId">收付组织</param> /// <param name="lCurrencyID">币别</param> /// <param name="settleTypeList">结算方式</param> /// <param name="strDocumentStatus">单据状态</param> /// <returns></returns> public static DynamicObjectCollection GetBalanceInnerAmountByPayOrg(Context ctx, DateTime endDate, IEnumerable<long> lPayOrgId, long lCurrencyID = 0, List<long> settleTypeList = null, string strDocumentStatus = "")
推荐阅读