fix empty arrays of json being created as empty text

This commit is contained in:
Enrique Barcelli 2021-12-05 11:32:06 +08:00
parent 77b1e61fee
commit 01d4fdbdcf

View file

@ -65,7 +65,7 @@ select
'cabecera', json_agg(DISTINCT
jsonb_build_object(
'ivoiceid',c_invoice_id,
'tipoOperacion','0101',
'tipOperacion','0101',
'fecEmision',dateinvoiced::date,
'horEmision',dateinvoiced::time,
'codLocalEmisor','0001',
@ -150,7 +150,7 @@ select
)
||
jsonb_build_object(
'adicionalDetalle',''
'adicionalDetalle','[]'::json
)
||
jsonb_build_object(
@ -175,11 +175,11 @@ select
)
||
jsonb_build_object(
'relacionados',''
'relacionados','[]'::json
)
||
jsonb_build_object(
'variablesGlobales',''
'variablesGlobales','[]'::json
)
||
jsonb_build_object(