forked from Wavyzz/dolibarr
NEW Removed deprecated CommonObject::client property. Please use CommonObject::thirdparty instead
This commit is contained in:
@@ -1932,7 +1932,7 @@ class Facture extends CommonInvoice
|
||||
$this->date=dol_now();
|
||||
$this->date_lim_reglement=$this->calculate_date_lim_reglement();
|
||||
}
|
||||
$num = $this->getNextNumRef($this->client);
|
||||
$num = $this->getNextNumRef($this->thirdparty);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1971,7 +1971,7 @@ class Facture extends CommonInvoice
|
||||
if (! $error)
|
||||
{
|
||||
// Define third party as a customer
|
||||
$result=$this->client->set_as_client();
|
||||
$result=$this->thirdparty->set_as_client();
|
||||
|
||||
// Si active on decremente le produit principal et ses composants a la validation de facture
|
||||
if ($this->type != self::TYPE_DEPOSIT && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL) && $idwarehouse > 0)
|
||||
@@ -3085,7 +3085,7 @@ class Facture extends CommonInvoice
|
||||
// If not a draft invoice and not temporary invoice
|
||||
if ($facref != 'PROV')
|
||||
{
|
||||
$maxfacnumber = $this->getNextNumRef($this->client,'last');
|
||||
$maxfacnumber = $this->getNextNumRef($this->thirdparty,'last');
|
||||
$ventilExportCompta = $this->getVentilExportCompta();
|
||||
// If there is no invoice into the reset range and not already dispatched, we can delete
|
||||
if ($maxfacnumber == '' && $ventilExportCompta == 0) return 1;
|
||||
|
||||
@@ -175,7 +175,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
// Customer
|
||||
print "<tr><td>".$langs->trans("Company")."</td>";
|
||||
print '<td colspan="3">'.$object->client->getNomUrl(1,'compta').'</td></tr>';
|
||||
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'compta').'</td></tr>';
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@@ -281,7 +281,7 @@ if ($action == 'create')
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
// Third party
|
||||
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$object->client->getNomUrl(1,'customer').'</td>';
|
||||
print '<tr><td>'.$langs->trans("Customer").'</td><td>'.$object->thirdparty->getNomUrl(1,'customer').'</td>';
|
||||
print '<td>';
|
||||
print $langs->trans("Comment");
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -540,7 +540,7 @@ if (empty($reshook))
|
||||
$outputlangs = $langs;
|
||||
$newlang='';
|
||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user