Hi,
I wanted to implement some kind of regress test file, not fully documenting
the option, but at least keeping trace of the syntax of the command.
I tried on my own ledger file the command:
ledger bal --lots "Account" -f myfile.dat -S 'lot_date(total) || date'
-y "%Y-%m-%d"
But it is failing with :
While evaluating value expression:
(lot_date(total) | date)
^^^^^^^^^^^^^^^
While calling function 'lot_date 0':
Error: boost::bad_get: failed value get using boost::get
Can somebody (maybe original poster Kumar Appaiah) provide me with some
anonymised test file?
Thanks
Regards,
Thierry
On Wednesday, January 4, 2017 at 9:34:35 PM UTC+1, John Wiegley wrote:
>
> >>>>> "KA" == Kumar Appaiah <[email protected] <javascript:>>
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.