Re: Rounding in ledger

2014-07-03 Thread tripun goel
Attached a new patch. The link to new patch is 
https://gitorious.org/ledger/npo-ledger-cli/raw/c0135638fce02aa3e74e6fe7d180fb65c7c64d0b:rounding/new_precision.patch

I have reimplemented precision feature to solve a minor issue,  posting 
without any annotated price were not being rounded. So a simple example 
like this were generating unbalanced amount error. 

D 1000.00 EUR
commodity EUR
  precision 2
  default

2012-01-01 *
   A3.69 EUR
   C-269 Boots @@ 3.69 EUR
 

But this new patch solve that problem too. The patch passes current test 
suite. Few other tests from this post examples are 
https://gitorious.org/ledger/npo-ledger-cli/raw/c0135638fce02aa3e74e6fe7d180fb65c7c64d0b:rounding/bug_reports/dir-commodity-precision.test
https://gitorious.org/ledger/npo-ledger-cli/raw/c0135638fce02aa3e74e6fe7d180fb65c7c64d0b:rounding/bug_reports/dir-commodity-precision-2.test
https://gitorious.org/ledger/npo-ledger-cli/raw/c0135638fce02aa3e74e6fe7d180fb65c7c64d0b:rounding/bug_reports/dir-commodity-precision-3.test
https://gitorious.org/ledger/npo-ledger-cli/raw/c0135638fce02aa3e74e6fe7d180fb65c7c64d0b:rounding/bug_reports/dir-commodity-precision-4.test

  

On Monday, 30 June 2014 16:28:58 UTC+5:30, tripun goel wrote:

 I have prepared a patch which adds precision feature to commodity 
 directive. I have also attached some tests. It works as follows 

 D 1000.00 EUR
 commodity EUR
   precision 2
   default

 2012-01-01 *
A2 AAA @ 10.122 EUR
A1 BBB @ 20.123 EUR
C

 Mention precision followed by an integer under commodity directive. This 
 integer is the number of places after decimal to keep. +1 means one place 
 after decimal and -1 means one place before decimal. '0' means round to no 
 decimal places. It does not affect display precision. So if display precision 
 is 3 then amount will be displayed to 3 decimal places however they are 
 rounded to 2 decimal places if you have set precision to 2. 

 Example result 
40.36 EUR  A
   -40.36 EUR  C
 
0

 Known issues:
 1. Cannot set rounding mode or truncate.
 2. Display precision is not changed.
 3. Range of integer is not checked. 

 Please review. Suggest new tests.



-- 

--- 
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.
From 60e38423e89f0042f2c150024614edcbe73ccb15 Mon Sep 17 00:00:00 2001
From: tripun tri...@gmail.com
Date: Thu, 3 Jul 2014 00:27:43 +0530
Subject: [PATCH] new precision feature implementation

---
 src/amount.cc   |  9 +
 src/commodity.h | 11 ++-
 src/textual.cc  | 11 ++-
 src/value.cc|  4 
 4 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/src/amount.cc b/src/amount.cc
index 7bf4dfc..dbe9b9a 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -445,6 +445,15 @@ amount_t amount_t::operator+=(const amount_t amt)
 
   _dup();
 
+  if(amt.has_commodity())  {
+  commodity_t comm = amt.commodity();
+
+   if(comm.has_flags(COMMODITY_SET_CUSTOM_PRECISION)) {
+amount_t temp(amt);
+temp.in_place_roundto(comm.custom_precision());
+}
+   }
+
   mpq_add(MP(quantity), MP(quantity), MP(amt.quantity));
 
   if (has_commodity() == amt.has_commodity())
diff --git a/src/commodity.h b/src/commodity.h
index 80945fe..0e8e430 100644
--- a/src/commodity.h
+++ b/src/commodity.h
@@ -108,10 +108,13 @@ protected:
 #define COMMODITY_SAW_ANN_PRICE_FLOAT0x400
 #define COMMODITY_SAW_ANN_PRICE_FIXATED  0x800
 #define COMMODITY_STYLE_TIME_COLON   0x1000
+#define COMMODITY_SET_CUSTOM_PRECISION   0X2000
+
 
 stringsymbol;
 optionalstd::size_t graph_index;
 amount_t::precision_t precision;
