|
|
|
|
|
by sago
2148 days ago
|
|
> Equity is similar to a liability. Ít is owed to the owners of the entity. You can kind of see the easy rationale there. I'm not sure it's very deep though. Revenue is in the same group (Credit). And the assets are like expenses (Debit). That is a bit more of a just-so-story in my mind. > Making assets positive in code is conventional. Are you sure? What code are you talking about? Making everything positive in the UI is certainly common. And not showing whether a value is credit or debit. But I really hope my accountancy software isn't coded that way! It needs to track whether a number is a credit or a debit. It could do it with an unsigned value in a struct with a 'is_cr' Boolean and some custom operations to combine the money structs. But I've only ever seen code using signed values, because it is so much faster and less errorprone. Doing it manually is just reinventing the math of negative numbers. And then, the overwhelming convention is the former is positive, the latter negative, not the other way round. |
|
Signed values are the way to go!