ref: debb5dccc7b87c897de9d6167e8af3e7e4b8fbb8
dir: /README/
FOLDERS - /bin contains helper scripts that don't fit into the mkfile - /client contains all clients and their information - /invoice contains all invoices - /template contains all invoice templates The mkfile is used to generate the invoice PDF files (and later more) bin/mkinvoice generates a new invoice folder with stub files. FOLDERS IN DETAIL The invoice files are: ---------------------- - client: name of the client (matches folder in /client) - data.tsv: invoice positions - date: date of the invoice (unix timestamp) - msg: (optional) letter message. If this does not exist, it uses the client/msg instead, if that doesn't exist, template/name.msg - template: name of the template file to use (matches file in /template) Generated files: - invoice-ID.pdf: resulting PDF file - md5sum: sum of relevant files. This sum is also set as the ID in the PDF file Additional files (TBD): - paid: contains infos about payment - history: list of events that happened around this invoice (storno, ...) - those files should influence the calculation, e. g. for payment warnings The template files are: ----------------------- - name: actual letter template - name.msg: default message for that template The client files are: --------------------- - addr: address lines for that client - msg: (optional) letter message. If this does not exist, it uses the template/name.msg. Can be overridden by a invoice/msg file. - vcard.vcf: vcard file with contact info (TBD) INDIVIDUAL FILES The message file (msg): ----------------------- - troff format - First line is the subject (paragraph) - \*(iv (string register) is the invoice ID/number - .IV (macro) prints the invoice positions (values) - These macros can also be used in template files The data.tsv file: ------------------ - tab separated values - lines that start with '#' are comments - fields: amount, price, VAT/Tax, name/description The client/addr file: --------------------- - troff format, no fill (newlines are newlines) - Address like on an envelope