# Account

**Kind:** Class

**Source:** `Frontend/src/app/models/person/accounts.model.ts` (line 67)

**Part of:** [Frontend](subsystem-frontend-src-app)

`Account` is a person-domain model in the frontend. It exposes `clone()` and `cloneSupplier()` to create `Account` copies for different caller workflows.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone()` | `Account` |
| `cloneSupplier` | `cloneSupplier(spi: Account)` | `Account` |

## Properties

| Property | Type |
|---|---|
| `PrimaryID` | `number` |
| `UserID` | `number` |
| `CompanyBranchID` | `number` |
| `AccountCurrencyCode` | `string` |
| `ClientVendorTypeID` | `number` |
| `AccountTypeID` | `number` |
| `Name` | `string` |
| `FullName` | `string` |
| `ModificationDate` | `Date` |
| `Vat` | `string` |
| `IsActive` | `boolean` |
| `Email` | `string` |
| `ImgPath` | `string` |
| `ContractualInfo` | `SupplierContractualInfo` |
| `MarketSegmentID` | `number` |
| `MarketSegmentIDs` | `number[]` |
| `Addresses` | `Address[]` |
| `ContactInfoList` | `Array<ContactInfo>` |
| `ContactPersonList` | `Array<ContactPersons>` |
| `registrationData` | `Array<ClientSupplierRegistration>` |
| `Selected` | `boolean` |
| `Comments` | `Comment[]` |

## Diagram

```mermaid
graph LR
  Caller --> Account
  Account --> clone["clone(): Account"]
  Account --> cloneSupplier["cloneSupplier(): Account"]
  clone --> AccountCopy["Account copy"]
  cloneSupplier --> SupplierCopy["Supplier Account copy"]
```

## Usage

```ts
import { Account } from './accounts.model';

function copyAccount(account: Account): Account {
  const copy = account.clone();

  return copy;
}

function copySupplierAccount(account: Account): Account {
  return account.cloneSupplier();
}
```

## AI Coding Instructions

- Import `Account` from the person accounts model when working with account data.
- Call `clone()` when the caller needs a copied `Account`.
- Call `cloneSupplier()` only for supplier-specific account flows.
- Keep cloned values typed as `Account` when passing them to services or components.

## Used by

12 references from 12 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### Imported by (12)

- `BookingTargetsComponent` — `Frontend/src/app/components/configuration/company/booking-targets/booking-targets.component.ts`:1
- `NewBranchComponent` — `Frontend/src/app/components/configuration/company/main-branch/new.branch.component.ts`:1
- `MyDeskColumnsViewComponent` — `Frontend/src/app/components/dashboard/my-desk/my-desk-columns-view/my-desk-columns-view.component.ts`:1
- `MyDeskComponent` — `Frontend/src/app/components/dashboard/my-desk/my-desk.component.ts`:1
- `InvoiceDetailsComponent` — `Frontend/src/app/components/invoices/invoice-details/invoice-details.component.ts`:1
- `AccountManagersListComponent` — `Frontend/src/app/components/market/AccountManagers/account-managers-list/account-managers-list.component.ts`:1
- `AllAccountsComponent` — `Frontend/src/app/components/market/all-accounts/all-accounts.component.ts`:1
- `PrincipalComponent` — `Frontend/src/app/components/market/principles/principles/principles.component.ts`:1

…and 4 more.
