API reference / Quittio \ Country \ CH
CountryCH
class in quittio/country-ch · extends AbstractCountryPack · implements CompletesInvoices
Quittio\Country\CH\CountryCH · Source
Country pack for Switzerland.
Not reviewed by a tax adviser yet (see the README of the pack).
Constants#
| Constant | Value | Description |
|---|---|---|
CODE | 'CH' | |
FLAG_CASH_ROUNDING | 'ch.cash_rounding' | Meta flag: round the amount due to 5 Rappen (CashRounding). |
TRANSLATION_NAMESPACE | 'quittio-ch' |
Methods#
| Method | Description |
|---|---|
->addressFormatter() | Default: international address format. |
->buyerCountryRules() | Default: no rules. |
->code() | |
->complete() | Rounds the amount due to 5 Rappen (BT-114) for invoices in CHF with the flag FLAG_CASH_ROUNDING or the setting cash_rounding = true (quittio.countries.ch). |
->correctionPolicy() | Cancellation by credit note, correction by cancel and reissue. |
->defaults() | |
->dunningLaw() | Art. 104 OR: 5 % default interest for businesses and consumers alike, no flat rate. |
->exporters() | Default: no exporters. |
->formatAliases() | Default: no aliases. |
->formatRules() | Default: no format rules; the generic automatic choice applies. |
->formats() | Default: no own formats. |
->legalTexts() | Default: an empty catalog. |
->letterLayouts() | Default: the free layout only. |
::locales() | Locales the pack ships translations for, e.g. ["de", "en", "fr", "it"]. |
->mandatoryOutput() | The UID of a seller that charges VAT, with the note of its registration (Art. 26 (2) lit. a MWSTG). |
->numberingRules() | Invoice numbers are not prescribed in Switzerland; unique numbers are good practice. |
->paymentQr() | The Swiss QR bill: Swiss QR Code with payment part and receipt. |
->profiles() | Default: no profiles. |
->readers() | Default: no readers. |
::registerTranslations() | Makes the pack's translations available to the active translator. Called lazily, so presets work even without a registered Quittio instance. |
->retention() | Ten years (Art. 70 (2) MWSTG, Art. 958f OR). Invoices on immovable property have 20 years (Art. 70 (3) MWSTG), which the pack does not model. |
->rules() | Elements of an invoice according to Art. 26 MWSTG (applies to every format). |
->serializers() | Default: no serializers; CII and UBL are built in. |
::swissDunningLaw() | |
->taxPresets() | |
->translationPath() |
addressFormatter()#
public function addressFormatter(): AddressFormatterDefault: international address format.
- Returns
AddressFormatter
buyerCountryRules()#
public function buyerCountryRules(): arrayDefault: no rules.
- Returns
array
code()#
public function code(): string- Returns
string
complete()#
public function complete(InvoiceData $invoice, array $settings): InvoiceDataRounds the amount due to 5 Rappen (BT-114) for invoices in CHF with the flag FLAG_CASH_ROUNDING or the setting cash_rounding = true (quittio.countries.ch).
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$settings | array |
- Returns
InvoiceData
correctionPolicy()#
public function correctionPolicy(): CorrectionPolicyCancellation by credit note, correction by cancel and reissue.
- Returns
CorrectionPolicy
defaults()#
public function defaults(): CountryDefaults- Returns
CountryDefaults
dunningLaw()#
public function dunningLaw(): DunningLawArt. 104 OR: 5 % default interest for businesses and consumers alike, no flat rate.
- Returns
DunningLaw
exporters()#
public function exporters(): arrayDefault: no exporters.
- Returns
array
formatAliases()#
public function formatAliases(): arrayDefault: no aliases.
- Returns
array
formatRules()#
public function formatRules(): arrayDefault: no format rules; the generic automatic choice applies.
- Returns
array
formats()#
public function formats(): arrayDefault: no own formats.
- Returns
array
legalTexts()#
public function legalTexts(): LegalTextCatalogDefault: an empty catalog.
- Returns
LegalTextCatalog
letterLayouts()#
public function letterLayouts(): arrayDefault: the free layout only.
- Returns
array
locales()#
public static function locales(): list<string>Locales the pack ships translations for, e.g. ["de", "en", "fr", "it"].
- Returns
list<string>
mandatoryOutput()#
public function mandatoryOutput(InvoiceData $invoice): MandatoryFieldListThe UID of a seller that charges VAT, with the note of its registration (Art. 26 (2) lit. a MWSTG).
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData |
- Returns
MandatoryFieldList
numberingRules()#
public function numberingRules(): NumberingRulesInvoice numbers are not prescribed in Switzerland; unique numbers are good practice.
- Returns
NumberingRules
paymentQr()#
public function paymentQr(): PaymentQrGeneratorThe Swiss QR bill: Swiss QR Code with payment part and receipt.
- Returns
PaymentQrGenerator
profiles()#
public function profiles(): arrayDefault: no profiles.
- Returns
array
readers()#
public function readers(): arrayDefault: no readers.
- Returns
array
registerTranslations()#
public static function registerTranslations(): voidMakes the pack's translations available to the active translator. Called lazily, so presets work even without a registered Quittio instance.
retention()#
public function retention(): RetentionRuleTen years (Art. 70 (2) MWSTG, Art. 958f OR). Invoices on immovable property have 20 years (Art. 70 (3) MWSTG), which the pack does not model.
- Returns
RetentionRule
rules()#
public function rules(): arrayElements of an invoice according to Art. 26 MWSTG (applies to every format).
- Returns
array
serializers()#
public function serializers(): arrayDefault: no serializers; CII and UBL are built in.
- Returns
array
swissDunningLaw()#
public static function swissDunningLaw(): DunningLaw- Returns
DunningLaw
taxPresets()#
public function taxPresets(): TaxPresetCollection- Returns
TaxPresetCollection
translationPath()#
public function translationPath(): string- Returns
string