Download the PHP package schenke-io/laravel-invoice without Composer

On this page you can find all versions of the php package schenke-io/laravel-invoice. 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 laravel-invoice

Version Downloads Tests License PHP

Laravel Invoice

A robust and flexible PHP package for Laravel that simplifies invoice management, currency handling, and complex VAT calculations.

Key Benefits

Core Components

Currency Value Object

The Currency class (src/Money/Currency.php) is the heart of all monetary operations. It stores values as integers (cents) and provides a rich set of methods for:

Example:

InvoiceNumeric

InvoiceNumeric (src/Invoicing/InvoiceNumeric.php) orchestrates the creation of an invoice. Its main responsibilities include:

Usage Examples

Here are some examples of how to use the laravel-invoice package, ranging from basic currency operations to complex multi-tax invoices.

1. Basic Currency Operations

The Currency class ensures precision by using cents internally.

2. Simple Invoice Generation

Creating a basic invoice with a single tax rate.

3. Complex Multi-Tax Invoice

Invoices can contain items with different tax categories. The package automatically groups them in the summary.

4. Multi-Country Support

The package supports VAT rates for various countries. You can specify the country code when adding lines.

5. SEPA QR Code Integration

Generate a SEPA-compliant QR code for easy payments.

Currency

Value object representing a monetary currency.

Public methods of Currency

method summary
fromAny static constructor from any value
fromFloat static constructor from a float value
fromCents static constructor from cents
code Returns the ISO 4217 currency code.
withCode Returns a new Currency instance with the specified currency code.
vatFromGross VAT amount from the gross price, given a VAT rate.
vatFromNet Calculate the VAT amount from the net price, given a VAT rate.
fromGrossToNet convert a gross value to a net value using VAT
fromNetToGross Convert a net value to a gross value using VAT
toFloat exports to float
formatted Returns the formatted value with thousands separator (German format).
formattedStr Returns the formatted value with thousands separator and currency symbol.
dividedBy Divides the currency value by the given divisor with half-up rounding.
str exports to formatted currency string
plus adds two objects
minus subtracts two objects
times multiplies the object by a factor
toLivewire exports to Livewire format (numeric scalar)
fromLivewire -
isEmpty Check if the object is empty (zero)

Vat

Represents a Value Added Tax (VAT) rate and provides factory methods for countries.

Public methods of Vat

method summary
country Get a country instance by its ISO code.
fromId Create a VAT instance from a numeric ID (e.g. '190' for 19.0%).
fromRate Create a VAT instance from a float rate (e.g. 0.19 for 19%).

VatCategory

Defines the high-level tax categories based on the analysis from

Public methods of VatCategory

method summary
description German description of the category.
vatRate -
hasVat Checks if this transaction case involves VAT.
isReverseCharge Checks if this transaction case is a reverse charge case.
cases -
from -
tryFrom -

InvoiceNumeric

Main class for managing invoice data and calculations.

Public methods of InvoiceNumeric

method summary
getTotalGrossPrice Get the total gross price of the invoice.
getTotalNetPrice Get the total net price of the invoice.
addWeight take the weight in grams and add it to the total weight
addLine add the lines with automatic positions
payMe show pay me information
isEmpty the total is zero
invoiceTableView Prepare data for a Blade template or raw HTML rendering.

Customer

Data transfer object for customer information.

LineData

Representation of a single line item on an invoice.

Public methods of LineData

method summary
fromTotalGrossPrice Create a line item from its total gross price.
fromTotalNetPrice Create a line item from its total net price.

InvoiceLineType

Enum defining the various types of line items that can appear on an invoice.

Public methods of InvoiceLineType

method summary
vatCategory Returns the tax category.
vatRate Returns the applicable VAT rate type.
cases -
from -
tryFrom -

InvoiceTableView

Data transfer object for the complete invoice table view.

LineViewBase

Base class for rendering invoice lines as HTML.

Public methods of LineViewBase

method summary
html Generate the HTML for a single invoice line row.

SepaCode

Generator for SEPA QR codes (BezahlCode).

Public methods of SepaCode

method summary
fromInvoice Create a SEPA code instance directly from an invoice.
dataUri Generate the QR code as a PNG data URI.

Custom invoice

To build a custom invoice you first generate a class which extends LineViewBase and implements LineViewInterface.

This class should define the column-alignment in the columns() method.

Then you start a new instance of InvoiceTableView and fill its public data. The columns() method must return keys that correspond to the public properties of your custom line view class.

CSS Styling

The rendering engine uses a configuration-based approach for CSS classes. You can customize the look of your tables by providing a config array to the html() method or by using the default configuration in TableView.

Row Classes

The following keys in the configuration control row-level styling:

Cell Classes

The following keys control cell-level alignment and emphasis:


Markdown file generated by schenke-io/packaging-tools


All versions of laravel-invoice with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
archtechx/enums Version ^v1.1
illuminate/contracts Version ^13.0
illuminate/console Version ^13.0
illuminate/http Version ^13.0
illuminate/routing Version ^13.0
illuminate/support Version ^13.0
illuminate/validation Version ^13.0
livewire/livewire Version ^4.0
spatie/laravel-data Version ^4.0
spatie/laravel-package-tools Version ^1.0
smhg/sepa-qr-data Version ^3.0
endroid/qr-code Version ^6.0
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 schenke-io/laravel-invoice contains the following files

Loading the files please wait ...