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