Download the PHP package 2lenet/invoice-bundle without Composer

On this page you can find all versions of the php package 2lenet/invoice-bundle. 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 invoice-bundle

InvoiceBundle v2

This bundle is useful to manage invoice in your project.

Installation

To install the bundle:

Configuration

To configure the bundle, in the doctrine service configuration file ("config/packages/doctrine.yaml"), you have to define which entity will get the role of customer.

For exemple, if you want to use your User entity, you will add this block at the end of file :

Then, when the bundle expect a CustomerInterface you can pass an user. Once this listener is configured, Doctrine will know how to replace the customer interface. And that's the same for the Product entity.

To get more info about relationships with abstract classes and interfaces, you can check official Symfony Documentation here

Do not forget to implement methods on your entity using bundle traits and add your custom needs.

PDF Parameter

Use PdfGenerator To export invoice in PDF, you have to define paramater in the file "config/packages/lle_invoice.yaml". For example, you can define parameter like that :

logo: Path of image to put on Invoice header

The other fields concern the company who made fixtures.

Usage

In this bundle, there are several services : InvoiceManager, InvoiceLineManager, InvoiceExporter, InvoicePDF. You can use all of them with Dependency Injection. You can use EasyAdmin or EasyAdminPlus to manage this entity.

Invoice Manager

InvoiceManager is a service that let you generate a draft invoice or validate an invoice.

Generate a draft invoice

A draft invoice is an invoice with pre-filled fields.

Example:

But if you want to get more pre-filled fields, you can pass an entity that implements CustomerInterface :

Validate an invoice

If you want to validate an invoice, you can use the InvoiceManager. Validate an Invoice set the invoice number, puts current date and set status to "Validate".

Example:

Then, you can persist your entity or do whatever you want.

Invoice Exporter

You can export one or more invoice in csv format.

Example:

You can choose the filename with: export([$invoice1, $invoice2], 'invoice_export.csv');


All versions of invoice-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/orm-pack Version *
symfony/framework-bundle Version ^6.0
symfony/validator Version ^6.0
symfony/form Version ^6.0
cocur/slugify Version ^4.0
gedmo/doctrine-extensions Version ^2.4|^3
twig/twig Version ^3.4
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 2lenet/invoice-bundle contains the following files

Loading the files please wait ....