Skip to main content

pdf-supplier-invoice

This skill handles supplier invoices that come with a PDF attachment. The PDF contains the invoice details (supplier, amount, account, invoice number). Keywords include "leverandørfaktura" with a PDF file, supplier invoice with attachment, incoming invoice PDF, "facture fournisseur" with PDF, "Lieferantenrechnung" with PDF.

Jump to install

Source facts

Repository
JardarIversen/ainm-2026
Last source activity
March 22, 2026 at 12:32
Detected SKILL.md language
English
Stars
18
Forks
14

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
pdf_supplier_invoice
tier
3
task
T20
description
This skill handles supplier invoices that come with a PDF attachment. The PDF contains the invoice details (supplier, amount, account, invoice number). Keywords include "leverandørfaktura" with a PDF file, supplier invoice with attachment, incoming invoice PDF, "facture fournisseur" with PDF, "Lieferantenrechnung" with PDF.
# PDF Supplier Invoice Extract from the PDF: supplier name, org number, address (street, postal code, city), bank account ("Bankkonto"), invoice number, dates (DD.MM.YYYY→YYYY-MM-DD), **net amount** ("Beløp"), **VAT amount** ("MVA 25%"), **total** ("Totalt"), expense account ("Konto"), description. ## Turn 1: GET /supplier + GET /ledger/account (parallel) ``` GET /supplier?organizationNumber=<org_nr>&fields=id,name&count=10 GET /ledger/account?number=<expense_acct>,2400,2710&fields=id,number,name ``` If supplier not found → create in Turn 2. If found → skip to Turn 3. ## Turn 2: POST /supplier (only if not found) ```json POST /supplier { "name": "<name>", "organizationNumber": "<org>", "bankAccountPresentation": [{"bban": "<bankkonto>"}], "postalAddress": {"addressLine1": "<street>", "postalCode": "<code>", "city": "<city>"} } ``` ## Turn 3: POST /supplierInvoice?sendToLedger=true 3-line EXPLICIT postings. Use the EXACT net/VAT/total amounts from the PDF. No vatType on any posting. ```json POST /supplierInvoice?sendToLedger=true { "invoiceNumber": "<invoice_number>", "invoiceDate": "<YYYY-MM-DD>", "invoiceDueDate": "<YYYY-MM-DD>", "supplier": {"id": <supplier_id>}, "amountCurrency": -<total>, "currency": {"id": 1}, "kidOrReceiverReference": "<bankkonto>", "voucher": { "date": "<invoice_date>", "description": "<description>", "postings": [ {"date": "<date>", "account": {"id": <expense_id>}, "amountGross": <net_from_pdf>, "amountGrossCurrency": <net_from_pdf>, "description": "<desc>", "row": 1, "supplier": {"id": <sid>}}, {"date": "<date>", "account": {"id": <acct_2710_id>}, "amountGross": <vat_from_pdf>, "amountGrossCurrency": <vat_from_pdf>, "description": "Inngående MVA 25%", "row": 2}, {"date": "<date>", "account": {"id": <acct_2400_id>}, "amountGross": -<total>, "amountGrossCurrency": -<total>, "description": "<desc>", "row": 3, "supplier": {"id": <sid>}} ] } } ``` Save `response.value.voucher.id` for Turns 4 and 5. ## Turn 4: POST /ledger/voucher/{voucherId}/attachment + PUT :sendToLedger (parallel) Both calls in the SAME turn: ``` POST /ledger/voucher/<voucher_id>/attachment file_index: 0 ``` ``` PUT /ledger/voucher/<voucher_id>/:sendToLedger ``` **3-4 writes total. 0 errors.**
View on GitHub