Blesta Source Documentation

QuickbooksInvoicePdf extends TcpdfWrapper

Quickbooks Invoice Template

Table of Contents

Properties

$CurrencyFormat
$Date
$include_address
$invoice
$meta
$direction
$font
$font_size
$font_size_alt
$font_size_alt2
$font_size_alt3
$header_end_y
$line_options
$payment_options
$primary_color
$primary_text_color
$standard_num_options
$table_heading_y_pos

Methods

__construct() Initializes the default invoice PDF
drawInvoice() Draws a complete invoice
Footer() Overwrite the default footer that appears on each page of the PDF
Header() Overwrite the default header that appears on each page of the PDF
drawTable() Draws a table using the given data and options
getDateDue() Fetch the date due to display
drawAddress() Renders the to address information
drawBackground() Renders the background image onto the document
drawInvoiceInfo() Renders the Invoice info section to the document, containing the invoice ID, client ID, date billed
drawInvoiceSubInfo() Renders the Invoice sub info section to the document, containing the date due
drawInvoiceType() Sets the invoice type on the document based upon the status of the invoice
drawLineHeader() Renders the line items table heading
drawLogo() Renders the logo onto the document
drawPageNumber() Renders the page number to the document
drawPaidWatermark() Draws the paid text in the background of the invoice
drawPaymentHeader() Renders the transaction payments/credits header onto the document
drawPayments() Renders the transaction payments/credits section onto the document
drawReturnAddress() Renders the return address information including tax ID
drawTableHeading() Renders a heading, typically above a table
drawTallies() Renders public notes and invoice tallies onto the document
drawTerms() Renders the terms of this document
setFontInfo() Set the fonts and font attributes to be used in the document
Properties

$invoice

public array<string|int, mixed> $invoice = []

An array of invoice data for this invoice

$direction

protected string $direction = 'ltr'

The direction of the document

$font_size_alt

private static string $font_size_alt = 7

Holds the alternate font size for this document

$font_size_alt2

private static string $font_size_alt2 = 10

Holds the second alternate font size for this document

$font_size_alt3

private static string $font_size_alt3 = 20

Holds the third alternate font size for this document

$header_end_y

private int $header_end_y = 0

The Y position where the header finishes its content

$payment_options

private array<string|int, mixed> $payment_options = []

An array of transaction payment row options

$primary_color

private static array<string|int, mixed> $primary_color = [0, 0, 0]

An RGB representation of the primary color used throughout

$primary_text_color

private static array<string|int, mixed> $primary_text_color = [0, 0, 0]

An RGB representation of the primary text color used throughout

$standard_num_options

private static array<string|int, mixed> $standard_num_options = ['prefix' => \false, 'suffix' => \false, 'code' => \false, 'with_separator' => \false]

The standard number format options

$table_heading_y_pos

private int $table_heading_y_pos = 233

The y_pos to start the table headings at

Methods

__construct()

Initializes the default invoice PDF

public __construct([string $orientation = 'P' ][, string $unit = 'mm' ][, string $format = 'A4' ][, bool $unicode = true ][, string $encoding = 'UTF-8' ][, bool $diskcache = false ][, string $font = null ]) : mixed
Parameters
$orientation : string = 'P'

The paper orientation (optional, default 'P')

$unit : string = 'mm'

The measurement unit (optional, default 'mm')

$format : string = 'A4'

The paper format (optional, default 'A4')

$unicode : bool = true

True if the PDF should support unicode characters (optional, default true)

$encoding : string = 'UTF-8'

The character encoding (optional, default 'UTF-8')

$diskcache : bool = false

True to cache results to disk (optional, default false)

$font : string = null

The font to use (optional, default null)

Overwrite the default footer that appears on each page of the PDF

public Footer() : mixed

Header()

Overwrite the default header that appears on each page of the PDF

public Header() : mixed

drawTable()

Draws a table using the given data and options

protected drawTable([array<string|int, mixed> $data = [] ][, array<string|int, mixed> $options = null ]) : mixed
Parameters
$data : array<string|int, mixed> = []

An array of 'column' => values

$options : array<string|int, mixed> = null

An array of options affecting the table including:

  • type The type of table (multicell or cell, default 'multicell')
  • x_pos The X position of the table (default current X post)
  • y_pos The Y position of the table (default current Y pos)
  • border Border thickness (default 0)
  • align Table alignment (default L)
  • text_color An RGB array of text color (default null, whatever the default text color is set to)
  • font_size The font size for the table (default current font size)
  • height The width of the cell(s) (default 0 - auto)
  • width The height of the cell(s) (default 0 - to end of screen)
  • font The font to set for the cell(s)
  • font_style The font style for the cell(s) 'B' = bold, 'I' = italic, 'BI' = bold and italic, 'U' = underlined
  • line_style The line style attributes (@see TCPDF::setLineStyle())
  • fill_color The color to fill the cell(s) with
  • padding The padding value to use for the cell(s) (null - auto padding)
  • col All options from $options that affect the given column by name or index
  • row All options from $options that affect the given row by index
  • cell All options from $options that affect the given cell by both column and row

getDateDue()

Fetch the date due to display

protected getDateDue() : string
Return values
string

The date due to display

drawBackground()

Renders the background image onto the document

private drawBackground() : mixed

drawInvoiceInfo()

Renders the Invoice info section to the document, containing the invoice ID, client ID, date billed

private drawInvoiceInfo() : mixed

drawInvoiceSubInfo()

Renders the Invoice sub info section to the document, containing the date due

private drawInvoiceSubInfo() : mixed

drawInvoiceType()

Sets the invoice type on the document based upon the status of the invoice

private drawInvoiceType() : mixed

drawPaidWatermark()

Draws the paid text in the background of the invoice

private drawPaidWatermark() : mixed

drawPaymentHeader()

Renders the transaction payments/credits header onto the document

private drawPaymentHeader() : mixed

drawPayments()

Renders the transaction payments/credits section onto the document

private drawPayments() : mixed

drawReturnAddress()

Renders the return address information including tax ID

private drawReturnAddress() : mixed

drawTableHeading()

Renders a heading, typically above a table

private drawTableHeading(string $heading) : mixed
Parameters
$heading : string

The heading to set for the table

drawTallies()

Renders public notes and invoice tallies onto the document

private drawTallies() : mixed

setFontInfo()

Set the fonts and font attributes to be used in the document

private setFontInfo(string $font) : mixed
Parameters
$font : string

The font to set

Tags
subpackage

components.invoicetemplates.quickbooks_invoice

copyright

Copyright (c) 2010, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results