How project costing works ​

ERPNext calculates what a project costs and what it earns from the documents linked to it. You do not enter the costs on the project. You link the timesheets, purchases, stock entries, and invoices to the project, and ERPNext adds them up.

Cost of time ​

Most service projects cost mainly time. The cost flows like this:

  1. An activity type has a default costing rate and billing rate. An activity cost can set other rates for one employee.
  2. An employee logs hours in a timesheet against a project and a task. ERPNext takes the rates from the activity cost, or from the activity type.
  3. Each timesheet row gets a Costing Amount (hours × costing rate) and, if billable, a Billing Amount (billing hours × billing rate).
  4. ERPNext adds the rows to the task: Total Costing Amount (via Timesheet) and Total Billable Amount (via Timesheet).
  5. ERPNext adds the rows to the project in the same fields.

For example, an employee with a costing rate of 40 and a billing rate of 100 works 5 hours on a task. The task and the project get a costing amount of 200 and a billable amount of 500.

Other costs ​

CostSourceProject field
PurchasesPurchase Invoices with the project in the Items rowsTotal Purchase Cost (via Purchase Invoice)
MaterialStock Entries for the projectTotal Consumed Material Cost (via Stock Entry)
Employee expensesExpense Claims for the project (HRMS app)Expense claim total, added by the HRMS app

How often ERPNext updates the purchase cost depends on How often should project be updated of Total Purchase Cost ? in Buying Settings.

Revenue ​

RevenueSourceProject field
OrderedThe Sales Order linked to the projectTotal Sales Amount (via Sales Order)
BilledSales Invoices for the projectTotal Billed Amount (via Sales Invoice)

Gross margin ​

ERPNext calculates the margin from what you billed and what you spent:

Gross Margin = Total Billed Amount
             − (Total Costing Amount + Total Purchase Cost + Total Consumed Material Cost)

Gross Margin % = Gross Margin ÷ Total Billed Amount × 100

If nothing is billed yet, Gross Margin % is 0.

Compare the result with the Estimated Cost that you enter on the project.

Beyond the project fields ​

The project fields cover timesheets, purchases, stock, and sales. For a full profit and loss view of the project, including Journal Entries and other income and expenses, use the project as an accounting dimension. See Track project profitability.