CorrectiveInvoice extends Document
in package

This is the corrective invoice class.

The corrective invoices will be stored in that class and will remain immutable (only get methods are available)

Tags
see
Document

Table of Contents

$additionalInformation  : array<string|int, mixed>
$comment  : string
$currencies  : array<string|int, mixed>
$customTags  : array<string|int, mixed>
$date  : Date|null
$delivery  : DocumentDelivery|null
$deliveryDate  : Date|null
$discounts  : array<string|int, mixed>
$documentNumber  : string
$error  : Error|null
$headquarter  : DocumentHeadquarter|null
$id Autonumeric element id.  : int
$information  : DocumentInformation|null
$items  : array<string|int, mixed>
$languageCode  : string
$paid  : bool
$paymentDate  : Date|null
$paymentSystem  : DocumentPaymentSystem|null
$pId Public and readable element id.  : string
$reserve  : bool
$reverseChargeVat  : bool
$rewardPoints  : array<string|int, mixed>
$taxes  : array<string|int, mixed>
$total  : float
$totals  : DocumentTotal|null
$user  : DocumentUser|null
$vouchers  : array<string|int, mixed>
__construct() Elements constructor.  : mixed
__toString() Uses "json_encode" function to return the JSON format of the element.  : string
getAdditionalInformation() Returns the document additional information.  : array<string|int, DocumentAdditionalInformation>
getComment() Returns the document comment.  : string
getCurrencies() Returns the document currencies.  : array<string|int, DocumentCurrency>
getCustomTags() Returns the document custom tags.  : array<string|int, DocumentCustomTag>
getDate() Returns the document date.  : Date|null
getDelivery() Returns the document Delivery.  : DocumentDelivery
getDeliveryDate() Returns the document delivery date.  : Date|null
getDiscounts() Returns the document discounts.  : array<string|int, DocumentDiscount>
getDocumentNumber() Returns the document documentNumber.  : string
getError() Returns the current element error (if there is error).  : Error|null
getHeadquarter() Returns the document information.  : DocumentHeadquarter|null
getId() Returns the element id.  : int
getInformation() Returns the document information.  : DocumentInformation|null
getItems() Returns the document items.  : array<string|int, DocumentRow>
getLanguageCode() Returns the document language initials.  : string
getPaid() Returns if the document is paid or not.  : bool
getPaymentDate() Returns the document payment date.  : Date|null
getPaymentSystem() Returns the document paymentSystem.  : DocumentPaymentSystem|null
getPId() Returns the element public id (pId).  : string
getReserve() Returns if the document is in a reserve status or not.  : bool
getReverseChargeVat() Sets if the document applies the reverse charge vat or not.  : bool
getRewardPoints() Returns the document reward points.  : array<string|int, DocumentRewardPoints>
getTaxes() Returns the document taxes.  : array<string|int, DocumentTax>
getTotal() Returns the document total.  : float
getTotals() Returns the document totals.  : DocumentTotal|null
getUser() Returns the document user.  : DocumentUser|null
getVouchers() Returns the document vouchers.  : array<string|int, DocumentVoucher>
jsonSerialize() Allow elements to be serialized.  : array<string|int, mixed>
toArray() Used to allow elements to be serialized.  : array<string|int, mixed>
getFieldItem()  : object|null
getFormattedData()  : mixed
setAdditionalInformation()  : void
setArrayField() Convert an API array of objects to a PHP array of objects.  : array<string|int, mixed>
setCurrencies()  : void
setCustomTags()  : void
setDate()  : void
setDelivery()  : void
setDeliveryDate()  : void
setDiscounts()  : void
setError()  : void
setHeadquarter()  : void
setInformation()  : void
setItems()  : void
setPaymentDate()  : void
setPaymentSystem()  : void
setRewardPoints()  : void
setTaxes()  : void
setTotals()  : void
setUser()  : void
setVouchers()  : void

Properties

$additionalInformation

protected array<string|int, mixed> $additionalInformation = []

$discounts

protected array<string|int, mixed> $discounts = []

$id

Autonumeric element id.

protected int $id = 0

All the given elements by the LogiCommerce API will send it.

$pId

Public and readable element id.

protected string $pId = ''

Setted by the user on LogiCommerce. All the integrable elements by the LogiCommerce API will send it. Useful for integrations and other 3rd party softwares that need to connect to LogiCommerce software.

Methods

__construct()

Elements constructor.

public __construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
$data : array<string|int, mixed> = []

