Documentation

ReferenceNumberGeneratorUtil
in package

FinalYes

Table of Contents

Properties

$userTraderCountrySettingService  : UserTraderCountrySettingService

Methods

__construct()  : mixed
generateReferenceNumberFromEntry()  : string|null
referenceLogicForCountryAT()  : string|null
referenceLogicForCountryCZ()  : string|null
Build the reference string for Czech (CZ) reports.
referenceLogicForCountryDE()  : string|null
taxId constant string = UStVA MM-YYYY separated by spaces " "
referenceLogicForCountryES()  : string|null
client's VAT number without "ES" N°Q clientId separated by hyphens "-"
referenceLogicForCountryFR()  : string|null
const $formNumber = "3310" MM or '3'.Q YY siretNumber separated by slashes "/"
referenceLogicForCountryGB()  : string|null
client's VAT number, without "UK"
referenceLogicForCountryIE()  : string|null
referenceLogicForCountryIT()  : string|null
if (company) client's vatId (11 digits) elseif (soletrader) client's tax code (string 16 characters)
referenceLogicForCountryNL()  : string|null
referenceLogicForCountryPL()  : string|null
client's VAT number without "PL" YY + (constant string = "M") + M if (monthly) const string = VAT-7 if (quarterly) const string = VAT-7K separated by spaces " "
referenceLogicForCountrySE()  : string|null
referenceLogicForCountryUK()  : string|null
just for good measure
getFilteredUserVatFromEntry()  : UserVat|null
helper for getting UserVat object filtered by country
isOss()  : bool
True when the Payment type is OSS for generating the banking details.
normalizeITVatId()  : string
resolveTraderTypeIdByEntryAndCountryId()  : int|null
resolveVat7()  : string|null
resolveVatId()  : string|null
Safely obtain the VAT number from the entry.

Properties

Methods

generateReferenceNumberFromEntry()

public generateReferenceNumberFromEntry(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryCZ()

Build the reference string for Czech (CZ) reports.

public referenceLogicForCountryCZ(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryDE()

taxId constant string = UStVA MM-YYYY separated by spaces " "

public referenceLogicForCountryDE(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryES()

client's VAT number without "ES" N°Q clientId separated by hyphens "-"

public referenceLogicForCountryES(Entry $entry) : string|null
Parameters
$entry : Entry
Return values
string|null

referenceLogicForCountryFR()

const $formNumber = "3310" MM or '3'.Q YY siretNumber separated by slashes "/"

public referenceLogicForCountryFR(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryGB()

client's VAT number, without "UK"

public referenceLogicForCountryGB(Entry $entry) : string|null
Parameters
$entry : Entry
Return values
string|null

referenceLogicForCountryIE()

public referenceLogicForCountryIE(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryIT()

if (company) client's vatId (11 digits) elseif (soletrader) client's tax code (string 16 characters)

public referenceLogicForCountryIT(Entry $entry, int $paymentProcedureTypeId) : string|null

if (regular payment) (constant string = 60) + MM elseif (prepayment of DEC vat) (constant string = 6013) elseif (final vat return) (constant string = 6012)

year

separated by dots

Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryNL()

public referenceLogicForCountryNL(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

referenceLogicForCountryPL()

client's VAT number without "PL" YY + (constant string = "M") + M if (monthly) const string = VAT-7 if (quarterly) const string = VAT-7K separated by spaces " "

public referenceLogicForCountryPL(Entry $entry, int $paymentProcedureTypeId) : string|null
Parameters
$entry : Entry
$paymentProcedureTypeId : int
Return values
string|null

isOss()

True when the Payment type is OSS for generating the banking details.

private isOss(int $paymentProcedureTypeId) : bool
Parameters
$paymentProcedureTypeId : int
Return values
bool

resolveTraderTypeIdByEntryAndCountryId()

private resolveTraderTypeIdByEntryAndCountryId(Entry $entry, int $countryId) : int|null
Parameters
$entry : Entry
$countryId : int
Return values
int|null

resolveVat7()

private resolveVat7(int|null $periodId) : string|null
Parameters
$periodId : int|null
Return values
string|null

        
On this page

Search results