       or coalesce(i.created_date, 'NULL') != coalesce(b.invoice_created_date,'NULL')
       or coalesce(i.invoice_date, 'NULL') != coalesce(b.invoice_date,'NULL')
       or coalesce(i.target_date, 'NULL') != coalesce(b.invoice_target_date,'NULL')
-      or coalesce(i.currency, 'NULL') != coalesce(b.invoice_currency,'NULL')
-
+      or coalesce(i.currency, 'NULL') != coalesce(b.invoice_currency,'NULL')				
+				
 -- H4
 select *
 from bipr b

-- bac

-- A1a
select a.updated_date, bac.updated_date
from accounts a
 left outer join bac on a.id = bac.account_id
where a.record_id != bac.account_record_id

from invoice_payments ip
     left outer join bip on ip.id = bip.invoice_payment_id
where ( coalesce(ip.RECORD_ID, 'NULL') != coalesce(bip.invoice_payment_record_id,'NULL')
      or coalesce(ip.ID, 'NULL') != coalesce(bip.invoice_payment_id,'NULL')
      or coalesce(ip.invoice_id, 'NULL') != coalesce(bip.invoice_id,'NULL')
      or coalesce(ip.type, 'NULL') != coalesce(bip.invoice_payment_type,'NULL')
      or coalesce(ip.linked_invoice_payment_id, 'NULL') != coalesce(bip.linked_invoice_payment_id,'NULL')
      or coalesce(ip.amount, 'NULL') != coalesce(bip.amount,'NULL')
      or coalesce(ip.currency, 'NULL') != coalesce(bip.currency,'NULL')
      or coalesce(ip.created_date, 'NULL') != coalesce(bip.created_date,'NULL')
      or coalesce(ip.account_record_id, 'NULL') != coalesce(bip.account_record_id,'NULL')
      -- or coalesce(ip.tenant_record_id, 'NULL') != coalesce(bip.tenant_record_id,'NULL')
     )
      and ip.type = 'ATTEMPT'

