Handle Purchase Order numbers explicitly in billing pipeline

Note that these aren't used for most registrars.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=213631863
This commit is contained in:
mcilwain
2018-09-20 11:19:36 -04:00
committed by Ben McIlwain
parent 3fc7271145
commit 633b30725a
10 changed files with 138 additions and 12 deletions
@@ -22,6 +22,7 @@ SELECT
eventTime,
BillingEvent.clientId AS registrarId,
RegistrarData.accountId AS billingId,
RegistrarData.poNumber AS poNumber,
tld,
reason as action,
targetId as domain,
@@ -63,6 +64,7 @@ JOIN (
SELECT
__key__.name AS clientId,
billingIdentifier,
IFNULL(poNumber, '') AS poNumber,
r.billingAccountMap.currency[SAFE_OFFSET(index)] AS currency,
r.billingAccountMap.accountId[SAFE_OFFSET(index)] AS accountId
FROM