>>>>> "pdc" == pete david clark <pete.david.cl...@gmail.com> writes:

pdc> My issue is that my company have now changed the policy to be even more
pdc> generous (unheard of right)! They now give me an allowance of £1000 to
pdc> buy at 50% discount, followed by a further £2500 at a 25% discount. Once
pdc> the first £1000 allowance is finished, the second £2500 allowance begins.

You may need to track a different commodity for your work bonus.  Here's one
way you could do it:

    ; account Assets:Bonus
    ;     assert (0 <= total)
    
    = %type=discount
        (Assets:Bonus)       (-1 BON * amount)
    
    2017/01/01 Beginning of month allowance
        (Assets:Bonus)     = (1000 BON / 2 + 2500 BON / 4)
    
    2017/01/20 Clothes
        Expenses:Clothes    £20  ; type: discount
        Assets:Checking

The trick is to never let BON become 0.  I tried to do this with an account
assertion, but it's not working the way I expected:

    account Assets:Bonus
        assert (0 <= total)

Anyway, the advantages of this method are:

  1. The amount of BON in Assets:Bonus is equal to the number of £ you could
     spend at a discount.

  2. You deal with conversation rates in one place.

  3. You (should) be able to trigger an assertion if you attempt to apply your
     discount when no more BON is available. Haven't gotten this working yet.

  4. You can choose to roll-over BON, or reset it the beginning of each month
     (which you'd do with a balance assignment to adjust the total).  Haven't
     gotten this quite working the way I'd like either.

There are likely more ways to automate this, but I think it should give you
the general idea...

-- 
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