Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-09-19 20:28:27 +02:00
commit 4ca5bd696d

View File

@ -1174,12 +1174,12 @@ class Thirdparties extends DolibarrApi
/** /**
* Generate a Document from a bank account record (like SEPA mandate) * Generate a Document from a bank account record (like SEPA mandate)
* *
* @param int $id thirdparty id * @param int $id thirdparty id
* @param int $companybankid companybankid * @param int $companybankid companybankid
* @param string $model model of document to generate * @param string $model model of document to generate
* @return void * @return void
* *
* @url GET {id}/generateBankAccountDocument/{companybankid}/{model} * @url GET {id}/generateBankAccountDocument/{companybankid}/{model}
*/ */
public function generateBankAccountDocument($id, $companybankid = null, $model = 'sepamandate') public function generateBankAccountDocument($id, $companybankid = null, $model = 'sepamandate')
@ -1216,8 +1216,7 @@ class Thirdparties extends DolibarrApi
if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09');
if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->company->thirdparty->default_lang)) $newlang=$this->company->thirdparty->default_lang; // for proposal, order, invoice, ... if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->company->thirdparty->default_lang)) $newlang=$this->company->thirdparty->default_lang; // for proposal, order, invoice, ...
if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->company->default_lang)) $newlang=$this->company->default_lang; // for thirdparty if ($this->conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->company->default_lang)) $newlang=$this->company->default_lang; // for thirdparty
if (! empty($newlang)) if (! empty($newlang)) {
{
$outputlangs = new Translate("",$conf); $outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
} }
@ -1238,8 +1237,8 @@ class Thirdparties extends DolibarrApi
if($result->num_rows == 0 ){ if($result->num_rows == 0 ){
throw new RestException(404, 'Account not found'); throw new RestException(404, 'Account not found');
} }
$i=0; $i=0;
$accounts =[]; $accounts =[];