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

Taxed money type #63

Open
bugproof opened this issue Oct 1, 2018 · 1 comment
Open

Taxed money type #63

bugproof opened this issue Oct 1, 2018 · 1 comment
Labels

Comments

@bugproof
Copy link

bugproof commented Oct 1, 2018

I wonder if it would be useful to add TaxedMoney type with a distinction between net amount and gross amount, just a proposition though. Tell me what you think.

But then, the following requirements should be met:

  • Changing tax updates the amounts, should it calculate from gross or net?
  • Two static instantiation methods to be able to instantiate from gross or from net FromNet/FromGross
  • Change of gross amount changes net amount, and change of net amount changes gross amount respectively to keep amounts synchronized

Taxation is pretty complex, and it would be great if NodaMoney handled that as well

@ptjhuang
Copy link

ptjhuang commented Apr 24, 2019

I like this, I've implemented my own and use it everywhere in the code base.

But I think it needs to be split out to another library. For example, I just saw a Transaction.cs in master branch that has a tuple of (Value, ExchangeRate, Discount, Tax). I feel it's starting to step on the toes of the application. It's not something I would want to use in my application. Looking down the issue list, I see IBAN requested - something I'm also interested in, but perhaps not all lumped into core NodaMoney, what started off as a simple type library will start to get heavy.

@remyvd thoughts?

NodaMoney (Money, ExchangeRate, core data types)
NodaMoney.Banking (IBAN, Credit Card etc)
NodaMoney.Accounting (with things like TaxedMoney, Transaction, FxAmount (Base:Money, Foreign:Money, ExchangeRate, see https://hillside.net/plop/2015/papers/penguins/8.pdf)
NodaMoney.Finance (Finance-y things)

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

No branches or pull requests

3 participants