Array that contains all the values to the object to initialize

Return values
mixed —

__toString()

Uses "json_encode" function to return the JSON format of the element.

public __toString() : string

Auto-invoked using echo or concatenations.

Return values
string —

getComment()

Returns the document comment.

public getComment() : string
Return values
string —

getDocumentNumber()

Returns the document documentNumber.

public getDocumentNumber() : string
Return values
string —

getError()

Returns the current element error (if there is error).

public getError() : Error|null
Return values
Error|null —

getLanguageCode()

Returns the document language initials.

public getLanguageCode() : string
Return values
string —

getPaid()

Returns if the document is paid or not.

public getPaid() : bool
Return values
bool —

getReserve()

Returns if the document is in a reserve status or not.

public getReserve() : bool
Return values
bool —

getReverseChargeVat()

Sets if the document applies the reverse charge vat or not.

public getReverseChargeVat() : bool
Return values
bool —

getTotal()

Returns the document total.

public getTotal() : float
Return values
float —

jsonSerialize()

Allow elements to be serialized.

public jsonSerialize() : array<string|int, mixed>

Auto-invoked using "json_encode" function.

Return values
array<string|int, mixed> —

toArray()

Used to allow elements to be serialized.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getFieldItem()

protected getFieldItem(array<string|int, mixed> $item, string $class) : object|null
Parameters
$item : array<string|int, mixed>
$class : string
Return values
object|null —

getFormattedData()

protected getFormattedData(mixed $value) : mixed
Parameters
$value : mixed
Return values
mixed —

setAdditionalInformation()

protected setAdditionalInformation(array<string|int, mixed> $additionalInformation) : void
Parameters
$additionalInformation : array<string|int, mixed>
Return values
void —

setArrayField()

Convert an API array of objects to a PHP array of objects.

protected setArrayField(array<string|int, mixed> $data, string $class) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

Array that contains all the values to the objects to initialize

$class : string

The PHP class we want the objects to be

Return values
array<string|int, mixed> —

setCurrencies()

protected setCurrencies(array<string|int, mixed> $currencies) : void
Parameters
$currencies : array<string|int, mixed>
Return values
void —

setCustomTags()

protected setCustomTags(array<string|int, mixed> $customTags) : void
Parameters
$customTags : array<string|int, mixed>
Return values
void —

setDate()

protected setDate(string $date) : void
Parameters
$date : string
Return values
void —

setDelivery()

protected setDelivery(array<string|int, mixed> $delivery) : void
Parameters
$delivery : array<string|int, mixed>
Return values
void —

setDeliveryDate()

protected setDeliveryDate(string $deliveryDate) : void
Parameters
$deliveryDate : string
Return values
void —

setDiscounts()

protected setDiscounts(array<string|int, mixed> $discounts) : void
Parameters
$discounts : array<string|int, mixed>
Return values
void —

setError()

protected setError(mixed $error) : void
Parameters
$error : mixed
Return values
void —

setHeadquarter()

protected setHeadquarter(array<string|int, mixed> $headquarter) : void
Parameters
$headquarter : array<string|int, mixed>
Return values
void —

setInformation()

protected setInformation(array<string|int, mixed> $information) : void
Parameters
$information : array<string|int, mixed>
Return values
void —

setItems()

protected setItems(array<string|int, mixed> $items) : void
Parameters
$items : array<string|int, mixed>
Return values
void —

setPaymentDate()

protected setPaymentDate(string $paymentDate) : void
Parameters
$paymentDate : string
Return values
void —

setPaymentSystem()

protected setPaymentSystem(array<string|int, mixed> $paymentSystem) : void
Parameters
$paymentSystem : array<string|int, mixed>
Return values
void —

setRewardPoints()

protected setRewardPoints(array<string|int, mixed> $rewardPoints) : void
Parameters
$rewardPoints : array<string|int, mixed>
Return values
void —

setTaxes()

protected setTaxes(array<string|int, mixed> $taxes) : void
Parameters
$taxes : array<string|int, mixed>
Return values
void —

setTotals()

protected setTotals(array<string|int, mixed> $totals) : void
Parameters
$totals : array<string|int, mixed>
Return values
void —

setUser()

protected setUser(array<string|int, mixed> $user) : void
Parameters
$user : array<string|int, mixed>
Return values
void —

setVouchers()

protected setVouchers(array<string|int, mixed> $vouchers) : void
Parameters
$vouchers : array<string|int, mixed>
Return values
void —

Search results