You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tricount and Splitwise connectors are bringing shared expenses into the realm of Cozy.
For now, they are saved in a format very close to how they are consumed by their respective web-apps. For shared expenses to be interesting from a Cozy point of view, and to be exploitable in the same way by Banks for example, we should have a common format for this kind of expenses.
Here are two examples of shared expenses, one from Tricount and one from Splitwise. I do not have now the time to think of a common format, I am putting this here not to forget :)
It is easier to give my opinion for splitwise that has more structured data. My idea so far is to be able to interpret data from these providers by using our existing banking doctypes.
To interpret Splitwise :
we create a new account in io.cozy.banks.accounts for each user_id :
account_id : user_id
label : thanks to the first&lastname of the user_id ("Patrick's splitwise")
account type : something like "Reimbursements state"
balance of the account : net _balance of the user_id
if we want to show the user his own balance in his cozy banks app it means we know wich user_id is the cozynaute.
if we want to dig in more in the details, it is possible to create entries in io.cozy.operations attached to the bank account we created. for one user_id :
we create one operation for every expense that has a "repayments" with the same user_id in the "from" attribute.
amount of the operation : amount in the concerned "repayments"
date : date of the expense
label : "description"+"cost"+"created by"/"firstname" of the expense
For tricount the repartition is limited to a unique user in the example, which makes it hard for me to understand the structure of the current doc. but the idea would be the same by interpreting the repartition section of the data to begin the creation of bank accounts.
The Tricount and Splitwise connectors are bringing shared expenses into the realm of Cozy.
For now, they are saved in a format very close to how they are consumed by their respective web-apps. For shared expenses to be interesting from a Cozy point of view, and to be exploitable in the same way by Banks for example, we should have a common format for this kind of expenses.
Here are two examples of shared expenses, one from Tricount and one from Splitwise. I do not have now the time to think of a common format, I am putting this here not to forget :)
com.tricount.expenses
com.splitwise.expenses
The text was updated successfully, but these errors were encountered: