费用应付单选择入库单显示自定义字段二开指引知识
2人赞赏了该文章 92次浏览 编辑于2019年6月13日 14:15:14

费用应付单选择入库单显示自定义字段设置(只支持入库单单据头字段的设置)

1、  入库单单据头增加自定义字段(合同号)

2、  应付单管理-基础资料的采购入库单 添加字段(合同号)

3、  数据库重建试图

Sql:

/****** Object:  View [dbo].[V_AP_STKINSTOCK]    Script Date: 2018/12/14 15:35:20 ******/

DROP VIEW [dbo].[V_AP_STKINSTOCK]

GO

 

/****** Object:  View [dbo].[V_AP_STKINSTOCK]    Script Date: 2018/12/14 15:35:20 ******/

SET ANSI_NULLS ON

GO

 

SET QUOTED_IDENTIFIER ON

GO

 

CREATE VIEW [dbo].[V_AP_STKINSTOCK] AS SELECT A.FID fid, A.FBILLTYPEID, A.FSUPPLIERID, A.FBUSINESSTYPE, A.FBILLNO, A.FOWNERID, A.F_AB_HTH,

A.FOWNERTYPEID, A.FDATE, B.FSETTLEORGID, CASE ISNULL(C.FMULBASE, 0) WHEN 0 THEN '0' ELSE '1' END fisusedstock, 'A' fforbidstatus, 'C' fdocumentstatus

 FROM T_STK_INSTOCK A LEFT OUTER JOIN T_STK_INSTOCKFIN B ON A.FID = B.FID LEFT OUTER JOIN (SELECT DISTINCT FMULBASE FROM T_AP_PAYABLEIENTRYSTOCK) c ON

 C.FMULBASE = A.FID WHERE (A.FDOCUMENTSTATUS = 'C' AND EXISTS (SELECT 1 FROM T_HS_PURHOOKLOGENTRY HOOK WHERE ((HOOK.FBILLTYPEID = A.FBILLTYPEID AND HOOK.FHOOKEDBILLID = A.FID) AND HOOK.FIBTAG = '1')))

GO

Oracle:

CREATE OR REPLACE VIEW V_AP_STKINSTOCK AS

SELECT A.FID FID, A.FBILLTYPEID, A.FSUPPLIERID, A.FBUSINESSTYPE, A.FBILLNO, A.FOWNERID, A.FOWNERTYPEID, A.FDATE,A.F_AB_HTH, B.FSETTLEORGID, DECODE(NVL(C.FMULBASE, 0), 0, '0', '1')

 FISUSEDSTOCK, 'A' FFORBIDSTATUS, 'C' FDOCUMENTSTATUS FROM T_STK_INSTOCK A LEFT OUTER JOIN T_STK_INSTOCKFIN B

 ON A.FID = B.FID LEFT OUTER JOIN (SELECT DISTINCT FMULBASE FROM T_AP_PAYABLEIENTRYSTOCK) C ON C.FMULBASE = A.FID WHERE (A.FDOCUMENTSTATUS = 'C'

 AND EXISTS (SELECT 1 FROM T_HS_PURHOOKLOGENTRY HOOK WHERE ((HOOK.FBILLTYPEID = A.FBILLTYPEID AND HOOK.FHOOKEDBILLID = A.FID) AND HOOK.FIBTAG = '1'))) with read only;

4、 录入采购入库单:

5、 费用应付单选择入库单:



2