---
tags: [vompay, service]
module: VomPay
---

# [Service]DashboardSettingsServices

## Connections
[[_VomPay]] · [[[Model]Models]] · [[[Repo]Repositories]] · [[[Service]MyFatoorahAPIServices]] · [[[Controller]Controllers]] · [[[Cross]CrossModuleDependencies]]

## Source
`Modules/VomPay/Services/Dashboard/` · `Modules/VomPay/Services/Settings/`

---

## VomPayDashboardService

Aggregates data for the VomPay dashboard view.

**Dependencies:** `VomPaySupplierRepository` · `VomPayInvoiceRepository` · `MyFatoorahSupplierAPIService`  
⚠️ Instantiates repos manually (no constructor DI).

| Method | Purpose |
|---|---|
| execute() | Returns deposits + dashboard totals + payment statuses + paginated invoices |
| getDeposits() | Calls `MyFatoorahSupplierAPIService.getSupplierDeposits()` |
| getDashboard() | Calls `MyFatoorahSupplierAPIService.getSupplierDashboard()` |
| getAllPaymentStatuses() | Returns `VomPayInvoiceStatusesEnum::Statuses` array |
| getVomPayInvoices() | Paginates `VomPayInvoice` records via repository (request query params) |

---

## VomPaySettingService

Creates (or replaces) VomPay settings for the tenant.

**Dependency:** `VomPaySettingRepository` (manual instantiation)

`createSettings(CreatingVomPaySettingRequestEntity)` — persists all 8 setting fields + notes. Returns created `VomPaySetting` model.

---

## PreparingVomPaySettingsCreationService

Assembles form data for the settings creation/edit view.

**Dependencies (injected):** `AccountsRepository` · `CostCentersRepository`  
**Also resolves via app():** `VomPaySettingRepository` · `VomPaySupplierRepository`

`execute()` returns:
- `settings` — latest `VomPaySetting` record
- `paymentAccounts` — accounts formatted for dropdown
- `expenseAccounts` — accounts formatted for dropdown
- `costCenters` — cost centers for dropdown
- `quickCreateLinks` — links to create accounts / cost centers
- `isSupplierDeactivated` — flag for UI warning
- Current account/cost center IDs from request
