Hello again. I've figured out some automation for this, now I can do:

2016/02/20 * Transform
    Wh:Raw             -1 apple @ (P(commodity))
    Wh:Raw             -1 orange @ (P(commodity))
    Wh:Packs            1 pack @ (P("apple") + P("orange"))

But it's still too verbose, specially for the final 'pack' posting. I plan 
to do some 12+ items packs!!!!

El domingo, 28 de febrero de 2016, 0:26:54 (UTC+1), Antonio A. Carrillo 
Hernández escribió:
>
> Well, it can be something like a function over the rest of the 
> transaction. As you can leave the balanced amount blank on some 
> transactions, you could write something marking the value of the 
> transaction, something like
>
> 2016/02/20 * Transform
>     Wh:Raw             -1 apple @ ((current_value))
>     Wh:Raw             -1 orange @ ((current_value))
>     Wh:Packs            1 pack @ ((balanced_ammount_value))
>
> I've been reading docs about commodities and valuation functions, but I 
> couldn't figure out if something like this can or can't be done. If this 
> can't be done actually, could it be done writing some python extension?
>
> Thanks.
>
>
> El sábado, 27 de febrero de 2016, 23:54:34 (UTC+1), John Wiegley escribió:
>>
>> >>>>> Antonio A Carrillo Hernández <[email protected]> writes: 
>>
>> > What I want is to let ledger calculate the final 'pack' price based on 
>> the 
>> > other commodities involved. For example, I want to write: 
>>
>> > 2016/02/20 * Transform 
>> > Wh:Raw -1 apple 
>> > Wh:Raw -1 orange 
>> > Wh:Packs 1 pack 
>>
>> > And ledger calculate all of the values automatically or 
>> semiautomatically, 
>> > so I don't have to figure out the Raw prices at date and calculate the 
>> Pack 
>> > price for every transaction. It can be done as ledger knows the Raw 
>> costs. 
>>
>> In this case, how would it determine the final price? 
>>
>> -- 
>> 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.

Reply via email to