凭证API引入凭证+流量傻瓜式操作(学习记录)原创
金蝶云社区-JOJOhe
JOJOhe
48人赞赏了该文章 284次浏览 未经作者许可,禁止转载编辑于2024年12月03日 14:46:37
summary-icon摘要由AI智能服务提供

凭证API接口是一个新功能,操作需先通过凭证接口写入测试数据获取JSON参数,再通过凭证API接口进行拼接操作。文章提供了操作指南、完整的JSON参数示例及传入流量时的报错解决方法,包括检查本方科目、对方科目及现金流量项目的指定,以及字段说明和总账参数的建议。

凭证API这个接口是一个新功能,操作指南可参考:https://vip.kingdee.com/article/264326947495511552?productLineId=1&lang=zh-CN;

通篇阅读下来,大概就是凭证+凭证API的拼接,前半部分可通过凭证接口写入测试数据获取JSON参数,后半部分就是拼接这一段

image.png

操作:1、在凭证接口通过填写测试数据获取参数

image.png

录入凭证后获取一段参数

2、在凭证API接口将那一段插入(对方科目,本方科目不知道怎么填,可录一张凭证,选下对方科目指定下流量看看)


image.png

分解下前面那段是

image.png

后面那段是这个:

image.png完整的JSON可参考:

{

"NeedUpDateFields": [],

"NeedReturnFields": [],

"IsDeleteEntry": "true",

"SubSystemId": "",

"IsVerifyBaseDataField": "false",

"IsEntryBatchFill": "true",

"ValidateFlag": "true",

"NumberSearch": "true",

"IsAutoAdjustField": "true",

"InterationFlags": "",

"IgnoreInterationFlag": "",

"IsControlPrecision": "false",

"ValidateRepeatJson": "false",

"Model": {

"FVOUCHERID": 0,

"FAccountBookID": {

"FNumber": "001"

},

"FDate": "2019-02-28 00:00:00",

"FBUSDATE": "2019-02-28 00:00:00",

"FYEAR": 2019,

"FPERIOD": 2,

"FVOUCHERGROUPID": {

"FNumber": "PRE001"

},

"FVOUCHERGROUPNO": "55",

"FATTACHMENTS": 0,

"FISADJUSTVOUCHER": false,

"FSourceBillKey": {

"FNumber": "78050206-2fa6-40e3-b7c8-bd608146fa38"

},

"FDocumentStatus": "Z",

"FEntity": [{

"FEXPLANATION": "1",

"FACCOUNTID": {

"FNumber": "6602.01"

},

"FDetailID": {

"FDETAILID__FFLEX5": {

"FNumber": "BM000045"

}

},

"FCURRENCYID": {

"FNumber": "PRE001"

},

"FEXCHANGERATETYPE": {

"FNumber": "HLTX01_SYS"

},

"FEXCHANGERATE": 1.0,

"FPrice": 0.0,

"FQty": 0.0,

"FAMOUNTFOR": 100.0,

"FDEBIT": 100.0,

"FCREDIT": 0.0,

"FEXPORTENTRYID": 0

},

{

"FEXPLANATION": "2",

"FACCOUNTID": {

"FNumber": "2221.05"

},

"FCURRENCYID": {

"FNumber": "PRE001"

},

"FEXCHANGERATETYPE": {

"FNumber": "HLTX01_SYS"

},

"FEXCHANGERATE": 1.0,

"FPrice": 0.0,

"FQty": 0.0,

"FAMOUNTFOR": 100.0,

"FDEBIT": 0.0,

"FCREDIT": 100.0,

"FEXPORTENTRYID": 0

},

{

"FEXPLANATION": "3",

"FACCOUNTID": {

"FNumber": "2221.05"

},

"FCURRENCYID": {

"FNumber": "PRE001"

},

"FEXCHANGERATETYPE": {

"FNumber": "HLTX01_SYS"

},

"FEXCHANGERATE": 1.0,

"FPrice": 0.0,

"FQty": 0.0,

"FAMOUNTFOR": 100.0,

"FDEBIT": 100.0,

"FCREDIT": 0.0,

"FEXPORTENTRYID": 0

},

{

"FEXPLANATION": "4",

"FACCOUNTID": {

"FNumber": "1002"

},

"FCURRENCYID": {

"FNumber": "PRE001"

},

"FEXCHANGERATETYPE": {

"FNumber": "HLTX01_SYS"

},

"FEXCHANGERATE": 1.0,

"FPrice": 0.0,

"FQty": 0.0,

"FAMOUNTFOR": 100.0,

"FDEBIT": 0.0,

"FCREDIT": 100.0,

"FEXPORTENTRYID": 0

}

],

"FVoucherCashflow": [{

"FVCHENTRYID": 4,

"FOPPVCHENTRYID": 3,

"FITEMID": {

"FNUMBER": "CI01.02.02"

},

"FSUBITEMID": {

"FNUMBER": "CI05.01.14"

},

"FCFAMOUNT": 100.0

},

{

"FVCHENTRYID": 1,

"FOPPVCHENTRYID": 2,

"FITEMID": {

"FNUMBER": ""

},

"FSUBITEMID": {

"FNUMBER": "CI05.01.14"

},

"FCFAMOUNT": 100.0

}

]

}

}

凭证传入

image.png

image.png

image.png

如果后续传流量报错可查:1.本方科目都是现金类科目 ,对方科目一般是非现金类科目,要指定主表;如果要指定附表要按满足附表指定条件指定。附表指定条件:

1、会计分录中有损益类科目,无现金类科目

2、会计分录中有损益类科目,有现金类科目,主表项定为非经营活动

3、会计分录中无损益类科目,有现金科类目,主表项定为经营活动

2.检查指定的现金流量项目系统里是否有,与对应账簿的科目表的会计要素是否相同。

3.现金流数据是否完整,流量是否平衡。不会的话,做个类似的凭证指定看看平不平。

字段说明如下(均必填): FVCHENTRYID:本方分录序号(凭证分录序号 FSeq) FOPPVCHENTRYID:对方分录序号(凭证分录序号 FSeq,跟 FVCHENTRYID 的序号不一样) FITEMID:主表项目 FSUBITEMID:附表项目 FCFAMOUNT:本位币金额(原币金额自动计算)

4、如果参数根据凭证指定流量检查了都没问题,但是传入还是提示附表不平类似:

image.png

建议检查下是否勾选总账参数【录入凭证时指定现金流量附表项目】,可暂时取消下,目前版本附表项目校验存在问题。后续版本会优化。

image.png


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