Skip to content

JobVersion

reference
2 min readUpdated

Kind: Class

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

Part of: Pams

JobVersion represents a version of a sales job in the client application. It groups operations that add a unitized item and reset expiration-test state for the current job version.

Methods

MethodSignatureReturns
addUnitizedItemaddUnitizedItem()void
resetExpirationTestresetExpirationTest()void

Properties

PropertyType
VersionIDnumber
VersionDateDate
IsSelectedboolean
TypeSelectedboolean
UserDisplayNamestring
AutoGeneratedSerialboolean
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 --> AddUnitizedItem["addUnitizedItem()"]
  JobVersion --> ResetExpirationTest["resetExpirationTest()"]
  AddUnitizedItem --> UnitizedItemState["Unitized item state"]
  ResetExpirationTest --> ExpirationTestState["Expiration-test state"]

Usage

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

function updateJobVersion(jobVersion: JobVersion): void {
  jobVersion.addUnitizedItem();

  // Reset expiration-test state before applying updated expiration logic.
  jobVersion.resetExpirationTest();
}

AI Coding Instructions

  • Call addUnitizedItem() on the active JobVersion instance when the sales workflow adds a unitized item.
  • Call resetExpirationTest() before recalculating or reapplying expiration-test state.
  • Keep state changes within JobVersion methods instead of duplicating their mutation logic in components.
  • Check callers that bind job-version state so UI updates follow these method calls.

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.WebApp/Client/app/models/sales/inquiry.model.ts:17

Was this page helpful?

Download as PDF