Update facture.php

if socid is filled and send, they no need to get the thirdparty of the object
This commit is contained in:
BENKE Charles 2014-12-14 18:03:30 +01:00
parent 8a6f7df186
commit 135d6c1d1f

View File

@ -1767,6 +1767,8 @@ if ($action == 'create')
$ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : ''); $ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : '');
$ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : ''); $ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : '');
// only if socid is not filled
if (empty($socid))
$soc = $objectsrc->thirdparty; $soc = $objectsrc->thirdparty;
$cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); $cond_reglement_id = (! empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(! empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1));