Faktura-indbakke behavior
Documented against app commit ed7d6935. The same text lives in docs/agent/faktura-indbakke.md in the app repo.
Faktura-indbakke
Section titled “Faktura-indbakke”Inbox of supplier invoice images that are booked into the same posting shape as a manual bilag. See docs/agent/transactions.md.
Middleware: auth.check, module:bogforing, account, year. Status changes and batch approve also require module:fiapprover.
Screens
Section titled “Screens”| Path | View | What it is |
|---|---|---|
GET /bogforings/faktura-indbakke/{category?}/{quarter?} | resources/views/pages/fakturaindbakke/index.blade.php | The inbox. Category and quarter are filters of this view. |
GET /bogforings/faktura-indbakke/add/{id} | resources/views/pages/fakturaindbakke/form.blade.php | Book an uploaded image. {id} is the invoice_imgs row. |
GET /bogforings/faktura-indbakke/edit/{id} | same form | Edit a bilag that already came from the inbox. {id} is the bogføring id. |
Regions on the list: upload, status filters, the image queue, batch approve (only for an approver), and the link into the booking form. Regions on the form: the invoice image, leverandør, modkonto, dates, fakturanr, bilagsnr, text, valuta, beløb, and the konto and moms lines. The form is the same field set as the bogføring modal.
Off-screen
Section titled “Off-screen”POST /bogforings/faktura-indbakke/upload (upload) stores the file with InvoiceImgService and leaves it unbooked. POST /bogforings/faktura-indbakke/upload/{id} (updateImg) replaces the file on an existing image.
add only renders the form. POST .../add/{id} (store) flattens Select2 arrays to a single id, then follows the manual create path: momskode maps, BogforingService::store with invoice_img_id, flipValue for the same type and kontoplan-type pairs, computeTransaction, and BogforingTransactionService::store. The image is then no longer waiting in the inbox.
edit / POST .../edit/{id} (update) loads the existing header and lines into the form and writes them back the same way. Replacing the image on an edit is updateImg, not a second header.
GET /bogforings/faktura-indbakke/status/{id}/{status} (updateStatus) sets the image or bilag status. It is limited to fiapprover. POST /bogforings/faktura-indbakke/batch-update (batchUpdate) applies that status to many rows and is under the same middleware. Neither call rebuilds lines.
GET /bogforings/faktura-indbakke/delete/{id} removes an unbooked image or its bilag through the inbox controller. A booked header still follows the bogføring delete rules (is_active), and the audit trigger records it.
public/js/faktura-indbakke.js posts POST /api/bogforing/checkFakturanr before save, same warning as the daybook. public/js/conversion.js posts GET /api/currencyexchange/db for the rate. Neither endpoint writes a posting.
Scanning mail and classifying PDFs is docs/agent/faktura-scan.md. This module only books images that are already in the inbox.