#ifndef BOKF_INVOICE_H #define BOKF_INVOICE_H #include #include struct invoice_seller { const char *name; const char *address; const char *postal_code; const char *city; const char *phone; const char *email; const char *org_nr; const char *vat_nr; const char *bankgiro; }; struct invoice_customer { const char *name; const char *address; const char *postal_code; const char *city; const char *vat_nr; }; struct invoice_line { const char *article_no; const char *description; int64_t quantity_milli; const char *unit; int64_t unit_price_ore; int64_t amount_ore; const char *note; const char *vat_code; int is_text; }; struct invoice_doc { struct invoice_seller seller; struct invoice_customer customer; int64_t number; const char *ocr; const char *invoice_date; const char *due_date; const char *delivery_date; const char *our_ref; const char *your_ref; const char *notes; int payment_days; const struct invoice_line *lines; size_t nlines; }; struct invoice_totals { int64_t net_ore; int64_t vat_ore; int64_t total_ore; int64_t net_25, net_12, net_6, net_free; }; void invoice_totals(const struct invoice_doc *d, struct invoice_totals *t); int invoice_ocr_check(const char *number_digits); int invoice_render_pdf(const struct invoice_doc *d, unsigned char **out, size_t *len); #endif