RJ,
  I think I see what you are trying to do, but it will not scale the
way you are doing it.  When you have a few thousand invoices ledger
will slow to a crawl.  What about something like this:

2012/4/1   XYZ
   ; Raising and invoice
   Debtor:XYZ              10000 Rs  ; Invoice: 1
   Income

2012/5/1  XYZ
    ; Receiving a payment here
   BankAccount              (10000 Rs * TDS)  ; Invoice: 1
   Assets:TDS                (10000 Rs * (1 - TDS))  ; Invoice: 1
   Debtor:XYZ

You must be very careful to commoditize every number you use.  Even if
you only work in a single currency, uncommoditized numbers do not work
as you think they should in ledger.

The comments in the data above are actually meta data, the colon after
Invoice means the the value of Invoice is "1" for that posting.  You
can search on that metadata.  There is decent information in the
ledger3 manual about using metadata.  It is much faster than using
value expression all over the place.

On Thu, Mar 21, 2013 at 5:41 AM, Harshad RJ <harshad...@gmail.com> wrote:
>
> On Thu, Mar 21, 2013 at 6:00 PM, John Wiegley <jo...@newartisans.com> wrote:
>>
>> At present variable names aren't used for much.  Can you show me an
>> example of
>> where you'd want to use a bill number in a variable name?  Perhaps there's
>> another way (such as with metadata) to make such a usage easier for you.
>
>
> Example: I raise an invoice say in April 2012, and received a payment in May
> 2012 with TDS (Tax deducted at source). This is how I thought I could record
> it:
>
> define TDS_RATE = 0.1
>
> define INVOICE_1 = 10000
>
> 2012/4/1
>    ; Raising an invoice here
>    Debtor:XYZ       INVOICE_1
>    Income
>
> 2012/5/1
>    ; Receiving a payment here
>    BankAccout      INVOICE_1 * TDS
>    Assets:TDS      INVOICE_1 * (1 - TDS)
>    Debtor:XYZ
>
> If there is a better way to do it, please let me know.
>
> thanks,
> --
> Harshad RJ
>
> --
>
> ---
> 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/groups/opt_out.
>
>



-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

-- 

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


Reply via email to