Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use empty posting while balancing imported entry #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dumbPy
Copy link
Contributor

@dumbPy dumbPy commented Dec 22, 2020

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

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.
@coveralls
Copy link

coveralls commented Dec 22, 2020

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%
Totals Coverage Status
Change from base Build 210: -0.02%
Covered Lines: 5150
Relevant Lines: 7243

💛 - Coveralls

@jbms
Copy link
Owner

jbms commented Dec 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants