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:
- An activity type has a default costing rate and billing rate. An activity cost can set other rates for one employee.
- 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.
- Each timesheet row gets a Costing Amount (hours × costing rate) and, if billable, a Billing Amount (billing hours × billing rate).
- ERPNext adds the rows to the task: Total Costing Amount (via Timesheet) and Total Billable Amount (via Timesheet).
- 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
| Cost | Source | Project field |
|---|---|---|
| Purchases | Purchase Invoices with the project in the Items rows | Total Purchase Cost (via Purchase Invoice) |
| Material | Stock Entries for the project | Total Consumed Material Cost (via Stock Entry) |
| Employee expenses | Expense 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
| Revenue | Source | Project field |
|---|---|---|
| Ordered | The Sales Order linked to the project | Total Sales Amount (via Sales Order) |
| Billed | Sales Invoices for the project | Total 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 × 100If 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.