Description
The Cost Basis calculation in softledger automatically calculates the realized gain / loss amounts for transactions along with prepare the cost layers for subsequent transactions. The Logic for how cost basis knows what date to run from is provided below
How
SoftLedger stores a timestamp of the next time we plan to run costbasis "nextCostBasisDate".
It can be viewed in the UI by hovering over the run costbasis icon:
This date will get updated in the following situations
- If you run costbasis, to the date of the most recent transaction it finishes calculating for (whether it stops from cancellation, error, or completing).
- If you delete a transaction, the date will be updated to the oldest of [date of the deleted transaction, or currently set "nextCostBasisDate"]
- If you create a transaction, the date will be updated to the oldest of [date of the created transaction, or currently set "nextCostBasisDate"]
- If you edit a transaction, and update a field that could impact costbasis(type/price/quantity/coin/wallet/date/currency), the date will be updated to the oldest of [date of the updated transaction, or currently set "nextCostBasisDate"]
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article