Sales & Financial Management

Core Positioning

This is the financial sub-module of the ERP system, implemented by the finance package of yudao-module-erp. It does not exist independently but is tightly integrated into ERP’s procurement and sales processes, responsible for recording and managing the flow of funds.

In one sentence: Procurement requires payment, sales require collection, returns require refunds — the financial module handles all these “money” matters.


Problems Solved

Pain PointHow Financial Module Solves It
Don’t know which supplier owes how muchSettlement account balances are clearly visible
Payments can’t be linked to specific purchase ordersPayment orders linked to purchase inbound orders
Collections disconnected from sales ordersReceipt orders linked to sales outbound orders
Refund process is chaoticReturn orders automatically trigger refund process

User Roles

graph LR subgraph Roles FINANCE2["Finance Staff
Manage settlement accounts
Process payments/receipts
Process refunds
Reconcile accounts"] end

Core ER Diagram

erDiagram ERP_ACCOUNT ||--o{ ERP_FINANCE_PAYMENT : "Payment" ERP_ACCOUNT ||--o{ ERP_FINANCE_RECEIPT : "Receipt" ERP_PURCHASE_IN ||--o{ ERP_FINANCE_PAYMENT : "Purchase Inbound → Payment" ERP_PURCHASE_RETURN ||--o{ ERP_FINANCE_PAYMENT : "Purchase Return → Refund" ERP_SALE_OUT ||--o{ ERP_FINANCE_RECEIPT : "Sales Outbound → Receipt" ERP_SALE_RETURN ||--o{ ERP_FINANCE_RECEIPT : "Sales Return → Refund" ERP_ACCOUNT { bigint id PK varchar name "Account Name" decimal balance "Current Balance" tinyint status "Status" } ERP_FINANCE_PAYMENT { bigint id PK varchar no "Payment No." bigint account_id FK "Settlement Account" bigint in_id FK "Purchase Inbound Order" decimal price "Payment Amount" datetime time "Payment Time" } ERP_FINANCE_RECEIPT { bigint id PK varchar no "Receipt No." bigint account_id FK "Settlement Account" bigint out_id FK "Sales Outbound Order" decimal price "Receipt Amount" datetime time "Receipt Time" }

Business Scenarios

Scenario 1: Purchase Payment

sequenceDiagram participant P2 as Purchaser participant F2 as Finance participant ERP5 as ERP participant ACC as Settlement Account P2->>ERP5: Complete purchase inbound F2->>ERP5: View purchase inbound orders pending payment F2->>ERP5: Select settlement account, create payment order ERP5->>ACC: Deduct account balance ERP5->>ERP5: Record payment transaction

Scenario 2: Sales Receipt

sequenceDiagram participant S3 as Salesperson participant F3 as Finance participant ERP6 as ERP participant ACC2 as Settlement Account S3->>ERP6: Complete sales outbound F3->>ERP6: View sales outbound orders pending receipt F3->>ERP6: Select settlement account, create receipt order ERP6->>ACC2: Increase account balance ERP6->>ERP6: Record receipt transaction

Settlement Accounts

Settlement accounts represent the fund account relationship between the company and suppliers/customers. Every payment and receipt affects the corresponding account balance.

AttributeDescription
Account Namee.g., “XX Supplier Settlement Account”
Current BalanceReal-time updates, payments deduct, receipts add
StatusEnabled/Disabled
docs