SELECT 'Fornecedores' as tipo, count(*) as qtdd, '17' as expected
FROM fornecedores_empresas
WHERE codigo IN (32, 57, 118, 119, 204, 215, 219, 224, 232, 237, 238, 239, 243, 244, 245, 256, 257);

SELECT 'Despesas' as tipo, count(*) as qtdd, '7' as expected
FROM cadastro_plano_de_contas_itens
WHERE conta_reduzida IN (554, 579, 663, 697, 699, 767, 799);

INSERT INTO financeiro_contas_fornecedores ( --
    fornecedor_id,
    nota_fiscal,
    data,
    valor,
    nome,
    plano_de_contas_id,
--
#     centros_de_custo_cadaris_id,
#     forma_pagamento,
#     boleto,
    pago, -- =1
#     comprovante,
    conta_id, -- =3
    created_at, -- =NOW()
    updated_at -- =NOW()
)
    VALUES --
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 237 LIMIT 1), '285209', '2020-12-07', 4999, 'Compra bateria parcela 09/10', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 579 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 238 LIMIT 1), '', '2020-12-07', 10000, 'Curso Maris 08/12', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 799 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 245 LIMIT 1), '4974369', '2020-12-07', 127491, 'Parc 005/012', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 204 LIMIT 1), '2278828 / 202000001151666', '2020-12-07', 35791, 'Compra Note 03/12', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 256 LIMIT 1), '', '2020-12-07', 1600, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 554 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '353767', '2020-12-07', 2840, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '', '2020-12-07', 2290, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '', '2020-12-07', 2290, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 663 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 57 LIMIT 1), '125739', '2020-12-07', 48542, 'Assinatura Getty images', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 697 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 215 LIMIT 1), '', '2020-12-07', 11774, 'Assinatura Locaweb', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '567555629', '2020-12-07', 48286, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '567555629', '2020-12-07', 34283, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 32 LIMIT 1), '567555629', '2020-12-07', 14003, 'Hospedagem', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 256 LIMIT 1), '', '2020-12-07', 1170, 'Contratação de ferramenta', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 554 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 119 LIMIT 1), '', '2020-12-07', 63521, 'Anúncio TPO', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 767 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 119 LIMIT 1), '', '2020-12-07', 699, 'Google.storage', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 699 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 239 LIMIT 1), '', '2020-12-07', 14225, 'StreamYard.com', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 257 LIMIT 1), '', '2020-12-07', 203775, 'Zerobounce', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 118 LIMIT 1), '', '2020-12-07', 139508, 'Facebook', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 243 LIMIT 1), '', '2020-12-07', 7990, 'Reportei', (SELECT id FROM cadastro_plano_de_contas_itens WHERE conta_reduzida= 554 LIMIT 1), 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 244 LIMIT 1), '', '2020-12-07', 8664, 'Zoom Us', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 239 LIMIT 1), '', '2020-12-07', 14450, 'StreamYard.com', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 256 LIMIT 1), '', '2020-12-07', 1600, 'Linktree', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 256 LIMIT 1), '', '2020-12-07', 1600, 'Linktree', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 219 LIMIT 1), '388059', '2020-12-07', 2840, 'Mlabs software', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 232 LIMIT 1), '', '2020-12-07', 20349, 'Paypal do Brasil', NULL, 1, 3, NOW(), NOW() ),
  ( (SELECT id FROM fornecedores_empresas WHERE codigo = 224 LIMIT 1), '', '2020-12-07', 4500, 'Anuidade', NULL, 1, 3, NOW(), NOW() );
