2
0
forked from Wavyzz/dolibarr

NEW Removed deprecated CommonObject::client property. Please use CommonObject::thirdparty instead

This commit is contained in:
Marcos García de La Fuente
2016-04-17 15:24:22 +02:00
parent 54dd1763fe
commit e2c86d3fd8
32 changed files with 87 additions and 95 deletions

View File

@@ -975,7 +975,7 @@ class FactureFournisseur extends CommonInvoice
}
else if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life
{
$num = $this->getNextNumRef($this->client);
$num = $this->getNextNumRef($this->thirdparty);
}
else
{

View File

@@ -1184,12 +1184,12 @@ if (empty($reshook))
// Recipient was provided from combo list
if (GETPOST('receiver','alpha') == 'thirdparty') // Id of third party
{
$sendto = $object->client->email;
$sendto = $object->thirdparty->email;
$sendtoid = 0;
}
else // Id du contact
{
$sendto = $object->client->contact_get_property(GETPOST('receiver','alpha'),'email');
$sendto = $object->thirdparty->contact_get_property(GETPOST('receiver','alpha'),'email');
$sendtoid = GETPOST('receiver','alpha');
}
}
@@ -2451,7 +2451,7 @@ elseif (! empty($object->id))
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
$newlang = $_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
$newlang = $object->client->default_lang;
$newlang = $object->thirdparty->default_lang;
if (!empty($newlang))
{

View File

@@ -976,12 +976,12 @@ if (empty($reshook))
// Recipient was provided from combo list
if ($_POST['receiver'] == 'thirdparty') // Id of third party
{
$sendto = $object->client->email;
$sendto = $object->thirdparty->email;
$sendtoid = 0;
}
else // Id du contact
{
$sendto = $object->client->contact_get_property($_POST['receiver'],'email');
$sendto = $object->thirdparty->contact_get_property($_POST['receiver'],'email');
$sendtoid = $_POST['receiver'];
}
}
@@ -1120,7 +1120,7 @@ if (empty($reshook))
$outputlangs = $langs;
$newlang=GETPOST('lang_id','alpha');
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->thirdparty->default_lang;
if (! empty($newlang))
{
$outputlangs = new Translate("",$conf);
@@ -2423,7 +2423,7 @@ else
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id']))
$newlang = $_REQUEST['lang_id'];
if ($conf->global->MAIN_MULTILANGS && empty($newlang))
$newlang = $object->client->default_lang;
$newlang = $object->thirdparty->default_lang;
if (!empty($newlang))
{