Project delivery and timesheets
Project delivery connects a client project to planned work, progress, recorded time, cost, and billable value. It gives delivery teams a shared view of work while giving finance a trace from submitted time to customer billing. See Projects, service, and support for the wider service model, Sales and commerce for the commercial lifecycle, and Accounting and financial operations for the accounting effects.
Delivery model
The project is the main delivery record. It links a customer and, when used, a sales order to a team, tasks, time, costs, and billing. It also supports selected views for client users.
The delivery model separates three questions:
- What must be done? Tasks define work, dates, dependencies, and milestones.
- What was done? Timesheets record time against projects and tasks.
- What can be charged? Billable time carries a rate and amount into sales invoicing.
The links between these records keep delivery progress and financial measures in step.
Project planning
Project lifecycle
The project lifecycle covers planned dates, active work, review of progress, and closure. A project has the statuses Open, On hold, Completed, and Cancelled. Its completion percentage can be managed directly or derived from task completion, task progress, or task weight. Manual completion values must stay between 0 and 100, while On hold and Cancelled preserve their explicit status instead of being reset by automatic progress updates.
Projects can start from a reusable project template. A template supplies a repeatable task plan so that a new project can begin with known work and timing. The project may also link to a sales order, which lets delivery and the commercial record refer to the same work.
The project record is also the starting point for delivery actions. Its task workspace lets teams review, sort, assign, and update task work without leaving the project. Teams can create time records, update costing and billing, set the project and its tasks to a final status together, and duplicate a project with its task structure. The project presents costing and budget views when the user can read the related records, while summary totals remain available in collapsible Costing and Billing and Margin sections.
Project records are selectable by a wider set of operational roles for cross-module links. This supports references to delivery work without giving those roles project management rights.
References: erpnext/…/project.json• L112-158 erpnext/…/project.json• L305-519 erpnext/…/project.js• L104-155 erpnext/…/project.js• L157-301 erpnext/…/project.js• L383-431 erpnext/…/project.js• L617-718
Task hierarchy and milestones
Tasks break a project into work that a team can assign, schedule, and complete. A task can be a group with child tasks, and a milestone is a task marked as a significant delivery point. Dependencies express the order between tasks.
Task status shows the work state: Open, Working, Pending Review, Overdue, Template, Completed, or Cancelled. Expected dates and expected hours describe the plan. Submitted time records provide actual dates, actual hours, and task cost and billing totals. Submitted time can move an open task to Working or Completed based on the completion marks in its logs, while an existing Completed or Cancelled task stays closed. A task cannot be completed while an unfinished dependent task remains. Dependency links also cannot form a cycle.
The task tree, list, Gantt view, and Kanban view give teams different ways to manage the same work structure. Standard views make open, due soon, overdue, and pending-review work easy to find. Overdue is driven by the expected end date rather than by moving a card manually.
Tasks stay within their project hierarchy. Parent tasks must be group tasks in the same project, and changes to a dependency can move later open work to keep the schedule aligned. Changes that affect project figures require access to the affected project, including the project a task leaves or joins.
References: erpnext/…/task.json• L118-216 erpnext/…/task.json• L240-313 erpnext/…/task.py• L84-213 erpnext/…/task.py• L249-321 erpnext/…/task.py• L342-377 erpnext/…/task.py• L379-448 erpnext/…/task.py• L450-472 erpnext/…/task.py• L388-416 erpnext/…/test_task.py• L583-649 erpnext/…/task_list.js• L12-68 erpnext/…/task_kanban.js• L1-14 erpnext/…/task_tree.js• L3-90
Progress and reminders
Project progress is a roll-up of task state or task progress unless the project uses manual progress. A completed project reaches 100 percent. A task that passes its expected end date becomes overdue unless it is already completed, cancelled, or waiting for a review date.
The Project Overview turns this state into management signals. It highlights the next open milestone, overdue and blocked work, tasks due soon, unassigned work, workload by assignee, expected versus logged hours, and planned versus completed progress. For a closed project it instead shows how delivery ended, including late, on-time, cancelled, and still-open tasks.
Projects can ask team members for regular status updates. The reminder cadence can be hourly, twice daily, daily, or weekly. Each reminder creates a project update and sends its subject and message to project users. Replies become project updates, and a later summary reports the updates to the same users. Holidays suppress the normal reminder or summary send for that day.
This diagram shows how planned work becomes delivery status and scheduled feedback.
flowchart LR
A[Open project] --> B[Planned tasks]
B --> C[Team progress]
C --> D[Project overview]
C --> E[Scheduled update request]
E --> F[User replies]
F --> G[Project status summary]
B --> H[Task progress roll-up]
H --> I[Project completion]
References: erpnext/…/project.py• L267-331 erpnext/…/project.py• L584-816 erpnext/…/project.json• L404-495 erpnext/…/project_overview.py• L38-148 erpnext/…/project_overview.py• L157-225 erpnext/…/project_overview_progress.py• L18-55 erpnext/…/project_overview_breakdown.py• L16-77
Project costing and budgets
The Project Costing view explains whether delivery is using its estimate and producing the expected commercial result. It combines submitted labour time with direct purchase, consumed material, and optional expense-claim costs. It compares those costs with the sales order contract and billed sales to show forecast, margin, and billing progress.
Cost attribution follows the project named by the source document. A row-level project takes precedence over the document project, while a blank or cleared row uses the document project. This rule applies to sales orders, sales invoices, and purchase invoices, so amounts stay with the project that owns each row. Direct purchase cost excludes stock valuation expense rows. Landed-cost claims reduce the remaining direct purchase share, while landed cost becomes part of consumed material cost when stock is used. The same source rules feed the project totals and the Costing view.
The view also explains the main cost drivers. It shows up to five leading labour activities, employees, suppliers, and items when the user can read the related records. Where labour hours have no costing rate, it estimates the missing cost from priced hours and marks labour cost as understated when at least five percent of hours lack a rate. This prevents reported cost from being mistaken for complete cost.
The Accounts view adds the financial control picture for the current fiscal year. It brings together project ledger activity, open purchase commitments, material requests, and active budgets. The Budgets tab lets an authorized user set an expense budget for a project across one or more fiscal years. A budget can stop, warn, or only track spending from purchase orders, material requests, or expenses.
These views respect access to the source records. A user may see project totals while seeing fewer source rows or no rate, ledger, or budget detail.
References: erpnext/…/project.json• L305-401 erpnext/…/project.js• L661-718 erpnext/…/project.js• L720-946 erpnext/…/project_costing.py• L35-114 erpnext/…/project_costing.py• L120-165 erpnext/…/project_costing.py• L211-283 erpnext/…/queries.py• L21-90 erpnext/…/queries.py• L97-159 erpnext/…/queries.py• L161-224 erpnext/…/queries.py• L226-273 erpnext/…/drivers.py• L16-66 erpnext/…/drivers.py• L68-112 erpnext/…/accounts.py• L37-47 erpnext/…/accounts.py• L93-145 erpnext/…/project_budgets.py• L26-115 erpnext/…/budgets.py• L43-116 erpnext/…/test_project.py• L686-745 erpnext/…/test_project.py• L785-918 erpnext/…/test_project.py• L920-1033
Time capture
Timesheet records
A timesheet is a time record for an employee or user. Its time logs identify the activity, project, and optional task, with start and end times, hours, completion, and notes. The record moves from Draft to Submitted and can then show billing, completion, payroll, or cancellation states. It keeps working hours separate from billable hours so that delivery effort and customer charges can differ.
Submitting a timesheet validates its time logs, prevents overlapping work for the same user or employee unless the project settings allow it, and updates linked tasks and projects. Submitted logs can move an open task to Working or Completed from their completion marks. The project then refreshes actual dates, actual time, and delivery totals from submitted time.
The timesheet form supports live time capture through a start or resume timer. It fills new logs with the active employee and company when those records are linked to the current user. Project and task choices stay within the selected customer or company and exclude closed work, which keeps new time tied to valid delivery records.
The form recalculates hours, billing hours, rates, and costing amounts as a user changes a log. It also offers invoice creation when submitted billable hours remain. Currency and exchange-rate changes update the displayed totals in both the timesheet currency and the base currency.
The timesheet can also be updated after submission when the time-log field permits that change. The system checks access again for rows that change delivery totals and refreshes the linked task and project totals. Cancellation also checks the affected delivery records and rejects changes to the time logs. Time cannot be logged against a cancelled task.
References: erpnext/…/timesheet.json• L12-49 erpnext/…/timesheet.json• L161-241 erpnext/…/timesheet.py• L69-102 erpnext/…/timesheet.py• L169-214 erpnext/…/timesheet.py• L236-266 erpnext/…/timesheet.py• L326-346 erpnext/…/timesheet.js• L4-118 erpnext/…/timesheet.js• L132-209 erpnext/…/timesheet.js• L211-257 erpnext/…/timesheet.js• L291-456 erpnext/…/timesheet.js• L458-477 erpnext/…/test_timesheet.py• L93-116 erpnext/…/test_timesheet.py• L921-985
Time rates and costs
Each activity type can provide a default costing rate and billing rate. An employee-specific activity cost can override the default. The resulting costing amount measures internal delivery cost, while the billing amount measures the value that can be charged to the customer. Rate lookup also respects access to the timesheet, employee, and activity type.
The project uses submitted time to show labour cost and hours. It combines those values with purchase, material, and optional expense costs to show delivery cost and gross margin. This gives delivery managers a view of effort and margin without treating all recorded hours as billable.
Rate records must be unique for an employee and activity, or for the default activity rate. When the timesheet currency differs from the base currency, the rate is converted before the time value is used.
References: erpnext/…/activity_cost.json• L24-80 erpnext/…/activity_cost.py• L32-70 erpnext/…/timesheet.py• L348-355 erpnext/…/timesheet.py• L612-663 erpnext/…/test_timesheet.py• L740-833 erpnext/…/test_timesheet.py• L854-920 erpnext/…/drivers.py• L46-66 erpnext/…/drivers.py• L99-112 erpnext/…/queries.py• L36-44
Billing linkage
Billable time
A time log is billable only when its billable flag is set. Its billing hours and billing amount then contribute to the timesheet totals. The timesheet tracks the amount and hours that remain unbilled, as well as the share already billed.
This relationship is the handoff from delivery to finance: the project supplies the work context, the timesheet supplies submitted time, and the sales invoice supplies the customer charge.
References: erpnext/…/timesheet.py• L107-148 erpnext/…/timesheet.json• L161-241
Sales invoice connection
Sales invoicing accepts submitted timesheets, including timesheets that are partly billed. The invoice records the source timesheet and time-log detail. On invoice submission, the source time is marked as billed. This prevents the same time log from being charged twice and changes the timesheet state to Partially Billed or Billed. Cancelling or returning an invoice can clear the related link and recalculate the billing state.
For a project invoice, the system can fetch submitted billable time that has no invoice link when the Projects Settings option is enabled. A user can also create an invoice from a timesheet for its remaining billable hours. Billing can therefore continue in more than one invoice until all billable time is linked.
This diagram shows the handoff from recorded effort to an invoice and back to billing state.
flowchart LR
A[Time log] --> B[Submitted timesheet]
B --> C{Billable and unbilled?}
C -- No --> D[Delivery record only]
C -- Yes --> E[Sales invoice time rows]
E --> F[Invoice submission]
F --> G[Time log marked billed]
G --> H[Timesheet billing status]
The Costing billing card provides the wider commercial view. It lists submitted sales orders and invoices that charge the project. An invoice can identify the project on the invoice or on its item rows, so both forms of project billing remain part of the project total.
References: erpnext/…/timesheet.py• L107-148 erpnext/…/timesheet.py• L488-541 erpnext/…/timesheet.py• L555-608 erpnext/…/timesheet_billing.py• L17-45 erpnext/…/timesheet_billing.py• L66-99 erpnext/…/projects_settings.json• L39-43 erpnext/…/billing.py• L15-84 erpnext/…/queries.py• L54-62 erpnext/…/test_project.py• L686-745 erpnext/…/test_timesheet.py• L184-236 erpnext/…/test_timesheet.py• L238-385 erpnext/…/test_timesheet.py• L642-694
Portal views
Client project view
The project portal page gives an authorized project user a compact delivery view. It shows project status, progress, hours spent, open tasks, and their assignments. It can also show timesheets and public project attachments when the project user has those views enabled.
Project access follows the users listed on the project. Adding a user grants access and sends a collaboration invitation. Removing the user removes the project share. The portal task form returns the user to the project after task creation, which keeps client work within the project context.
References: erpnext/…/projects.py• L8-25 erpnext/…/projects.html• L21-76 erpnext/…/project.py• L400-448 erpnext/…/project.json• L241-258 erpnext/…/project_user.json• L55-83 erpnext/…/tasks.py• L6-17
Portal time view
The portal can list submitted timesheet entries that belong to a customer’s projects or invoices. A user can open an entry to see its project, activity, task, time range, hours, status, and note. Project-level access controls whether timesheets appear at all, so the client view can focus on delivery status without exposing time detail.
The portal also resolves an invoice link from either the timesheet or its individual time log. This keeps billed entries visible when billing is stored at the time-log level. The server-side time lookups apply the user’s access to Timesheet and Project records before they return billable time, rates, or timesheet choices.
References: erpnext/…/timesheet.py• L705-753 erpnext/…/timesheet.py• L462-495 erpnext/…/timelog_info.html• L14-45 erpnext/…/project_timesheets.html• L1-32 erpnext/…/project_user.json• L61-73 erpnext/…/test_timesheet.py• L696-738
Delivery views and reports
The Projects workspace brings together project and task records, time tracking, progress cards, costing, budgets, and delivery reports. The views answer different management questions rather than replacing the project record.
| View or report | Main question |
|---|---|
| Project overview | What is the current delivery position and which work needs attention? |
| Project costing | How do cost, estimate, forecast, contract, billing, and margin compare? |
| Project budgets and accounts | What has been spent, committed, requested, or budgeted? |
| Delayed Tasks Summary | Which tasks are late and by how many days? |
| Daily Timesheet Summary | Who recorded which submitted work time for each project and task? |
| Timesheet Billing Summary | How do working hours, billing hours, and billing amount compare by project, employee, or date? |
| Project portal | What can a client or project user see about delivery work? |
The Timesheet Billing Summary uses the time-log start time for its date range. Its end date includes the full selected day by comparing the start time with the next day, so a log that starts on that day and ends at midnight is not lost.
These views use the same project, task, and timesheet relationships. Managers can therefore compare planned work, actual effort, delay, cost, and billing without creating a separate delivery ledger.
References: erpnext/…/project_dashboard.py• L4-20 erpnext/…/project_overview.py• L50-94 erpnext/…/project_costing.py• L55-114 erpnext/…/projects.json• L20-175 erpnext/…/delayed_tasks_summary.py• L18-55 erpnext/…/daily_timesheet_summary.py• L21-71 erpnext/…/timesheet_billing_summary.py• L26-124
Change checklist
When these files or sections are changed, remember to consider these:
- When task status, progress, dates, dependency, or cycle rules change, check the project completion roll-up, Project Overview attention cards, milestone state, and overdue views.
- When timesheet detail fields or its status choices change, check task and project actual totals, overlap checks, portal time views, costing totals, and billing report columns.
- When timer behavior or timesheet form filters change, check employee defaults, customer and company project choices, task choices, live totals, currency conversion, and invoice creation.
- When billable time or invoice linking changes, check duplicate-billing protection, parent and time-log invoice links, the unbilled card, and the Partially Billed/Billed status rules.
- When project user fields change, check invitation, access sharing, portal task access, attachment visibility, and timesheet visibility together.
- When costing or budget source queries change, check source-document permissions, company currency, fiscal-year limits, commitments, budget status, and the Costing summary.
- When sales or purchase project attribution changes, check row-level ownership, blank or cleared row fallback to the document project, and refreshes after submit, cancel, or row edits.
- When landed-cost or stock valuation handling changes, check the split between direct purchase and consumed material cost, returns, and refreshes after landed-cost voucher changes.
- When costing driver or rate-gap rules change, check the top-driver groups, the five-percent understated-labour signal, and permission-based detail.
- When project total fields or their form layout changes, check the stored totals, the detailed Costing view, list and report uses, and visibility of the collapsible summary sections.
- When activity rates or currency behavior changes, check both internal costing totals, rate-gap warnings, and customer billing totals.
- When reminder cadence or Project Update fields change, check scheduled sends, reply collection, holiday handling, and the daily summary.
- When project or task permissions change, check cross-module link selection, portal access, costing detail, and budget visibility without granting unintended edit access.
- When billing report date filters change, check the selected end day and time logs that end at midnight.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A task is completed while a dependent task is still active | The task cannot be completed | Complete or cancel every dependency first |
| A dependency chain points back to an existing task | The task save is rejected | Keep dependency links acyclic |
| A project is set to Completed while its progress is below 100 percent | The project save is rejected | Complete or cancel its tasks before closing the project |
| A task date falls outside its project dates or its parent task dates | The task save is rejected | Keep the task schedule inside the project and parent plan |
| A time log overlaps another active log for the same user or employee | Timesheet validation fails | Use non-overlapping ranges or set the matching Projects Settings exception |
| A time log points to a cancelled task or a task from another project | The timesheet cannot be accepted | Keep the task active and align the task and project links |
| A billable log has no valid activity rate or exchange rate | Cost or billing value is incomplete or the rate lookup fails | Set a default or employee activity rate and maintain the needed currency rate |
| An invoice uses a draft, cancelled, or already invoiced time record | The invoice cannot use that time | Submit the timesheet and keep each time-log link unique |
| A project budget is missing or its control stage is exceeded | Spend is not controlled or a new order, request, or expense is stopped | Set an active budget with the intended Stop, Warn, or Track only rule |
| A project has no enabled project user for a reminder | No recipient receives the project update | Add enabled project users with valid email access |
| A user lacks access to a source record behind a costing or portal view | Some detail is hidden or the action is rejected | Apply the required Project and source-doctype permissions |
| A source row has a stale or incorrect project link | Sales or purchase value is shown under the wrong project | Keep row-level links and document-level fallback aligned, then refresh affected projects after source changes |
| A landed-cost claim is counted as both direct purchase and consumed material cost | Project cost and margin are overstated | Keep valuation rows and claimed landed costs in their intended cost category |
| A billing report uses the selected end date as a time value | Logs at the end of the day can be omitted | Filter by time-log start time before the next calendar day |
Key files
| File | Why to read it |
|---|---|
| erpnext/…/project.py | Shows how project progress, delivery totals, reminders, access, sales links, status changes, and permissions work together. |
| erpnext/…/project.js | Shows the project actions that connect planning to tasks, timesheets, costing, budgets, views, and status changes. |
| erpnext/…/project.json | Defines the project lifecycle, progress choices, dates, customer links, costing fields, budget view, reminder controls, and cross-module access. |
| erpnext/…/project_overview.py | Shows the management view of milestones, task risk, workload, delivery outcome, unbilled time, and profitability. |
| erpnext/…/project_overview_breakdown.py | Shows how task status, delivery outcome, workload, and completed work are grouped for the overview. |
| erpnext/…/project_overview_progress.py | Shows how planned and completed progress is compared over time. |
| erpnext/…/project_costing.py | Shows the Costing tab summary, monthly values, billing, drivers, rate gaps, reports, and permission-aware sections. |
| erpnext/…/queries.py | Shows how labour, purchases, materials, expense claims, sales orders, and invoices contribute to project totals, including row-level project attribution and landed-cost treatment. |
| erpnext/…/accounts.py | Shows the project ledger, commitments, fiscal-year accounts, and budget view. |
| erpnext/…/project_budgets.py | Shows how project budgets are created, distributed, controlled, and displayed. |
| erpnext/…/drivers.py | Shows the main labour, supplier, and item cost drivers and unpriced labour signal. |
| erpnext/…/task.py | Shows task status, dependency, cycle, schedule, milestone, access, and timesheet roll-up behavior. |
| erpnext/…/task.json | Defines task states, hierarchy, planning fields, milestone flag, delivery totals, and link access. |
| erpnext/…/test_task.py | Captures contracts for task scheduling, dependency changes, status roll-up, project access, and cancelled-task time protection. |
| erpnext/…/task_list.js | Shows standard task filters, status actions, indicators, and Gantt information. |
| erpnext/…/timesheet.py | Shows time validation, activity rates, task and project updates, billing states, portal listing, access checks, and invoice creation. |
| erpnext/…/timesheet.js | Shows the user-facing timer, delivery-record filters, live time and amount totals, currency display, and invoice action. |
| erpnext/…/timesheet.json | Defines the timesheet lifecycle, time-log table, working and billable totals, billing status, currency, and role access. |
| erpnext/…/test_timesheet.py | Captures contracts for rates, overlap checks, access, partial billing, invoice returns, and portal visibility. |
| erpnext/…/activity_cost.py | Shows the uniqueness contract for default and employee-specific activity rates. |
| erpnext/…/timesheet_billing.py | Shows the handoff from submitted timesheets to sales invoices and the anti-duplication link. |
| erpnext/…/projects.py | Shows the data made available to authorized project users in the portal. |
| erpnext/…/projects.html | Shows the client-facing project status, task, timesheet, and attachment view. |
| erpnext/…/projects.json | Shows the main workspace entry points for project delivery, time tracking, and reports. |
| erpnext/…/timesheet_billing_summary.py | Shows the report date range, grouping, permission filtering, and working-versus-billing totals. |