Preview attached purchase invoice pdf's

hope I didn’t miss out on some fundamental feature that’s already in erpnext,
but I wonder if there is a suggested workflow and user-interface to add original invoice copies (scanned or pdf’s) from a supplier.

i.e. a quick way to preview the pdf-contents side by side with the form-views when keying in data or tagging cost-centers for the received invoice.

right now in erpnext, attaching a file and then clicking it’s name just opens it in another browser window/tab… It would be a better UX if we could stay on the page to allow form-entry while viewing the attached pdf.

I also believe there should be a dedicated invoice-copy field for pdf’s like this. Right now an attachment is just a file, instead of being (commonly required to keep) a copy of the suppliers original invoice that must be stored together with the invoice entry.

best david

1 Like

Hello David,

You can add a custom Attachment or image-attach field. If you attach invoice copy in jpeg format, you will also see it’s preview in the invoice itself. However, to make it readable, you will have to mostly open it in the new tab only.

Hi Umair,

I believe from a UX & workflow perspective, we need a way to view both the form and the pdf at the same time to make it quick and easy to do the data-entry (see example screen-shot from a book keeping system that has this feature).

Basically you get an icon in case there are connected documents (scanned paper-invoices or emailed/uploaded pdf-invoices).

The file(s) can then be opened in a side-pane (scaled to fit), and allows for scrolling/clicking left-right to go through them if multiple files or pages.

In case there are no pdf’s attached, you could simply drag one straigh onto the form-view and it should prompt if you want to connect the new file to the active document (add meta / tags if needed).

Having the server convert the pdf’s to an image could be ok, even though it removes the option of copy-pasting things like supplier invoice-numbers, amounts and such. (this would of course be better solved with OCR + a learn feature) Not sure about browser-support for native pdf’s.

1 Like

created a related issue here: Attachments: Storage paths and UI improvements · Issue #14720 · frappe/frappe · GitHub

just waking up this old thread. seen some other more recent discussions on OCR
would be a great productivity improvement, being able to view pdf’s (quotes, invoices, etc) side-by-side with the document view.

To me, a semi-automatic “smart-scan / extraction” of key fields would be enough, i.e. high-lighting the supplier-quote-no in the pdf, then each in the erpnext view could allow to click it to assign and automatically enter the text… repeat for amount, etc.

I think this could work really well, and as most suppliers use templates from their invoicing-system, saving a bit of meta in the document-type, tied to that supplier, would allow it from happening automatically the next time an invoice is added.

image