(root)/ – Rev 36795
Rev 36794 |
Last modification |
Compare with Previous |
View Log
| RSS feed
Last modification
- Rev 36795 2026-06-08 13:06:28
- Author: amit
- Log message:
- Add pending-indent phantom-cleanup migrations (drafts + PAYMENT_FAILED)
selectPendingIndentWalletAmount counts any billing/refund-NULL order regardless
of status, so abandoned draft orders and old PAYMENT_FAILED orders inflated
partner 'unbilled PO' and broke finance reco.
- cleanup_abandoned_draft_orders.sql: 2019-21 never-submitted, wallet-never-debited
drafts (status=0, not rejected) -> PAYMENT_FAILED + refund_timestamp. ~1970 rows.
- cleanup_phantom_payment_failed.sql: 2017-19 PAYMENT_FAILED orders counted as
unbilled PO -> drop ONLY phantom (no-debit or net-settled) via refund_timestamp;
KEEP net-committed (real payable). Temp-table form to avoid locking the live DB.
Both data-only (no code), idempotent, ran on hadb1; pending prod + replicas.