Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

team preliminaries #4037

Merged
merged 4 commits into from
Jun 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](http://img.shields.io/travis/gratipay/gratipay.com/master.svg)](https://travis-ci.org/gratipay/gratipay.com)
[![Open Bounties](https://api.bountysource.com/badge/team?team_id=423&style=bounties_received)](https://www.bountysource.com/teams/gratipay/issues)

[Gratipay](http://gratipay.com) provides payments and payroll for open work,
[Gratipay](http://gratipay.com) provides payments and payouts for open work,
in order to cultivate an economy of gratitude, generosity, and love.


Expand Down
2 changes: 1 addition & 1 deletion gratipay/billing/exchanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_ready_payout_routes_by_network(db, network):
p.status_of_1_0_payout='pending-payout'


----- TODO: Include members on payroll once process_payroll is implemented
----- TODO: Include team members once process_takes is implemented

)
""", (network,))
Expand Down
6 changes: 3 additions & 3 deletions gratipay/billing/payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def payin(self):
self.process_payment_instructions(cursor)
self.transfer_takes(cursor, self.ts_start)
self.process_draws(cursor)
payments = cursor.all("""
_payments_for_debugging = cursor.all("""
SELECT * FROM payments WHERE "timestamp" > %s
""", (self.ts_start,))
try:
Expand All @@ -166,7 +166,7 @@ def payin(self):
import csv
from time import time
with open('%s_payments.csv' % time(), 'wb') as f:
csv.writer(f).writerows(payments)
csv.writer(f).writerows(_payments_for_debugging)
raise
self.take_over_balances()

Expand Down Expand Up @@ -288,7 +288,7 @@ def transfer_takes(cursor, ts_start):

@staticmethod
def process_draws(cursor):
"""Send whatever remains after payroll to the team owner.
"""Send whatever remains after payouts to the team owner.
"""
log("Processing draws.")
cursor.run("UPDATE payday_teams SET is_drained=true;")
Expand Down
4 changes: 2 additions & 2 deletions gratipay/models/participant/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Participants on Gratipay give payments and take payroll.
"""Participants on Gratipay give payments and take payouts.
"""
from __future__ import print_function, unicode_literals

Expand Down Expand Up @@ -1586,7 +1586,7 @@ def to_dict(self, details=False, inquirer=None):

# Key: taking
# Values:
# 3.00 - user takes this amount in payroll
# 3.00 - user takes this amount from teams
output['taking'] = str(self.taking)
output['ntaking_from'] = self.ntaking_from

Expand Down
2 changes: 1 addition & 1 deletion gratipay/models/participant/mixins/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IdentityMixin(object):
A participant may have zero or more national identities on file with
Gratipay, with at most one for any given country at any given time. When at
least one of a participant's national identities has been verified, then
they may join the payroll of one or more Teams.
they may join one or more Teams.

Since national identity information is more sensitive than other
information in our database, we encrypt it in the application layer before
Expand Down
4 changes: 2 additions & 2 deletions gratipay/models/team.py → gratipay/models/team/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Teams on Gratipay receive payments and distribute payroll.
"""Teams on Gratipay receive payments and distribute payouts.
"""
from __future__ import absolute_import, division, print_function, unicode_literals

Expand Down Expand Up @@ -273,7 +273,7 @@ def update_receiving(self, cursor=None):
""", dict(team_id=self.id))


# This next step is easy for now since we don't have payroll.
# This next step is easy for now since we don't have payouts.
from gratipay.models.participant import Participant
Participant.from_username(self.owner).update_taking(cursor or self.db)

Expand Down
6 changes: 6 additions & 0 deletions sql/branch.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- https://github.com/gratipay/gratipay.com/pull/4037

BEGIN;
DROP VIEW current_payroll;
DROP TABLE payroll;
END;