Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • InvoiceDelivery

Class InvoiceDelivery

Invoice Delivery component

Consolidates invoice creation and delivery. Supports email, interfax, and postalmethods.

Package: blesta\components\invoice\delivery
Copyright: Copyright (c) 2011, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/invoice_delivery/invoice_delivery.php

Methods summary

public
# __construct( )

Initialize the Invoice Delivery object

Initialize the Invoice Delivery object

public
# deliverInvoices( array $invoice_ids, string $delivery_method, mixed $deliver_to = null, string $from_staff_id = null, array $options = null )

Delivers a set of invoices using the given delivery method. All invoices are compiled together into a single document.

Delivers a set of invoices using the given delivery method. All invoices are compiled together into a single document.

Parameters

$invoice_ids
array
$invoice_ids An array of invoice IDs to deliver
$delivery_method
string
$delivery_method The delivery method (email, interfax, postalmethods)
$deliver_to
mixed
$deliver_to The destination of the invoices, a string or array of email addresses or fax numbers (optional, can not override invoice postal address)
$from_staff_id
string
$from_staff_id The ID of the staff member this invoice is to be delivered from (optional)
$options
array
$options An array of additional options to pass and may include: - base_client_url The base URL to the client interface - email_template The email template name to use (optional) - email_tags An array of key/value tag replacements (optional)
public
# downloadInvoices( array $invoice_ids )

Offers for download a set of invoices. All invoices are compiled together into a single document.

Offers for download a set of invoices. All invoices are compiled together into a single document.

public array
# errors( )

Returns an errors raised

Returns an errors raised

Returns

array
An array of errors, boolean false if no errors were set
private array
# getInvoices( array $invoice_ids, boolean $merge = false )

Fetches invoices and groups them by client ID

Fetches invoices and groups them by client ID

Parameters

$invoice_ids
array
$invoice_ids An array of invoice ID numbers to fetch
$merge
boolean
$merge True to merge all invoices together in single large array, false to keep invoices divided by client ID

Returns

array
An array of stdClass invoice object grouped by client ID (if $merge is true 1st index is numeric, otherwise 1st index is client ID, 2nd index is numeric)
private object
# buildInvoices( array $invoices, boolean $include_address = true )

Takes an array of invoices and constructs a single document object containing all invoice data (e.g. can create a single PDF containing multiple invoices).

Takes an array of invoices and constructs a single document object containing all invoice data (e.g. can create a single PDF containing multiple invoices).

Parameters

$invoices
array
A numerically indexed array of stdClass objects each representing an invoice
$include_address
boolean
$include_address True to include address information on the invoices, false otherwise

Returns

object
The object containing the build invoices

Magic methods summary

Properties summary

private string $language
#

The language code to use for all email correspondance

The language code to use for all email correspondance

private object $company
#

An object representing the company being processed

An object representing the company being processed

private array $company_settings
#

Company settings

Company settings

private array $invoices
#

An array of stdClass objects representing invoices

An array of stdClass objects representing invoices

Blesta API documentation generated by ApiGen 2.8.0