Bug #3093
Monthly Snapshot Payout - TDS Accruals Management
Description
build a frontend interface to manage station_partner_tds_accruals data. This interface will integrate with 3 API endpoints (POST, GET, PUT). The primary goal is to allow users to view, backfill missing TDS (Tax Deducted at Source) entries, and correct existing TDS amounts for a partner's monthly payout.
Updated by Shreya Agarwal about 2 months ago
In this , dynamic TDS Amount and Net Amount fields were implemented inside the Mark as paid popup on the Partner Payout Process page (/partnerships/partner-payout-process) under Partnership Management.
At the UI a numeric input field for TDS Amount (optional) and a read-only display field for Net Amount were added directly below the Payment Amount (optional) field. The Net Amount is dynamically calculated in real-time as the user enters or modifies values, using the formula:
The submit handler (handleMarkPaidSubmit) was updated so that when calling the POST /api/v1/partnership/monthly-snapshot-payout/mark-as-paid API endpoint, the calculated Net Amount is passed in the paymentAmount payload field and the TDS Amount is passed in tdsAmount.
Added dynamic TDS Amount and Net Amount fields to the Mark as paid payout modal under Partnership Management.
TDS Input Field: Added an optional TDS Amount input box directly below the Payment Amount box.
Dynamic Net Amount Calculation: Added a read-only Net Amount box that automatically calculates and updates in real-time as:
Net Amount = Payment Amount (or Balance Due) − TDS Amount
API Payload Integration: Configured the payout submission logic so the API payload receives the calculated Net Amount in the payment amount field and the entered TDS value in the TDS amount field.
State Reset Logic: Implemented automatic state cleanup so the TDS input and calculated Net Amount reset whenever the modal is opened or closed.