How come an INNER JOIN returns zero rows when I use coalesce?
The column named importe is numeric but the JOIN conditions are not being fulfilled so it returns a blank value instead of a NULL mark.
How can I set this value to 0 instead of a blank value, I tried with COALESCE but it's not working.

If the join conditions are not being fulfilled you have 0-rows. An INNER JOIN on false returns 0-rows: not one row with a null value, not one row with a zero.
SELECT x,y
FROM ( VALUES (1) ) AS t(x)
JOIN ( VALUES (2) ) AS g(y)
  ON false;
 x | y 
---+---
(0 rows)

Returns nothing. What you want is an outer join.
SELECT x,y
FROM ( VALUES (1) ) AS t(x)
LEFT OUTER JOIN ( VALUES (2) ) AS g(y)
  ON false;
 x | y 
---+---
 1 |  
(1 row)

Now that you have a row, you can use COALESCE
SELECT x, coalesce(y,0) AS y
FROM ( VALUES (1) ) AS t(x)
LEFT OUTER JOIN ( VALUES (2) ) AS g(y)
  ON false;
 x | y 
---+---
 1 | 0
(1 row)