FacturaScripts

TaxExceptions
in package

This class centralizes all VAT tax exceptions and related validation rules.

Tags
collaborator

Daniel Fernández Giménez contacto@danielfg.es

Table of Contents

Constants

ES_OTHER_NOT_SUBJECT  = 'ES_OTHER_NOT_SUBJECT'
ES_TAX_EXCEPTION_14  = 'ES_14'
ES_TAX_EXCEPTION_20  = 'ES_20'
ES_TAX_EXCEPTION_21  = 'ES_21'
ES_TAX_EXCEPTION_22  = 'ES_22'
ES_TAX_EXCEPTION_23_24  = 'ES_23_24'
ES_TAX_EXCEPTION_25  = 'ES_25'
ES_TAX_EXCEPTION_68_70  = 'ES_68_70'
ES_TAX_EXCEPTION_7  = 'ES_7'
ES_TAX_EXCEPTION_84  = 'ES_84'
ES_TAX_EXCEPTION_OTHER  = 'ES_OTHER'

Properties

$removedValues  : array<string|int, mixed>
$values  : array<string|int, mixed>

Methods

add()  : void
all()  : array<string|int, mixed>
get()  : string|null
isValidCombination()  : bool
Checks if the operation and VAT exception combination is valid.
remove()  : void

Constants

ES_OTHER_NOT_SUBJECT

public mixed ES_OTHER_NOT_SUBJECT = 'ES_OTHER_NOT_SUBJECT'

ES_TAX_EXCEPTION_14

public mixed ES_TAX_EXCEPTION_14 = 'ES_14'

ES_TAX_EXCEPTION_20

public mixed ES_TAX_EXCEPTION_20 = 'ES_20'

ES_TAX_EXCEPTION_21

public mixed ES_TAX_EXCEPTION_21 = 'ES_21'

ES_TAX_EXCEPTION_22

public mixed ES_TAX_EXCEPTION_22 = 'ES_22'

ES_TAX_EXCEPTION_23_24

public mixed ES_TAX_EXCEPTION_23_24 = 'ES_23_24'

ES_TAX_EXCEPTION_25

public mixed ES_TAX_EXCEPTION_25 = 'ES_25'

ES_TAX_EXCEPTION_68_70

public mixed ES_TAX_EXCEPTION_68_70 = 'ES_68_70'

ES_TAX_EXCEPTION_84

public mixed ES_TAX_EXCEPTION_84 = 'ES_84'

ES_TAX_EXCEPTION_OTHER

public mixed ES_TAX_EXCEPTION_OTHER = 'ES_OTHER'

Properties

$removedValues

private static array<string|int, mixed> $removedValues = []

$values

private static array<string|int, mixed> $values = []

Methods

add()

public static add(string $key, string $value) : void
Parameters
$key : string
$value : string

all()

public static all() : array<string|int, mixed>
Return values
array<string|int, mixed>

get()

public static get(string|null $key) : string|null
Parameters
$key : string|null
Return values
string|null

isValidCombination()

Checks if the operation and VAT exception combination is valid.

public static isValidCombination(string|null $operation, string|null $exception, string $context) : bool
Parameters
$operation : string|null

InvoiceOperation value (intracomunitaria, exportacion, importacion, null...)

$exception : string|null

VAT exception value (ES_20, ES_25, ES_PASSIVE_SUBJECT, null...)

$context : string

'sales' or 'purchases'

Return values
bool

remove()

public static remove(string $key) : void
Parameters
$key : string

        
On this page

Search results