Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

invoice support in rewards.rchain.coop #548

Closed
dckc opened this issue Mar 25, 2018 · 23 comments
Closed

invoice support in rewards.rchain.coop #548

dckc opened this issue Mar 25, 2018 · 23 comments
Labels
Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...) invoice-process centralized payment process, after budgets / rewards are decided wontfix zz-Operations NEEDS SPONSOR guides: @TrenchFloat, @jimscarver @Tonyprisca13

Comments

@dckc
Copy link
Contributor

dckc commented Mar 25, 2018

Let's collect this discussion that's happening in several other issues:

#219 (comment)
#491 (comment)

Feb 2:
#260 (comment)

@dckc
Copy link
Contributor Author

dckc commented Mar 25, 2018

I would like to export to csv the invoice rows per member.

We have that already, no? A recent example:

You can even get all of them at once with the InvoiceExport tab.

The only planned requirement not currently met is

The InvoiceInfo table collects all and only the contact info required by https://github.com/rchain/contractors/blob/master/README.md ; that is: name and eth address.
Neither email address nor postal address is required.

In #219 you write:

Integrate PI-data with the "Member database"

I'd really rather not give access to the member database to the rewards app.

Make PI-data accessible to Finance

As noted above, the rewards app currently collects all the necessary data.

How is the invoice creation going to be done?

The design I proposed Feb 2 is currently implemented.

Is the bounty system able to create a PDF?

Not yet, but I have done it before. I can estimate the effort if you like.

To some extent, I would rather have the app produce google spreadsheets and put them right in the members' gdrive folder. Now that I think about it, that might allow me to avoid collecting name and eth address in the rewards.rchain.coop database.

@dckc
Copy link
Contributor Author

dckc commented Mar 25, 2018

Or... rather than having the rewards.rchain.coop app write into the gdrive: just develop an invoice template that grabs data out of rewards.rchain.coop. Since we already require RAM members to trust gdrive with their contact info, this would be pretty simple. The template would just use IMPORTHTML to get the data. There could be a "check rewards" button that allows the recipient (Finance / Ops) to check consistency between the spreadsheet and rewards.rchain.coop.

@Keaycee
Copy link
Contributor

Keaycee commented Mar 26, 2018

I think there should be a relationship between the rewards.rchain.coop and our old spreedsheet. Can the rewards.rchain.coop be locked to prevent voting after the end of the month ?
Can the invoice be sent out from rewards.rchain.coop?

@lapin7
Copy link
Contributor

lapin7 commented Mar 26, 2018

@dckc says:

The InvoiceInfo table collects all and only the contact info required by https://github.com/rchain/contractors/blob/master/README.md ; that is: name and eth address.
Neither email address nor postal address is required.

Copied from the https://github.com/rchain/contractors/blob/master/README.md

Critical data needed by Accounting to record the expense are:

Name (First and Last)
Date that work was performed, e.g. November 2017
Github Project Number if Applicable
Hours Worked and Rate if Applicable
Amount Due
Amount Payable in Rhoc
Amount Payable in USD, Bitcoin, or Ether
Rhoc Wallet Address if Applicable
BTC or Ether Address if Applicable
Mailing Address for USD Checks

For @lapin7's and others convenience:

  • email address
  • github name
  • url to personal folder
  • url to invoice template
  • url to tax form
  • url to SoW
  • RHOC/USD rate
  • ETH/USD rate
  • department
  • approval date
  • approval signature
  • submitted date
  • due date
  • SoW contract reward

Integrate PI-data with the "Member database"

@lapin7 OK. Don't Integrate PI-data with the "Member database"

Make PI-data accessible to Finance
@dckc I'd really rather not give access to the member database to the rewards app.

@lapin7 The rewards app currently collects not all the necessary data: Mailing Address for USD Checks is missing. But this can be added to the personal invoice template by the RAM.

How is the invoice creation going to be done?
The design @dckc proposed Feb 2 is currently implemented.

@lapin7 An invoice template that grabs data out of https://rewards.rchain.coop is OK (IMPORTHTML to get the data)

Is the bounty system able to create a PDF?
@dckc Not yet, but I have done it before. I can estimate the effort if you like.

@lapin7 Not needed. The spreadsheet template can do that.

@dckc
Copy link
Contributor Author

dckc commented Mar 26, 2018

Mailing Address for USD Checks

wow. I looked at that list several times without seeing that.

@lapin7
Copy link
Contributor

lapin7 commented Mar 28, 2018

When does Bounty-App "InvoiceInfo" show my reward for issue #529 ?

  • member must be verified
  • budget must have 3 votes by verified users
  • reward must have 3 votes by verified users

