#!/usr/bin/env php ***** create_invoice.php (1.7) ***** Dolibarr has detected a technical error.
This information can be useful for diagnostic purposes (you can set option $dolibarr_main_prod to '1' to hide sensitive information):
Date: 20260305030732
Dolibarr: 23.0.0 - https://www.dolibarr.org
Level of features: 0
Login: admin
PHP: 8.4.10
Server: Apache
OS: Linux webm016.cluster100.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Requested URL: /erp/dev/examples/code/create_invoice.php
Referer:
Menu manager:

Modules/Applications: user, import, export, fckeditor, societe, propal, commande, expedition, ficheinter, ticket, partnership, fournisseur, supplier_proposal, reception, incoterm, facture, tax, banque, paymentbybanktransfer, prelevement, margin, product, accounting, service, stock, productbatch, variants, agenda, barcode, socialnetworks, mailing, emailcollector, cron, paypal, printing, datapolicy
Database type manager: mysqli
Latest database access request error: 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-03-05 03:07:32', '2026-03-05 03:07:32', null, 'A private comment', 'A public comment', null, NULL, null, null, 0, null, null, 1, null, 1, 0, '2026-03-06 03:07:32', null, null, null, null, 0, 0, '', 0, 'EUR', 1, 0, NULL, 0, null)
Return code for latest database access request error: DB_ERROR_1452
Information for latest database access request error: Cannot add or update a child row: a foreign key constraint fails (`qmkimgxdolibarr`.`llx_facture`, CONSTRAINT `fk_facture_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`))

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