alexpgp: (St. Jerome w/ computer)
I've been using org mode in emacs for a few years, now, to help me keep track of my assignments, and more recently, to help generate invoices.

To generate a line item for an invoice, an item must have certain "Properties" (a feature of org mode). Generally speaking, these are:
  • a BillUnit property, which answers one of the following questions:
    • Is the charge based on source words or target words?
    • Does the job involve an hourly charge?
    • Is this a rush job?
    • Is this a minimum job?
  • a Units property, which indicates the number of BillUnits to bill.
  • and the all-important UnitRate, which is multiplied by the Units to get the line item total.
If I haven't done work for a certain client or end client for a while, I sometimes forget what UnitRate to charge, resulting in either (a) having to fish through the archive to find a job for the same client or end client, or (b), if I'm not on the bounce, charging a wrong—and typically lower—rate for work.

So I got to thinking about automating the process, and just as an experiment, I created a function in my .emacs file (the file that emacs reads upon startup).
(defun clientA-xl8 () 0.xx)
where 0.xx reflects my translation rate for client "A". Then, instead of assigning the value of 0.xx to the UnitRate property of the job, I entered the value
(clientA-xl8)
and then, when I ran my invoice generation function... lo, and behold (!), my hypothesis—that emacs evaluates property values in org mode and then uses any returned value—was demonstrated to have merit.

This is just a first step, but an important one.
alexpgp: (Default)
#+TBLFM: @>$6='(apply '+ '(@2..@>)) ;N
Who would have suspected it would be so easy?

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 7th, 2025 04:22 pm
Powered by Dreamwidth Studios