Documentation

XMLExport440CalculateData
in package

calulate data for export

Tags
author

Bettina Rasberger

Table of Contents

Methods

addChildCompany()  : mixed
add data and childs to object $company
addChildPerson()  : mixed
add data and childs to object person
addDataToRecordMigel()  : mixed
add childes record_migel to services for all found and saved materials related to MiGeL
addDataToRecordOther()  : mixed
add childes record_other to services for all found and saved entries
addEntryToArray()  : mixed
add entry to resultArray of cost unit
calculateAddDiffs()  : mixed
if difference was found add it to resultArray of cost unit
checkAndSaveVAT()  : mixed
If VAT has been billed for FT or MAT, the data for XML export is prepared here.
numberFormat()  : string
Make number_format without rounding number up
saveForExportVAT()  : mixed
save VAT for export

Methods

addChildCompany()

add data and childs to object $company

public addChildCompany(object &$cfg, object &$company, array<string|int, mixed> &$dataCompany[, mixed $showAllData = false ]) : mixed
Parameters
$cfg : object

reference to $cfg

$company : object

reference to $services

$dataCompany : array<string|int, mixed>

reference to array with company data

$showAllData : mixed = false

addChildPerson()

add data and childs to object person

public addChildPerson(object &$XmlExport440, object &$cfg, object &$person, array<string|int, mixed> &$dataPerson[, mixed $showAllData = false ]) : mixed
Parameters
$XmlExport440 : object

reference to $XmlExport440

$cfg : object

reference to $cfg

$person : object

reference to $person

$dataPerson : array<string|int, mixed>

reference to array with person data

$showAllData : mixed = false

addDataToRecordMigel()

add childes record_migel to services for all found and saved materials related to MiGeL

public addDataToRecordMigel(object &$lang, object &$cfg, array<string|int, mixed> &$arrSpecialVariables, object &$services, object &$resultArray, array<string|int, mixed> &$arrExcludedInsurance, float $diffMat, mixed $counterEntries) : mixed
Parameters
$lang : object

reference to $lang

$cfg : object

reference to $cfg

$arrSpecialVariables : array<string|int, mixed>

reference to $arrSpecialVariables with required informations

$services : object

reference to $services

$resultArray : object

reference to $resultArray

$arrExcludedInsurance : array<string|int, mixed>

array with GLN numbers of all insurance that reject rounding differences in the XML file

$diffMat : float

found difference between invoice and calculated total amount material

$counterEntries : mixed

addDataToRecordOther()

add childes record_other to services for all found and saved entries

public addDataToRecordOther(object &$services, object &$resultArray) : mixed
Parameters
$services : object

reference to $services

$resultArray : object

reference to $resultArray

addEntryToArray()

add entry to resultArray of cost unit

public addEntryToArray(array<string|int, mixed> &$resultArray, int $record_id, string $name, string $provider_id, string $responsible_id, string $tariff_type, string $code, float $quantity, float $unit, float $amount, dateTime $date_begin[, int|null $session = 1 ][, float|null $unit_factor = 1 ][, float|null $external_factor = 1 ][, float|null $vat_rate = '0' ][, string|null $validate = '' ][, string|null $obligation = '' ][, dateTime|null $date_end = '' ][, mixed $remark = '' ]) : mixed
Parameters
$resultArray : array<string|int, mixed>

reference to $resultArray of cost unit

$record_id : int

record sequence number

$name : string

official service name as given by the used tariff catalog

$provider_id : string

the provider's identification (EAN or ZSR) that physically applied the service

$responsible_id : string

the responsible person's identification (EAN or ZSR) who has medical responsibility for the applied service

$tariff_type : string

tariff_type is the official 3-character designator of the used tariff as given by Forum Datenaustausch

$code : string

the code of the service record as given by the used tariff catalog

$quantity : float

quantity is the used quantity of the current service

$unit : float

unit is the tax point (TP), (5) minute rate or hourly rate of the applied service

$amount : float

the charged amount of the applied service

$date_begin : dateTime

the date when the service was (first) applied

$session : int|null = 1

default 1, session number

$unit_factor : float|null = 1

default 1, the tax point value (TPV) of the applied service

$external_factor : float|null = 1

default 1, is a external scale factor (given by the main software) for the applied service

$vat_rate : float|null = '0'

default 0, is the applicable vat rate for the applied service given as a percentage factor

$validate : string|null = ''

default '', is a Boolean value if the applied service was validated with a validator

$obligation : string|null = ''

default '', is a Boolean value if the applied service is a standard insurance benefit under the given law

$date_end : dateTime|null = ''

default '', the date when the service was last applied

$remark : mixed = ''

calculateAddDiffs()

if difference was found add it to resultArray of cost unit

public calculateAddDiffs(object &$lang, object &$cfg, array<string|int, mixed> &$arrSpecialVariables, int &$counterEntries, array<string|int, mixed> &$resultCostUnit, float $diff, int $typeCostUnit) : mixed
Parameters
$lang : object

reference to $lang

$cfg : object

reference to $cfg

$arrSpecialVariables : array<string|int, mixed>

reference to $arrSpecialVariables with required informations

$counterEntries : int

counter for array $resultCostUnit as reference

$resultCostUnit : array<string|int, mixed>

reference to array with all calculated enntries of cost unit

$diff : float

found difference between invoice and calculated total amount

$typeCostUnit : int

2: client, 4: Municipality, 5: cantons WITHOUT actual electronic transmission - only for paper invoice

checkAndSaveVAT()

If VAT has been billed for FT or MAT, the data for XML export is prepared here.

public checkAndSaveVAT(mixed $mysqliResultSet, array<string|int, mixed> &$arrCalculatedVat) : mixed
Parameters
$mysqliResultSet : mixed
$arrCalculatedVat : array<string|int, mixed>

save all needed data in passed array by reference

numberFormat()

Make number_format without rounding number up

public numberFormat(float $number[, int $decimals = 0 ][, mixed $decPoint = '.' ][, mixed $thousandsSep = '' ]) : string
Parameters
$number : float

The number being formatted.

$decimals : int = 0

Sets the number of decimal digits. If 0, the decimal_separator is omitted from the return value.

$decPoint : mixed = '.'
$thousandsSep : mixed = ''
Return values
string

A formatted version of number.

saveForExportVAT()

save VAT for export

public saveForExportVAT(varchar &$ouid, array<string|int, mixed> &$arrCalculatedVat, mixed &$arrVatRates, mixed &$vat, mixed &$vatrates, float &$amountCostUnitTotal) : mixed
Parameters
$ouid : varchar

uid of businessunit

$arrCalculatedVat : array<string|int, mixed>

valid VAT rates

$arrVatRates : mixed
$vat : mixed
$vatrates : mixed
$amountCostUnitTotal : float

total amount invoice


        
On this page

Search results