You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pay Ops - run report from Pay to see how many PAD and OB credits are still sitting there #25868
select sum(remaining_amount), sum(amount) from pay.credits where is_credit_memo = 't';
-> 4351.7, 78912.2
select sum(txn_remaining_amount), sum(txn_amount)
from cas.ar_transactions art
join pay.credits c on c.cfs_identifier = art.txn_number
WHERE txn_class = 'CREDIT MEMO'
and c.remaining_amount > 0
and art.txn_type in ('BC_REG_CREDIT_MEMO')
and is_credit_memo = 't';
-> 4516.7, -4663.7
SELECT sum(txn_remaining_amount)
FROM cas.ar_transactions art
WHERE txn_class = 'CREDIT MEMO'
and not EXISTS (
SELECT 1
FROM cas.ar_applied_receivables aar
WHERE aar.applied_from_id = art.txn_id
AND aar.applied_from_type = 'CREDIT MEMO'
AND aar.applied_to_type = 'INVOICE'
)
and art.txn_type in ('BC_REG_CREDIT_MEMO');
-3683.7
select count(distinct c.cfs_identifier)
from cas.ar_transactions art
join pay.credits c on c.cfs_identifier = art.txn_number
WHERE txn_class = 'CREDIT MEMO'
and c.remaining_amount > 0
and art.txn_type in ('BC_REG_CREDIT_MEMO')
and is_credit_memo = 't';
SELECT
aggregated.account_id,
aggregated.total_txn_remaining_amount,
aggregated.total_remaining_amount,
pa.credit
FROM (
SELECT
c.account_id,
SUM(art.txn_remaining_amount) AS total_txn_remaining_amount,
SUM(c.remaining_amount) AS total_remaining_amount
FROM cas.ar_transactions art
JOIN pay.credits c ON c.cfs_identifier = art.txn_number
WHERE art.txn_class = 'CREDIT MEMO'
AND c.remaining_amount > 0
AND art.txn_type IN ('BC_REG_CREDIT_MEMO')
AND c.is_credit_memo = 't'
GROUP BY c.account_id
) AS aggregated
JOIN pay.payment_accounts pa ON pa.id = aggregated.account_id;
48 accounts have credits. Compared with CAS, 7 accounts show a difference in amount, account ids: 4610, 5593, 8402, 9177, 14368, 20024, 23014, 102522
Activity
seeker25 commentedon Feb 7, 2025
Move up estimate if needed
seeker25 commentedon Feb 7, 2025
To be done by Next Thursday
Jxio commentedon Feb 11, 2025
select sum(remaining_amount), sum(amount) from pay.credits where is_credit_memo = 't';-> 4351.7, 78912.2
-> 4516.7, -4663.7
-3683.7
-> 75
Jxio commentedon Feb 12, 2025
48 accounts have credits. Compared with CAS, 7 accounts show a difference in amount, account ids: 4610, 5593, 8402, 9177, 14368, 20024, 23014, 102522
seeker25 commentedon Feb 13, 2025
Provided this to Patty, reopen if needed