Looking to hire Laravel developers? Try LaraJobs

laravel-erp-projects maintained by jeffersongoncalves

Description
ERP projects — projects, tasks and timesheets for the Laravel ERP ecosystem
Last update
2026/06/28 00:21 (dev-main)
License
Downloads
4

Comments
comments powered by Disqus

Laravel ERP Projects

Laravel ERP Projects

ERP projects — projects, tasks and timesheets for the Laravel ERP ecosystem.

This package is the projects / timesheet module of an ERPNext-native rebuild. It owns projects, their task tree and the timesheets that capture effort, and bills billable timesheet hours into the accounting module as a sales invoice. It depends on jeffersongoncalves/laravel-erp-core and jeffersongoncalves/laravel-erp-accounting.

Features

  • Activity types — A master of billable activities with default costing and billing rates.
  • Projects — A status-driven document (Open → Completed → Cancelled) holding the customer party, schedule, percent complete and billable/billed totals.
  • Tasks — A status-driven, self-referencing task tree with priority, schedule, progress and expected/actual time. Statuses: Open, Working, Pending Review, Overdue, Completed, Cancelled.
  • Timesheets — A submittable document with billable/costing detail rows. While draft it recomputes its total hours, billable hours and billing/costing amounts from its lines.
  • Billing serviceTimesheetService turns a submitted timesheet into an accounting sales invoice, wiring the projects module into the general-ledger engine.
  • Effort documents — Timesheets capture effort: submitting one posts nothing to the ledger. Revenue is recognised only when the timesheet is billed into a sales invoice.
  • Customizable Models — Override any model via config (ModelResolver pattern); Project and Task ship swappable contracts.
  • Translations — English and Brazilian Portuguese.

Compatibility

Package PHP Laravel
^1.0 ^8.2 ^11.0 | ^12.0 | ^13.0

Installation

composer require jeffersongoncalves/laravel-erp-projects

Publish and run the migrations (the core and accounting package migrations must be published too):

php artisan vendor:publish --tag="erp-core-migrations"
php artisan vendor:publish --tag="erp-accounting-migrations"
php artisan vendor:publish --tag="erp-projects-migrations"
php artisan migrate

Publish the config (optional):

php artisan vendor:publish --tag="erp-projects-config"

Billing

TimesheetService is registered as a singleton.

use JeffersonGoncalves\Erp\Projects\Services\TimesheetService;

// Timesheet -> Sales Invoice (draft; caller supplies the Receivable + income accounts)
$invoice = app(TimesheetService::class)->createSalesInvoice($timesheet, $receivable->id, $income->id);
$invoice->submit();
  • createSalesInvoice copies the party from the timesheet's parent project onto an accounting SalesInvoice, then adds one invoice line per billable detail (item_code SERVICE, qty = hours, rate = billing rate, income account). The receivable (debit_to) is supplied by the caller because it is a non-nullable foreign key. The invoice is saved as a draft; submitting it posts the balanced receivable/income general-ledger entries. The timesheet is flagged billed (sales_invoice_id, per_billed = 100).

Database Tables

All tables use the configured prefix shared across the ERP ecosystem (default: erp_): activity_types, projects, tasks, timesheets, timesheet_details.

Testing

composer test

Changelog

Please see CHANGELOG for what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.