1
0

Creator tax compliance (#4254)

* Initial implementation

* Remove test code

* Query cache

* Appease clippy

* Precise TIN/SSN

* Make tax threshold customizable via env variable

* Address review comments
This commit is contained in:
François-Xavier Talbot
2025-08-25 12:34:58 -04:00
committed by GitHub
parent ca36d11570
commit 006b19e3c9
16 changed files with 773 additions and 37 deletions
@@ -0,0 +1,34 @@
{
"db_name": "PostgreSQL",
"query": "\n SELECT\n SUM(amount) amount,\n SUM(fee) fee,\n SUM(amount) FILTER (WHERE created >= DATE_TRUNC('year', NOW())) amount_this_year\n FROM payouts\n WHERE user_id = $1 AND (status = 'success' OR status = 'in-transit')\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "amount",
"type_info": "Numeric"
},
{
"ordinal": 1,
"name": "fee",
"type_info": "Numeric"
},
{
"ordinal": 2,
"name": "amount_this_year",
"type_info": "Numeric"
}
],
"parameters": {
"Left": [
"Int8"
]
},
"nullable": [
null,
null,
null
]
},
"hash": "2fb4c034099267e2268821d1806fe28d540625e9713fcd88b4a965130245c1ee"
}