Skip to main content

Overview

This quick start guide will walk you through the essential steps to start using Simple Invoice, from your first login to generating your first professional invoice.
Before starting, ensure you have completed the Installation process and can access the login page.

First Login

1

Access the Login Page

Navigate to your Simple Invoice installation in your web browser:
http://localhost/simple_invoice/
Or your production domain:
https://yourdomain.com/
2

Log In with Default Credentials

Use the default administrator credentials:
  • Username: admin
  • Password: admin
Security Alert: Change these default credentials immediately after your first login. Go to your user profile and update both the username and password.
The authentication system uses PHP’s password_verify() function for secure password hashing:
classes/Login.php
// Password verification from Login.php
if (password_verify($_POST['user_password'], $result_row->user_password_hash)) {
    // Write user data into PHP SESSION
    $_SESSION['user_id'] = $result_row->user_id;
    $_SESSION['user_name'] = $result_row->user_name;
    $_SESSION['user_email'] = $result_row->user_email;
    $_SESSION['user_login_status'] = 1;
}
3

Change Your Password

After logging in, immediately update your credentials:
  1. Click on your username in the navigation bar
  2. Select Profile or Settings
  3. Update your password
  4. Optionally change your username and email
The system uses bcrypt hashing for secure password storage.

Configure Your Company Profile

Before creating invoices, set up your company information:
1

Navigate to Company Profile

Access the company profile configuration page from the main navigation menu.
2

Enter Company Information

Fill in your business details:
  • Company Name (nombre_empresa)
  • Address (direccion)
  • City (ciudad)
  • Postal Code (codigo_postal)
  • State/Province (estado)
  • Phone (telefono)
  • Email (email)
  • Tax Rate (impuesto) - Enter as a percentage (e.g., 13 for 13%)
  • Currency - Select from 32+ supported currencies
perfil.php
<input type="text" class="form-control" name="nombre_empresa" 
       value="<?php echo $nombre_empresa;?>" required>
<input type="text" class="form-control" name="direccion" 
       value="<?php echo $direccion;?>" required>
<input type="text" class="form-control" name="ciudad" 
       value="<?php echo $ciudad;?>" required>
<input type="number" class="form-control" name="impuesto" 
       value="<?php echo $impuesto;?>" required>
3

Upload Company Logo

Add your company logo to appear on invoices:
  • Supported formats: JPG, JPEG, PNG, GIF
  • Maximum file size: 1MB
  • Recommended size: 200x80 pixels
The logo will be stored in the img/ directory and referenced in the perfil table.
4

Save Configuration

Click Save Changes to store your company profile. This information will appear on all generated invoices.

Create Your First Client

1

Navigate to Clients

Click on Clients or Clientes in the main navigation menu.
2

Add New Client

Click the New Client button to open the client creation form.Enter the client information:
  • Client Name (nombre_cliente) - Required, must be unique
  • Phone (telefono_cliente) - Up to 30 characters
  • Email (email_cliente) - Up to 64 characters
  • Address (direccion_cliente)
  • Status (status_cliente) - Active (1) or Inactive (0)
ajax/nuevo_cliente.php
$nombre_cliente = mysqli_real_escape_string($con, 
    (strip_tags($_POST["nombre_cliente"], ENT_QUOTES)));
$telefono_cliente = mysqli_real_escape_string($con, 
    (strip_tags($_POST["telefono_cliente"], ENT_QUOTES)));
$email_cliente = mysqli_real_escape_string($con, 
    (strip_tags($_POST["email_cliente"], ENT_QUOTES)));

$sql = "INSERT INTO clientes (nombre_cliente, telefono_cliente, 
        email_cliente, direccion_cliente, status_cliente, date_added) 
        VALUES ('$nombre_cliente','$telefono_cliente','$email_cliente',
        '$direccion_cliente','1', NOW())";
3

Save Client

Click Save to create the client record. The client will now be available when creating invoices with autocomplete functionality.

Create Your First Product

1

Navigate to Products

Click on Products or Productos in the main navigation.
2

Add New Product

Click New Product to open the product creation form.Enter product details:
  • Product Code (codigo_producto) - Required, unique identifier (up to 20 chars)
  • Product Name (nombre_producto) - Required (up to 255 chars)
  • Price (precio_producto) - Numeric value
  • Status - Active or Inactive
ajax/nuevo_producto.php
$codigo_producto = mysqli_real_escape_string($con, 
    (strip_tags($_POST["codigo_producto"], ENT_QUOTES)));
