> ## Documentation Index
> Fetch the complete documentation index at: https://docs.younegotiate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule Report

> ABC Collections wants a failed payments report every Monday morning. They choose the report type, set the schedule, and add the finance team as recipients.

## Real-World Example

ABC Collections wants a failed payments report every Monday morning. They choose the report type, set the schedule, and add the finance team as recipients.

Every Monday, the system should generate the report using the selected settings and send it only to the selected recipients.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Creditor creates report schedule"] --> B["System saves schedule"]
    B --> C["Scheduled time arrives"]
    C --> D["System generates report"]
    D --> E["Report is sent to selected recipients"]
    E --> F["Report history is updated"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A actor;
    class B,C,D system;
    class E,F outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should let the creditor choose the report, schedule, recipients, and delivery settings.
* Reports should be generated according to the selected schedule.
* Scheduled report delivery may happen in the background.

## How It Should Not Work

* It should not send reports to unintended recipients.
* It should not include data outside the creditor's allowed access.
* It should not keep sending a report after the schedule is disabled or removed.

## Developer Notes

* Imports and reports can involve background work, so visible status should never claim completion before processing is done.
* Partial failures should remain visible to the creditor instead of being treated as a clean success.

## Related App Areas

* `app/Livewire/Creditor/ImportConsumers`
* `app/Livewire/Creditor/Reports`
* `app/Jobs/ImportConsumersCoordinatorJob.php`
* `app/Jobs/ProcessConsumerChunkJob.php`
