>>>>> "KA" == Kumar Appaiah <a.ku...@alumni.iitm.ac.in> writes:

KA> When I display the lots of commodities in my account, I get something like 
AK> this:

AK> # ledger bal --lots "Account" -f myfile.dat -S date -y "%Y-%m-%d"

AK> This is sorted in price. However, it would be much more useful if I could
AK> sort it in terms of date for further processing in a script, since I need
AK> FIFO lot details. Is there a way to get date sorted lot outputs directly
AK> from ledger?

Hi Kumar,

I've just pushed a fix to the 'next' branch which allows you to say:

  ledger bal --lots "Account" -f myfile.dat \
      -S 'lot_date(total) || date' -y "%Y-%m-%d" 

It was an oversight that sort expressions did not have access to the current
reporting scope. Now you can sort on the lot date of the total, or the date if
no lot date exists.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to