# Supplier

**Kind:** Class

**Source:** `Pams/Web/Pams.WebApp/Client/app/models/person/supplier.model.ts` (line 9)

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

`Supplier` is a client-side model for representing a supplier person in the PAMS web application. It supports creating copied instances through `clone()` and `cloneSupplier()` without mutating the original model.

## Methods

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

## Properties

| Property | Type |
|---|---|
| `SupplierID` | `number` |
| `SupplierCurrencyCode` | `string` |
| `PersonID` | `number` |
| `UserID` | `number` |
| `ModificationDate` | `Date` |
| `CompanyBranchID` | `number` |
| `IsActive` | `boolean` |
| `SupplierName` | `string` |
| `FullName` | `string` |
| `SupplierTypeID` | `number` |
| `IsPrincipal` | `boolean` |
| `ContractualInfo` | `SupplierContractualInfo` |
| `Vat` | `string` |
| `ImgPath` | `string` |
| `MarketSegmentID` | `number` |
| `MarketSegmentIDs` | `number[]` |
| `Addresses` | `Address[]` |
| `ContactInfoList` | `Array<ContactInfo>` |
| `ContactPersonList` | `Array<ContactPersons>` |

## Diagram

```mermaid
graph LR
  Supplier[Supplier]
  Supplier --> Clone[clone(): Supplier]
  Supplier --> CloneSupplier[cloneSupplier(): Supplier]
  Clone --> CopiedSupplier[Copied Supplier]
  CloneSupplier --> CopiedSupplier
```

## Usage

```ts
import { Supplier } from './models/person/supplier.model';

const supplier = new Supplier();

const copiedSupplier = supplier.clone();
const supplierCopy = supplier.cloneSupplier();

// Keep the original supplier unchanged when editing a copy.
```

## AI Coding Instructions

- Use `clone()` or `cloneSupplier()` before editing supplier data that must not change the original instance.
- Keep clone return types as `Supplier` so callers retain access to supplier model behavior.
- Do not replace cloning with direct object assignment when nested person data may be shared.
- Check calling code to determine whether it expects `clone()` or the supplier-specific `cloneSupplier()` method.

## Relationships

- IMPORTS → `Address`
- IMPORTS → `SupplierContractualInfo`
- IMPORTS → `SupplierContractCountry`
- IMPORTS → `SupplierContractClient`
- IMPORTS → `SupplierMarketSegment`
- IMPORTS → `SupplierContractMarketSegment`
- IMPORTS → `DecreasedTable`

## Used by

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

### Imported by (3)

- `ProductCategoryService` — `Pams/Web/Pams.WebApp/Client/app/services/common/product-category.service.ts`:1
- `SupplierService` — `Pams/Web/Pams.WebApp/Client/app/services/person/supplier.service.ts`:1
- `ProductCategory` — `Pams/Web/Pams.WebApp/Client/app/models/common/product-category.model.ts`:4
