ledger/ledger — pull request #306 by maxsatula (2014-06-30 17:48:54+00:00)
Title: Status (cleared/pending/uncleared) processing behavior

When a status flag (! or *) is explicitly specified for an individual posting, it always must have a priority over entire transaction status.
New behavior is the same as an old one when:
1) Either transaction or posting status is UNCLEARED, or both
2) Transaction and posting are specified (CLEARED or PENDING) and are the same
3) Transaction is marked PENDING, posting is marked CLEARED, then the posting considered as CLEARED

New behavior DIFFERS from the old one when:
1) Transaction is marked CLEARED, posting is marked PENDING, then the posting considered as PENDING, despite pending is a "lower" status than cleared, but "local" flag overrides "global" flag here.