---
tags: [accounting, model, integration]
module: Accounting
---

# Integration Models

## Connections
[[_Accounting]] · [[[Model]JournalEntry]] · [[[Model]Account]] · [[[Service]IntegrationSyncServices]] · [[[Repo]Repositories]] · [[[DB]DatabaseTables]] · [[[Cross]CrossModuleDependencies]]

## Source
```
Modules/Accounting/Models/SuccessSyncedOrderManualEntry.php
Modules/Accounting/Models/SuccessSyncedOrderSingleRecord.php
Modules/Accounting/Models/FailedSyncedOrder.php
Modules/Accounting/Models/SyncSegment.php
Modules/Accounting/Models/AccountIntegration.php
Modules/Accounting/Models/PaymentOptionsIntegration.php
Modules/Accounting/Models/SingleRecordJournalEntry.php
Modules/Accounting/Models/SingleRecordAccount.php
Modules/Accounting/Models/Currency.php
```

## Responsibilities
- **SuccessSyncedOrderManualEntry** — tracks which external orders (Foodics, Zid, Marn, Prexle) have been synced as manual [[[Model]JournalEntry]] records; prevents duplicates
- **SuccessSyncedOrderSingleRecord** — same but for the single-record aggregation mode
- **FailedSyncedOrder** — stores failed sync attempts with error messages for retry
- **SyncSegment** — batches orders into segments for bulk syncing jobs
- **AccountIntegration** — maps an integration type + external ID to a local [[[Model]Account]]
- **PaymentOptionsIntegration** — maps payment method IDs (from POS systems) to accounts
- **SingleRecordJournalEntry** — aggregated daily transaction record (single-record mode)
- **SingleRecordAccount** — per-account aggregated record
- **Currency** — tenant-level supported currencies with exchange rates

## Key Relationships

| Model | Relation | Target |
|---|---|---|
| SuccessSyncedOrderManualEntry | belongsTo | [[[Model]JournalEntry]] |
| AccountIntegration | belongsTo | [[[Model]Account]] |
| PaymentOptionsIntegration | belongsTo | [[[Model]Account]] |
| SingleRecordJournalEntry | belongsTo | [[[Model]JournalEntry]], CostCenter |
| SingleRecordAccount | belongsTo | [[[Model]Account]], [[[Model]JournalEntry]] |

## Integration Sources
`Foodics` (POS) · `Zid` (e-commerce) · `Marn` (POS) · `Prexle` (e-commerce) · `VomPay` (payments) · `LazyWait`
