Agregue la condición IF en la consulta SQL, algo como esto.
SELECT invoice_details.invoice_no,
invoice_details.invoice_date,
invoice_details.invoice_amount,
SUM(IF(received_amount_details.received_amount IS NULL
OR received_amount_details.received_amount = '', 0.0,
received_amount_details.received_amount)) AS totalreceiptamt
FROM (SELECT DISTINCT invoice_no,
received_amount
FROM received_amount_details) AS received_amount_details
right join invoice_details
ON received_amount_details.invoice_no =
invoice_details.invoice_no
WHERE invoice_details.proje_id = '7'
GROUP BY invoice_details.invoice_no
Esto agregará 0.0 ya que el valor predeterminado no es monto_recibido_detalles. monto_recibido ES NULL o está en blanco
También estamos haciendo la combinación correcta para obtener todos los valores de la página de detalles de la factura.
Puede obtener más información sobre la condición IF en MYSQL aquí,
https://www.w3schools.com/mysql/func_mysql_if.asp https://dev.mysql.com/doc/refman/8.0 /es/if.html