Documentation

Invoice extends DataObject
in package

An Invoice

Tags
uses
DataType
uses
AHV

Table of Contents

$data  : array<string|int, DataType>
$dataTypes  : array<string|int, mixed>
This has to be overwritten by the concrete implementation.
$lifeValidate  : bool
__construct()  : mixed
The constructor is normally called from one of the {@link \VeruA\DataMapper\DataMapper}s descendants
__get()  : DataType
Returnes the {@link \VeruA\DataObjects\DataType} of the requested field
__isset()  : mixed
__set()  : mixed
Sets a value instatiating a new DataType Object if none is set, or sets the value of the DataType
__unset()  : mixed
validate()  : bool
Validate the data array with the registered validators
values()  : mixed
Returns the internal data Array, containing all the DataObjects

Properties

$data

protected array<string|int, DataType> $data = []

Contains the DataTypes with their respetive values

$dataTypes

This has to be overwritten by the concrete implementation.

protected array<string|int, mixed> $dataTypes = [ // {{{ 'id' => ['type' => 'Integer'], 'receiver' => ['type' => 'DataType', 'props' => ['required' => true, 'len' => 2]], 'id_klient' => ['type' => 'Integer', 'props' => ['relation' => 'client']], 'id_owner' => ['type' => 'Integer', 'props' => ['relation' => 'owner|spitex']], // 'id_vers' => ['type' => 'Integer', 'props' => ['relation' => 'organisation']], // KV 'amount' => ['type' => 'Decimal'], 'material' => ['type' => 'Decimal'], 'flextarif' => ['type' => 'Decimal'], // nur wenn auch KV/UV/MV/IV Leistungen auff der Rechnung sind (d.h. Rechnung an Vesicherung) {{{ 'vers_nr' => ['type' => 'String', 'props' => []], // 'id_arzt' => ['type' => 'Integer', 'props' => ['relation' => 'arzt']], 'reason' => ['type' => 'String', 'props' => []], // grund der behandlung 'status' => ['type' => 'Boolean', 'props' => []], // ist behandlung abgeschlossen? 'id_kanton' => ['type' => 'Integer', 'props' => ['relation' => 'taxwert']], // fur statistik/auswertung Wohnort des klienten 'rkosten_anzeigen' => ['type' => 'Boolean'], // }}} 'client' => ['type' => '\Client', 'props' => ['relation' => 'id_klient']], 'biller' => ['type' => '\?', 'props' => ['relation' => 'id_owner']], 'insurance' => ['type' => '\?', 'props' => ['relation' => 'id_vers']], 'referrer' => ['type' => '\?', 'props' => ['relation' => 'id_arzt']], // tabelle - verordnender Arzt 'requestDate' => ['type' => 'Date'], // Rechnungsdatum 'from' => ['type' => 'Date'], // nur ganzer Monat bsp. 1.1.2021 'to' => ['type' => 'Date'], // nicht über mehrere Jahre bsp. 31.3.2021 'paid' => ['type' => 'Date'], 'schreiben' => ['type' => 'String', 'props' => []], // evtl normalisieren 'gesetz' => ['type' => 'Integer', 'props' => ['unechterelation' => 'tarif|taxwert']], 'exported' => ['type' => 'Boolean'], // should be normalized 'exportedCag' => ['type' => 'Boolean'], // should be normalized 'exportedCeesv' => ['type' => 'Boolean'], // should be normalized 'exportedBillcare' => ['type' => 'Boolean'], // should be normalized 'exportedAbacus' => ['type' => 'Boolean'], // should be normalized // ea/kt/gm 'ea_befreit' => ['type' => 'Boolean'], 'id_rechempfänger' => ['type' => 'Integer', 'props' => ['relation' => 'id - person']], // garantor 'id_kt' => ['type' => 'Integer', 'props' => ['relation' => 'organisation']], // kt kostenträger // organisation 'id_kt_2' => ['type' => 'Integer', 'props' => ['relation' => 'organisation']], // gm kostenträger // organisation 'sr' => ['type' => 'Integer', 'props' => ['relation' => 'sammelrechnung']], // id der sammelrechnung 'id_zk' => ['type' => 'Integer', 'props' => ['relation' => 'zusatzkosten']], // 'zeit_a' => ['type' => 'Integer'], 'zeit_b' => ['type' => 'Integer'], 'zeit_c' => ['type' => 'Integer'], // minuten 'nk_a' => ['type' => 'Decimal'], 'nk_b' => ['type' => 'Decimal'], 'nk_c' => ['type' => 'Decimal'], // decimal zusatzkosten 'kv_a' => ['type' => 'Decimal'], 'kv_b' => ['type' => 'Decimal'], 'kv_c' => ['type' => 'Decimal'], // private? 'berechnung' => ['type' => 'Integer'], // 2: stundensatz oder 1: taxpunkt rechnung 'gesamt_taxp' => ['type' => 'DataType'], 'tp_wert' => ['type' => 'DataType'], 'covid19' => ['type' => 'Boolean'], ]

The format of the array is as follws:

column => [ 'type' => DataType, 'props' => ['required' => bool, 'len' => int] ], ...
  • column The column from the database
  • type The DataType to instation for the respective value
  • props are optional and every validator can implement their own
  • Need to be configured in the descendants. This is the actual configuration of the fields DataTypes

    $lifeValidate

    private bool $lifeValidate = false

    If set to true every value is validated on __set()

    Methods

    __construct()

    The constructor is normally called from one of the {@link \VeruA\DataMapper\DataMapper}s descendants

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

    Sets the values of the DataObject. Every value is passed to the respective

    Return values
    mixed

    __get()

    Returnes the {@link \VeruA\DataObjects\DataType} of the requested field

    public __get(mixed $name) : DataType
    Parameters
    $name : mixed

    The name of the field

    Return values
    DataType

    Returns the DataType of the field

    __isset()

    public __isset(mixed $name) : mixed
    Parameters
    $name : mixed
    Return values
    mixed

    __set()

    Sets a value instatiating a new DataType Object if none is set, or sets the value of the DataType

    public __set(string $name, mixed $value) : mixed
    Parameters
    $name : string

    The name of the field

    $value : mixed

    The value

    Tags
    throws
    OutOfRangeException

    if the field does not exist

    Return values
    mixed

    __unset()

    public __unset(mixed $name) : mixed
    Parameters
    $name : mixed
    Return values
    mixed

    validate()

    Validate the data array with the registered validators

    public validate() : bool
    Tags
    throws
    ValidationException

    if the validation does not pass a validator containing all errors encountered

    Return values
    bool

    Returns true if all fields are valid

    values()

    Returns the internal data Array, containing all the DataObjects

    public values() : mixed
    Return values
    mixed

    Search results