Skip to main content

Version Docs Updated

Purpose

This document describes the technical capabilities and operational flow of the PayoutListTable class, which manages the "Payout Requests" screen in the admin panel.

🧾 Payout List Table

PayoutListTable is the primary admin-side UI component of Rentiva's financial governance layer. Built on the WP_List_Table class, it presents complex financial data in a readable, actionable format.


πŸ—οΈ Core Responsibilities​

  1. Analytics View: Real-time display of vendor balances and requested payout amounts.
  2. Secure Filtering: Listing only payout requests in valid states.
  3. Transaction Management: Bulk approval and CSV export integration.

πŸ“Š Column Structure and Data Sources​

Each column in the table is fed from different layers of the database:

ColumnData SourceDescription
VendorWP_UserDisplay Name and ID of the vendor who submitted the request.
Amountpost_metaRequested payout amount (formatted with wc_price).
BalanceLedgerVendor's current available balance in the Ledger table.
Statuspost_statusRequest status (Pending, Approved, Rejected).
Requestedpost_dateDate the request was created (with GMT normalization).

⚑ Bulk Actions​

Bulk Approve​

Administrators can select multiple requests and trigger the central approval mechanism:

  • Method: process_bulk_approve()
  • How it works: Calls GovernanceService::process_approval for each selected ID.
  • Idempotency: Only pending requests are processed; already-approved ones are skipped (double-debit protection).

πŸ”„ Status and Color Codes​

The table visualizes transaction statuses with dynamic colors:

  • 🟑 Pending: Awaiting approval.
  • πŸ”΅ Approved: Approved (payment order issued).
  • 🟒 Confirmed: Finalized (completed on the bank/processor side).
  • πŸ”΄ Rejected / Failed: Rejected or an error occurred.

πŸ›‘οΈ Security and Authorization​

  • Capability: The mhm_rentiva_approve_payout capability is required to perform bulk actions.
  • Nonce: All bulk actions pass through standard WP security.
  • Idempotency Guard: Inside PayoutListTable, a post_status check is performed before each operation to prevent duplicate processing at the code level.

Section Summary​

  • PayoutListTable is an internal admin tool that displays the financial ledger.
  • Data is fetched in a hybrid manner from Ledger and post_meta.
  • Bulk approval passes through the GovernanceService filter.

Changelog​

DateVersionNote
23.04.20264.27.2English translation added.
19.03.20264.21.2PayoutListTable class updated with bulk approve and ledger integration.