Skip to content

Account

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/person/accounts.model.ts (line 10)

Part of: Pams

Account is a client-side model for account data associated with a person. It supports copying account state through clone() and creating a supplier-oriented copy through cloneSupplier().

Methods

MethodSignatureReturns
cloneclone()Account
cloneSuppliercloneSupplier(spi: Account)Account

Properties

PropertyType
PrimaryIDnumber
UserIDnumber
CompanyBranchIDnumber
AccountCurrencyCodestring
ClientVendorTypeIDnumber
AccountTypeIDnumber
Namestring
FullNamestring
ModificationDateDate
Vatstring
IsActiveboolean
ImgPathstring
ContractualInfoSupplierContractualInfo
MarketSegmentIDnumber
MarketSegmentIDsnumber[]
AddressesAddress[]
ContactInfoListArray<ContactInfo>
ContactPersonListArray<ContactPersons>
registrationDataArray<ClientSupplierRegistration>

Diagram

mermaid
graph LR
  Person[Person model] --> Account[Account]
  Account --> Clone[clone(): Account]
  Account --> SupplierClone[cloneSupplier(): Account]

Usage

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

const account = new Account();

const accountCopy = account.clone();
const supplierAccount = account.cloneSupplier();

AI Coding Instructions

  • Use clone() when a separate Account instance needs the same account state.
  • Use cloneSupplier() when passing account data through supplier-specific flows.
  • Keep cloning logic inside Account so callers do not manually copy model fields.
  • Update both clone methods when adding fields that must persist in copied accounts.

Relationships

  • IMPORTS → Address
  • IMPORTS → SupplierContractualInfo
  • IMPORTS → SupplierContractCountry
  • IMPORTS → SupplierContractClient
  • IMPORTS → SupplierMarketSegment
  • IMPORTS → SupplierContractMarketSegment
  • IMPORTS → DecreasedTable

Was this page helpful?

Download as PDF