Load context
On first use: Read ../../CLAUDE.md to obtain scenario-level configuration (supplier tiering/payment terms/approval hierarchy/compliance rules).
/ap-master — Accounts Payable Master Process
Complete AP cycle
Step 1:获取到期应付清单
→ 从 [ERP] 获取所有未清应付(到期日 ≤ +30 天)
Step 2:获取可用资金
→ 从 [CASH] 获取各账户可用余额
Step 3: Payment scheduling → Execute payment-scheduling → Generate payment plan by priority
Step 4: Three-way matching (items with invoices pending matching) → Execute triple-match-automation-ap → Perform three-way matching for each invoice pending payment → Only items that pass matching may enter the payment list
Step 5: Payment review → Execute supplier-payment-review → Review supplier information/amount/compliance for each payment
Step 6: Generate payment instructions → Consolidate payments that passed approval → Generate payment instruction file → Submit for approval
---
## 第一步:获取到期应付清单
**从 [ERP] 查询未清应付:**
Query conditions:
- Due date: Today to +30 days
- Suppliers: All
- Status: Open
Export fields: Supplier | Amount | Due date | Days overdue | PO number | Invoice number | Contract terms
Summary:
- Overdue: [X] items / [XXX万]
- Due this week: [X] items / [XXX万]
- Due next week: [X] items / [XXX万]
---
## 第二步:三单匹配(发票核查)
**对每笔有待匹配发票的应付执行匹配:**
Execute Skill: triple-match-automation-ap
Invoice matching results:
- Passed: [X] items / [XXX万]
- Pending: [X] items / [XXX万]
- Failed: [X] items / [XXX万]
Handling of failed items: → Suspend payment → Contact supplier for resolution → Record in next period's pending payment list
---
## 第三步:付款排期
**执行 Skill:payment-scheduling**
When funds are sufficient: → All due payables can be scheduled for payment
When funds are insufficient: → Sort by priority → P0 (overdue) → P1 (Grade A suppliers) → P2 (due this week) → P3 (due next week) → Delay P4 (not yet due) items
---
## 第四步:付款审核
**对每笔待付款执行审核:**
Execute Skill: supplier-payment-review
Review results:
- Passed: [X] items / [XXX万]
- Rejected: [X] items / [XXX万]
- Pending supplementation: [X] items / [XXX万]
Rejected items: → Record rejection reason → Do not include in payment instructions → If there is fraud risk, escalate to finance manager + legal
---
## 第五步:生成付款指令
═══════════════════════════════════════ Payment Instructions Payment date: [YYYY-MM-DD] Generation time: [YYYY-MM-DD HH:MM] Number of payments: [X] items Total payment amount: [XXX万] ═══════════════════════════════════════
[Approved Payment List]
| No. | Supplier | Amount | Payee account | Summary | PO number |
|---|---|---|---|---|---|
| 1 | [Supplier A] | [XX ten thousand] | [Account] | [Summary] | [PO number] |
| 2 | [Supplier B] | [XX ten thousand] | [Account] | [Summary] | [PO Number] |
| ... | ... | ... | ... | ... | ... |
Total | — | [XXX万] | — | — | —
[Rejected/Suspended Items]
| No. | Supplier | Amount | Reason | Status |
|---|---|---|---|---|
| 1 | [Supplier C] | [XX ten thousand] | [Three-way match mismatch] | Suspended |
| 2 | [Supplier D] | [XX ten thousand] | [Account change pending verification] | Rejected |
Total | — | [XX万] | — | —
[Payment Instruction Details]
Payment Method: Bank-Enterprise Direct Connection / Online Banking Transfer Payment Account: [Account] Batch Payment File: [File Name] Online Banking Key Responsible Person: [Name]
═══════════════════════════════════════ Approval Levels: AP Supervisor → Finance Manager → [Finance Director] Instruction Generator: [Name] Instruction Generation Time: [YYYY-MM-DD HH:MM] ═══════════════════════════════════════
---
## 第六步:付款执行后跟踪
Payment Execution Confirmation: → Marked as paid in [ERP] → [CASH] frozen funds released → Supplier payment voucher archived
Unsuccessful Payment Handling: → Identify the reason for failure (incorrect account/insufficient balance/limit) → Reschedule payment (next payment date) → Record the reason for failure
---
## 升级触发条件
- 付款总额 > [填空:如 500 万元]
- 单笔付款 > [填空:如 50 万元]
- 拒绝项涉及欺诈风险
- 资金缺口 > [填空:如 100 万元]
- 连续 3 周存在已逾期但未付的应付
---
*Finance Skills — ap-master atomic skill*