# ListPartnerBankAccountsByPartner

## Overview

ListPartnerBankAccountsByPartner retrieves all bank accounts belonging to a given partner. This supports downstream modules (accounts payable, accounts receivable) that need to display or select from a partner's full set of bank accounts, including both default and non-default accounts.

## Business Rules

- Accepts `{ partnerId }` as input
- Returns all bank accounts for the specified partner, regardless of default designation
- Returns an empty array when the partner has no bank accounts — not an error
- Results include both the default bank account and non-default accounts
- Reading bank accounts is permitted regardless of partner status (DRAFT, ACTIVE, or INACTIVE)
- Bank accounts are isolated per partner; only accounts belonging to the specified partner are returned

## Process Flow

```mermaid
flowchart TD
    A[Receive input] --> B[SELECT from PartnerBankAccount where partnerId = input.partnerId]
    B --> C{Any accounts found?}
    C -->|Yes| D[Return bank account records]
    C -->|No| E[Return empty array]
```

## External Dependencies

- None

## Error Scenarios

- No explicit error — returns an empty array when no bank accounts exist for the partner

## Test Cases

- returns all bank accounts for a partner with multiple accounts
- returns empty array when partner has no bank accounts
- includes both default and non-default accounts in results
- returns accounts regardless of partner lifecycle status
