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

Conflicts:
	htdocs/admin/translation.php
This commit is contained in:
Laurent Destailleur 2018-01-11 01:14:20 +01:00
commit 90ddfc3f7f
6 changed files with 18 additions and 17 deletions

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -280,14 +281,14 @@ class doc_generic_contract_odt extends ModelePDFContract
// On peut utiliser le nom de la societe du contact // On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else { else {
$socobject = $object->client; $socobject = $object->thirdparty;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact; $contactobject = $object->contact;
} }
} }
else else
{ {
$socobject=$object->client; $socobject=$object->thirdparty;
} }
// Make substitution // Make substitution
$substitutionarray=array( $substitutionarray=array(

View File

@ -307,14 +307,14 @@ class doc_generic_product_odt extends ModelePDFProduct
// On peut utiliser le nom de la societe du contact // On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else { else {
$socobject = $object->client; $socobject = $object->thirdparty;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact; $contactobject = $object->contact;
} }
} }
else else
{ {
$socobject=$object->client; $socobject=$object->thirdparty;
} }
// Make substitution // Make substitution
$substitutionarray=array( $substitutionarray=array(

View File

@ -304,14 +304,14 @@ class doc_generic_user_odt extends ModelePDFUser
// On peut utiliser le nom de la societe du contact // On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else { else {
$socobject = $object->client; $socobject = $object->thirdparty;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact; $contactobject = $object->contact;
} }
} }
else else
{ {
$socobject=$object->client; $socobject=$object->thirdparty;
} }
// Open and load template // Open and load template

View File

@ -306,14 +306,14 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
// On peut utiliser le nom de la societe du contact // On peut utiliser le nom de la societe du contact
if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact; if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socobject = $object->contact;
else { else {
$socobject = $object->client; $socobject = $object->thirdparty;
// if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use
$contactobject = $object->contact; $contactobject = $object->contact;
} }
} }
else else
{ {
$socobject=$object->client; $socobject=$object->thirdparty;
} }
// Make substitution // Make substitution
$substitutionarray=array( $substitutionarray=array(

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2014-2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com> * Copyright (C) 2014-2015 Charlie Benke <charlies@patas-monkey.com>
* Copyright (C) 2015-2016 Abbes Bahfir <bafbes@gmail.com> * Copyright (C) 2015-2016 Abbes Bahfir <bafbes@gmail.com>
* *
@ -308,7 +308,7 @@ if (empty($reshook))
$outputlangs = $langs; $outputlangs = $langs;
$newlang=''; $newlang='';
if (empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if (empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09');
if (empty($newlang)) $newlang=$srcobject->client->default_lang; if (empty($newlang)) $newlang=$srcobject->thirdparty->default_lang;
if (! empty($newlang)) { if (! empty($newlang)) {
$outputlangs = new Translate("",$conf); $outputlangs = new Translate("",$conf);
$outputlangs->setDefaultLang($newlang); $outputlangs->setDefaultLang($newlang);
@ -887,7 +887,7 @@ if ($action == 'create')
$projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:''); $projectid = (!empty($objectsrc->fk_project)?$objectsrc->fk_project:'');
$soc = $objectsrc->client; $soc = $objectsrc->thirdparty;
$note_private = (! empty($objectsrc->note) ? $objectsrc->note : (! empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private','none'))); $note_private = (! empty($objectsrc->note) ? $objectsrc->note : (! empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private','none')));
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public','none')); $note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public','none'));