Merge pull request #8049 from fmarcet/6.0
Fix: Still using property ->client instead of ->thirdparty.
This commit is contained in:
commit
0ae02d76a3
@ -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(
|
||||||
|
|||||||
@ -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(
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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(
|
||||||
|
|||||||
@ -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>
|
||||||
*
|
*
|
||||||
@ -297,7 +297,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);
|
||||||
@ -878,7 +878,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')));
|
$note_private = (! empty($objectsrc->note) ? $objectsrc->note : (! empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private')));
|
||||||
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public'));
|
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user