Kingdee K3 order book increased real-time inventory

When K3 order book increased display real-time inventory

First,  step

1, create a view, according to the total inventory of materials.

2,  Book acquiring the target sequence typeid

3.  Modify order book relationship table ICTableRelation, an additional association with real-time inventory

4,  book field in the table is modified sequence ICChatBillTitle , additional display real-time inventory field.

5, when the sequential display hidden columns displayed by checking the field book stock filter.

 

Second, the  association describes the menu

No.

Table Name

Table function

1

ictransactiontype

Business Document type table

2

iclisttemplate

When the order book template table

3

ICTableRelation

Documents list all connection relationships between tables

4

Icrctbhilltitle

Table documents list display field

 

Third,  step by step implementation:

1,  to create a total inventory view xn_jskc .

CREATE VIEW [dbo].[xn_jskc]

AS

SELECT a.FItemID, SUM(a.FQty) kc

FROM dbo.ICInventory a LEFT JOIN dbo.t_Stock b ON a.FStockID = b.FItemID

WHERE 1=1 AND b.FTypeID = 500 GROUP BY a.FItemID

 

2,  obtaining the target code book document template sequence , where sales order, for example, to obtain 32

SELECT flisttemplateid,* FROM ictransactiontype

WHERE fname LIKE '% sales order %'

 

When the code book template sequentially acquiring the code template , 61

SELECT ftemplateid,* FROM iclisttemplate WHERE fid = 32

 

3, when increasing the order book connection relationship association table

--select * from ICTableRelation where ftypeid = 61

INSERT INTO dbo.ICTableRelation(FTypeID,FTableName,FTableNameAlias,

FFieldName,FTableName11,FTableNameAlias11,FFieldName11,FLogic,FBillID,

FFieldID,FMode,FIndex,FCondition,FLeftParentheses,FRightParentheses,

FLogicOperator, FISConst, FConstType, FSubFilter)

SELECT ftypeid,ftablename,FTableNameAlias,FFieldName,'xn_jskc','kc',

'fitemid',flogic,fbillid,ffieldid,fmode,findex,'','','','=',0,0,'' 

FROM dbo.ICTableRelation WHERE ftypeid = 61 AND finterid = 16

 

4, when the display field increases order book

--SELECT * FROM ICChatBillTitle WHERE ftypeid = 61

 insert ICChatBillTitle (FInterID, FTypeID, FColCaption, FHeadSecond, 

FColName, FTableName, FColType, FColWidth, FVisible, FItemClassID, 

FVisForQuest,  FReturnDataType, FCountPriceType, FCtlIndex, FName, 

FTableAlias, FAction, FNeedCount, FIsPrimary, FLogicAction, FStatistical, 

FMergeable, FVisForOrder, FColCaption_CHT, FColCaption_EN, FControl, 

FMode, FControlType, FPrecisionField, FAlign, FEditable, format, 

FFormatType)

Select 500001, 61, ' real-time inventory $' , '', 'KC', 'xn_jskc', 2, 1000,. 3, -1, 0,

0, 1, 5, 'kc ', 'kc', '', 1, 0, '', 1, 0,1, ' even though the stock $' , '$ stockQty', 

0, 0, 5, '', 0, 0, '', 0

 

5,  the timing Book Filters check display hidden columns.

 

Fourth, the  function reference table field Interpretation

1. ICTransactionType : This table reflects the overall supply chain all the documents.

ICTransactionType

FbrNo

 

IN

ID document type internal affairs

FROB

Red and blue flag word: 1 indicates that the document in blue region dividend, 0 represents no red and blue points word

Fname

Document Name

Ftype

Document Category

FtempalteID

Template document ID (and ICTemplate, ICTemplateEntry table corresponding to FID

FvchTempalteID

(Unused)

FheadTable

Document header corresponding to the name of the database table

FentryTable

Document database table corresponding to table body

FcheckPro

(Unused)

FformWidth

The default document entry width

FformHeight

The default height of the document entry

FfixCols

Fixing the number of columns of the document

 

2. ICListTemplate : This table reflects the overall book of the supply chain when ordered.

ICListTemplate

IN

Inner code (primary key)

Fname

Documents list names

FTemplateID

Template ID

FLogicStr

 

Implied menu / Permission Validation

SS: 1 distinction invoice / document review ( already canceled )

H: hidden menu

Fmodule, FmoduleDetail: test weight (and t_Objecttype corresponding to)

 

FBillTemplateID

 

Corresponding to the document ID Template

 

FmenuID

菜单模板,与ICListtoolbar 表中的FID对应

Ffilter

 

缺省过滤条件

 

FSourceType

1-序时簿模板,2-交叉分析报表

FgoupID

模板属于哪个业务系统

FneedStatistic

模板在交叉分析报表中是否显示

FneedCount

是否有合计行

FBillCls

 

单据类型(200-入库单 201-出库单 202-调拨单 204-盘盈/盘亏单)

 

FMasterTable

 

主表别名(优化需要)

 

 

3. ICChatbilltitle:该表反映了供需链所有序时簿显示字段的所有情况。

ICChatBillTitle

FInterID

内码 (<1000,自定义字段>1000) (900-999为多级审核字段),在k/3V10.2

由于在单据和序时簿上增加审核日期,现在将900-999分为两段,900-949为多级审核人、950-949为多级审核日期。

FTypeID

模版ID,对应ICListTemplate的FTemplateID

FColCaption

列标题(支持双层表头)

FHeadSecond

FColName

 

字段别名,rs字段和界面的对应

 

FTableName

取数的表

FName

取数字段

 

FTableAlias

取数的表别名

FCtlIndex

 

过滤条件中的显示格式控制,与类型相关

FColType

 

数据类型, 主要用来控制显示格式0:日期; 1:字符串,2:数量;3ID4:单价;5:折扣率;6:金额;7:,8:,9:汇率10-利率;11-税额;12—只有关联标志使用,用于特殊处理(v10.2进行了关联标志的优化以后,可以不需要了)40—本位币金额 

 

FColWidth

 

列宽,一般都是

1000

FVisible

 

是否显示,如id字段需要隐藏

 

FVisForQuest

 

过滤条件中是否可见

 

FVisForOrder

 

过滤界面排序是否可见。

FItemClassID

 

过滤条件中F7时的选择

 

FReturnDataType

过滤条件中f7返回类型: 0,内码;1,编码;2,名称

 

FStatistical

改字段在交叉分析报表中是否可见

FAction

特殊取数

FControl

需要特殊处理的字段1-凭证;2Action4-数量;5-金额

FIsPrimary

1-内码;2-分录号;3FTranType

FNeedCount

 

改字段是否统计

 

FMergeble

 

是否融合

 

FFormat

字段格式(当前处理了日期类型,数字类型)和单据模板上的格式相同

感谢  林德剑 提供

Guess you like

Origin www.cnblogs.com/hjsofware/p/10927766.html