收款单创建
应收收款、订单收款、预收、预收退回
- 应收收款
HTTP请求
POST /api/funds/fund_collectings请求参数
| 参数名 | 是否必须 | 说明 |
|---|---|---|
| 无 | 无 | 无 |
| number | string | 收款单编号 |
| customer_id | integer | 客户 |
| status | string | 审批状态(draft: 草稿;approving: 待审批;submitted: 已提交;rejected: 已驳回;passed: 审批通过;deprecated: 已作废) |
| operator_id | integer | 收款人 |
| paid_on | string | 收款日期 |
| note | string | 备注 |
| category | string | 收款类别(collecting) |
| collectings_fund_collectings_attributes[0][collecting_id] | integer | 应收ID |
| collectings_fund_collectings_attributes[0][collect_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][fund_account_id] | integer | 资金账户ID |
| fund_accounts_collectings_attributes[0][settlement_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][account_name] | string | 资金账户名称 |
| document_addition_attributes[copy_to][] | array | 抄送人员Ids |
- 返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| fund_collecting[:id] | integer | 返回保存后收款单ID |
- 返回 JSON 数据
{
"status":{
"code":200,
"message":"OK"
},
"fund_collecting":{
"id":5994
}
}- 订单收款
HTTP请求
POST /api/funds/fund_collectings请求参数
| 参数名 | 是否必须 | 说明 |
|---|---|---|
| 无 | 无 | 无 |
| number | string | 收款单编号 |
| customer_id | integer | 客户 |
| status | string | 审批状态(draft: 草稿;approving: 待审批;submitted: 已提交;rejected: 已驳回;passed: 审批通过;deprecated: 已作废) |
| operator_id | integer | 收款人 |
| paid_on | string | 收款日期 |
| note | string | 备注 |
| category | string | 收款类别(ordering) |
| collectings_fund_collectings_attributes[0][collecting_id] | integer | 应收ID |
| collectings_fund_collectings_attributes[0][collect_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][fund_account_id] | integer | 资金账户ID |
| fund_accounts_collectings_attributes[0][settlement_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][account_name] | string | 资金账户名称 |
| document_addition_attributes[copy_to][] | array | 抄送人员Ids |
- 返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| fund_collecting[:id] | integer | 返回保存后收款单ID |
- 返回 JSON 数据
{
"status":{
"code":200,
"message":"OK"
},
"fund_collecting":{
"id":5994
}
}- 预收
HTTP请求
POST /api/funds/fund_collectings请求参数
| 参数名 | 是否必须 | 说明 |
|---|---|---|
| 无 | 无 | 无 |
| number | string | 收款单编号 |
| customer_id | integer | 客户 |
| status | string | 审批状态(draft: 草稿;approving: 待审批;submitted: 已提交;rejected: 已驳回;passed: 审批通过;deprecated: 已作废) |
| operator_id | integer | 收款人 |
| paid_on | string | 收款日期 |
| note | string | 备注 |
| category | string | 收款类别(advance) |
| fund_accounts_collectings_attributes[0][fund_account_id] | integer | 资金账户ID |
| fund_accounts_collectings_attributes[0][settlement_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][account_name] | string | 资金账户名称 |
| document_addition_attributes[copy_to][] | array | 抄送人员Ids |
- 返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| fund_collecting[:id] | integer | 返回保存后收款单ID |
- 返回 JSON 数据
{
"status":{
"code":200,
"message":"OK"
},
"fund_collecting":{
"id":5994
}
}- 预收退回
HTTP请求
POST /api/funds/fund_collectings请求参数
| 参数名 | 是否必须 | 说明 |
|---|---|---|
| 无 | 无 | 无 |
| number | string | 收款单编号 |
| customer_id | integer | 客户 |
| status | string | 审批状态(draft: 草稿;approving: 待审批;submitted: 已提交;rejected: 已驳回;passed: 审批通过;deprecated: 已作废) |
| operator_id | integer | 收款人 |
| paid_on | string | 收款日期 |
| note | string | 备注 |
| category | string | 收款类别(backing) |
| fund_collectings_sub_fund_collectings_attributes[0][sub_fund_collecting_id] | integer | 预收单据 |
| fund_collectings_sub_fund_collectings_attributes[0][offset_amount] | string | 本次退回金额 |
| fund_accounts_collectings_attributes[0][fund_account_id] | integer | 资金账户ID |
| fund_accounts_collectings_attributes[0][settlement_amount] | string | 本次收款金额 |
| fund_accounts_collectings_attributes[0][account_name] | string | 资金账户名称 |
| document_addition_attributes[copy_to][] | array | 抄送人员Ids |
- 返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| fund_collecting[:id] | integer | 返回保存后收款单ID |
- 返回 JSON 数据
{
"status":{
"code":200,
"message":"OK"
},
"fund_collecting":{
"id":5994
}
}文档更新时间: 2025-03-17 14:52 作者:张艳军