Document Model
Every document in penquify consists of three parts:DocHeader
The header contains all metadata fields for a logistics document. Every field beyonddoc_type, doc_number, and date is optional (defaults to empty string).
Core Fields
Core Fields
Emitter Fields
Emitter Fields
Receiver Fields
Receiver Fields
Reference Fields
Reference Fields
Dispatch Fields (Guia)
Dispatch Fields (Guia)
SII / Sign-off Fields
SII / Sign-off Fields
DocItem
Each line item in the document.Computed Properties
TheDocument class computes totals automatically:
JSON Schema
A complete document as JSON:Template System
Documents are rendered to HTML using Jinja2 templates. The default template isguia_despacho.html (Chilean dispatch guide). Templates receive the full document dict via doc.to_dict():
header.*— all header fieldsitems[]— array of item dictsobservations— observation textsubtotal,iva,total— computed values
penquify/templates/. See the Custom Template guide to create your own.