@dckc @kitblake @lapin7 @pythonical are verified coop members
@TrenchFloat @peetklasen @ChloeCoul are NOT verified coop members

#529 has 3 votes of verified members
@lapin7 has 3 votes for a reward for #529

But #529 does not show up in InvoiceInfo. ?????

Budget Votes

Pay period Voter Amount Vote time
03/01/18 dckc 500.00 Thu Mar 22 18:13:06 2018
03/01/18 kitblake 500.00 Mon Mar 26 08:52:19 2018
03/01/18 lapin7 500.00 Thu Mar 22 17:43:06 2018
03/01/18 peetklasen 75.00 Thu Mar 22 20:59:54 2018

Reward Votes

pay_period issue_num voter worker percent vote_time slash
3/1/18 #529 O> Preparation of invoices 201802 dckc lapin7: HJ Hilbolling 10 Thu Mar 22 18:13:38 2018
3/1/18 #529 O> Preparation of invoices 201802 lapin7 ChloeCoul: 30 Thu Mar 22 17:46:29 2018
3/1/18 #529 O> Preparation of invoices 201802 lapin7 lapin7: HJ Hilbolling 10 Thu Mar 22 17:46:51 2018
3/1/18 #529 O> Preparation of invoices 201802 peetklasen lapin7: HJ Hilbolling 34 Thu Mar 22 21:19:48 2018
3/1/18 #529 O> Preparation of invoices 201802 pythonical lapin7: HJ Hilbolling 10 Sat Mar 24 14:31:18 2018
3/1/18 #529 O> Preparation of invoices 201802 TrenchFloat lapin7: HJ Hilbolling 10 Fri Mar 23 19:30:30 2018
  • How to become a verified user?
    The Verify Coop Membership link is in the upper right menu under your login (after you log in).
    image

What does m*7 mean? (dckc:m7, pythonical:, lapin7:m7)
What does : mean?

@dckc
Copy link
Contributor Author

dckc commented Mar 28, 2018

InvoiceExport is a view that is automatically computed, but InvoiceInfo is not. It's a table. Each RAM has to manually add a record each month using the InvoiceInfo relationship tab from their user record.

I think an ER diagram might be an essential bit of documentation. I sometimes assume people are comfortable reading the SQL source code.

@lapin7
Copy link
Contributor

lapin7 commented Mar 28, 2018

I got this error:
Errors
Failed to save record because a foreign key constraint failed: Cannot add or update a child row: a foreign key constraint fails (xataface.invoice_info, CONSTRAINT invoice_info_ibfk_2 FOREIGN KEY (pay_period) REFERENCES pay_period (start_date))

I did this in browser Chrome, Safari on Mac.

  1. Log in as @lapin7
  2. Status view
  3. Click on Rewards for lapin7
  4. Click on InvoiceInfo
  5. Click on New InvoiceInfo
  6. In "HJ Hilbolling lapin7 » Add New InvoiceInfo" filled out:
  • Pay period: today >> 2018-03-28
  • Name: lapin7 or HJ Hilbolling
  • RHOC wallet: 0x......83E38d........6eC8.......
  1. Click on Save

Any ideas??

@dckc
Copy link
Contributor Author

dckc commented Mar 28, 2018

Use March 1st rather than today to stand for 201803.

This goes back to an outstanding TODO item from the Feb 2 design:

  • pay periods are represented in the UI as a pick-list rather than a guess at the calendar

@dckc
Copy link
Contributor Author

dckc commented Mar 28, 2018

What does m*7 mean? (dckc:m7, pythonical:, lapin7:m7)

It means: certified as master; will get 7x weight when #375 is in place.

What does : mean?

verified coop member

@lapin7
Copy link
Contributor

lapin7 commented Mar 28, 2018

OK. I've now a new empty invoice: 03/01/18 lapin7 -10 Invoice # 2018-03-lapin7

How do I get these two lines into the invoice?
The "Reward USD" and "Reward provisional" show both 300 and 63. Does that mean that they can be added to the invoice?

image

@dckc
Copy link
Contributor Author

dckc commented Mar 28, 2018

You have to get from your InvoiceInfo record to the InvoiceExport view of it; then the details will be filled in.

You might have to "Open this record in the Invoice Info table"; then follow the InvoiceExport view:

Invoice # 2018-03-lapin7

Ignore the RHOC conversion, of course. I ought to take that out.

@lapin7
Copy link
Contributor

lapin7 commented Mar 28, 2018

As I see it: the app can not provide a good invoice. However it can populate field (or cells) in a spreadsheet with IMPORTHTML to get the needed data. Could @dckc create button "Get Issues and Rewards" in a personal template that looks like template that gets:

  • issue number
  • issue description
  • issue reward

