Skip to content

JobVersion

reference
2 min readUpdated

Kind: Class

Source: Pams/Web/Pams.Web/Client/app/models/sales/job-version.model.ts (line 10)

Part of: Pams

JobVersion is a sales-domain model that represents a version of a job. It manages job-version state related to unitized items and expiration testing through addUnitizedItem() and resetExpirationTest().

Methods

MethodSignatureReturns
addUnitizedItemaddUnitizedItem()void
resetExpirationTestresetExpirationTest()void

Properties

PropertyType
VersionIDnumber
VersionDateDate
IsSelectedboolean
TypeSelectedboolean
UserDisplayNamestring
AutoGeneratedSerialboolean
DeliveryTermDeliveryTerm
PaymentMethodPaymentMethod
SupplierSupplier
VersionSerialnumber
JobProcessIDnumber
JobVersionPricenumber
CurrencyIDnumber
RateToBaseCurrencynumber
JobVersionPriceInBaseCurrencynumber
PaymentMethodIDnumber
DeliveryTermIDnumber
JobVersionStatusIDnumber
StatusDateDate
CreatedByUserIDnumber
ModifiedByUserIDnumber
ModificationDateDate
CurrentJobVersionStatusLogIDnumber
DeliveryTimePeriodIDnumber
DeliveryTimePeriodCountnumber
IsPartialShipmentboolean
CurrencyCodestring
CurrencySymbolstring
ClientOrderNumberstring
SupplierOfferNumberstring
OfferValidationTimePeriodIDnumber
OfferValidationTimePeriodCountnumber
IsCurrentboolean
SupplierOrderNumberstring
OrderActivationDateDate
OrderDeliveryDateDate
OrderDateDate
OrderBacklognumber
ItemsJobItem[]
MileStonesOfferMileStone[]
JobStatusnumber
CreatedByUserNamestring
JobVersionStatusLabelstring
commissionBasestring
JobVersionParentIDnumber
CommissionPercentagenumber
AgreedCommissionPercentagenumber
ContractualCommissionPercentagenumber
commissionValidationnumber
SupplierIDnumber

Where it refuses work

  • JobVersion stops the work with an early return when this.JobVersionPrice <= 0.
  • JobVersion stops the work with an early return when this.Items[0].Description.
  • JobVersion stops the work with an early return when this.OrderActivationDate == null || this.DeliveryTimePeriodCount == null || this.Delivery….
  • JobVersion stops the work with an early return when this.OrderDeliveryDateCalculated == "".
  • JobVersion stops the work with an early return when diff < 0.
  • JobVersion stops the work with an early return when this.ContractualCommissionPercentage == -1.

Diagram

mermaid
graph LR
  JobVersion[JobVersion]
  AddUnitizedItem[addUnitizedItem()]
  ResetExpirationTest[resetExpirationTest()]
  UnitizedItems[Unitized item state]
  ExpirationTest[Expiration test state]

  JobVersion --> AddUnitizedItem
  JobVersion --> ResetExpirationTest
  AddUnitizedItem --> UnitizedItems
  ResetExpirationTest --> ExpirationTest

Usage

ts
import { JobVersion } from './models/sales/job-version.model';

const jobVersion = new JobVersion();

// Add an item managed by the job version.
jobVersion.addUnitizedItem();

// Clear or reinitialize expiration-test state before editing or validation.
jobVersion.resetExpirationTest();

AI Coding Instructions

  • Keep unitized-item changes inside addUnitizedItem() rather than duplicating its state changes in calling code.
  • Call resetExpirationTest() when a workflow needs to clear expiration-test state before recalculation or validation.
  • Check the model source for initialized properties and required defaults before creating a JobVersion instance.
  • Preserve the model’s existing mutation patterns when adding sales job-version behavior.

Relationships

  • IMPORTS → JobItem
  • IMPORTS → OfferMileStone
  • IMPORTS → AppSettings
  • IMPORTS → JobVersionStatusE
  • IMPORTS → JobStatusE
  • IMPORTS → JobItemStatusE

Used by

1 reference from 1 file. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (1)

  • TempInqPams/Web/Pams.Web/Client/app/models/sales/inquiry.model.ts:17

Was this page helpful?

Download as PDF