$nombre_producto = mysqli_real_escape_string($con, 
    (strip_tags($_POST["nombre_producto"], ENT_QUOTES)));
$precio_producto = floatval($_POST['precio_producto']);

$sql = "INSERT INTO products (codigo_producto, nombre_producto, 
        status_producto, precio_producto, date_added) 
        VALUES ('$codigo_producto','$nombre_producto','1',
        '$precio_producto', NOW())";
3

Save Product

Click Save to add the product to your catalog. Products will be available for selection when creating invoices.

Generate Your First Invoice

1

Navigate to New Invoice

Click InvoicesNew Invoice (or Nueva Factura) in the navigation.
2

Select Client

Start typing the client name in the Client field. The autocomplete feature will show matching clients:
nueva_factura.php
$("#nombre_cliente").autocomplete({
    source: "./ajax/autocomplete/clientes.php",
    minLength: 2,
    select: function(event, ui) {
        event.preventDefault();
        $('#id_cliente').val(ui.item.id_cliente);
        $('#nombre_cliente').val(ui.item.nombre_cliente);
        $('#tel1').val(ui.item.telefono_cliente);
        $('#mail').val(ui.item.email_cliente);
    }
});
Client phone and email will populate automatically.
3

Select Vendor and Payment Method

  • Vendor (id_vendedor) - Defaults to the logged-in user
  • Date (fecha) - Defaults to current date
  • Payment Method (condiciones):
    • Efectivo (Cash)
    • Cheque (Check)
    • Transferencia bancaria (Bank Transfer)
    • Crédito (Credit)
4

Add Products

Click Add Products to open the product search modal.
  1. Search for products
  2. Click on a product to add it to the invoice
  3. Adjust quantity if needed
  4. Products are temporarily stored in the tmp table during editing
The system automatically calculates:
  • Subtotal (sum of all line items)
  • Tax (based on company profile tax rate)
  • Total (subtotal + tax)
5

Review and Generate

Review the invoice details:
  • Verify all products and quantities
  • Check calculations
  • Confirm client information
Click Print or Generate to create the invoice.

View and Print Invoice PDF

After generating an invoice:
1

Invoice Saved to Database

The system saves the invoice to two tables:
  • facturas - Invoice header with client, date, total
  • detalle_factura - Line items with products and quantities
ajax/agregar_facturacion.php
$insert = mysqli_query($con, "INSERT INTO facturas (
    numero_factura, fecha_factura, id_cliente, id_vendedor, 
    condiciones, total_venta, estado_factura
) VALUES (
    '$numero_factura', NOW(), '$id_cliente', '$id_vendedor',
    '$condiciones', '$total_venta', 1
)");
2

Generate PDF

The system uses TCPDF to generate a professional PDF invoice:
  • Company logo (if uploaded)
  • Company information from profile
  • Client details
  • Product line items with prices
  • Subtotal, tax calculation, and total
  • Invoice number and date
pdf/documentos/factura_pdf.php
require_once(dirname(__FILE__).'/../html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'letter', 'en', array(0, 0, 0, 0));
$html2pdf->writeHTML($html, false);
$html2pdf->Output('Invoice_' . $numero_factura . '.pdf');
3

View or Download

The PDF opens in your browser. You can:
  • Print directly
  • Save to your computer
  • Email to the client

Multi-Currency Support

Simple Invoice supports 32+ currencies out of the box:
  • Americas: USD, CAD, BRL, MXN, ARS, COP, GTQ
  • Europe: EUR, GBP, CHF, SEK, NOK, DKK
  • Asia: JPY, CNY, INR, PHP, THB, VND, IDR, MYR, SGD, HKD
  • Africa & Middle East: ZAR, EGP, NGN, AED, ILS
  • And more…
Each currency includes:
  • Symbol (e.g., $, €, £)
  • Precision (decimal places)
  • Thousand separator
  • Decimal separator
  • ISO code
To use a different currency:
  1. Go to Company Profile
  2. Select your preferred currency from the dropdown
  3. All new invoices will use the selected currency format

Next Steps

Explore Features

Learn about user management, client operations, and advanced features.

Configure Settings

Customize database settings, company profile, and currency options.

API Reference

Explore AJAX endpoints for programmatic access.

Deploy to Production

Production deployment best practices and security hardening.
Pro Tip: Back up your database regularly, especially before major updates. The simple_invoice database contains all your business data including clients, products, and invoice history.

Build docs developers (and LLMs) love