Using DEVONthink for invoices, any way to add up values?

Hi,

I have used DEVONthink for a few years to store invoices and other documents that relate to our company. These are manually added via the inbox as pdf’s, I annotate a reference number to the invoices using a text box, then file away into an “invoices” group.

What would be really handy would be a way to sum up all the invoices that relate to a particular reference number (the text box that I added).

I fully appreciate that if a solution was possible within DT, that I would need to edit each one of these documents in some way.

Was wondering if any of you DT experts had any ideas? I barely scratch the surface with my DT knowledge!

My current thinking is that I will need to export all the invoice documents to an external database (maybe FileMaker), then add fields for amount and reference number for each invoice record. Is there a simpler method and staying within DT?

Thanks in advance

Nick

Annotations are actually indexed by version 3.x, therefore searching for the reference number should return the desired invoices.

What exactly do you want to sum up, is this information already stored as custom metadata?

Thanks for the reply,

Yes, I can return the list for invoices by searching for the reference number. The invoice monetary amount is not stored anywhere at present, just characters on the pdf.

Ideally I would like to have a total amount for all the invoices with a particular reference without having to add up manually.

Also, ideally I would like to have a list of all the unique reference numbers that appear on the invoices.

I am prepared to manually edit the 7000 or so invoices if need be and I can’t see a way of achieving this without editing them!

Thanks again

Nick

Is the format of the invoices always the same? You could e.g. duplicate some documents for testing and then check whether the document amount placeholder returns the desired value.

All different formats from several hundred different suppliers, so not the same format at all. Some are even handwritten which obv rules out any OCR!

If I could somehow place the amount in some field in the document by manually editing, could DT total up the invoices for that particular reference number?

Thanks again

Nick

You could use custom metadata prices (see Preferences > Data), afterwards Tools > Create Expense Report could be used. Or a script to sum up the values of the selection.

1 Like

At least for the OCRd documents, you could check out the result of the document amount placeholder, as suggested by @cgrunenberg. That might save you some work. For handwritten documents, that’s not an option, of course.

I export the list to a spreadsheet for budget/expense reporting

You mentioned you stored the reference number
I also store the amount, so it can be easily retrieved
(tags, custom metadata)

I use an applescript to assist with the initial filing
There is an amount detection function that works sometimes, but mostly I enter the amount manually

Also an applescript to export the list to a spreadsheet which handles the sumation

1 Like

Thanks very much for all the replies.

Sorry, some of the responses went above my head. How would I go about inserting an amount placeholder into an existing pdf? Have read sections from the manual but tbh I didn’t understand it.

Also how would I add custom metadata, is this a simple process like adding a text box to an existing pdf (probably the extent of my DT knowledge)?

many thanks

Nick

To be honest, I think you are making this too complicated and expecting too much from DEVONthink given your situation. Unless you have a large number of incoming invoices which would benefit by an investment in automation, I think:

  • process incoming as you do. Add the reference info you mentioned into the PDF if you like, but perhaps more valuable would be to append that info into the file name. If pertinent info in the file name, then it opens the possibility of simpler use of DEVONthink rules (should that be of value) to add meta data or tags or whatever.

  • put a new line item in your database or spreadsheet of the invoice and do you summing (and other computations that you may wish, e.g. sum by Vendor or something) there. Filemaker is of course more sophisticated and complex than a spreadsheet. I’d go with a spreadsheet unless you have more complex needs. Numbers if free in macOS, and of course there is Microsoft Excel. Record your reference information, file name, perhaps a link to the DEVONthink file, etc. as a spreadsheet column or a Filemaker database field.

  • store the invoice by importing into DEVONthink.

Use the information inspector panel (Devonthink > Tools > Inspectors > Show) if you’re running the Pro or Server editions.
As you can see in the screenshot, there are Generic and Custom panels
Custom fields are set up in Devonthink > Settings > Data
image

I create summaries about invoices via the App Receipts. Website

I send my invoices to DT Inbox where they are automatically sorted, tagged and named with several rules. But getting the invoice values and tax out was not possible for me via DT. So, after tagging and naming they are placed in an external indexed folder by DT.

That folder is also indexed by receipts App and inside that App I can see all Cash data of the Invoices And best of it Receipts does take the tags from DT also as tags and you can create reports per tag. This can contain taxes, totals, sums etc. and you can filter by time period.

I would like to do everything within DT, but not possible for me.

Hope this helps you.

1 Like

Thanks for the app recommendation
I’ll take a look, but my preference is to use Devonthink for storage and a spreadsheet for reporting

As you indicated, an invoice/receipt can contain more than one amount
I’m wondering how others would store these multi-amounts
I have up to 40 budget categories that I track using a tag&amount paradigm

As you indicated, an invoice/receipt can contain more than one amount
I’m wondering how others would store these multi-amounts
I have up to 40 budget categories that I track using a tag&amount paradigm

The App gives an overview at the scan which value is used for what. And you can adjust mistakes. It works quite reliably and for me it integrates very good in DT. I would also like to have it completely in DT but for me this became a never ending war with the formatting of the Invoices especially when those are scanned an OCRd. If you have a SetApp subscription the receipts app is included there.

If you find a 100% DT solution I would be interested in how you did that.

As I said, Devonthink for storage; a spreadsheet for reporting
with an applescript to export data from Devonthink to the spreadsheet

Each invoice/receipt is stored as a group
This allows for storage of multiple records associated with the invoice/receipt

A single amount is simple
A budget category tag is assigned, and the amount appended to the filename

For multiple amounts, a budget note is created
to hold the tag&amount pairs

1 Like

A single amount is simple
A budget category tag is assigned, and the amount appended to the filename

For multiple amounts, a budget note is created
to hold the tag&amount pairs

Okay, thanks for clarifying, did you manage to get the values automatically or is it a manual process for you? Because this is what I didn’t manage to automate since it was not possible to rely on the format of the invoices especially when it is OCR scanned.

I use Applescript to assist with my record processing
and it has an automatic feature that attempts to return the single amount
This sometimes needs to be corrected manually
Multiple Amounts is a manual process