Documentation

Invoice extends Record
in package

Synchronization invoices class.

Table of Contents

$accountFieldsMap  : array<string|int, string>
Account fields map .
$config  : Config
Config.
$controller  : Controller
Controller.
$lastScan  : array<string|int, mixed>
Last scan config data.
$connector  : Token
Connector.
__construct()  : mixed
Constructor.
createInvoiceInCrm()  : int
Method to save invoice to YetiForce.
findAccount()  : int
Find account record id by vat id or email fields.
findAdditionalData()  : array<string|int, mixed>
Parse additional data.
findByEmail()  : int
Find record id by email fields.
findProduct()  : int
Find product id by ean.
getFormattedTime()  : string
Return parsed time to magento time zone.
getFromApi()  : array<string|int, mixed>
Get data by id from api.
getInvoicesFromApi()  : array<string|int, mixed>
Method to get invoices form Magento.
getSearchCriteria()  : string
Method to get search criteria Magento records.
import()  : bool
Import invoices from magento.
log()  : void
Add log to db.
parseInventoryData()  : array<string|int, mixed>
Parse inventory data to YetiForce format.
parseShippingData()  : array<string|int, mixed>
Parse shipping data.
process()  : mixed
{@inheritdoc}
saveInventoryCrm()  : bool
Save inventory elements.
syncAccount()  : int
Method to create/update account.
syncContact()  : int
Method to create contact.

Properties

$accountFieldsMap

Account fields map .

public array<string|int, string> $accountFieldsMap = ['email1' => 'email', 'phone' => 'phone', 'phone_extra' => 'phone_extra', 'fax' => 'mobile', 'fax_extra' => 'mobile_extra', 'buildingnumbera' => 'buildingnumbera', 'addresslevel1a' => 'addresslevel1a', 'addresslevel2a' => 'addresslevel2a', 'addresslevel3a' => 'addresslevel3a', 'addresslevel4a' => 'addresslevel4a', 'addresslevel5a' => 'addresslevel5a', 'addresslevel6a' => 'addresslevel6a', 'addresslevel7a' => 'addresslevel7a', 'addresslevel8a' => 'addresslevel8a', 'buildingnumberb' => 'buildingnumberb', 'addresslevel1b' => 'addresslevel1b', 'addresslevel2b' => 'addresslevel2b', 'addresslevel3b' => 'addresslevel3b', 'addresslevel4b' => 'addresslevel4b', 'addresslevel5b' => 'addresslevel5b', 'addresslevel6b' => 'addresslevel6b', 'addresslevel7b' => 'addresslevel7b', 'addresslevel8b' => 'addresslevel8b']

$lastScan

Last scan config data.

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

Methods

__construct()

Constructor.

public __construct(Controller $controller) : mixed
Parameters
$controller : Controller
Return values
mixed

createInvoiceInCrm()

Method to save invoice to YetiForce.

public createInvoiceInCrm(Inventory $mapModel) : int
Parameters
$mapModel : Inventory
Return values
int

findAccount()

Find account record id by vat id or email fields.

public findAccount(array<string|int, mixed> $data, Vtiger_Record_Model $recordModel) : int
Parameters
$data : array<string|int, mixed>
$recordModel : Vtiger_Record_Model
Return values
int

findAdditionalData()

Parse additional data.

public findAdditionalData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

findByEmail()

Find record id by email fields.

public findByEmail(array<string|int, mixed> $data, Vtiger_Record_Model $recordModel) : int
Parameters
$data : array<string|int, mixed>
$recordModel : Vtiger_Record_Model
Return values
int

findProduct()

Find product id by ean.

public findProduct(string $ean) : int
Parameters
$ean : string
Return values
int

getFormattedTime()

Return parsed time to magento time zone.

public getFormattedTime(string $value) : string
Parameters
$value : string
Return values
string

getFromApi()

Get data by id from api.

public getFromApi(string $type, string $id) : array<string|int, mixed>
Parameters
$type : string
$id : string
Return values
array<string|int, mixed>

getInvoicesFromApi()

Method to get invoices form Magento.

public getInvoicesFromApi([array<string|int, mixed> $ids = [] ]) : array<string|int, mixed>
Parameters
$ids : array<string|int, mixed> = []
Return values
array<string|int, mixed>

getSearchCriteria()

Method to get search criteria Magento records.

public getSearchCriteria([int $pageSize = 10 ]) : string
Parameters
$pageSize : int = 10
Return values
string

import()

Import invoices from magento.

public import() : bool
Return values
bool

log()

Add log to db.

public log(string $category[, Throwable|null $ex = null ]) : void
Parameters
$category : string
$ex : Throwable|null = null
Return values
void

parseInventoryData()

Parse inventory data to YetiForce format.

public parseInventoryData(Vtiger_Record_Model $recordModel, array<string|int, mixed> $item, Inventory $mapModel) : array<string|int, mixed>
Parameters
$recordModel : Vtiger_Record_Model
$item : array<string|int, mixed>
$mapModel : Inventory
Return values
array<string|int, mixed>

parseShippingData()

Parse shipping data.

public parseShippingData(Inventory $mapModel) : array<string|int, mixed>
Parameters
$mapModel : Inventory
Return values
array<string|int, mixed>

process()

{@inheritdoc}

public process() : mixed
Return values
mixed

syncAccount()

Method to create/update account.

public syncAccount(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

syncContact()

Method to create contact.

public syncContact(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

        

Search results