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

Admin: transactions and incomes #39

Closed
marcosmenendez opened this issue Jul 30, 2014 · 3 comments
Closed

Admin: transactions and incomes #39

marcosmenendez opened this issue Jul 30, 2014 · 3 comments
Assignees
Milestone

Comments

@marcosmenendez
Copy link

First, I've seen that there is an option in admin called incomes https://pre.thegooddata.org/incomes/admin that may be depreciated since it was probably changed to transactions https://pre.thegooddata.org/transactions/admin

Second, I've seen that there are multiple transactions value at 0 with no currency. I guess they've been created when registering a user.

The way transactions should work is the following:

  1. When there is a share purchase, there should be a transaction type "purchase" value 0.01, currency GBP
  2. When there is a loan, there should be a transaction type "loan", value -0.01, currency GBP
  3. When there is a donation, type should be donation and value and currency will depend on the users' decision
  4. There may be actions where there is a combination of 1+2 or 1+3
  5. When a member quits, there should be 1 or 2 transactions depending if there is a loan attach to it. Loan transaction should have a value of +0.01 GBP and purchase a value of -0.01 GBP. If there was no loan attached, status of purchase transaction should be "Pending" until the user ask for the money back or it is manually converted to a donation
  6. All transactions should have a date attached to them that may be edited

If it doesn't work that way, let's discuss if it makes more sense to keep it as it is

@atrandafir
Copy link
Contributor

I don't know the initial purpose of the table Incomes, if it is deprecated or not.

All I can see is that we are not using it to create any data, just to display some stathistics on Good Data page:

  • Total Money Earned (select sum(gross_amount) as total from tbl_incomes)
  • Money available for microloans (select sum((gross_amount-expenses) * loan_reserved/100) as total from tbl_incomes)

@atrandafir
Copy link
Contributor

As for how transactions are currently working:

  • When user chooses 1 UK Pence loan it was saving a transaction of type LOAN but amount +0.01 USD, I have changed it to -0.01 GBP.
  • When user chooses Buy share with Bitcoin, it is saving a transaction of type SHARE with amount +0.01 GBP.
  • When users chooses Support with a donation, it is saving a transaction type DONATION with amount and currency the user has selected.

Questions:

  • Do we have to also create a SHARE transaction when we give the loan to the user? I mean, loan does -0.01 and SHARE will do +0.01 GBP.
  • Do we have to create a SHARE transaction when user buys share with donation? For example if user donates 10 GBP, 0.01GBP should go to buy share and remaining 9.99 GBP should go as donation?
  • How are we going to manage it when user asks for the money back? (resignation)
  • How are we going to convert it to a donation? (resignation)

Other:

  • Currently when member quits (resignation) there are no transactions going on. We should do that once we answer the questions above.
  • As for the dates, yes, the transaction has a created_at field where date and time is stored.

@marcosmenendez
Copy link
Author

Regarding Q1 and 2: Yes and yes
Regarding Q3 and 4: The best way will be to include the 3 different options (loan cancellation, money back or donation) in the resignation page that is described in this new issue #47 . It is not urgent. I think we can manage those few cases manually in the meantime

Regarding the table incomes, I assume that it summarizes the numbers contained in the transactions you've just mentioned, right?

Even in that case, i guess we should just keep one view in the admin panel, https://pre.thegooddata.org/transactions/admin and hide the menu option for this https://pre.thegooddata.org/transactions/admin right?

atrandafir pushed a commit that referenced this issue Aug 20, 2014
…rrencies, exchange rate, import all stripe currencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants