# Finance Expansion Plan — Receipt Vouchers, Payment Vouchers, Expenses
Date: 2026-03-16

## Goal
Extend the existing Finance module without changing old planning files.

## Scope
1. Receipt Vouchers
2. Payment Vouchers
3. Automatic journal posting on posting action
4. Auto receipt voucher for paid sales invoice amounts
5. Auto payment voucher for paid expenses and similar outflows
6. Company additional expenses management
7. Expense item setup and configuration
8. Partial payment / partial collection support
9. Voucher reversal by reverse journal entry only
10. Branch + fiscal period + number sequence support

## Core Rules
- Follow existing architecture: Controllers → Services → Models → Database
- Controllers stay thin
- Business logic goes in Services
- Validation uses FormRequest
- Do not modify old planning files
- Build step by step
- Stop after each task
- No direct editing after posting
- Reversal only through reverse entry workflow

## Recommended Build Order
### Phase 1 — Setup
1. Payment Methods
2. Expense Categories
3. Expense Items
4. Voucher Posting Profiles
5. Voucher Types

### Phase 2 — Expenses
6. Expense records
7. Expense attachments
8. Expense status flow
9. Expense approval/payment preparation

### Phase 3 — Receipt Vouchers
10. Receipt voucher tables
11. Receipt voucher models
12. Receipt voucher services
13. Receipt voucher requests/controllers/views
14. Receipt posting
15. Receipt reversal

### Phase 4 — Payment Vouchers
16. Payment voucher tables
17. Payment voucher models
18. Payment voucher services
19. Payment voucher requests/controllers/views
20. Payment posting
21. Payment reversal

### Phase 5 — Integrations
22. Sales invoice collection integration
23. Auto receipt voucher for paid amounts
24. Expense payment integration
25. Partial payment logic

### Phase 6 — Reports
26. Receipt register
27. Payment register
28. Expense register
29. Cash/bank movement
30. Expenses by item / branch / cost center

## Suggested Folder Structure
app/
├─ Models/
│  └─ Finance/
│     ├─ Setup/
│     ├─ Vouchers/
│     └─ Expenses/
├─ Services/
│  └─ Finance/
│     ├─ Setup/
│     ├─ Vouchers/
│     └─ Expenses/
├─ Http/
│  ├─ Controllers/
│  │  └─ Admin/Finance/
│  │     ├─ Setup/
│  │     ├─ Vouchers/
│  │     └─ Expenses/
│  └─ Requests/
│     └─ Admin/Finance/
resources/views/
└─ dashboard/finance/
   ├─ setup/
   ├─ receipts/
   ├─ payments/
   └─ expenses/

## Recommended Tables
### Setup
- finance_payment_methods
- finance_expense_categories
- finance_expense_items
- finance_voucher_posting_profiles
- finance_receipt_voucher_types
- finance_payment_voucher_types

### Operations
- finance_expenses
- finance_expense_attachments
- finance_receipt_vouchers
- finance_payment_vouchers
- finance_voucher_reversals

### Integration
- sales_invoice_collections (only if missing in current project)

## Suggested Statuses
### Receipt / Payment Voucher
- draft
- approved
- posted
- reversed

### Expense
- draft
- approved
- paid_partial
- paid_full
- cancelled
