Neu
- Single PHP rules can be switched off, re-rated or replaced by their code:
validation.rules.disabled,validation.rules.severityandQuittio::extend('rule', …)in Laravel,RuleOverrideswithQuittio::configureRules()in the core. Official EN 16931 and Peppol rules needallow_official; unknown codes are refused.Quittio::ruleCodes()lists the known codes. - The calculation policy decides what happens with declared amounts of other systems:
calculation.declared_amounts(keep,recalculate,reject),CalculationPolicyandDeclaredAmountsModein the core. An own calculator is configured withcalculation.calculatoror passed toQuittio::create(calculator: …);Quittio::calculator()returns it. Quittio::edit()(core and Laravel) andInvoiceBuilder::fromUsing()continue existing invoice data with the calculator of the instance; cancellations and the document calculator ofQuittioFakeuse it as well.InvoiceFactory::calculated()takes a calculator.- Tax presets whose rate depends on the date (
Quittio\Core\Tax\DatedTaxPreset) are resolved with the supply date of each line (SupplyDate: line period, VAT point date, delivery date, invoicing period, issue date).DatedValuesholds values that change on dates;TaxPresetCollection::alias()finds presets under further keys. VatPreset::Standard(de.standard) andVatPreset::Reduced(de.reduced) take the German rate of the supply date (TaxTables), e.g. 16 % and 5 % from July to December 2020. The plausibility ruleDE-VAT-RATEwarns about rates that applied neither as standard nor as reduced rate on the supply date. The small amount limit ofDE-USTG-08is that of the issue date (150.00 EUR before 2017).- Country packs register output formats, aliases and serializers (
Countries\Capabilities\ProvidesFormats, implemented byAbstractCountryPack); the German pack brings XRechnung (XRechnungFormats). Profiles declare sub lines, extension fields and third party payments with capabilities (SupportsSubLines,SupportsExtensionFields,SupportsThirdPartyPayments) instead of the core checking XRechnung keys. - Default interest for every country pack with a reference rate:
Quittio\Core\Dunning\DefaultInterest(forCountry($pack)), the contractDunning\ReferenceRatesand the capabilityProvidesReferenceRates; the German pack provides its base rates (BaseRateTableimplementsReferenceRates) and itsDefaultInterestuses the core calculation.DocumentBuilder::interestCharge()adds calculated charges with their day count and texts. - Documents can be queued in Laravel:
Quittio::document($quote)->queue()->save($disk, $path)with the jobRenderDocument, the eventsQueuedDocumentStoredandQueuedDocumentFailedandQuittioManager::queueDocument();QuittioFakerecords them (assertDocumentQueued(),queuedDocuments()). Documents are stored as versioned snapshots (DocumentData::toSnapshot(),fromSnapshot(),toArray(),toJson()…) with their own upcasters (quittio.snapshots.document_upcasters,SnapshotUpcasterChain::documentDefault());Mapping\Attributes\MapOfkeeps keyed arrays. - The German special cases are reached with the builder macro
de():->de()->smallAmount(),->de()->selfBilled(),->de()->deductAdvance($advance)… (GermanInvoice).
Geändert
- Lines without VAT treatment of a German seller get the preset key
de.standardinstead ofde.standard_19, andquittio.defaults.vat = 'de.reduced_7'givesde.reduced. Applications that compare preset keys useVatPreset::fromKey($key)?->canonical(). Supplies from 2020-07-01 to 2020-12-31 get 16 % and 5 %. CiiWriter,UblWriter,CiiReaderandUblReaderkeep no state between calls: each call works with its own internal worker, so one instance can be used reentrantly. The readers no longer extend the internalXPathReaderand therefore no longer expose its constants.- The render run resolves the logo of the presentation before it builds the view model (
ViewContext::$logo,ResolvedLogo), so the view layer does no I/O;ViewModelFactorykeeps no state between calls. - The documentation website is versioned: the root shows the latest release,
/next/the development version and/X.Y/older minor versions, with a version switcher (docs/_versioning/build.mjs). Every version has a generated API reference underapi/(phpDocumentor,tools/docs/phpdoc.sh); the builder traits underBuilder\Concernsare no longer@internal, so their methods appear there. - Pull requests opened in the read-only split repositories
quittio/core,quittio/laravelandquittio/country-deare closed automatically with a pointer to the monorepo.
Veraltet
VatPreset::Standard19andVatPreset::Reduced7: useVatPreset::StandardandVatPreset::Reduced; the keysde.standard_19andde.reduced_7stay readable.Flags::SMALL_AMOUNT_LIMIT: useTaxTables::smallAmountLimitOn().- The builder macros
smallAmount(),propertyRelatedService(),newVehicle(),selfBilled(),deductAdvance()andconsumerDefaultNotice()directly on the builder: use->de()->….GermanInvoiceMacros::ADVANCE_TYPES: useGermanInvoice::ADVANCE_TYPES.FormatRegistry::XRECHNUNG_CIIandXRECHNUNG_UBL: useXRechnungFormats::CIIandUBLof the German pack, which registers the formats; the core keeps them until 1.0.
Behoben
- Peppol invoices with an electronic address scheme that Peppol does not accept, e.g.
EM(e-mail), are rejected with the new rulePEPPOL-EN16931-CL008instead of passing the PHP rules and failing the official Peppol validation. The allowed schemes are the code listCodeList::PEPPOL_EAS(peppol-eas-codes.json, from the Peppol BIS rules 3.0.20);tools/codelists/update.phpregenerates it withCodeListGenerator::generatePeppol().