Skip to content

API reference

Quittio\Laravel\Events

quittio/laravel#

Quittio\Laravel\Events

  • DocumentRenderedDispatched after a document (quote, reminder, …) was rendered.
  • DocumentRenderingDispatched before a quote, order confirmation, delivery note, proforma invoice, payment reminder or account statement is calculated and rendered.
  • InvoiceRenderedDispatched after all requested formats were produced.
  • InvoiceRenderingDispatched before an invoice is calculated, validated and rendered.
  • InvoiceValidatedDispatched after a render run whose validation did not block it, before InvoiceRendered. $result is the validation of the main (first) format: in mode "error" it has no errors (warnings may be present unless validation.block_on_warnings), in mode "warn" it may contain errors, so check $result->isValid(). Not dispatched in mode "off" (nothing was validated) and not when validation blocked the run (see InvoiceValidationFailed).
  • InvoiceValidationFailedDispatched when validation blocked rendering.
  • MandatoryFieldMissingDispatched when a template omitted mandatory values.
  • QueuedDocumentFailedDispatched when a queued RenderDocument job failed for good: after its last attempt, or at once for errors that another attempt cannot fix. $job->data() returns the document.
  • QueuedDocumentStoredDispatched by a queued RenderDocument job after it stored the document. DocumentRendered precedes it.
  • QueuedInvoiceFailedDispatched when a queued RenderInvoice job failed for good: after its last attempt, or at once for errors that another attempt cannot fix (validation, invalid data, configuration). $job->data() returns the invoice.
  • QueuedInvoiceStoredDispatched by a queued RenderInvoice job after it stored the main output, e.g. to link the stored file to an order. InvoiceRendered precedes it.

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