帖子
帖子
用户
博客
课程
显示全部楼层
13
帖子
0
勋章
105
Y币

采购订单对接问题

[复制链接]
发表于 2023-4-9 06:21:00
用api工具调用,返回200了。可是在采购入库列表里看不到。第二个问题是交易类型在哪里定义接口要必传,可以系统里没有,api工具里写的是,A20001,有具体含义么?
这个是返回:



{
"code": "200",
"message": "操作成功",
"data": {
  "bustype_code": "A20001",
  "currency_code": "CNY",
  "code": "CGRK000020230409000001",
  "exchRate": 1,
  "exchRateType": "n6uqh0ke",
  "invoiceVendor_code": "0001000006",
  "natCurrency_code": "CNY",
  "org_code": "001",
  "purchaseOrders": [
   {
    "inInvoiceOrg_code": "001",
    "inOrg_code": "001",
    "invExchRate": 1,
    "natMoney": 412000,
    "natSum": 12000,
    "natTax": 0,
    "natTaxUnitPrice": 0,
    "natUnitPrice": 0,
    "oriMoney": 4000000,
    "oriSum": 412000,
    "oriTax": 12000,
    "oriTaxUnitPrice": 206,
    "oriUnitPrice": 200,
    "taxitems_code": "VAT9",
    "priceQty": 2000,
    "product_cCode": "87654321",
    "priceUOM_Code": "KGM",
    "purUOM_Code": "KGM",
    "qty": 2000,
    "subQty": 2000,
    "unitExchangeTypePrice": 0,
    "unitExchangeType": 0,
    "invPriceExchRate": 0.1,
    "unit_code": "KGM",
    "isGiftProduct": true,
    "inInvoiceOrg": "1680603575638556728",
    "inInvoiceOrg__transferValue": true,
    "purUOM_Precision": 2,
    "purUOM": 1684296551743619080,
    "purUOMImport": 1684296551743619080,
    "purUOMImport_Name": "千克",
    "purUOM__transferValue": true,
    "priceUOM": 1684296551743619080,
    "priceUOM_Precision": 2,
    "priceUOMImport": 1684296551743619080,
    "priceUOMImport_Name": "千克",
    "priceUOM__transferValue": true,
    "unit": 1684296551743619080,
    "unit__transferValue": true,
    "inOrg": "1680603575638556728",
    "inOrg__transferValue": true,
    "taxRate": 9,
    "taxitems_import": "1680600594952749101",
    "taxitems": "1680600594952749101",
    "taxitems__transferValue": true,
    "product": 1697826248471347206,
    "product__transferValue": true,
    "paymentProgressACKs": [],
    "stockSensClue": "~",
    "id": 1699021297358995463,
    "mainid": 1699021297358995462,
    "proDescFlag": "0",
    "demandOrg": "1680603575638556728",
    "lineno": 10,
    "pubts": "2023-04-09 06:15:11",
    "ytenant": "n6uqh0ke"
   }
  ],
  "vendor_code": "0001000006",
  "vouchdate": "2023-04-09 05:00:00",
  "resubmitCheckKey": "OPENAPI_66f9b3aaec324974a183c74739e473b6_n6uqh0ke_951ada30e0969e954f5d9058fff6a516",
  "exchRateType__transferValue": true,
  "natCurrency": "1680600594952749084",
  "natCurrency__transferValue": true,
  "currency": "1680600594952749084",
  "currencyImport": "1680600594952749084",
  "currency__transferValue": true,
  "vendor": 1697876052924170249,
  "vendor__transferValue": true,
  "org": "1680603575638556728",
  "org__transferValue": true,
  "invoiceVendor": 1697876052924170249,
  "invoiceVendor__transferValue": true,
  "bustype": "1680600594950651943",
  "bustype__transferValue": true,
  "id": 1699021297358995462,
  "exchRateDate": "2023-04-09 05:00:00",
  "generalPurchaseOrderType": "1",
  "isMaxLimitPrice": false,
  "inventoryowner": 0,
  "creatorId": 1680599985052188672,
  "creator": "默认用户",
  "createTime": "2023-04-09 06:15:11",
  "createDate": "2023-04-09 06:15:11",
  "barCode": "st_purchaseorder|1699021297358995462",
  "status": 0,
  "isWfControlled": false,
  "pubts": "2023-04-09 06:15:11",
  "tenant": 3205488861139648,
  "yTenantId": "n6uqh0ke",
  "isFirstBillno": false,
  "totalQuantity": 2000,
  "moneysum": 412000
}
}


