I'm pretty sure than the --raw options preserving exactly the format used for 
amounts in the ledger file. 

John (from my iPhone)

> On Feb 22, 2014, at 5:14 PM, Pascal Fleury <[email protected]> wrote:
> 
> Hi,
> 
> I am using 'ledger print' to cleanup/format/sort my journal file. It mostly 
> works fine, but I am tracking my use of hourly rented cars (think Zipcar in 
> the US, known as Mobility in Switzerland). These are charged by hour and by 
> mileage. A typical transaction looks like this:
> 
> 2014/01/30 * (16785024) Courses
>     ; car_type: economy
>     Expenses:Transports:Mobility   27 km @ 0.64 CHF
>     Expenses:Transports:Mobility   3.5 h @ 2.80 CHF
>     Credit:Mobility                -27.08 CHF
>     Rounding:Mobility
> 
> Now if I run this through 'ledger print', it ends up becoming:
> 
> 2014/01/30 * (16785024) Courses
>     ; car_type: economy
>     Expenses:Transports:Mobility   27 km @ 0.64 CHF
>     Expenses:Transports:Mobility   12600s @ 0.0007777778 CHF
>     Credit:Mobility                -27.08 CHF
>     Rounding:Mobility
> 
> While the price is right, it looses a little bit in readability.
> 
> Is there a way to have ledger print either keep the units I used in the 
> translation, or at least use a default unit (in my case hours) to represent 
> such items ?
> 
> I found a solution for my needs, which is to use 'hr' as the unit, which 
> ledger doesn't know, so does not try to convert to anything, but I would 
> prefer the natural 'h' notation. 
> 
> Or maybe I am approaching the whole issue from the wrong angle, so feel free 
> to tell me how it could be solved in an other way. I am hoping to get total 
> mileage as well as total renting time out of it.
> 
> --pascal
> -- 
>  
> --- 
> 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/groups/opt_out.

-- 

--- 
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/groups/opt_out.

Reply via email to