INSERT INTO paidtype (name, description, creationdate, active, maincompany_id, cusbalance)
SELECT 'Contado', 'Pago inmediato', NOW(), 1, :maincompany_id, 0
WHERE NOT EXISTS (
    SELECT 1 FROM paidtype p WHERE p.maincompany_id = :maincompany_id AND p.name = 'Contado'
);

INSERT INTO paidtype (name, description, creationdate, active, maincompany_id, cusbalance)
SELECT 'Crédito', 'Pago a crédito', NOW(), 1, :maincompany_id, 1
WHERE NOT EXISTS (
    SELECT 1 FROM paidtype p WHERE p.maincompany_id = :maincompany_id AND p.name = 'Crédito'
);
