beancount-import icon indicating copy to clipboard operation
beancount-import copied to clipboard

Use empty posting while balancing imported entry

Open dumbPy opened this issue 4 years ago • 2 comments

If an empty posting i.e., one without an amount, is entered by hand, it should be used to balance the transaction instead of a FIXME posting.

Example

2020-08-26 * "Loan to Asim"
    Assets:INR:HSBC:Saving -34000 INR
    Assets:Receivables:Asim

when this transaction is imported currently, it gets balanced as

2020-08-26 * "Loan to Asim"
    Assets:INR:HSBC:Saving -34000 INR
    Assets:Receivables:Asim 
    Assets:FIXME            34000 INR

but should be, after this PR

2020-08-26 * "Loan to Asim"
    Assets:INR:HSBC:Saving -34000 INR
    Assets:Receivables:Asim 34000 INR

dumbPy avatar Dec 22 '20 07:12 dumbPy

Pull Request Test Coverage Report for Build 213

  • 8 of 13 (61.54%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 68.862%

Changes Missing Coverage Covered Lines Changed/Added Lines %
beancount_import/source/generic_importer_source.py 8 13 61.54%
<!-- Total: 8 13
Totals Coverage Status
Change from base Build 210: -0.02%
Covered Lines: 5150
Relevant Lines: 7243

💛 - Coveralls

coveralls avatar Dec 22 '20 07:12 coveralls

Thanks, this looks good, but can you please add a unit test for this?

jbms avatar Dec 23 '20 06:12 jbms