#!/usr/bin/env php ***** create_order.php (1.11) ***** DolibarrHasDetectedError.
InformationToHelpDiagnose:
Date: 20250918102330
Dolibarr: 22.0.1 - https://www.dolibarr.org
LevelOfFeature: 0
Login: admin
PHP: 7.4.33
Server: Apache
OS: Linux webm003.cluster020.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
UserAgent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

RequestedUrl: /dolibarrlr/dev/examples/code/create_order.php
Referer:
MenuManager:

Modules: user, agenda, import, export, societe, propal, commande, fournisseur, reception, facture, tax, banque, product, service, projet, categorie, bookmark, expedition, abricot, subtotal, accounting
DatabaseTypeManager: mysqli
RequestLastAccessInError: INSERT INTO llx_commande ( ref, fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_private, note_public, ref_ext, ref_client, model_pdf, fk_cond_reglement, deposit_percent, fk_mode_reglement, fk_account, fk_availability, fk_input_reason, date_livraison, fk_delivery_address, fk_shipping_method, fk_warehouse, fk_incoterms, location_incoterms, entity, module_source, pos_source, fk_multicurrency, multicurrency_code, multicurrency_tx) VALUES ('(PROV)', 4, '2025-09-18 10:23:30', 1, null, '2025-09-18 10:23:30', 1, 'A private comment', 'A public comment', null, null, '', null, null, null, NULL, null, null, null, NULL, NULL, NULL, 0, '', 1, null, null, 0, 'EUR', 1)
ReturnCodeLastAccessInError: DB_ERROR_1452
InformationLastAccessInError: Cannot add or update a child row: a foreign key constraint fails (`aqtispluddolilr`.`llx_commande`, CONSTRAINT `fk_commande_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`))

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