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 AccountHistoryChunk#mixIn for printSubView #37

Open
michielbdejong opened this issue Mar 22, 2021 · 2 comments
Open

Use AccountHistoryChunk#mixIn for printSubView #37

michielbdejong opened this issue Mar 22, 2021 · 2 comments

Comments

@michielbdejong
Copy link
Collaborator

The current code would match floater transactions even if they're years apart. Let's set a max date skew of say 7 calendar days, and not match if the difference is bigger than that.

Also, the floater-matching code should move from run.js to a newly created class MultiChunkAccountHistory.

  • check if a mutationToSelf is in-chunk for both the sender and the receiver account. So maybe the sender composes chunks of implied bank-to-bank transactions, and sends those to the receiver, who then tries to match them up with AccountHistoryChunk#mixIn or something close to that.
@michielbdejong
Copy link
Collaborator Author

Don't try to match if only one of the two accounts is in-chunk for the date of that mutation.

@michielbdejong michielbdejong changed the title Max date skew and move floater code into Ledger Use AccountHistoryChunk#mixIn for printSubView Mar 23, 2021
@michielbdejong
Copy link
Collaborator Author

Primary channels can be:

  • "me - bank account" (bank statement)
  • "me - group" (WieBetaaltWat)
  • "shop - me" (Invoice)
  • "bank account - shop" (Bill Payment History)

Secondary channels can be:

  • "my one bank account - my other bank account" (de-dupe!)
  • "bank account - shop"
  • "group member - shop" (de-dupe!)

Tertiary channels can be:

  • "shop - me"
  • "shop - other group member"

if you link a WieBetaaltWat entry to a bank statement entry, make sure to de-dupe it. Also you may have seen the payment in a shop's billing history.

Direct netting:

  • Alice gives goods to Bob and her (group or bilateral) debt to Bob decreases. Nobody else is involved.
  • You receive interest or are charged for the cost of using a bank card.

Indirect:
Alice -> Bank -> Shop
Alice -> Bank -> Bank -> Shop
Alice -> Bank -> Bank -> Bank -> Shop
etc.

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

No branches or pull requests

1 participant