FIX_PAYMENT_STATUS_NAME_ISSUE

This commit is contained in:
Srinivas-Saravanan 2025-05-20 15:54:16 +05:30
parent d68674377b
commit e420e651db

View File

@ -30,7 +30,7 @@ class PaymentStatusModel extends Model
public function getPaymentData($fromDate, $toDate, $status)
{
$builder = $this->db->table('payment_status')->select('payment_status.*,concat(customers.first_name," ",customers.last_name) as customer_name,books.short_code as scheme_name')
$builder = $this->db->table('payment_status')->select('payment_status.*,CONCAT(COALESCE(customers.first_name, ""), " ", COALESCE(customers.last_name, "")) AS customer_name,books.short_code as scheme_name')
->join('customers','customers.customer_id = payment_status.customer_id and customers.isactive = 1')
->join('books','books.book_id = payment_status.scheme_id and books.isactive = 1');