# 收付款记录
本文档将详细列举当前系统支持收付款相关的 webhook
# 创建收付款记录
curl 示例请求:
curl --request POST \
--url 'http://${yourhost}/${yourpath}?businessType=CREATE_PAYMENT' \
--header 'content-type: application/json' \
--data '{"requestId":"244c229c-4f5f-48e9-b938-2a80217bdf39","businessType":5000,"data":{"bankAccount":{"bank":null,"bankAccount":null,"bankName":null},"type":"PURCHASE_ORDER_OUT","number":"22022400000002","paymentDate":"2022-02-24","paymentMoney":1336.0000,"writtenMoney":1336.000000,"writeOffsProgress":"ALL_WRITE_OFFS","comment":"","attachments":[],"currency":"CNY","customer":{"name":"上海xxx有限公司","code":"10201","category":"普通"},"state":"CONFIRMED","writeOffRecords":[{"deliveryNumber":"R-220224-001","inOutInventoryNumber":"L-220224-001","operateTime":{"year":2022,"month":"FEBRUARY","nano":0,"monthValue":2,"dayOfMonth":24,"hour":11,"minute":54,"second":10,"dayOfYear":55,"dayOfWeek":"THURSDAY","chronology":{"calendarType":"iso8601","id":"ISO"}},"writeOff":1000.000000,"orderNumber":"2022022401","orderTotalMoney":1336.0,"orderCreateTime":{"year":2022,"month":"FEBRUARY","nano":0,"monthValue":2,"dayOfMonth":24,"hour":11,"minute":52,"second":54,"dayOfYear":55,"dayOfWeek":"THURSDAY","chronology":{"calendarType":"iso8601","id":"ISO"}},"currency":"CNY","itemCode":"电脑-002","quantity":5.000000,"type":"INVENTORY_WRITE_OFF_RECORD"},{"deliveryNumber":"R-220224-001","inOutInventoryNumber":"L-220224-001","operateTime":{"year":2022,"month":"FEBRUARY","nano":0,"monthValue":2,"dayOfMonth":24,"hour":11,"minute":54,"second":10,"dayOfYear":55,"dayOfWeek":"THURSDAY","chronology":{"calendarType":"iso8601","id":"ISO"}},"writeOff":336.000000,"orderNumber":"2022022401","orderTotalMoney":1336.0,"orderCreateTime":{"year":2022,"month":"FEBRUARY","nano":0,"monthValue":2,"dayOfMonth":24,"hour":11,"minute":52,"second":54,"dayOfYear":55,"dayOfWeek":"THURSDAY","chronology":{"calendarType":"iso8601","id":"ISO"}},"currency":"CNY","itemCode":"test55-010","quantity":6.000000,"type":"INVENTORY_WRITE_OFF_RECORD"}],"isReject":"OFF","enterpriseCode":"10201","createBy":"test"}}'
请求报文说明
{
"requestId":"244c229c-4f5f-48e9-b938-2a80217bdf39",//请求id
"businessType":5000,//业务类型
"data":{
"bankAccount":{//收付款单账户信息
"bank":null,//开户银行
"bankAccount":null,//开户账号
"bankName":null//账号名称
},
"type":"PURCHASE_ORDER_OUT",//收付款单类型 SALES_ORDER_IN(0,"订单收款"),
// SALES_ORDER_OUT(2,"订单退款"),
// PURCHASE_ORDER_OUT(1,"采购单付款"),
// PURCHASE_ORDER_IN(3,"采购单收款"),
"number":"22022400000002",//首付款单号
"paymentDate":"2022-02-24",//收付款日期
"paymentMoney":1336,//收付款金额
"writtenMoney":1336,//收付单已核销金额
"writeOffsProgress":"ALL_WRITE_OFFS",//收付款核销记录 NO_WRITE_OFFS(0, "未核销"),
// PART_WRITE_OFFS(1, "部分核销"),
// ALL_WRITE_OFFS(2, "全部核销");
"comment":"",//收付款单备注信息
"attachments":[//收付款单附件信息
],
"currency":"CNY",//收付款单币种
"customer":{//企业信息
"name":"上海xxx有限公司",//企业名称
"code":"10201",//企业编号
"category":"普通"//企业分类
},
"state":"CONFIRMED",//状态 AUDITING(1, "审核中"),
// CONFIRMED(2, "已审核"),
// CANCELED(3, "已取消"),
// PENDING_WAITING(4, "待提交");
"writeOffRecords":[//收付款单核销详情信息
{
"deliveryNumber":"R-220224-001",//发退货单号/退料单号
"inOutInventoryNumber":"L-220224-001",//出入库单号
"operateTime":{//出入库日期 java LocalDateTime
"year":2022,
"month":"FEBRUARY",
"nano":0,
"monthValue":2,
"dayOfMonth":24,
"hour":11,
"minute":54,
"second":10,
"dayOfYear":55,
"dayOfWeek":"THURSDAY",
"chronology":{
"calendarType":"iso8601",
"id":"ISO"
}
},
"writeOff":1000,//此核销记录在此收付款单核销的金额
"orderNumber":"2022022401",//单据编号
"orderTotalMoney":1336,//单据总金额
"orderCreateTime":{//单据创建日期 java LocalDateTime
"year":2022,
"month":"FEBRUARY",
"nano":0,
"monthValue":2,
"dayOfMonth":24,
"hour":11,
"minute":52,
"second":54,
"dayOfYear":55,
"dayOfWeek":"THURSDAY",
"chronology":{
"calendarType":"iso8601",
"id":"ISO"
}
},
"currency":"CNY",//单据币种
"itemCode":"电脑-002",//物料
"quantity":5,//数量
"type":"INVENTORY_WRITE_OFF_RECORD"//核销记录类型 INVENTORY_WRITE_OFF_RECORD(0, "出入库核销记录类型"),
// ORDER_EXTRA_PRICE_RECORD(1, "额外收费项核销类型"),
// INITIAL_CUSTOMER_FINANCE(2, "初始化账款核销类型");
},
{
"deliveryNumber":"R-220224-001",
"inOutInventoryNumber":"L-220224-001",
"operateTime":{
"year":2022,
"month":"FEBRUARY",
"nano":0,
"monthValue":2,
"dayOfMonth":24,
"hour":11,
"minute":54,
"second":10,
"dayOfYear":55,
"dayOfWeek":"THURSDAY",
"chronology":{
"calendarType":"iso8601",
"id":"ISO"
}
},
"writeOff":336,
"orderNumber":"2022022401",
"orderTotalMoney":1336,
"orderCreateTime":{
"year":2022,
"month":"FEBRUARY",
"nano":0,
"monthValue":2,
"dayOfMonth":24,
"hour":11,
"minute":52,
"second":54,
"dayOfYear":55,
"dayOfWeek":"THURSDAY",
"chronology":{
"calendarType":"iso8601",
"id":"ISO"
}
},
"currency":"CNY",
"itemCode":"test55-010",
"quantity":6,
"type":"INVENTORY_WRITE_OFF_RECORD"
}
],
"isReject":"OFF",//是否驳回
"enterpriseCode":"10201",//企业编号
"createBy":"test"//创建人姓名
}
}
# 审核收付款记录
请求报文说明
同上
# 撤回收付款记录
请求报文说明
同上
# 删除收付款记录
请求报文说明
{
"requestId":"244c229c-4f5f-48e9-b938-2a80217bdf39",//请求id
"businessType":5002,//业务类型
"data":"22022400000002"//收付款单号
}