and inserts it here then we're good

The select criteria are:

  • authorized access from spreadsheet to bounty app, based on github name and password
  • github name
  • month
  • minimum 3 votes for budget by verified members
  • minimum 3 votes for issue per worker by verified members
  • total of rewards of all workers is not greater then the voted budget
  • maybe I forgot something

@dckc
Copy link
Contributor Author

dckc commented Mar 28, 2018

I made a template invoice and shared it with you, @lapin7 .

I think it covers all the bases, but I'm not sure what you mean by

authorized access from spreadsheet to bounty app, based on github name and password

authorized for what? We agreed on permissionless access to these data, no?

@lapin7
Copy link
Contributor

lapin7 commented Mar 29, 2018

I think it covers all the basis, but I'm not sure what you mean by
authorized access from spreadsheet to bounty app, based on github name and password
authorized for what? We agreed on permissionless access to these data, no?

Yes, that's true. I forgot about that. We keep permissionless access

In that case we don't have to ask for the public ETH address. That would be only in the spreadsheet. I think it's not a good idea to connect real names to public ETH addresses.

Your spreadsheet works wonderful.

Now I have to copy the TAB Import to all personal spreadsheets "Invoices"

@lapin7
Copy link
Contributor

lapin7 commented Mar 29, 2018

Yesterday in the RAM-meeting I said that Budget votes would be definitive on the 1st of April. No votes possible anymore.
But is it possible to extend the voting for Rewards with 1 week?
Otherwise RAM's have to catch up in April for work done in March.

I have also to talk with our CFO to get the payment process more streamlined.

@kitblake
Copy link
Contributor

May I suggest that we make voting for Rewards during the first week (or X days) of the month default?

@dckc
Copy link
Contributor Author

dckc commented Mar 30, 2018

But is it possible to extend the voting for Rewards with 1 week?

The "current pay period" can be changed (or not changed) at any time. (There's no web UI to do it; one has to connect directly to the database and do an SQL update.)

And actually, as to the question from @Keaycee :

Can the rewards.rchain.coop be locked to prevent voting after the end of the month ?

It's designed to... and it does only allow new votes in the current pay period, but it doesn't yet prevent you from editing exisiting votes in any pay period, whether current or not.

dckc added a commit to rchain-community/rchain-dbr that referenced this issue Mar 30, 2018
Google Sheets suffices for handling invoices;
no need to deal with them here.

rchain/bounties#548
@dckc
Copy link
Contributor Author

dckc commented Mar 30, 2018

In that case we don't have to ask for the public ETH address. That would be only in the spreadsheet. I think it's not a good idea to connect real names to public ETH addresses.

Agreed. I just dropped the invoice_info table and the invoice_export view.

c31d192

@lapin7
Copy link
Contributor

lapin7 commented Mar 30, 2018

I've created a template for creating invoices for March. It combines @dckc 's draft template + import. The import is in hidden rows. The named data ranges are deleted, because it doesn't support copying a gsheet to another gsheet.

The template is going to be copied to personal gsheets.

Collaborators can create then their own invoices for March and other month to come.

@dckc
Copy link
Contributor Author

dckc commented Mar 30, 2018

Is there some reason you continue to use the monster spreadsheet, @lapin7 ? It takes forever to load. It's very unwieldy.

@lapin7
Copy link
Contributor

lapin7 commented Mar 30, 2018

No reason to go to my monster spreadsheet.
You can go now to InvoiceTemplate :-)

@rchain rchain deleted a comment from motionfactory-digital Apr 1, 2018
@rchain rchain deleted a comment from motionfactory-digital Apr 1, 2018
@rchain rchain deleted a comment from motionfactory-digital Apr 1, 2018
@rchain rchain deleted a comment from dckc Apr 1, 2018
@dckc
Copy link
Contributor Author

dckc commented Apr 2, 2018

So it looks like invoice support doesn't belong in rewards.rchain.coop but rather in google sheets. See #563 for follow-up.

@dckc dckc closed this as completed Apr 2, 2018
@dckc dckc added wontfix Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...) zz-Operations NEEDS SPONSOR guides: @TrenchFloat, @jimscarver @Tonyprisca13 labels Apr 2, 2018
@dckc dckc added the invoice-process centralized payment process, after budgets / rewards are decided label Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development splitting into core-dev, developer-education, ...? (guides: @dckc, ...) invoice-process centralized payment process, after budgets / rewards are decided wontfix zz-Operations NEEDS SPONSOR guides: @TrenchFloat, @jimscarver @Tonyprisca13
Projects
None yet
Development

No branches or pull requests

4 participants