generate_invoice_ledger
Generate invoice ledger
Use this when the user wants several invoices in one spreadsheet ("put these invoices into Excel", "invoice log from these PDFs", "purchase ledger", "VAT summary by rate", "check these invoices for duplicates"). Send the invoices as rows when their values are in the chat or a screenshot; send attached invoice PDFs (selectable text) in files; send pasted invoice text in invoice_texts (one string per invoice), and use text only as a fallback. Returns an Excel ledger (supplier, invoice number, invoice and due date, currency, net, tax per rate, tax total, gross, status) with By supplier, By tax rate and Checks sheets, and a CSV. Flags totals that do not equal net + tax, tax that does not match its rate, and duplicate invoice numbers per supplier. Reads header totals only, not line items. Does not read scanned images, convert currencies, file tax returns, or say whether tax is reclaimable.
textfilescurrencyinvoicesdate_orderdecimal_markinvoice_texts