Correct linked_objects assignment for 'propal' #Wrong sourcetype 'commande' instead of 'propal' when creating recurring invoice template from invoice linked to proposal #37099 @defrance (#37112)

* Correct linked_objects assignment for 'propal'

@defrance Adam Hocini

* Refactor linked objects assignment for proposals

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
adamhocini 2026-02-07 23:58:14 +01:00 committed by GitHub
parent f20eb01d0e
commit ebce799bdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,8 +301,7 @@ if (empty($reshook)) {
$object->linked_objects['commande'] = $orderid;
} elseif (!empty($srcObject->linkedObjectsIds['propal'])) {
$proposalid = reset($srcObject->linkedObjectsIds['propal']);
$object->linked_objects['commande'] = $proposalid;
$object->linked_objects['propal'] = $proposalid;
}
}