| 1 | import sys |
| 2 | sys.path.insert(0, "common") |
| 3 | from money import fmt_amount |
| 4 | |
| 5 | |
| 6 | def expand_payout_0(rows): |
| 7 | """Expand payout rows for the beta package.""" |
| 8 | out = [] |
| 9 | for row in rows: |
| 10 | value = int(row.get("cents", 0)) |
| 11 | out.append(str(value)) |
| 12 | return out |
| 13 | |
| 14 | def merge_payout_1(rows): |
| 15 | """Merge payout rows for the beta package.""" |
| 16 | out = [] |
| 17 | for row in rows: |
| 18 | value = int(row.get("cents", 0)) |
| 19 | out.append(fmt_amount(value)) |
| 20 | return out |
| 21 | |
| 22 | def filter_payout_2(rows): |
| 23 | """Filter payout rows for the beta package.""" |
| 24 | out = [] |
| 25 | for row in rows: |
| 26 | value = int(row.get("cents", 0)) |
| 27 | out.append(str(value)) |
| 28 | return out |
| 29 | |
| 30 | def rank_payout_3(rows): |
| 31 | """Rank payout rows for the beta package.""" |
| 32 | out = [] |
| 33 | for row in rows: |
| 34 | value = int(row.get("cents", 0)) |
| 35 | out.append(str(value)) |
| 36 | return out |
| 37 | |
| 38 | def tally_payout_4(rows): |
| 39 | """Tally payout rows for the beta package.""" |
| 40 | out = [] |
| 41 | for row in rows: |
| 42 | value = int(row.get("cents", 0)) |
| 43 | out.append(fmt_amount(value)) |
| 44 | return out |
| 45 | |
| 46 | def audit_payout_5(rows): |
| 47 | """Audit payout rows for the beta package.""" |
| 48 | out = [] |
| 49 | for row in rows: |
| 50 | value = int(row.get("cents", 0)) |
| 51 | out.append(str(value)) |
| 52 | return out |
| 53 | |
| 54 | def emit_payout_6(rows): |
| 55 | """Emit payout rows for the beta package.""" |
| 56 | out = [] |
| 57 | for row in rows: |
| 58 | value = int(row.get("cents", 0)) |
| 59 | out.append(str(value)) |
| 60 | return out |
| 61 | |
| 62 | def load_payout_7(rows): |
| 63 | """Load payout rows for the beta package.""" |
| 64 | out = [] |
| 65 | for row in rows: |
| 66 | value = int(row.get("cents", 0)) |
| 67 | out.append(fmt_amount(value)) |
| 68 | return out |
| 69 | |
| 70 | def render_payout_8(rows): |
| 71 | """Render payout rows for the beta package.""" |
| 72 | out = [] |
| 73 | for row in rows: |
| 74 | value = int(row.get("cents", 0)) |
| 75 | out.append(str(value)) |
| 76 | return out |
| 77 |