# Client

**Kind:** Class

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

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

`Client` represents a client person model in the web application. It supports creating copied `Client` instances through `clone()` and `cloneClient()` so callers can work with a separate model instance.

## Methods

| Method | Signature | Returns |
|---|---|---|
| `clone` | `clone()` | `Client` |
| `cloneClient` | `cloneClient(cli: Client)` | `Client` |

## Properties

| Property | Type |
|---|---|
| `ClientID` | `number` |
| `UserID` | `number` |
| `ModificationDate` | `Date` |
| `CompanyBranchID` | `number` |
| `ClientCode` | `string` |
| `FullName` | `string` |
| `ClientName` | `string` |
| `Vat` | `string` |
| `Selected` | `boolean` |
| `ClientTypeID` | `number` |
| `MarketSegmentID` | `number` |
| `MarketSegmentIDs` | `number[]` |
| `Addresses` | `Address[]` |
| `ContactInfoList` | `Array<ContactInfo>` |
| `ContactPersonList` | `Array<ContactPersons>` |
| `registrationData` | `Array<ClientSupplierRegistration>` |
| `ImgPath` | `string` |

## Diagram

```mermaid
graph LR
  Client[Client instance] --> Clone[clone()]
  Client --> CloneClient[cloneClient()]
  Clone --> ClientCopy[Copied Client]
  CloneClient --> ClientCopy
```

## Usage

```ts
import { Client } from "./client.model";

declare const client: Client;

const clonedClient = client.clone();
const copiedClient = client.cloneClient();

// Use the copied instance without changing the original reference.
console.log(clonedClient, copiedClient);
```

## AI Coding Instructions

- Use `clone()` or `cloneClient()` when a caller needs a separate `Client` instance.
- Keep copy behavior consistent between `clone()` and `cloneClient()`.
- Do not mutate a source `Client` when preparing editable state; clone it first.
- Check whether nested model properties require their own copy handling when extending this class.

## Relationships

- IMPORTS → `Address`

## Used by

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

### Imported by (7)

- `ContactViewEditComponent` — `Pams/Web/Pams.Web/Client/app/components/market/contacts/contact-view-edit/contact-view-edit.component.ts`:1
- `ContactsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/contacts/contacts.component.ts`:1
- `RegistrationsComponent` — `Pams/Web/Pams.Web/Client/app/components/market/registrations/registrations/registrations.component.ts`:1
- `CurrencyRate` — `Pams/Web/Pams.Web/Client/app/components/payments/payment-details/payment-details.component.ts`:1
- `PaymentsListComponent` — `Pams/Web/Pams.Web/Client/app/components/payments/payments-list/payments-list.component.ts`:1
- `TagComponent` — `Pams/Web/Pams.Web/Client/app/components/shared/tag/tag.component.ts`:1
- `ClientService` — `Pams/Web/Pams.Web/Client/app/services/person/client.service.ts`:1