268
帖子
3
勋章
903
Y币
1、参考文档https://doc.yonisv.com/mybook/developergame/open-platform/nodata/nodata.html
2、不同的交易类型对应不同的业务流,菜单搜索交易类型即可拿到对应编码。
13
帖子
0
勋章
105
Y币
搜交易类型,里边什么内容都没有,没有设置交易类型。
13
帖子
0
勋章
105
Y币
第一个问题,又实验了一遍,调用成功,说税目编码有问题,查了一下,无问题
调用:
{
    "data": {
        "resubmitCheckKey": "00000d34974144b59cfa5c781b6dadd1",
        "bustype_code": "A20001",
        "currency_code": "CNY",
        "exchRate": 1,
        "exchRateType": "01",
        "invoiceVendor_code": "0001000006",
        "natCurrency_code": "CNY",
        "org_code": "001",
        "purchaseOrders": [
            {
                "inInvoiceOrg_code": "001",
                "inOrg_code": "001",
                "invExchRate": 1,
                "natMoney": 0,
                "natSum": 0,
                "natTax": 0,
                "natTaxUnitPrice": 0,
                "natUnitPrice": 0,
                "oriMoney": 0,
                "oriSum": 0,
                "oriTax": 0,
                "oriTaxUnitPrice": 0,
                "oriUnitPrice": 0,
                "taxitems_code": "VAT0",
                "priceQty": 1,
                "product_cCode": "87654321",
                "priceUOM_Code": "KGM",
                "purUOM_Code": "KGM",
                "qty": 1,
                "subQty": 23.32,
                "unitExchangeTypePrice": 0,
                "unitExchangeType": 0,
                "invPriceExchRate": 0,
                "unit_code": "KGM",
                "_status": "Insert"
            }
        ],
        "_status": "Insert",
        "vendor_code": "0001000006",
        "vouchdate": "2023-04-10 04:08:05"
    }
}

返回:

{
"code": "999",
"message": "[\n  {\n    \"sheet\": \"PurchaseOrders(1)\",\n    \"rootSheet\": null,\n    \"rowNum\": \"1\",\n    \"rootRowNum\": null,\n    \"message\": \"税目编码:VAT0查询结果不唯一\",\n    \"propertyName\": null,\n    \"errorMsgType\": 0\n  }\n]"
}

第二个问题,这个 "bustype_code": "A20001",是根据示例填写的,本项目,此条为空,没有数据,在交易类型栏目里是空,啥都没有,需要为了接口配置一下么,实际应用中,此菜单下无数据。
140
帖子
3
勋章
1521
Y币
交易类型是必填项, 另外 确认下科目编码是不是重了


本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册

X
13
帖子
0
勋章
105
Y币
客户id:n6uqh0ke

税目没有重复

贴不了图片,只能贴文字。

NO VAT
不征税
0
全部


启用

VAT FREE
免税
0
全部


启用

停用
编辑
删除
VAT0
0%
0
全部


启用

VAT1.5
1.5%
1.5
全部


启用

VAT13
13%
13
全部


启用

VAT3
3%
3
全部


启用

VAT5
5%
5
全部


启用

VAT6
6%
6
全部


启用

VAT9
9%
9
全部


启用
268
帖子
3
勋章
903
Y币
BIP304359 · 2023-4-10 04:19第一个问题,又实验了一遍,调用成功,说税目编码有问题,查了一下,无问题
调用:
{



以销售订单为例,接口的交易类型字段对应图中参照框。维护的菜单为交易类型


先找到单据菜单,点击右边展示出所有该单据的交易类型。接口传值要以你实际业务场景传,不能瞎传。先学习下业务知识,不同的交易类型要走不同的业务流程的。





本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册

X
268
帖子
3
勋章
903
Y币
BIP304359 · 2023-4-10 14:49客户id:n6uqh0ke

税目没有重复

税率重复的问题,等工单回复
13
帖子
0
勋章
105
Y币
YonJiao · 2023-4-10 17:15税率重复的问题,等工单回复

调用接口调用的是采购单,看错接口了。这个采购入库单,调用也是400,内部错误,帮忙看一下

https://yonbip-core3.diwork.com/ ... record/single/save?

入参

                            {
                               'data': {
                                        'resubmitCheckKey': 'a74b78b0435b48c791cf49972a1a8be0',
                                'needCalcLines': false,
                                'id': '',
                                        'code': '',
                                'org': '0001000006',
                                'purchaseOrg': '0001000006',
                                        'accountOrg': '0001000006',
                                        'inInvoiceOrg': '0001000006',
                                        'vouchdate': '2023-04-10',
                                'bustype': 'A15001',
                                'warehouse': '000002',
                                        'vendor': '0001000006',
                                    'currency': 'CNY',
                                        'natCurrency': 'CNY',
                                        'exchRateType': '01',
                                        'exchRate': 1,
                                        'operator': '00000001',
                                'memo': '抄码器入库',
                                        'purInRecords': [
                                                {
                                        'id': '',
                                        'rowno': 0,
                                                        'isSerialNoManage': false,
                                                        'product': '87654321',
                                                        'invExchRate': 1,
                                                        'unitExchangeType': 0,
                                                        'stockUnitId': 'KGM',
                                                        'qty': 1,
                                                        'subQty':23.45 ,
                                                        'unitExchangeTypePrice': 0,
                                                        'invPriceExchRate': 1,
                                                        'priceUOM': 'KGM',
                                                        'isGiftProduct': false,
                                                        'taxitems': 'VAT0',
                                                        'autoCalcCost': false,
                                                        'memo': '',
                                                        '_status': 'Insert'
                                                }
                                        ],
                                        '_status': 'Insert',
                                }
您需要登录后才可以回帖 登录

本版积分规则