# Account

**Kind:** Class

**Source:** `Pams/Web/Pams.Web/Client/app/models/person/accounts.model.ts` (line 67)

**Part of:** [Pams](subsystem-pams)

`Account` represents account data in the PAMS web client person model layer. It supports copying account instances through `clone()` and creating supplier-oriented copies through `cloneSupplier()`.

## 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
  Account[Account instance] --> Clone[clone()]
  Clone --> AccountCopy[Account copy]
  Account --> SupplierClone[cloneSupplier()]
  SupplierClone --> SupplierAccount[Supplier account copy]
```

## Usage

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

const account = new Account();

const accountCopy: Account = account.clone();
const supplierAccount: Account = account.cloneSupplier();
```

## AI Coding Instructions

- Use `clone()` when a separate `Account` instance is needed without changing the original reference.
- Use `cloneSupplier()` when preparing account data for supplier-related flows.
- Keep clone-related changes aligned between `clone()` and `cloneSupplier()`.
- Check callers before changing clone behavior, since form state and person data may depend on copied instances.

## Used by

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

### Imported by (16)

- `BookingTargetsComponent` — `Pams/Web/Pams.Web/Client/app/components/configuration/company/booking-targets/booking-targets.component.ts`:1
- `NewBranchComponent` — `Pams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/new.branch.component.ts`:1
- `MyDeskComponent` — `Pams/Web/Pams.Web/Client/app/components/dashboard/my-desk/my-desk.component.ts`:1
- `InvoiceDetailsComponent` — `Pams/Web/Pams.Web/Client/app/components/invoices/invoice-details/invoice-details.component.ts`:1
- `AccountManagersListComponent` — `Pams/Web/Pams.Web/Client/app/components/market/AccountManagers/account-managers-list/account-managers-list.component.ts`:1
- `AccountDetailsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/account-details/account-details.component.ts`:1
- `AllAccountsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/all-accounts/all-accounts.component.ts`:1
- `ClientViewEditComponent` — `Pams/Web/Pams.Web/Client/app/components/market/client/client-view-edit/client-view-edit.component.ts`:1

…and 8 more.
