You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quittio::invoice() in the core: without Laravel, an invoice starts with the configured seller and renders at the end of the chain, as Quittio::invoice() does in Laravel: $quittio->invoice()->number(…)->buyer(…)->line(…)->render(), also ->render('xrechnung-cii'), ->render(['zugferd', 'xrechnung-cii']) and ->check(). It returns the new Builder\BoundInvoiceBuilder, an InvoiceBuilder bound to the instance.
Quittio::quote(), orderConfirmation(), deliveryNote(), proforma(), paymentReminder(), bonusStatement() and accountStatement() in the core, with the configured seller and ->render() (Documents\BoundDocumentBuilder). Quittio::document() also accepts a DocumentBuilder.
Core configuration keys seller (a PartyBuilder from Party::make() or a SellerParty), bank_account (iban, bic, name) and small_business (Config::$seller, $bankAccount, $smallBusiness): invoice() and the document methods start with this seller, its account as credit transfer and, for a small business, Meta::FLAG_SMALL_BUSINESS. As in Laravel, another seller set with seller() removes these defaults again, and payment() with an IBAN replaces the account. A seller without name or postal address, a bank account without IBAN and a bank account or small business flag without seller are rejected with a ConfigurationException.
Quittio::priceReduction() (core and Laravel facade) and PriceReduction::of() take a CancellationHistory (history:) of the earlier partial cancellations and price reductions of the original, so that the VAT of a price reduction is rounded cumulatively per VAT group as for partial cancellations: the VAT credited so far is round2(net amount credited so far × rate), and exactly the invoice's VAT once the whole net amount of a group is credited (the reduction that gets there closes the group itself). Three reductions of 0.50 of an invoice of 1.50 net at 19 % carry 0.10, 0.09 and 0.10 instead of 3 × 0.10. A VAT amount that differs from the reduction's own rounding is declared (flag cancellation_vat_aligned, information QUITTIO-CANCELLATION-VAT-ALIGNED), BT-111 is aligned the same way, and the note names the aligned VAT and adds the new label price_reduction_vat_aligned ("Rundungsausgleich: Die Umsatzsteuer dieser Entgeltminderung ist so bemessen, dass alle Entgeltminderungen und Stornos zur Rechnung RE-… zusammen die Umsatzsteuer des geminderten und stornierten Entgelts exakt berichtigen."). With a history, the reductions and cancellations together cannot credit more than the taxable amount of a group. Without a history nothing changes.
CancellationHistory::withPriceReduction() adds an issued price reduction to the history, CancellationHistory::fromDocuments() builds the history from all issued documents that credited an invoice (partial cancellations, price reductions and the cancellations of those, which count negatively). Partial cancellations and price reductions of one invoice share one history.
tools/validate-fixtures.php writes a price reduction aligned with a partial cancellation (de-price-reduction-aligned), so that KoSIT and veraPDF check its declared VAT in CII, UBL and ZUGFeRD.
tools/validate-fixtures.php writes the cancellations of a prepayment invoice without a date of the supply (de-advance-cancellation-381, de-advance-cancellation-380, de-advance-partial-cancellation), so that KoSIT and veraPDF check them in CII, UBL and ZUGFeRD.
Changed
The documentation moved from docs.quittio.dev to quittio.dev/docs, the MCP server to https://quittio.dev/docs/mcp; the old addresses redirect. Code examples show Laravel and plain PHP side by side, and the API reference is generated from the public classes (tools/docs/api.php) instead of phpDocumentor. The package links (homepage, support.docs) point to the new address.
The information QUITTIO-CANCELLATION-VAT-ALIGNED and the flag cancellation_vat_aligned (Meta::FLAG_CANCELLATION_VAT_ALIGNED) cover price reductions aligned with the earlier documents as well; code and flag keep their names, the message names partial cancellations and price reductions.
Quittio::priceReduction() and PriceReduction::of() refuse a prepayment invoice (386), also a document with the flag prepayment_correction, with an InvalidArgumentException: an advance payment is no supply whose consideration is reduced afterwards. The VAT is owed on the amount received and the final invoice deducts only that amount (section 13 (1) no. 1 lit. a sentence 4 and section 14 (5) sentence 2 UStG), so a lower price is settled there; an advance payment refunded is a full or partial cancellation of the prepayment invoice (section 17 (2) no. 2 UStG).
Fixed
A prepayment invoice (386) without a date of the supply could not be cancelled: the cancellation by credit note (381) or negative invoice (380), full or partial, failed DE-USTG-03 (and AT-USTG-04), which exempted only type code 386. Cancellation::of() and Quittio::cancellation() now mark the cancellation of a prepayment invoice with the new meta flag prepayment_correction (Meta::FLAG_PREPAYMENT_CORRECTION), which the cancellation of such a cancellation keeps. DE-USTG-03 and AT-USTG-04 ask a document with this flag that refers to the original (BG-3) for no date of the supply: it reverses an advance payment for a supply not made, e.g. refunded, and refers to the prepayment invoice instead (section 14 (5) and section 17 (2) no. 2 UStG, section 31 (5) UStDV, section 14.8 UStAE; section 16 (3) no. 2 UStG in Austria). A corrected invoice (384) of a prepayment invoice (Correction::of(), Quittio::correction()) carries the flag too and is checked like the prepayment invoice: DE-USTG-03 and AT-USTG-04 warn as for 386 unless the expected date of the service is named, DE-USTG-17 asks for the date of receipt of a payment stated in it. Other invoices without a date of the supply and their cancellations still fail DE-USTG-03.