一、基础数据
T_BC_ExpenseType 费用类型
T_BC_OperationType 业务类别
T_BC_CollectionAccount 收款信息
T_BC_AccountLimit 员工额度表
T_BC_BudgetControl 额度控制
T_BC_ProxyReimburse 代理报销
T_BC_REIMBURSELEVELSETTING 额度设置
T_BC_ReimburseLevel 报销级别
T_BC_STAFFREIMBURSELEVELSET 差旅标准级别
T_BC_EvectionStandard 差旅标准
二、主要业务表
--费用申请单
SELECT distinct bat.* FROM T_BC_OtherExpenseBill bat
inner join T_BC_OtherExpenseBillEntry baten on bat.fid=baten.fbillid
inner join T_ORG_Company org on bat.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and bat.fnumber='单据编码'
--出差申请单
SELECT distinct bat.* FROM T_BC_EvectionReqBill bat
inner join T_BC_EvectionReqBillEntry baten on bat.fid=baten.fbillid
inner join T_ORG_Company org on bat.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and bat.fnumber='单据编码'
--费用报销单
SELECT distinct bat.* FROM T_BC_BizAccountBill bat
inner join T_BC_BizAccountBillEntry baten on bat.fid=baten.fbillid
inner join T_ORG_Company org on bat.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and bat.fnumber='单据编码'
--对公报销单
SELECT distinct bat.* FROM T_BC_BizAccountOutBill bat
inner join T_BC_BizAccountOutBillEntry baten on bat.fid=baten.fbillid
inner join T_ORG_Company org on bat.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and bat.fnumber='单据编码'
--差旅报销单
SELECT distinct bat.* FROM T_BC_TravelAccountBill bat
inner join T_BC_TravelAccountBillEntry baten on bat.fid=baten.fbillid
inner join T_ORG_Company org on bat.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and bat.fnumber='单据编码'
--借款单
SELECT distinct day.* FROM T_BC_DailyLoanBill day
inner join T_BC_DailyLoanBillEntry dayen on day.fid= dayen .fbillid
inner join T_ORG_Company org on dayen.FCompanyID=org.fid
where org.fnumber='申请人公司编码'
--and day.fnumber='单据编码'
--还款单
SELECT distinct rp.* FROM T_BC_RePaymentBill rp
inner join T_BC_RePaymentBillEntry rpen on rp.fid=rpen.FPARENTID
inner join T_ORG_Company org on rp.FAPPLIERCOMPANYID=org.fid
where org.fnumber='申请人公司编码'
--and rp.fnumber='单据编码'
--多收款人分录
T_BC_BIZACCOUNTBCE 费用报销单多收款人分录
T_BC_BIZAOBAE 对公费用报销单多收款人分录
--核销表
T_BC_BizABLCE 借款核销表
T_BC_BIZABRCE 申请核销表
三、发票云相关
t_bc_TicketEntry 费用报销单发票信息分录
T_BC_PurTicketEntry 物品采购报销单信息分录
T_BC_BizOutTicketEntry 对公费用报销单发票信息分录
T_BC_TraTicketEntry 差旅报销单发票信息分录
单据状态
制单=10,暂存=20,已提交=25,已废弃=27,审核中=30,审核未通过=40,已生成付款单=43,已生成凭证=45,已生成K/3凭证=46,已生成凭证未付款=47,取消=50,审核通过=60,已付款=70,等待付款=65,已关闭=80,已生成报销单=90,已挂账=110,暂挂账=115,已生成结算单=120,付款中=125,收款中=130,已收款=135,已生成收款单=140
推荐阅读