PM DACs: Reference Data
In this topic, you can find information about the data access classes (DACs) that contain reference data that is used in most other DACs in project accounting.
Project Accounting Preferences
The PMSetup DAC contains the general project accounting preferences, which are specified on the Projects Preferences (PM101000) form.
SELECT
*
FROM
PMSetup s
WHERE
s.CompanyID = 2
Account Groups
The PMAccountGroup DAC contains account groups for projects. The account groups are defined on the Account Groups (PM201000) form.
SELECT
*
FROM
PMAccountGroup a
WHERE
a.IsActive=1
AND a.type='E'
Rules for Project Billing
The PMBillingRule DAC contains the list of rules for project billing, which are defined on the Billing Rules (PM207000) form.
SELECT
*
FROM
PMBillingRule b
WHERE
b.type='T'
Change Order Classes
The PMChangeOrderClass DAC contains the change order class data, which is defined on the Change Order Classes (PM203000) form.
SELECT
*
FROM
PMChangeOrderClass c
WHERE
c.ClassID = 'DEFAULT'
Project Rate Tables
If a project is billed with the Time and Material step of the billing rule and the @Rate parameter is used in the billing rule formula, the relevant rate from the configured rate table is used in the pro forma invoices.
A user configures each rate by performing the following steps:
- Adding a rate table on the Rate Tables (PM204200) form. The rate table data is stored in the PMRateTable DAC.
- Adding a rate type on the Rate Types (PM204100) form. The rate type data is stored in the PMRateType DAC.
- Defining a rule on the Rate Lookup Rules (PM205000) form. The
rule data is stored in the PMRateDefinition
DAC. A definition of a rule includes the addition of sequences and the defining
of conditions for each combination of a rate table and rate type. Conditions can
be defined for the following entities:
- A project, whose ID is stored in the PMProjectRate DAC
- A project task, whose ID is stored in the PMTaskRate DAC
-
An account group, whose ID is stored in the PMAccountGroupRate DAC
- An inventory item, whose ID is stored in the PMItemRate DAC
-
An employee, whose ID is stored in the PMEmployeeRate DAC
- Adding a rate sequence for each combination of rate table, rate type, and rate code on the Rate Tables (PM206000) form. The rate sequence data is stored in the PMRateSequence DAC.
- Adding a rate on the Rate Tables (PM206000) form. The rate data is stored in the PMRate DAC.
For details on the configuration of billing rates, see Billing Rates: General Information.
Projects, Project Templates, Customer Contracts, and Contract Templates
The Contract DAC contains the master data of the entities that are created and edited on the following data entry forms:
- Projects (PM301000)
- Project Templates (PM208000)
- Customer Contracts (CT301000)
- Contract Templates (CT202000)
- The selection of all projects with the In Planning
status
SELECT * FROM Contract p WHERE p.Status='D' AND p.BaseType='P' AND p.NonProject=0 AND IsTemplate=0
- The selection of Non-Project items
SELECT * FROM Contract WHERE NonProject=1
Project Tasks
The PMTask DAC contains the tasks that are defined in the table on the Tasks tab of the Projects (PM301000) form—that is, the tasks of a particular project.
The following examples illustrate the selection of project tasks that meet specific conditions:
-
The selection of the tasks for the specified project
SELECT * FROM PMTask t WHERE t.ProjectID = 3312
-
The selection of all common tasks
SELECT * FROM PMTask INNER JOIN Contract ON PMTask.ProjectID = Contract.ContractID WHERE Contract.NonProject = 1
The PMTaskAllocTotal DAC contains the quantity and the previously allocated amount for the project tasks with the Allocate Budget allocation method specified on the Calculation Rules tab of the Allocation Rules (PM207500) form. (The previously allocated amount, which is expressed in the project currency, is stored in the PMTaskAllocTotal.Amount field.) The class contains data that is not available in the UI but that can be useful for troubleshooting and data migration.
Project Budget Lines
The PMBudget DAC contains the project budget lines that are defined on the following forms:
- Projects (PM301000), on the Revenue Budget and Cost Budget tabs
- Project Budget (PM309000)
Project budget lines aggregate the project balance amounts and quantities by project ID, project task ID, cost code, account group, and inventory ID.
The selection of project budget lines that meet particular conditions is illustrated in the following examples:-
The selection of project budget lines for the specified project with the specified account group
SELECT * FROM PMBudget b WHERE b.ProjectID = 3293 AND b.AccountGroupID=23
-
The selection of the cost project budget of the specified project
SELECT * FROM PMBudget WHERE Type = 'E' AND ProjectID = 3293
-
The selection of the budget lines entered for the out-of-balance account group
SELECT * FROM PMBudget INNER JOIN PMAccountGroup ON PMBudget.AccountGroupID = PMAccountGroup.GroupID WHERE PMAccountGroup.Type = 'O'
Change Order Budgets
The PMChangeOrderBudget DAC contains the lines that are defined on the Revenue Budget and Cost Budget tabs of the Change Orders (PM308000) form.
The following example shows the retrieval of the list of change order budgets with the specified project and account group.
SELECT
*
FROM
PMChangeOrderBudget c
WHERE
c.ProjectID = 29
AND c.AccountGroupID = 2