Skip to content

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#

ConstantValueDescription
CODE'CH'
FLAG_CASH_ROUNDING'ch.cash_rounding'Meta flag: round the amount due to 5 Rappen (CashRounding).
TRANSLATION_NAMESPACE'quittio-ch'

Methods#

MethodDescription
->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(): AddressFormatter

inherited from AbstractCountryPack

Default: international address format.

Returns
AddressFormatter

buyerCountryRules()#

public function buyerCountryRules(): array

inherited from AbstractCountryPack

Default: no rules.

Returns
array

code()#

public function code(): string
Returns
string

complete()#

public function complete(InvoiceData $invoice, array $settings): InvoiceData

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).

ParameterTypeDescription
$invoiceInvoiceData
$settingsarray
Returns
InvoiceData

correctionPolicy()#

public function correctionPolicy(): CorrectionPolicy

Cancellation by credit note, correction by cancel and reissue.

Returns
CorrectionPolicy

defaults()#

public function defaults(): CountryDefaults
Returns
CountryDefaults

dunningLaw()#

public function dunningLaw(): DunningLaw

Art. 104 OR: 5 % default interest for businesses and consumers alike, no flat rate.

Returns
DunningLaw

exporters()#

public function exporters(): array

inherited from AbstractCountryPack

Default: no exporters.

Returns
array

formatAliases()#

public function formatAliases(): array

inherited from AbstractCountryPack

Default: no aliases.

Returns
array

formatRules()#

public function formatRules(): array

inherited from AbstractCountryPack

Default: no format rules; the generic automatic choice applies.

Returns
array

formats()#

public function formats(): array

inherited from AbstractCountryPack

Default: no own formats.

Returns
array

legalTexts()#

public function legalTexts(): LegalTextCatalog

inherited from AbstractCountryPack

Default: an empty catalog.

Returns
LegalTextCatalog

letterLayouts()#

public function letterLayouts(): array

inherited from AbstractCountryPack

Default: the free layout only.

Returns
array

locales()#

public static function locales(): list<string>

static

Locales the pack ships translations for, e.g. ["de", "en", "fr", "it"].

Returns
list<string>

mandatoryOutput()#

public function mandatoryOutput(InvoiceData $invoice): MandatoryFieldList

The UID of a seller that charges VAT, with the note of its registration (Art. 26 (2) lit. a MWSTG).

ParameterTypeDescription
$invoiceInvoiceData
Returns
MandatoryFieldList

numberingRules()#

public function numberingRules(): NumberingRules

Invoice numbers are not prescribed in Switzerland; unique numbers are good practice.

Returns
NumberingRules

paymentQr()#

public function paymentQr(): PaymentQrGenerator

The Swiss QR bill: Swiss QR Code with payment part and receipt.

Returns
PaymentQrGenerator

profiles()#

public function profiles(): array

inherited from AbstractCountryPack

Default: no profiles.

Returns
array

readers()#

public function readers(): array

inherited from AbstractCountryPack

Default: no readers.

Returns
array

registerTranslations()#

public static function registerTranslations(): void

static

Makes the pack's translations available to the active translator. Called lazily, so presets work even without a registered Quittio instance.

retention()#

public function retention(): RetentionRule

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.

Returns
RetentionRule

rules()#

public function rules(): array

Elements of an invoice according to Art. 26 MWSTG (applies to every format).

Returns
array

serializers()#

public function serializers(): array

inherited from AbstractCountryPack

Default: no serializers; CII and UBL are built in.

Returns
array

swissDunningLaw()#

public static function swissDunningLaw(): DunningLaw

static

Returns
DunningLaw

taxPresets()#

public function taxPresets(): TaxPresetCollection
Returns
TaxPresetCollection

translationPath()#

public function translationPath(): string
Returns
string

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.