Constants

TAX_EXCL

TAX_EXCL

TAX_INCL

TAX_INCL

DETAIL

DETAIL

Properties

$id_order

$id_order : integer

Type

integer

$number

$number : integer

Type

integer

$delivery_number

$delivery_number : integer

Type

integer

$delivery_date

$delivery_date : integer

Type

integer

$total_discount_tax_excl

$total_discount_tax_excl : float

Type

float

$total_discount_tax_incl

$total_discount_tax_incl : float

Type

float

$total_paid_tax_excl

$total_paid_tax_excl : float

Type

float

$total_paid_tax_incl

$total_paid_tax_incl : float

Type

float

$total_products

$total_products : float

Type

float

$total_products_wt

$total_products_wt : float

Type

float

$total_shipping_tax_excl

$total_shipping_tax_excl : float

Type

float

$total_shipping_tax_incl

$total_shipping_tax_incl : float

Type

float

$shipping_tax_computation_method

$shipping_tax_computation_method : integer

Type

integer

$total_wrapping_tax_excl

$total_wrapping_tax_excl : float

Type

float

$total_wrapping_tax_incl

$total_wrapping_tax_incl : float

Type

float

$note

$note : string

Type

string — note

$date_add

$date_add : \intger

Type

\intger

$definition

$definition : 

Type

$_total_paid_cache

$_total_paid_cache : array

Type

array — Total paid cache

Methods

getProductsDetail()

getProductsDetail() 

getInvoiceByNumber()

getInvoiceByNumber(  $id_invoice) 

Parameters

$id_invoice

getProducts()

getProducts(  $products = false,   $selectedProducts = false,   $selectedQty = false) : array

Get order products

Parameters

$products
$selectedProducts
$selectedQty

Returns

array —

Products with price, quantity (with taxe and without)

useOneAfterAnotherTaxComputationMethod()

useOneAfterAnotherTaxComputationMethod() : boolean

This method returns true if at least one order details uses the One After Another tax computation method.

Returns

boolean

getProductTaxesBreakdown()

getProductTaxesBreakdown(  $order = null) : array

Returns the correct product taxes breakdown.

Parameters

$order

Returns

array

getShippingTaxesBreakdown()

getShippingTaxesBreakdown(  $order) : array

Returns the shipping taxes breakdown

Parameters

$order

Returns

array

getWrappingTaxesBreakdown()

getWrappingTaxesBreakdown() : array

Returns the wrapping taxes breakdown

Returns

array

getEcoTaxTaxesBreakdown()

getEcoTaxTaxesBreakdown() : array

Returns the ecotax taxes breakdown

Returns

array

getByDateInterval()

getByDateInterval(  $date_from,   $date_to) : array

Returns all the order invoice that match the date interval

Parameters

$date_from
$date_to

Returns

array —

collection of OrderInvoice

getByStatus()

getByStatus(  $id_order_state) : array

Parameters

$id_order_state

Returns

array —

collection of OrderInvoice

getByDeliveryDateInterval()

getByDeliveryDateInterval(  $date_from,   $date_to) : array

Parameters

$date_from
$date_to

Returns

array —

collection of invoice

getCarrier()

getCarrier(  $id_order_invoice) 

Parameters

$id_order_invoice

getCarrierId()

getCarrierId(  $id_order_invoice) 

Parameters

$id_order_invoice

retrieveOneById()

retrieveOneById(  $id) : \OrderInvoice

Parameters

$id

Returns

\OrderInvoice

getTotalPaid()

getTotalPaid() : float

Amounts of payments

Returns

float —

Total paid

getRestPaid()

getRestPaid() : float

Rest Paid

Returns

float —

Rest Paid

getSibling()

getSibling() : \PrestaShopCollection|array

Return collection of order invoice object linked to the payments of the current order invoice object

Returns

\PrestaShopCollection|array —

Collection of OrderInvoice or empty array

getSiblingTotal()

getSiblingTotal(integer  $mod = \OrderInvoice::TAX_INCL) 

Return total to paid of sibling invoices

Parameters

integer $mod

TAX_EXCL, TAX_INCL, DETAIL

getGlobalRestPaid()

getGlobalRestPaid() 

Get global rest to paid This method will return something different of the method getRestPaid if there is an other invoice linked to the payments of the current invoice

isPaid()

isPaid() : boolean

Returns

boolean —

Is paid ?

getOrderPaymentCollection()

getOrderPaymentCollection() : \PrestaShopCollection

Returns

\PrestaShopCollection —

Collection of Order payment

getInvoiceNumberFormatted()

getInvoiceNumberFormatted(integer  $id_lang,   $id_shop = null) : string

Get the formatted number of invoice

Parameters

integer $id_lang

for invoice_prefix

$id_shop

Returns

string

saveCarrierTaxCalculator()

saveCarrierTaxCalculator(array  $taxes_amount) 

Parameters

array $taxes_amount

setProductCustomizedDatas()

setProductCustomizedDatas(  $product,   $customized_datas) 

Parameters

$product
$customized_datas

setProductCurrentStock()

setProductCurrentStock(  $product) 

This method allow to add stock information on a product detail

Parameters

$product

setProductImageInformations()

setProductImageInformations(  $product) 

This method allow to add image information on a product detail

Parameters

$product