Consolidated Excluded and Included line tables into single "Contract Lines" interface
Single "Contract Lines" page manages all contract lines regardless of mode
Contract header's "Contract Lines Inclusion Mode" field determines line interpretation (Exclude or Include)
Six line types: Resource, Item, Expense, All Resources, All Items, All Expenses
Existing lines preserved when switching between Exclude and Include modes
Automatic work order integration evaluates lines and marks contracted work as unit price = 0
Full archive and migration support with automatic data migration from old Excluded Contract Line tables
Old Included Contract Line tables completely removed (not in active use)
+How It Works+
All maintenance contract lines managed through single "Contract Lines" page. Contract header's "Contract Lines Inclusion Mode" determines behavior.
Exclude Mode (Default):
No lines defined = All work order lines covered by contract. Lines defined = Specified items/resources/expenses excluded from contract coverage. All other items/resources/expenses remain covered.
Include Mode:
No lines defined = All work order lines excluded from contract coverage. Lines defined = Only specified items/resources/expenses covered by contract. All other items/resources/expenses excluded.
Creating Contract with Line Rules:
Navigate to Maintenance Contracts. Create or open contract. Set "Contract Lines Inclusion Mode" (Exclude is default). Click into Contract Lines section. Add lines: For specific exclusions/inclusions, select type (Resource, Item, Expense) and specify No. For broad rules, select All Resources, All Items, or All Expenses. Optionally specify Work Type Code (resources only) or Vendor No. (expenses only). Release contract.
Line Type Requirements:
Specific types (Resource, Item, Expense): No. field is mandatory
All* types (All Resources, All Items, All Expenses): Work Type Code field optional - leave blank for all, or specify for one
Work Type Code: Only for Resource or All Resources types
Vendor No.: Only for Expense or All Expenses types
Work Order Line Matching:
Resource lines match on resource number and work type code. If Work Type Code blank on Contract Line, matches resources regardless of work type. If Work Type Code specified, matches only resources with that work type. Similar logic for Vendor No. on expenses.
Switching Modes:
Open released contract, reopen to status = Open, change "Contract Lines Inclusion Mode" field, review Contract Lines (unchanged but interpreted differently), re-release contract. Same lines now behave with opposite logic.
+How It Does NOT Work+
Line Type Restrictions:
❌ Cannot specify Vendor No. on Resource or Item lines
❌ Cannot specify Work Type Code on Item or Expense lines
❌ Cannot release contract with incomplete Resource/Item/Expense lines (No. field blank)
❌ All* types do NOT require No. field, but specific types do
Mode Behavior:
❌ Switching modes does NOT recreate or modify line definitions
❌ Mode switching does NOT automatically update work orders - only affects future assignments
❌ Empty lines behavior differs by mode: Exclude = everything covered, Include = nothing covered
❌ Cannot have both Exclude and Include behavior simultaneously
Work Order Integration:
❌ Matching does NOT apply retroactively to posted work order lines
❌ Cannot change contract assignment when work order lines are already posted
❌ Contract evaluation does NOT bypass line rules - always applies matching logic
❌ Contracted lines do NOT allow manual price override - always set to 0
Archive:
❌ Archive does NOT dynamically update - preserves definitions at time of archiving
❌ Restored contracts do NOT merge with current definitions - exact restoration
❌ Archive does NOT interpret mode differently - stores as-is
+Upgrade Impact+
Automatic migration from Excluded MC Line tables to new MC Line table on first login
All existing Excluded MC Lines automatically migrate with enum type conversion
Old Excluded MC Line data automatically deleted after successful migration
Included MC Lines tables completely removed (not used in production)
Migration uses upgrade tag '539342-DAMINV-MC-Lines-20250101' for one-time execution
Contracts with "Contract Lines Inclusion Mode" = Exclude continue working identically
No setup or configuration changes required
Permission sets automatically updated
Old data preserved if migration encounters issues
Include mode functionality available but requires explicit mode selection
Error Messages:
"Vendor No. can only be specified for Expense or AllExpenses types." → Change Type or remove Vendor No.
"Work Type Code can only be specified for Resource or AllResources types." → Change Type or remove Work Type Code
"For MC Lines with types Resource, Item and Expense, the No. must be specified." → Fill in No. field or change to All* types
"Change can not be applied because... some lines are already consumed." → Complete or reverse consumed work order lines before changing contract