Download the PHP package aichadigital/larabill without Composer

On this page you can find all versions of the php package aichadigital/larabill. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package larabill

Larabill - Professional Billing & Invoicing for Laravel

Latest Version Total Downloads Pipeline Coverage PHPStan level 8 PHP Version Laravel Version License

Development happens on gitlab.castris.com. The GitHub repository is a read-only distribution mirror: issues and pull requests opened there are not seen.

πŸ”’ Stability contract (effective from v6.0.0) β€” larabill is a closed, stable product governed by STABILITY.md: breaking changes only enter with a qualified, documented usage imperative; every major is auto-upgradeable from the previous one; deprecations live through at least one full major before removal. As of 6.0 the deprecated backlog is empty. One planned major exists (agreement model redesign β€” see the notice below).

πŸ”” Planned major β€” agreement model redesign (STABILITY.md.

ℹ️ Schema upgrade policy (stable versions = respect for data) β€” since 1.0, larabill treats your database as a contract: schema changes ship WITH their upgrade path. Every release that touches tables includes a data-aware migration (existing rows are transformed, never discarded), and breaking majors ship an UPGRADE-X.md guide in the dist. To upgrade an existing install: composer update aichadigital/larabill, re-run php artisan larabill:install --no-migrate (idempotent β€” it publishes only the NEW migrations, skipping the ones you already have), then php artisan migrate. Never use migrate:fresh on a database with real data.

⚠️ Upgrading? Follow the guides sequentially: UPGRADE-6.0.md (5.x β†’ 6.0, deprecated surface removed β€” zero migrations).

Larabill is a professional, UUID-first billing and invoicing package for Laravel applications. It provides tax calculation for Spain/EU/worldwide and flexible invoice generation with immutability protection, plus an optional thin bridge to intra-community VAT/NIF verification (delegated to the lararoi package). The consumer app's users.id MUST be UUID v7 char(36) β€” see ADR-006.

🎯 Features

Core Functionality

  • Invoice Management: UUID-based IDs, sequential numbering, proforma invoices, immutable records
  • Tax Calculation: Spanish (IVA), Canary Islands (IGIC), Ceuta/Melilla (IPSI), EU reverse charge, worldwide
  • VAT/NIF Verification (optional): thin bridge that delegates to the lararoi package (VIES and other providers). Not wired into invoice issuance β€” reverse charge is driven by the is_roi_taxed flag
  • Fiscal Data Management: Company and customer fiscal configurations with temporal validity
  • PDF Generation: Built-in invoice PDF generation using DomPDF
  • EU Compliance: Full support for EU B2B reverse charge and destination VAT rules

Technical Excellence

  • String UUID v7: Ordered UUIDs for invoices and the consumer's users.id (ADR-006)
  • FixedDecimal money: Precise monetary value objects backed by base-100 integers (no floating-point errors)
  • Preflight check: larabill:install aborts cleanly when users.id is not UUID-compatible
  • Temporal Validity: Fiscal configurations with valid_from/valid_until dates
  • Invoice Immutability: Protection against modifications after issuance
  • Non-overlapping prices: at most one active price per article and billing frequency on any date, enforced on write (ADR-012)

πŸ“¦ Requirements

  • PHP ^8.3
  • Laravel ^12.0 | ^13.0
  • users.id UUID v7 char(36) β€” see docs/setup-uuid.md

πŸš€ Installation

Via Composer

Publish Configuration

Run the Installer

This will:

  1. Publish migrations
  2. Run database migrations
  3. Seed default tax categories and rates

Diagnostic Commands

Larabill enforces at most one active price per article and billing frequency on any given date (ADR-012), and rejects writes that would break it. A database written before that invariant may already hold overlapping prices, so run this as a pre-upgrade gate and resolve what it reports. It does not repair anything on purpose: deciding which of two prices survives is a pricing decision, and it is yours.

Manual Installation (if preferred)

βš™οΈ Configuration

Environment Variables

Add these to your .env file:

Model Configuration

The user model resolves through user_model (env LARABILL_USER_MODEL) in config/larabill.php:

models.user is an optional explicit override β€” when set to an existing class it wins over user_model. If neither key points to an existing class, larabill fails loudly (no silent default). Package models can be swapped through the models block:

πŸ—οΈ Architecture

Fiscal Data Model

Larabill separates company and customer fiscal data with temporal validity:

Key principles:

  • The customer is a User (ADR-003); businesses and sub-accounts are modelled with parent_user_id. The legacy CustomerFiscalData model was removed.
  • Company config changes apply from a specific date forward
  • UserTaxProfile records are temporally versioned (valid_from/valid_until) β€” never modify past records
  • Invoices capture a fiscal snapshot at creation time
  • Invoices are absolutely immutable once issued

UUID Strategy

Larabill uses string UUID v7 for invoices:

Monetary Values (FixedDecimal)

Money is stored as base-100 integers and exposed as FixedDecimal value objects (from lara100), so there are no floating-point errors. You assign the unscaled base-100 integer; reading the attribute returns a FixedDecimal:

Invoice and invoice-item money attributes use the FixedDecimalCast (scale 2) from the lara100 package. Note: query-builder access (->value(), ->sum(), ->where()) returns the raw integer, while Eloquent attribute access returns a FixedDecimal.

πŸ“– Usage

Creating an Invoice

Invoice numbers are correlative per series (invoice_series_control, EU/RD 1619/2012): fiscal_number, prefix, series_number and fiscal_year all derive atomically from InvoiceNumberingService. An active CompanyFiscalConfig must exist β€” createInvoice() snapshots the issuer's fiscal data and refuses to emit without it.

Removed in 6.0: the former BillingService quick-start path is gone β€” InvoiceService is the emission path. See UPGRADE-6.0.md for the 1:1 mapping.

Tax Calculation

VAT/NIF Verification (optional bridge to lararoi)

Intra-community VAT/NIF verification is owned by the lararoi package. Larabill exposes a single thin bridge action that delegates to lararoi's contract and returns its canonical result unchanged:

Providers (VIES, isvat, vatlayer, …), caching and optional tracking are configured in lararoi, not here β€” publish its config with php artisan vendor:publish --tag="lararoi-config". This bridge is not wired into invoice issuance: reverse charge is decided by the invoice's is_roi_taxed flag, never by a live lookup.

Company Fiscal Configuration

User Tax Profile

The customer is a User (ADR-003); their fiscal data lives in UserTaxProfile, temporally versioned. This replaces the removed CustomerFiscalData model.

πŸ§ͺ Testing

Current status (v3.1.3): 928 tests passing on SQLite, plus MySQL 8 integration tests (real column types and unique constraints) and fork-based concurrency tests. The UUID-first contract is demonstrated on MySQL 8.

πŸ“š Documentation

Document Description
ARCHITECTURE.md Core architecture and domain model
setup-uuid.md UUID-first onboarding for the consumer app
ADR-006 UUID-first decision (supersedes the agnostic id contract)
TAX_RATES_MIGRATION_GUIDE.md Tax rates migration guide
STABILITY.md Stability contract: how larabill evolves from v6.0.0
UPGRADE-4.0.md Upgrade guide: larabill 3.x β†’ 4.0 (VAT verification bridge)
UPGRADE-5.0.md Upgrade guide: larabill 4.x β†’ 5.0 (fiscal series vs fiscal type)
UPGRADE-6.0.md Upgrade guide: larabill 5.x β†’ 6.0 (deprecated surface removed)
CHANGELOG.md Version history and breaking changes

For AI agents working with this package, see .claude/project.md.

πŸ—ΊοΈ Roadmap

Shipped

  • βœ… Core invoice management (immutable records, UUID v7, sequential numbering, proforma)
  • βœ… Spanish tax system (IVA, IGIC, IPSI)
  • βœ… EU reverse charge (B2B) and destination VAT
  • βœ… Fiscal data with temporal validity (CompanyFiscalConfig, UserTaxProfile)
  • βœ… FixedDecimal money type (base-100, no floating-point errors)
  • βœ… VeriFACTU integration (Spain AEAT) via lara-verifactu
  • βœ… Grouped payments
  • βœ… Legal-retention contract (LegallyRetainable) for GDPR tooling

Under consideration

  • Subscription billing
  • Payment gateway integration (Stripe, PayPal, Redsys)
  • Advanced reporting

See the CHANGELOG for the full release history.

🀝 Contributing

Please see CONTRIBUTING for details.

πŸ”’ Security

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

πŸ“„ License

GNU Affero General Public License v3.0 (AGPL-3.0-or-later). See LICENSE.md for details.

This means:

  • βœ… You can use, modify, and distribute this software
  • βœ… You must share any modifications under the same license
  • ⚠️ If you run this as a network service, you must provide the source code to users
  • ⚠️ You must preserve copyright and attribution notices

πŸ‘₯ Credits


All versions of larabill with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
aichadigital/lara-privacy-core Version ^1.0
aichadigital/lara-verifactu Version ^1.0
aichadigital/lara100 Version ^2.0
aichadigital/lararoi Version ^1.0.4
dompdf/dompdf Version ^3.1
illuminate/contracts Version ^13.0
illuminate/database Version ^13.0
illuminate/http Version ^13.0
lorisleiva/laravel-actions Version ^2.0
spatie/laravel-package-tools Version ^1.17
spatie/laravel-translatable Version ^6.12
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aichadigital/larabill contains the following files

Loading the files please wait ...