# TANRAIL ONE — Phase 3.3 Financial Integration

## Principle
The Financial Core is isolated. It does not contain dependencies on `Sales`, `Procurement`, or `Inventory`.
Integration flows ONE WAY via Laravel Events.

## Integration Architecture
```mermaid
graph TD
    A[Sales Engine: PaymentReceived Event] -->|Listened By| B(Financial Core Listener)
    B -->|Translates to| C[FinancialService::postJournal]
    C -->|Persists| D[(Ledger Database)]

    E[Procurement Engine: PaymentSent Event] -->|Listened By| B2(Financial Core Listener)
    B2 -->|Translates to| C
```

## Inventory Deferral
As decided in this phase, Inventory Movements do **NOT** trigger Financial Journals currently. Physical tracking is sufficient for the MVP Core. Cost accounting (FIFO layers) is explicitly deferred to an Advanced Extension to avoid polluting the core ledger with unneeded complexity before the business requires it.

## Future Business Expansion
If a new business (e.g., Fleet Management) needs to record an expense for fuel, it simply constructs an array of debits and credits and calls `FinancialService::postJournal()`. The Core Financial module requires absolutely zero code modifications to support this.
