On Sat, Jan 21, 2017 at 11:59 PM, John Wiegley <jo...@newartisans.com> wrote: >>>>>> "o" == o1bigtenor <o1bigte...@gmail.com> writes: > > o> Sort of if the account entered is foo at amount xx.xx then I would call > o> 'something' (don't know what to call it - - - sorry) and then in my text > o> file (I'm using leafpad because I'm finding it faster for text entry than > o> vi which is my low level text editor of choice) I would see 4 lines of text > o> populated with amounts related to xx.xx. > > I didn't quite follow your examples. Could you please try again? > (short example for the entry item.) (copied) This is your example for calculations with a fourth item (second tax) using the calculations I would need to use to get results to the accounts I am using.
(2017-01-01 foo Expense:foo (0.20($20 * 100/105)) Expense:bar (0.80($20 * 100/105)) Expense:tax (on foo portion) (0.20($20 * 5/105)) Expense:tax (on bar portion) (0.80($20 * 5/105)) Income -$20 Is this how I could be entering it? I haven't been because that formats 'messy' and that makes it harder to see if there are errors in input.) I'm wondering if this a place to use 'meta data' but I haven't tried anything in that line yet. Previous 2nd example. (example for multi-item rounding error There is a 2 level tax (some items are no tax, some items (most) have tax A and B, some have only tax A some only have tax B (and to make sure its kinky, tax B is for a some items (rarely) different). 2017.01.20 foo sales co Expense: foo A: 1234.12.12.12 (tax A no tax B) 123.12 Expense: foo B: 2234.23.23.23 (tax A tax B) 23.45 Expense: foo C: 3234.32.32.32 (tax A tax B) 12.12 Expense: foo D: 4234.42.42.42 (tax A tax B) 51.23 Expense: Tax A: 5234.00.00.00 x.xx Asset: back account ert: 1211.01.01.01 total amount My jurisdiction rules tell me that tax B is to be included in the cost of the item but because tax A, that I have paid is refundable to me, then I need to break it out and keep track of it. When I charge tax A or tax B then I need to remit it. With tax A my tax amount payable is reduced by the amount of tax A that I have paid (as a business).) With this second example I am trying to show that in a multi-line invoice; where some items have 1 of 2 taxes, some have both and some have none; that rounding issues start happening. At the point of sale the cost of the objects are first totaled, then taxes are applied where appropriate and they are totaled, following with the tax totals being added to the object totals. Arithmetically when the stated percentage of tax is added to the individual items rounding occurs. When there are say, a number of roundings up (or down) then an error is created when comparing the total generated using individual items (with individual taxes) as compared to a combined total with overall taxes. The error is never large (maximum +/- $0.01 per item) but there definitely is a nuisance factor to the error. (Added time for the correction.) Not sure if there is an elegant way to avoid this but I thought that it would be worth asking. If these examples are still confusing, well then I would apologize but this is what I do regularly in ledger but I use a calculator to calculate the values and then I just transfer those values into the ledger document. I'm just trying to streamline things, make for a lower likelihood of errors and have something that I could get someone else who isn't 'math comfortable' to do the actual inputting. I am not a programmer having viewed computers as tools for the 30 some years that I have had them. Am finding that I am beginning to learn to program because what I want (in certain areas) just isn't available. This to say that as I read the manual and begin to understand what it is that you've (John) done 'under the hood' - - - well - - - its elegant and it works well. Your documentation is great unlike a lot of the open source stuff I've tried to read. Thank you! Regards Dee -- --- 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.