InvoiceRun
in package
Table of Contents
Methods
- billingFlexTariffs() : mixed
- billing all open flex tariffs in a given period
- billingMaterial() : mixed
- billing all open flex tariffs in a given period
- clientOpenServices() : array<string|int, mixed>
- get all clients with open klv-services in given period
- getCantonsClients() : array<string|int, mixed>
- get all cantons of clients for given period in result-array
- getFlexTariffsClient() : mysqli_result
- get all open flex tariffs in a given period
- getFtForBilling() : array<string|int, mixed>
- get all billable flexible tariffs in given period
- getMaterialClient() : mysqli
- get all open material in a given period
- getMatForBilling() : array<string|int, mixed>
- get all billable material in given period
- getUneditedCantons() : array<string|int, mixed>
- get all canton and zusatzkosten.id with unedited changes on table update_db
- getValidCantons() : array<string|int, mixed>
- store all valid cantons for given period in result-array
- getValidCantonsTP() : array<string|int, mixed>
- store all valid cantons for given period with taxpunkt in result-array
- getZkCanton() : array<string|int, mixed>
- get zusatzkosten for canton in given period
- saveInvoiceText() : mixed
- save text in invoice
Methods
billingFlexTariffs()
billing all open flex tariffs in a given period
public
billingFlexTariffs(int $invoiceNr, mysqli_result $resFT, array<string|int, mixed> $arrMwst, int $biller, array<string|int, mixed> $clientData, array<string|int, mixed> $dataZk, int $mod_xml, mysqli_fetch_assoc $res_xml, array<string|int, mixed> &$arr_data_xml, mixed &$xml_kv) : mixed
billing, update tables rechung / rechnung_ea and close all billed flex tariffs
Parameters
- $invoiceNr : int
-
number of invoice for flex tariffs
- $resFT : mysqli_result
-
all billable flex tariffs
- $arrMwst : array<string|int, mixed>
-
key: id and element: satz from table mwst_satz
- $biller : int
-
1=kv, 2=ea, 3=canton, 4=municipality
- $clientData : array<string|int, mixed>
-
all relevant data to client
- $dataZk : array<string|int, mixed>
-
all relevant data of entry in table zusatzkosten
- $mod_xml : int
-
1: module is activ - 0: not activ
- $res_xml : mysqli_fetch_assoc
-
entry in table mod_xml for client
- $arr_data_xml : array<string|int, mixed>
-
array to store amounts for table xml_restkosten
- $xml_kv : mixed
billingMaterial()
billing all open flex tariffs in a given period
public
billingMaterial(int $invoiceNr, mysqli_result $resMat, array<string|int, mixed> $arrMwst, int $biller, array<string|int, mixed> $clientData, array<string|int, mixed> $dataZk, int $mod_xml, mysqli_fetch_assoc $res_xml, array<string|int, mixed> &$arr_data_xml, mixed &$xml_kv, mixed $start_monat, mixed $end_monat, mixed $von, mixed $bis) : mixed
billing, update tables rechung / rechnung_ea and close all billed flex tariffs
Parameters
- $invoiceNr : int
-
number of invoice for flex tariffs
- $resMat : mysqli_result
-
all billable articles
- $arrMwst : array<string|int, mixed>
-
key: id and element: satz from table mwst_satz
- $biller : int
-
1=kv, 2=ea, 3=canton and/or municipality
- $clientData : array<string|int, mixed>
-
all relevant data to client
- $dataZk : array<string|int, mixed>
-
all relevant data of entry in table zusatzkosten
- $mod_xml : int
-
1: module is activ - 0: not activ
- $res_xml : mysqli_fetch_assoc
-
entry in table mod_xml for client
- $arr_data_xml : array<string|int, mixed>
-
array to store amounts for table xml_restkosten
- $xml_kv : mixed
- $start_monat : mixed
- $end_monat : mixed
- $von : mixed
- $bis : mixed
clientOpenServices()
get all clients with open klv-services in given period
public
clientOpenServices(string $monthFrom, string $monthTo, int $year[, int $owner = 0 ]) : array<string|int, mixed>
returns a array with all client-ids with open services
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
- $owner : int = 0
-
id of owner, 0 if billing organisation
Return values
array<string|int, mixed> —$clientsWithOpenServices
array wiht client-ids
getCantonsClients()
get all cantons of clients for given period in result-array
public
getCantonsClients(string $monthFrom, string $monthTo, int $year) : array<string|int, mixed>
returns a array with all cantons of clients in period
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
Return values
array<string|int, mixed> —$cantonsClient
with id of canton as [idCanton] and [probs]: 0 = no problems - 1 = more than one canton in period - key is id from table klient
getFlexTariffsClient()
get all open flex tariffs in a given period
public
getFlexTariffsClient(string $monthFrom, string $monthTo, int $year, int $client, int $biller[, int $owner = 0 ]) : mysqli_result
returns a array with all client-ids with open services
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
- $client : int
-
id of client in table klient
- $biller : int
-
1=kv, 2=ea, 3=canton, 4=municipality
- $owner : int = 0
-
id of owner, 0 if billing organisation
Return values
mysqli_result —$result
mysqli result with relevant data from flex_tarif and flextarif_klient
getFtForBilling()
get all billable flexible tariffs in given period
public
getFtForBilling(string $monthFrom, string $monthTo, int $year[, int $owner = 0 ]) : array<string|int, mixed>
returns a array with billable flexible tariffs in period
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
- $owner : int = 0
-
id of owner, 0 if billing organisation
Return values
array<string|int, mixed> —$clientsWithOpenFT
array wiht client name and birthdate - key is id from table klient
getMaterialClient()
get all open material in a given period
public
getMaterialClient(string $monthFrom, string $monthTo, int $year, int $client, int $biller[, int $owner = 0 ]) : mysqli
returns a array with all client-ids with open services
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
- $client : int
-
id of client in table klient
- $biller : int
-
1=kv, 2=ea, 3=oh
- $owner : int = 0
-
id of owner, 0 if billing organisation
Return values
mysqli —result $result
mysqli result with relevant data from artikel and artikel_klient
getMatForBilling()
get all billable material in given period
public
getMatForBilling(string $monthFrom, string $monthTo, int $year[, int $owner = 0 ]) : array<string|int, mixed>
returns a array with billable materials in given period
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
- $owner : int = 0
-
id of owner, 0 if billing organisation
Return values
array<string|int, mixed> —$clientsWithOpenMat
array wiht client name and birthdate - key is id from table klient
getUneditedCantons()
get all canton and zusatzkosten.id with unedited changes on table update_db
public
getUneditedCantons() : array<string|int, mixed>
Return values
array<string|int, mixed> —$uneditedChanges
array with idCanton and idZusatzkosten
getValidCantons()
store all valid cantons for given period in result-array
public
getValidCantons(string $monthFrom, string $monthTo, int $year) : array<string|int, mixed>
returns a string with all possible Clients
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
Return values
array<string|int, mixed> —$validCantons
array with name, kvg_uvg, kuerzel_kanton and kostentraeger - key is the id of entry in table taxwert
getValidCantonsTP()
store all valid cantons for given period with taxpunkt in result-array
public
getValidCantonsTP(string $monthFrom, string $monthTo, int $year) : array<string|int, mixed>
returns a string with all possible Clients
Parameters
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
Return values
array<string|int, mixed> —$validCantons
array with name, kvg_uvg, kuerzel_kanton and kostentraeger - key is the id of entry in table taxwert
getZkCanton()
get zusatzkosten for canton in given period
public
getZkCanton(int $idCanton, string $monthFrom, string $monthTo, int $year) : array<string|int, mixed>
returns a mysqli fetch assoc result with data
Parameters
- $idCanton : int
-
id of entry in table taxwert
- $monthFrom : string
-
month wiht format MM
- $monthTo : string
-
month wiht format MM
- $year : int
-
year with format YYYY
Return values
array<string|int, mixed> —$dataZk
array wiht all data for canton in table zusatzkosten
saveInvoiceText()
save text in invoice
public
saveInvoiceText(int $invoiceNr, text $text) : mixed
update entry in table rechnung
Parameters
- $invoiceNr : int
-
number of affected invoice
- $text : text
-
value for field schreiben