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
| Method | Signature | Returns |
|---|---|---|
addUnitizedItem | addUnitizedItem() | void |
resetExpirationTest | resetExpirationTest() | void |
Properties
| Property | Type |
|---|---|
VersionID | number |
VersionDate | Date |
IsSelected | boolean |
TypeSelected | boolean |
UserDisplayName | string |
AutoGeneratedSerial | boolean |
VersionSerial | number |
JobProcessID | number |
JobVersionPrice | number |
CurrencyID | number |
RateToBaseCurrency | number |
JobVersionPriceInBaseCurrency | number |
PaymentMethodID | number |
DeliveryTermID | number |
JobVersionStatusID | number |
StatusDate | Date |
CreatedByUserID | number |
ModifiedByUserID | number |
ModificationDate | Date |
CurrentJobVersionStatusLogID | number |
DeliveryTimePeriodID | number |
DeliveryTimePeriodCount | number |
IsPartialShipment | boolean |
CurrencyCode | string |
CurrencySymbol | string |
ClientOrderNumber | string |
SupplierOfferNumber | string |
OfferValidationTimePeriodID | number |
OfferValidationTimePeriodCount | number |
IsCurrent | boolean |
SupplierOrderNumber | string |
OrderActivationDate | Date |
OrderDeliveryDate | Date |
OrderDate | Date |
OrderBacklog | number |
Items | JobItem[] |
MileStones | OfferMileStone[] |
JobStatus | number |
CreatedByUserName | string |
JobVersionStatusLabel | string |
commissionBase | string |
JobVersionParentID | number |
CommissionPercentage | number |
AgreedCommissionPercentage | number |
ContractualCommissionPercentage | number |
commissionValidation | number |
SupplierID | number |
Where it refuses work
JobVersionstops the work with an early return whenthis.JobVersionPrice <= 0.JobVersionstops the work with an early return whenthis.Items[0].Description.JobVersionstops the work with an early return whenthis.OrderActivationDate == null || this.DeliveryTimePeriodCount == null || this.Delivery….JobVersionstops the work with an early return whenthis.OrderDeliveryDateCalculated == "".JobVersionstops the work with an early return whendiff < 0.JobVersionstops the work with an early return whenthis.ContractualCommissionPercentage == -1.
Diagram
mermaidgraph LR JobVersion --> AddUnitizedItem["addUnitizedItem()"] JobVersion --> ResetExpirationTest["resetExpirationTest()"] AddUnitizedItem --> UnitizedItemState["Unitized item state"] ResetExpirationTest --> ExpirationTestState["Expiration-test state"]
Usage
tsimport { 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 activeJobVersioninstance when the sales workflow adds a unitized item. - Call
resetExpirationTest()before recalculating or reapplying expiration-test state. - Keep state changes within
JobVersionmethods 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)
TempInq—Pams/Web/Pams.WebApp/Client/app/models/sales/inquiry.model.ts:17
Was this page helpful?