diff --git a/lib/new-admin/services/transactions.js b/lib/new-admin/services/transactions.js index 84630d33..44de0ab2 100644 --- a/lib/new-admin/services/transactions.js +++ b/lib/new-admin/services/transactions.js @@ -46,7 +46,7 @@ function batch ( c.id_card_data_number AS customer_id_card_data_number, c.id_card_data_expiration AS customer_id_card_data_expiration, c.id_card_data AS customer_id_card_data, - concat(c.id_card_data::json->>'firstName', ' ', c.id_card_data::json->>'lastName') AS customer_name, + array_to_string(array[c.id_card_data::json->>'firstName', c.id_card_data::json->>'lastName'], ' ') AS customer_name, c.front_camera_path AS customer_front_camera_path, c.id_card_photo_path AS customer_id_card_photo_path, ((NOT txs.send_confirmed) AND (txs.created <= now() - interval $1)) AS expired @@ -73,7 +73,7 @@ function batch ( c.id_card_data_number AS customer_id_card_data_number, c.id_card_data_expiration AS customer_id_card_data_expiration, c.id_card_data AS customer_id_card_data, - concat(c.id_card_data::json->>'firstName', ' ', c.id_card_data::json->>'lastName') AS customer_name, + array_to_string(array[c.id_card_data::json->>'firstName', c.id_card_data::json->>'lastName'], ' ') AS customer_name, c.front_camera_path AS customer_front_camera_path, c.id_card_photo_path AS customer_id_card_photo_path, (extract(epoch FROM (now() - greatest(txs.created, txs.confirmed_at))) * 1000) >= $1 AS expired