+int_least16_t custom_precision;
 optionalstring  name;
 optionalstring  note;
 optionalamount_tsmaller;
@@ -132,7 +135,7 @@ protected:
 (commodity_t::decimal_comma_by_default ?
  static_castuint_least16_t(COMMODITY_STYLE_DECIMAL_COMMA) :
  static_castuint_least16_t(COMMODITY_STYLE_DEFAULTS)),
-symbol(_symbol), precision(0) {
+symbol(_symbol), precision(0),custom_precision(0) {
   TRACE_CTOR(commodity_t::base_t, const string);
 }
 virtual ~base_t() {
@@ -247,9 +250,15 @@ public:
   amount_t::precision_t precision() const {
 return base-precision;
   }
+  int_least16_t custom_precision() const {
+return base-custom_precision;
+  }
   void set_precision(amount_t::precision_t arg) {
 base-precision = arg;
   }
+  void set_custom_precision(int_least16_t arg) {
+base-custom_precision = arg;
+  }
 
   optionalamount_t smaller() const {
 return base-smaller;
diff --git a/src/textual.cc b/src/textual.cc
index 

Re: Automated Txns for Taxes Owed on stocks?

2014-07-03 Thread Martin Blais
On Wed, Jul 2, 2014 at 7:28 PM, James A. Robinson j...@highwire.org wrote:

 On Wed, Jul 2, 2014 at 3:55 PM, Martin Blais bl...@furius.ca wrote:
  But if you mean continuously, e.g., given some unrealized gain against
  positions, how much of it can be considered due to the tax-man, always
  calculated based on current ledger, I think you would need a custom
 script
  to report that. You do have the cost basis of all assets in the Ledger,
 so
  it would be possible to use this to estimate your taxes.

 Thanks, I think I do mean more of the continuously
 updating scenario.  Basically using the cost basis
 calculation and adding that to a virtual account
 that calculates the expected taxes.

 Say I have a ledger consisting of a salary paycheck:

 $ cat X
 2014-01-01 * MyCo Paycheck
 Assets:401k:MyCo   $100.00  ; 401k: employer
 basic
 Assets:401k:MyCo   $100.00  ; 401k: employer
 match
 Assets:401k:MyCo   $100.00  ; 401k: pre-tax
 Assets:401k:MyCo   $100.00  ; 401k: post-tax
 Assets:Prepaid Tax:Income:Federal  $400.00
 Liabilities:Tax:Income:Federal$-400.00
 Expenses:Tax:Income:Federal$400.00
 Expenses:Tax:Federal:MED/EE $60.00
 Expenses:Tax:Federal:OASDI/EE  $100.00
 Expenses:Tax:Ca:Dis/EE  $20.00
 Assets:Prepaid Tax:Income:Ca   $300.00
 Liabilities:Tax:Income:Ca $-300.00
 Expenses:Tax:Income:Ca $300.00
 Expenses:Insurance:Medical  $50.00
 Expenses:Insurance:Vision$6.00
 Income:MyCo:Salary  $-2,000.00
 Income:MyCo:MyCo:Basic$-100.00
 Income:MyCo:MyCo:Match$-100.00
 Assets:MyBank:Checking

 I can use exact values to calculate the expected tax
 liability and prepaid tax (exactly equal in this case):

 $ ledger -f X balance Assets:Prepaid
  $700.00  Assets:Prepaid Tax:Income
  $300.00Ca
  $400.00Federal
 
  $700.00

 $ ledger -f X balance Liabilities
 $-700.00  Liabilities:Tax:Income
 $-300.00Ca
 $-400.00Federal
 
 $-700.00



You don't need these postings:

2014-01-01 * MyCo Paycheck
...
Assets:Prepaid Tax:Income:Federal  $400.00
Liabilities:Tax:Income:Federal$-400.00
...
Assets:Prepaid Tax:Income:Ca   $300.00
Liabilities:Tax:Income:Ca $-300.00

Those look incorrect to me. These won't work to calculate the tax you have
to pay in the future, which depends not on your contributions, but on the
amount of distributions when you take the money out, if we're talking
about pre-tax money (the amount of which hopefully will have grown
substantially at that point).

I would say: remove those entries and write a script that fetches the
current market value of the pre-tax account and calculate from that value
the amount of tax you will eventually have to pay, with reasonable
assumptions about the tax rate at the expected time of withdrawal (i.e. if
this is retirement, a low tax rate as you may not be working anymore). I
don't think you can use Ledger to have it compute that for you, though you
definitely can use Ledger to compute the market value of that 401k account.




and I can pivot report on the 401k balance:

 $ ledger -f X balance 401k --pivot=401k
  $400.00  401k
  $100.00employer basic:Assets:401k:MyCo
  $100.00employer match:Assets:401k:MyCo
  $100.00post-tax:Assets:401k:MyCo
  $100.00pre-tax:Assets:401k:MyCo
 
  $400.00

 Later on I'll be taking those dollars and buying
 stocks or something:

 2014-02-02 * 401K Investment
 Assets:401k:VIPSX  29.607 VIPSX @@ $400.00
  Assets:401k:MyCo

 The pivot report show that I'd have a $100.00
 cost basis in the 401k, and that everything else
 (employer basic, employer match, pre-tax), plus
 whatever gains made in excess of $400.00 due
 to changes in the stocks, have a liability equal
 to some appropriate tax rate.


Again, that's incorrect, once the investments grow, your liability
amounts will all be wrong.

As for the after-tax amounts, what I'd do if I were you is hold that in a
separate account from the pre-tax amounts. They're probably separate real
world accounts anyway, aren't they? (I'm curious, I haven't use after-tax
401k contributions yet, but I doubt they fold them into the same 401k
account.)

If it turns out that both pre-tax and after-tax money can be held in a
single real-world account - again, I'd really like to know how this works -
you could just create two subaccounts.



So I'd like to figure out a way to get a running
 

Re: balance assertions semantics

2014-07-03 Thread Martin Blais
On Wed, Jul 2, 2014 at 7:04 PM, John Wiegley jo...@newartisans.com wrote:

  Martin Blais bl...@furius.ca writes:

  Yes, I'm suggesting that making such an assertion should not be possible
  anymore. You give up this capability, in exchange for the property of
  order-independence. That's the compromise I made; for me,
 order-independence
  is a much more important property than the capability to make balance
  assertions between transactions within a day.

 For me, this loses the value of balance assertions for a convenience I
 don't
 presently need.




 You often have this? What kind of account is this? Bank, credit card,
  trading?  And how often do this occur? I have seen very few cases in 8
 years
  where I could not just increment or decrement the balance assertion
 date, or
  skip an assertion (very rarely occurs - it's okay to skip one if you have
  another one later on, they're entirely optional anyway).

 My credit card statements regularly have transactions within one day, for
 which other transactions on that same day occur only on the next statement.
 Hence, not having intra-day assertions would mean I couldn't make use of
 assertions to help manage reconciliation of statements (my primary use of
 them, in fact).

 The goal of Ledger has always been flexibility first, allowing users to
 define
 their own semantics.  I recognize that Beancount is much more oriented
 toward
 an accounting-centric semantics for the sake of that use case.  This is a
 healthy division, and I think a cross-pollinating one too.


I don't think how that lets users define their own semantics.


Intra-day assertions could have other uses too, which I'm unaware of at the
 moment.  That's reason enough for me to be unwilling to sacrifice them for
 convenience.  There may even be other solutions here that allow us to have
 both that have yet to be explored.





 John

 --

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


-- 

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


Re: balance assertions semantics

2014-07-03 Thread Martin Blais
On Thu, Jul 3, 2014 at 12:17 PM, Martin Blais bl...@furius.ca wrote:

 On Wed, Jul 2, 2014 at 7:04 PM, John Wiegley jo...@newartisans.com
 wrote:


 My credit card statements regularly have transactions within one day, for
 which other transactions on that same day occur only on the next
 statement.
 Hence, not having intra-day assertions would mean I couldn't make use of
 assertions to help manage reconciliation of statements (my primary use of
 them, in fact).

 The goal of Ledger has always been flexibility first, allowing users to
 define
 their own semantics.  I recognize that Beancount is much more oriented
 toward
 an accounting-centric semantics for the sake of that use case.  This is a
 healthy division, and I think a cross-pollinating one too.


 I don't think how that lets users define their own semantics.


Sorry I fat-fingered the send button, I meant: I don't see how this lets
users define their own semantics.

-- 

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


Re: Automated Txns for Taxes Owed on stocks?

2014-07-03 Thread James A. Robinson
On Thu, Jul 3, 2014 at 9:04 AM, James A. Robinson j...@highwire.org wrote:
 Which brings up another question: for a Roth IRA, one is able to obtain a
 tax-free distribution up to the amount of its contributions way before
 retirement (http://en.wikipedia.org/wiki/Roth_IRA#Advantages: Direct
 contributions to a Roth IRA (principal) may be withdrawn tax and penalty
 free at any time). This means that during the life of this Roth IRA
 account, you have to keep track of the total amount of (contributions -
 distributions taken).

So the full quote from the snippet you got from Wikipedia is:

Direct contributions to a Roth IRA (principal) may be withdrawn
tax and penalty free at any time.[1] Earnings may be withdrawn
tax and penalty free after 5 years if the condition of age 59½ (or
other qualifying condition) is also met. Rollover, converted (before
age 59½) contributions held in a Roth IRA may be withdrawn tax
and penalty free after 5 years. Distributions from a Roth IRA do
not increase Adjusted Gross Income. This differs from a traditional
   IRA where all withdrawals are taxed as Ordinary Income, and a penalty
applies for withdrawals before age 59½

So that first sentence is simply discussing the difference between
a Roth IRA and a Traditional IRA when it comes to *early* withdrawal
of funds.

With the Roth, you're allowed to pull those principal contributions,
whereas with the Traditional IRA it's more restrictive, it's only
allowed for some very specific purposes (death, disability, medical
bills, and so forth).

Jim

-- 

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


Re: balance assertions semantics

2014-07-03 Thread Simon Michael

On 7/3/14 9:25 AM, Martin Blais wrote:

Sorry I fat-fingered the send button, I meant: I don't see how this lets
users define their own semantics.


I think in the sense that they can choose to assert intra-day, or 
between days, by where they place the assertions (on a dummy transaction 
if necessary).


But note they can't choose (in Ledger) to place dated assertions at one 
end of the journal, or in a separate file - because Ledger's assertions 
currently follow *only* parse order, ignoring of the date of the posting 
they're on. I had forgotten this. It sounds like John would change this 
but it's awkward with the current implementation, because it processes 
assertions during parsing.



--

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


Re: balance assertions semantics

2014-07-03 Thread Martin Blais
On Thu, Jul 3, 2014 at 1:58 PM, John Wiegley jo...@newartisans.com wrote:

  Simon Michael si...@joyful.com writes:

  But note they can't choose (in Ledger) to place dated assertions at one
 end
  of the journal, or in a separate file - because Ledger's assertions
  currently follow *only* parse order, ignoring of the date of the posting
  they're on. I had forgotten this. It sounds like John would change this
 but
  it's awkward with the current implementation, because it processes
  assertions during parsing.


Oh wow... this explains it. Now this makes sense. I was under the
impression that balancing was still respecting date order (that's how I
implemented it in Beancount). So these are really different kinds of
operations: I'll call mine, the order-independent ones that have their own
directive, a balance assertion, and a file-order based ones running
assertions. I don't think I would ever really need running assertions,
though IFF all the transactions are present in the input and in sorted
order, I see how that makes it possible to support intra-day balance checks.



Yes, I've dumped at least a day into this problem, but Ledger's current
 processing pipeline won't allow it without back-tracking or caching huge
 amounts of data in memory, or recalculating certain figures from scratch
 each
 time they are needed.

 I'm convinced Ledger should have adopted an intermediary data
 representation:
 Parse data into raw structures, and then cooking these structures.  At
 the
 moment it parses directly into the cooked form.  Having an intermediate
 raw
 representation would allow me to do many things much more easily,
 order-independence being among them (or so I believe).


That's what I do in Beancount. The only processing at the parsing stage
is ensuring the transactions balance (e.g., filling a missing posting
amount).


My Haskell version of the Ledger parser does exactly this, but changing the
 C++ code would be a huge refactoring, and beyond the scope of what I want
 to
 do to that code right now.  If I were to spend large amounts of time doing
 new
 development, it would be in Haskell with a hope to merge efforts with Simon
 toward more feature parity for hledger.  I'm quite happy with C++ ledger's
 current feature set and stability, so my goal there is to keep that purring
 along, modulo fixing important problems like rounding and currency
 evaluation.


On a related note about the C++ implementation:

What about the booking problem I outlined in this section:
https://docs.google.com/document/d/1F8IJ_7fMHZ75XFPocMokLxVZczAhrBRBVN9uMhQFCZ4/edit#heading=h.e2ug3mq1m700

The only way I managed to get an inventory to reduce a position was by
specifying both the cost and the date.
Is this a bug or intended behavior?
If not, is the user expected to always put both the cost and the date in?

-- 

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


Re: Automated Txns for Taxes Owed on stocks?

2014-07-03 Thread Martin Blais
On Thu, Jul 3, 2014 at 1:19 PM, James A. Robinson j...@highwire.org wrote:

  Right, this is also what I understand. What I'm suggesting above is a
 method
  to keep track of the after-tax basis that lives in your account, that
 is,
  the sum total of all non-deductible contributions you made in the past
 (what
  you called the cost basis). You would add legs with another
 commodity,
  say AFTERTAX or ROTH or whatever you prefer to call it, something
 like
  this:
 
  2014-01-01 * MyCo Paycheck
  ...
  Income:Prepaid Tax:Income:Federal  -400.00 AFTERTAX
  Assets:401k:MyCo400.00 AFTERTAX
 
  The sum of all AFTERTAX units will tell you how much money you can get
 a
  non-taxable distribution of.
  If you do take a distribution, you have to remember to also add matching
 and
  appropriate legs to it:
 
  2014-01-01 * MyCo Paycheck
  Assets:401k:MyCo  $-2100.00
  Assets:Bank:Checking   $2100.00
  Assets:401k:MyCo   -2100.00 AFTERTAX
  Expenses:Distributions  2100.00 AFTERTAX
 
  This works:
 
Assets:401k:MyCo's AFTERTAX units count how much of that account is
  after-tax basis
 
Income:Prepaid Tax:Income:Federal counts the total of your after-tax
  contributions made during the exercise period
 
Expenses:Distributions's AFTERTAX units tells you how much after-tax
  distributions you receives during the exercise period

 Am I understanding correctly that you are saying to just
 flag a certain dollar amount into the Assets:401k:MyCo
 account as being after-tax, and to track that over the years?


I'm not sure what you mean by flagging, but what I mean is using an
alternative commodity (AFTERTAX) to count the after-tax amounts
contributed in parallel to the real dollar ($ or USD) ones (by in
parallel, I mean that the same number of units appears twice, e.g. in the
2100$ postings and in the 2100 AFTERTAX postings). You could put those
AFTERTAX units either in the same account, or in another one, as you
prefer. In Beancount's asset reporting, these would appear  in the assets
column, and you can just ignore those units if you like, or you can set a
price of AFTERTAX to 0$ so that their disappear.

This is a pretty common case, and I could consider writing a plug-in to
automate the insertion of such postings (if you use Beancount, you can
write your own plugin with hard-coded account names in the code, that will
work; when I write plugins I have to try to go a bit further and provide
generic behavior others can reuse, so I have to get creative in how I infer
or let users specify which account names to use for these automatically
inserted entries).



I'm not sure I following what the Expenses:Distributions
 account entry is for, why is it an expense?


It's an expense of AFTERTAX units because you've used them up by getting a
distribution. You'd similarly use up dollars ($) to get a meal at a
restaurant, it's the same logic. (More rationale: it has to be an income
account (income or expense) and not a balance sheet account (assets or
liabilities) because that's a *transient* amount, that is, the sum total of
all used up distributions is not important, unlike an asset account.
Because its amount is always positive, it should be an expense account and
not an income account.)

-- 

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


Re: balance assertions semantics

2014-07-03 Thread John Wiegley
 Martin Blais bl...@furius.ca writes:

 On a related note about the C++ implementation:  What about the booking
 problem I outlined in this section: The only way I managed to get an
 inventory to reduce a position was by specifying both the cost and the date.

 Is this a bug or intended behavior?

To be honest, I'm not sure.  Your treatment of the problem is much too
in-depth for me to take in at the moment.  Which is great for understanding
the problem, but not so great for me to contribute to the discussion just
now. :)

John

-- 

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


Re: Automated Txns for Taxes Owed on stocks?

2014-07-03 Thread James A. Robinson
Got it, thanks for the explanation.

Jim

-- 

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


Re: How to install/use ledger emacs support?

2014-07-03 Thread Simon Michael

On 7/2/14 5:41 PM, Craig Earls wrote:

oops.  I forgot that I separated out the ledger mode document ion into
a separate reference.  see ledger-mode.pdf, you may need to build it
using texi2pdf in the doc subdirectory of the ledger distribution.

Simon, can we add ledger-mode.pdf to the docs on the web site?


Sure, once I get finish swapping that into my brain.. ledger-mode.pdf 
now linked at http://ledger-cli.org/docs.html .



--

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


Re: How to install/use ledger emacs support?

2014-07-03 Thread Craig Earls
Thanks!

On Thursday, July 3, 2014, Simon Michael si...@joyful.com wrote:

 On 7/2/14 5:41 PM, Craig Earls wrote:

 oops.  I forgot that I separated out the ledger mode document ion into
 a separate reference.  see ledger-mode.pdf, you may need to build it
 using texi2pdf in the doc subdirectory of the ledger distribution.

 Simon, can we add ledger-mode.pdf to the docs on the web site?


 Sure, once I get finish swapping that into my brain.. ledger-mode.pdf now
 linked at http://ledger-cli.org/docs.html .


 --

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



-- 
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/d/optout.


Re: reconcile multiple files in emacs

2014-07-03 Thread Brian May
On Sunday, 29 June 2014 14:53:13 UTC+10, Craig Earls wrote:

 Ledger-mode does not follow includes. I have had a feature request in for 
 this for a while but it is much more difficult than it appears 


Hello,

Are there any workarounds? I tried putting the following at the top of the 
file, so Ledger knows the balance when just processing the individual file:

 2014/08/04 Adjustment 
   
Adjustment 
  
Liabilities:Credit Card=  AUD -XXX

Unfortunately, Ledger gets upset when processing this normally, when the 
adjustment becomes 0:

In file included from path/accounts.ledger, line 53: 
While parsing file path/2014-2015/main.ledger, line 51: 
Error: Only one posting with null amount allowed per transaction

-- 

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


Re: reconcile multiple files in emacs

2014-07-03 Thread Craig Earls
No workarounds right now.  As I said, it is far more complex than it
appears. If there were a simple work around I would do it.  I find
using a single file for all transactions solves lots of problems aside
from avoiding this one.

On Thu, Jul 3, 2014 at 8:29 PM, Brian May
br...@microcomaustralia.com.au wrote:
 On Sunday, 29 June 2014 14:53:13 UTC+10, Craig Earls wrote:

 Ledger-mode does not follow includes. I have had a feature request in for
 this for a while but it is much more difficult than it appears


 Hello,

 Are there any workarounds? I tried putting the following at the top of the
 file, so Ledger knows the balance when just processing the individual file:

  2014/08/04 Adjustment
 Adjustment
 Liabilities:Credit Card=  AUD -XXX

 Unfortunately, Ledger gets upset when processing this normally, when the
 adjustment becomes 0:

 In file included from path/accounts.ledger, line 53:
 While parsing file path/2014-2015/main.ledger, line 51:
 Error: Only one posting with null amount allowed per transaction

 --

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



-- 
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/d/optout.


ANNOUNCE: User configurable reconcile buffer for ledger-mode

2014-07-03 Thread Craig Earls
This one has been a long time coming.  You can now easily customize
the contents of the reconcile buffer.  Change the
ledger-reconcile-buffer-line-format variable using ledger
customization, or your own init code.

The default is %(date)s %-4(code)s %-50(payee)s %-30(account)s %15(amount)s\n

Available fields are date, status, code, payee, account, amount.  The
format for each field is %WIDTH(FIELD), WIDTH can be preced by a minus
sign which mean to left justify and pad the field.

-- 
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/d/optout.