All Projects → mzur → InvoiScript

mzur / InvoiScript

Licence: MIT license
Generate simple PDF invoices with PHP

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to InvoiScript

Invoicenet
Deep neural network to extract intelligent information from invoice documents.
Stars: ✭ 1,886 (+11687.5%)
Mutual labels:  invoice, invoice-pdf
invoice-generator-api
A free API for generating invoice PDFs and e-Invoices.
Stars: ✭ 350 (+2087.5%)
Mutual labels:  invoice, invoice-pdf
invoice
📝 PDF invoice generator
Stars: ✭ 76 (+375%)
Mutual labels:  invoice, invoice-pdf
Manta
🎉 Flexible invoicing desktop app with beautiful & customizable templates.
Stars: ✭ 5,160 (+32150%)
Mutual labels:  invoice, invoice-pdf
freeturn
Freelance mission control
Stars: ✭ 50 (+212.5%)
Mutual labels:  invoice
Crater Mobile
Crater Invoice App mobile app built with React Native
Stars: ✭ 164 (+925%)
Mutual labels:  invoice
Openpapyrus
Sophisticated ERP, CRM, Point-Of-Sale, etc. Open source now. This system is developed since 1996.
Stars: ✭ 158 (+887.5%)
Mutual labels:  invoice
Dapper Invoice
A billable-time invoice featuring style over substance
Stars: ✭ 135 (+743.75%)
Mutual labels:  invoice
itflow
Free and open-source web application for MSPs that streamlines IT documentation, ticketing, invoicing, and accounting, an alternative to ITGlue. It helps in managing and organizing client's IT information, increasing efficiency and profitability.
Stars: ✭ 282 (+1662.5%)
Mutual labels:  invoice
Dolibarr
Dolibarr ERP CRM is a modern software package to manage your company or foundation's activity (contacts, suppliers, invoices, orders, stocks, agenda, accounting, ...). It is open source software (written in PHP) and designed for small and medium businesses, foundations and freelancers. You can freely install, use and distribute it as a standalon…
Stars: ✭ 2,877 (+17881.25%)
Mutual labels:  invoice
Defterp
deftERP - Jakarta EE (Java EE 7 : JSF, JPA, EJB, CDI, Bean Validation)
Stars: ✭ 207 (+1193.75%)
Mutual labels:  invoice
Node Sales Tax
💰 International sales tax calculator for Node (offline, but provides optional online VAT number fraud check). Tax rates are kept up-to-date.
Stars: ✭ 182 (+1037.5%)
Mutual labels:  invoice
Representation-Learning-for-Information-Extraction
Pytorch implementation of Paper by Google Research - Representation Learning for Information Extraction from Form-like Documents.
Stars: ✭ 82 (+412.5%)
Mutual labels:  invoice
Sypht Python Client
A python client for the Sypht API
Stars: ✭ 160 (+900%)
Mutual labels:  invoice
xsender
Java library for sending XML files through SOAP - SUNAT
Stars: ✭ 15 (-6.25%)
Mutual labels:  invoice
apex
Apex is a self hosted sales, purchase, inventory and accounting solution for small businesses.
Stars: ✭ 55 (+243.75%)
Mutual labels:  invoice
Invoiceneko
An Open Sourced Invoice System developed for anyone who needs to generate out an invoice and manage clients
Stars: ✭ 204 (+1175%)
Mutual labels:  invoice
Pyafipws
Factura Electrónica AFIP y otros servicios web (proyecto software libre) — Interfases, tools and apps for Argentina's gov't. webservices (soap, com/dll simil-ocx, pdf, dbf, xml, json, etc.) #python
Stars: ✭ 198 (+1137.5%)
Mutual labels:  invoice
Cashier Btc
💰 Self-hosted Bitcoin payment gateway (฿)
Stars: ✭ 223 (+1293.75%)
Mutual labels:  invoice
ZUGFeRD-csharp
C# assembly for creating and reading ZUGFeRD invoices
Stars: ✭ 73 (+356.25%)
Mutual labels:  invoice

InvoiScript

Generate simple PDF invoices with PHP.

Installation

Run:

composer require mzur/invoiscript

Usage

Example

use Mzur\InvoiScript\Invoice;

require_once(__DIR__.'/vendor/autoload.php');

$content = [
   'title' => 'Invoice No. 1',
   'beforeInfo' => [
      '<b>Date:</b>',
      'June 10, 2021',
   ],
   'afterInfo' => [
      'All prices in EUR.',
      '',
      'This invoice is due on <b>June 20, 2021</b>.',
   ],
   'clientAddress' => [
      'Jane Doe',
      'Example Street 42',
      '1337 Demo City',
   ],
   'entries' => [
      [
         'description' => 'Hot air',
         'quantity' => 11,
         'price' => 8,
      ],
      [
         'description' => 'Something cool',
         'quantity' => 5,
         'price' => 20,
      ],
   ],
];

$pdf = new Invoice($content);
$pdf->generate('invoice.pdf');

This generates the following PDF:

Styling

Content in title, beforeInfo and afterInfo can be styled with basic HTML-like tags. Example:

$content = [
   'title' => 'Invoice No. <b>1</b>',
   'beforeInfo' => [
      '<i>Date:</i>',
      '<u>June 10, 2021</u>',
   ],
   //...
];

Available tags:

  • <b></b>: Bold
  • <i></i>: Italic
  • <u></u>: Underlined

See the layout section for customization of font and font sizes.

Template

Set a template file:

$pdf = new Invoice($content);
$pdf->setTemplate(__DIR__.'/template.pdf');

The template can have multiple pages, which will be used for the matching pages of the invoice. If the invoice has more pages than the template, the last page of the template will be repeated.

Language

Set the language:

$pdf = new Invoice($content);
$pdf->setLanguage('de');

Available languages are en and de. Default is en.

Variables

Variables can be used in title, beforeInfo and afterInfo. Example:

$content = [
   'title' => 'Invoice No. {number}',
   'beforeInfo' => [
      '<b>Date:</b>',
      '{createdDate}',
   ],
   //...
];

$variables = [
   'number' => 1,
   'createdDate' => 'June 10, 2021',
];

$pdf = new Invoice($content);
$pdf->setVariables($variables);

The following variables are always available:

  • {total}: Total amount of the invoice.
  • {page}: Current page number.
  • {pages}: Total number of pages.

Layout

The default spacings, font, font size etc. can be overridden with a custom layout. Example:

$layout = [
   'font' => 'helvetica',
];

$pdf = new Invoice($content);
$pdf->setLayout($layout);

See the source code for all available layout options and the defaults.

Acknowledgment

Thanks to the creator(s) of FPDF and FPDI!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].