#!/usr/bin/env php ***** create_invoice.php (1.7) ***** O Dolibarr detectou um erro técnico.
Essas informações podem ser úteis para fins de diagnóstico (você pode definir a opção $dolibarr_main_prod como '1' para ocultar informações confidenciais):
Data: 20261129133924
Dolibarr: 24.0.4 - https://www.dolibarr.org
Nível de funções: 0
Iniciar Sessão: admin
PHP: 8.4.28
Server: Apache
OS: Linux brs40.brs.com.br 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
Agente utilizador: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

URL solicitada: /dev/examples/code/create_invoice.php
Referer:
Administração do menu:

Módulos / Aplicações: user, service, categorie, cabinetmed, idoowhatsapp, import, export, agenda, recruitment, ticket, stock, fckeditor, societe, propal, product
Tipo de gerente de base de dados: mysqli
Últimos erros de acesso ao banco de dados: INSERT INTO llx_facture ( ref, entity, ref_ext, type, subtype, fk_soc, datec, datef, date_pointoftax, note_private, note_public, ref_client, fk_account, module_source, pos_source, pos_print_counter, fk_fac_rec_source, fk_facture_source, fk_user_author, fk_projet, fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf, fk_input_reason, situation_cycle_ref, situation_counter, situation_final, fk_incoterms, location_incoterms, fk_multicurrency, multicurrency_code, multicurrency_tx, retained_warranty, retained_warranty_date_limit, retained_warranty_fk_cond_reglement, ip) VALUES ('(PROV)', 1, null, 0, null, 4, '2026-11-29 13:39:24', '2026-11-29 13:39:24', null, 'A private comment', 'A public comment', null, NULL, null, null, 0, null, null, 1, null, 1, 0, '2026-11-30 13:39:24', null, null, null, null, 0, 0, '', 0, 'BRL', 1, 0, NULL, 0, null)
Código de retorno do último erro de acesso ao banco de dados: DB_ERROR_1452
Informação do último erro de acesso ao banco de dados: Cannot add or update a child row: a foreign key constraint fails (`novatixcom_dolibarr2404`.`llx_facture`, CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`))

Mensagem: Cannot add or update a child row: a foreign key constraint fails (`novatixcom_dolibarr2404`.`llx_facture`, CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`))
--- end error code=1