PHPackages                             gerardojbaez/sale-statements - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gerardojbaez/sale-statements

ActivePackage

gerardojbaez/sale-statements
============================

A payment-agnostic sales records system for your Laravel application.

v1.2.0(5y ago)4931MITPHPCI failing

Since Oct 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gerardojbaez/sale-statements)[ Packagist](https://packagist.org/packages/gerardojbaez/sale-statements)[ RSS](/packages/gerardojbaez-sale-statements/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (4)Versions (7)Used By (0)

Sales Statements 💰 📃 😁
======================

[](#sales-statements-moneybag-page_with_curl-grin)

A payment-agnostic sales records system for your Laravel application.

Easily store and manage your application's quotes, orders, invoices, and credit memos sales documents.

Used in production by [Rentado.net](https://rentado.net/?source=gerardojbaez/sale-statements) and [Full Help](https://www.fullhelp.com/?source=gerardojbaez/sale-statements) 🎉

Features
--------

[](#features)

- Support for quotes, orders, invoices and credit notes
- Ability to generate orders from a quote, invoices from an order, credit memos from an invoice.
- May be extended to support other sales documents.
- Store discounts on statement and optionally associate it with select items
- Per-item tax rates

TL;DR
-----

[](#tldr)

```
use \Gerardojbaez\SaleStatements\Models\SaleStatement;
use \Gerardojbaez\SaleStatements\Models\SaleStatementType;

// Create Invoice sale statement
$invoice = SaleStatement::create(SaleStatementType::TYPE_ORDER);

// Add Billing and Shipping Address
$invoice->addresses()->create([
    'is_shipping' => true,
    'is_billing' => true,
    'line_1' => '711-2880 Nulla St',
    'locality' => 'Mankato', // City, Town, Municipality, etc...
    'administrative_area' => 'Mississipi', // State, Province, Region, etc...
    'country_code' => 'US',
    'postalcode' => 96522,
    'given_name' => 'Cecilia', // i.e., first name
    'additional_name' => 'J.', // Can be used to hold a middle name, or a patronymic.
    'family_name' => 'Chapman', // i.e., last name
    'organization' => 'Acme Co.',
]);

// Store a discount at the statement-level
$discount = $invoice->discounts()->create([
    'name' => 'Get 20% off of license!',
    'discount' => 20,
    'is_percentage' => true,
]);

// Store tax rate at the statement-level
$tax = $statement->taxes()->create([
    'name' => 'PR 10.5 %',
    'rate' => 0.105,
    'amount' => 2486
]);

// Add line item to statement
$item = $invoice->items()->create([
    'name' => 'Software license',
    'price' => 14900, // $149.00
    'quantity' => 1,
]);

// Optionally associate discount with item
$item->discounts()->attach($discount);

// Associate tax rate with item
$item->taxes()->attach($tax);
```

A note on PDFs, address and money formatting
--------------------------------------------

[](#a-note-on-pdfs-address-and-money-formatting)

Address and money formatting is something that varies a lot between applications, this is why PDF generation is not included in this package and may not be added in the future.

You may consider using [Dompdf](https://github.com/dompdf/dompdf) and [Sparksuite's invoice template](https://github.com/sparksuite/simple-html-invoice-template) as a starting point. If your application already has addresses and money formatting, adding PDF with the above tools may be a trivial task.

A note on money values
----------------------

[](#a-note-on-money-values)

All amounts are represented in the smallest unit (e.g., cents), so USD 5.00 is written as `500`. For this reason, all database columns that store monetary values are using the INT data type.

I don't see the relation to my users or products table
------------------------------------------------------

[](#i-dont-see-the-relation-to-my-users-or-products-table)

There's no assumption of your billable and product models. If you need to add a relation or extend the base functionality, you are free to do so by altering the tables as needed and extending the default models.

Security
--------

[](#security)

If you discover any security-related issue, please email  instead of using the issue tracker.

License
-------

[](#license)

Released under the MIT License. Please see the License file included for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~404 days

Total

6

Last Release

375d ago

Major Versions

v1.2.0 → v2.0.0-beta.12022-02-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/71cb68c0b70885cd6cb1f518f31b2253ced4d4c2d25d0e540bb2553982546ecc?d=identicon)[gerardojbaez](/maintainers/gerardojbaez)

---

Top Contributors

[![gerardojbaez](https://avatars.githubusercontent.com/u/11788389?v=4)](https://github.com/gerardojbaez "gerardojbaez (55 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gerardojbaez-sale-statements/health.svg)

```
[![Health](https://phpackages.com/badges/gerardojbaez-sale-statements/health.svg)](https://phpackages.com/packages/gerardojbaez-sale-statements)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[illuminatech/balance

Provides support for Balance accounting system based on debit and credit principle

16137.4k](/packages/illuminatech-balance)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
