diff --git a/app/Controllers/InvoiceController.php b/app/Controllers/InvoiceController.php index f4927fb..2804df7 100644 --- a/app/Controllers/InvoiceController.php +++ b/app/Controllers/InvoiceController.php @@ -38,8 +38,8 @@ class InvoiceController extends ResourceController $data = $this->InvoiceModel->select('partner_invoice.*, PB.name as broker_name, PA.name as agent_name') ->join('partner_brokers PB', 'PB.id = partner_invoice.broker_id', 'left') ->join('partner_agent PA', 'PA.id = partner_invoice.agent_id', 'left') - ->where('is_active', 1) - ->orderBy('id', 'DESC') + ->where('partner_invoice.is_active', 1) + ->orderBy('partner_invoice.id', 'DESC') ->findAll(); return $this->respond(['status' => 'success', 'code' => 200,'data' => $data ], 200);