diff --git a/app/Controllers/InvoiceController.php b/app/Controllers/InvoiceController.php index 469312f..16594d1 100644 --- a/app/Controllers/InvoiceController.php +++ b/app/Controllers/InvoiceController.php @@ -262,7 +262,8 @@ class InvoiceController extends ResourceController ->join('partner_agent pa', 'pa.id = pe.agent_id', 'left') ->where('partner_policy.is_active', 1) ->where('partner_policy.commission_amount > 0') - ->where('partner_policy.is_data_accuracy_checked', 1); + ->where('partner_policy.is_data_accuracy_checked', 1) + ->where('partner_policy.manager_id', $input['manager_id']); // Apply agent_id filter (supports multiple agents) if (!empty($input['agent_id'])) {