Created
November 16, 2023 09:25
-
-
Save OneWeb/ba718ae6100f2d18266a22c77451b17a to your computer and use it in GitHub Desktop.
GC promo report config example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gc_promo_report: | |
reports: | |
entries: | |
name: 'Entries report' | |
description: 'This report shows all promotion entries.' | |
sql: "SELECT * FROM gc_promo_entry ORDER BY id ASC;" | |
bank-transfer-payment-report: | |
name: 'Bank transfer payment report' | |
description: 'This report shows all approved cash prize claims.' | |
sql: | | |
"SELECT | |
@rownum := @rownum + 1 as ac_code, | |
CONCAT(e.first_name, ' ', e.last_name) AS customer_name, | |
REPLACE(UPPER(e.bank_account_sort_code), ' ', '') AS BIC, | |
REPLACE(UPPER(e.bank_account_number), ' ', '') AS IBAN, | |
e.payment_price AS customer_amount, | |
e.id AS entry_id | |
FROM gc_promo_entry e | |
cross join (select @rownum := 0) r | |
WHERE e.status = 'Approved' | |
AND e.payment_preference = 'BankTransfer' | |
ORDER BY e.status_approved_at DESC;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment