diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index f0bbdcc7b0b..51b0c19ea49 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1725,7 +1725,7 @@ if (empty($reshook)) { $srcobject = new $classname($db); '@phan-var-force CommonObject $srcobject'; - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines"); + dol_syslog("Try to find source object origin_type=".$object->origin_type." origin_id=".$object->origin_id." to add lines or deposit lines"); $result = $srcobject->fetch($object->origin_id); $i = -1; // Ensure initialised for static analysis, but with invalid idx. @@ -1839,7 +1839,7 @@ if (empty($reshook)) { 0, // product_type 1, $i >= 0 ? $lines[$i]->special_code : 0, - $object->origin, + $object->origin_type, 0, 0, 0, @@ -2025,7 +2025,7 @@ if (empty($reshook)) { $product_type, $lines[$i]->rang, $lines[$i]->special_code, - $object->origin, + $object->origin_type, $lines[$i]->rowid, $fk_parent_line, isset($lines[$i]->fk_fournprice) ? $lines[$i]->fk_fournprice : null, @@ -3726,19 +3726,19 @@ if ($action == 'create') { $projectid = (!empty($projectid) ? $projectid : $objectsrc->fk_project); // Propagate ref customer of src object to the invoice ? - if (getDolGlobalString("INVOICE_DO_NOT_PROPAGATE_REF_CUSTOMER_Of_SRC_TO_INVOICE")) { + if (getDolGlobalString("INVOICE_DO_NOT_PROPAGATE_REF_CUSTOMER_OF_SRC_TO_INVOICE")) { $ref_client = ""; } else { $ref_client = (!empty($objectsrc->ref_client) ? $objectsrc->ref_client : (!empty($objectsrc->ref_customer) ? $objectsrc->ref_customer : '')); } - // only if socid not filled else it's already done above + // Only if socid not filled else it's already done above if (empty($socid)) { $soc = $objectsrc->thirdparty; } if ($element == 'expedition') { - $elem = $subelem = $objectsrc->origin; + $elem = $subelem = $objectsrc->origin_type; $expeoriginid = $objectsrc->origin_id; dol_include_once('/'.$elem.'/class/'.$subelem.'.class.php'); $classname = ucfirst($subelem); @@ -4515,10 +4515,14 @@ if ($action == 'create') { } // Source / Channel - What trigger creation - print '