Introduction xInvoice - Build beautiful invoice from database or data in form of array

xInvoice script basically help you to generate beautifully designed invoice using few lines of codes. You can create invoices directly from database. This helps you to easily integrate xInvoice to your application if you are looking to create invoices. It has option of both HTML and PDF.

Invoice contains two part.

  1. Data -> Invoice data can be passed in two different ways. One way is to use the data files. These files basically contains the invoice data in form of array. You can set/modify data to these array elements for example if you want to set the logo, you can set
    $xData["company"]["logo"]["data"] = "https://mpdf.github.io//files/images/tiger8trns.png";
    You can set this data directly using the database also by running query using PDOModel. It will replace the keys with similar names of data array.
  2. Design -> xInvoice contains multiple different design of the invoices. You can create new design template by modifying existing template. Each template contains php codes so you need to have basic understanding of php if you want to modify it. Each template contains different HTML structure. Template path can be set in the config settings file or at the run time using the setSettings function.