War bug
This commit is contained in:
parent
317abb46fd
commit
6d2a3edf69
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -31,8 +31,7 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class pdf_canelle
|
* Class to generate the supplier invoices with the canelle model
|
||||||
* \brief Class to generate the supplier invoices with the canelle model
|
|
||||||
*/
|
*/
|
||||||
class pdf_canelle extends ModelePDFSuppliersInvoices
|
class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||||
{
|
{
|
||||||
@ -882,7 +881,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
|
|
||||||
// If BILLING contact defined on invoice, we use it
|
// If BILLING contact defined on invoice, we use it
|
||||||
$usecontact=false;
|
$usecontact=false;
|
||||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
$arrayidcontact=$object->getIdContact('internal','BILLING');
|
||||||
if (count($arrayidcontact) > 0)
|
if (count($arrayidcontact) > 0)
|
||||||
{
|
{
|
||||||
$usecontact=true;
|
$usecontact=true;
|
||||||
@ -894,15 +893,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
||||||
else $socname = $object->client->nom;
|
else $socname = $mysoc->nom;
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
$carac_client_name=$outputlangs->convToOutputCharset($mysoc->nom);
|
||||||
}
|
}
|
||||||
|
|
||||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$mysoc,$object->contact,$usecontact,'target');
|
||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
@ -954,7 +954,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
|
|
||||||
// If BILLING contact defined on invoice, we use it
|
// If BILLING contact defined on invoice, we use it
|
||||||
$usecontact=false;
|
$usecontact=false;
|
||||||
$arrayidcontact=$object->getIdContact('external','BILLING');
|
$arrayidcontact=$object->getIdContact('internal','BILLING');
|
||||||
if (count($arrayidcontact) > 0)
|
if (count($arrayidcontact) > 0)
|
||||||
{
|
{
|
||||||
$usecontact=true;
|
$usecontact=true;
|
||||||
@ -966,15 +966,15 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
{
|
{
|
||||||
// On peut utiliser le nom de la societe du contact
|
// On peut utiliser le nom de la societe du contact
|
||||||
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
|
||||||
else $socname = $object->client->nom;
|
else $socname = $mysoc->nom;
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
$carac_client_name=$outputlangs->convToOutputCharset($mysoc->nom);
|
||||||
}
|
}
|
||||||
|
|
||||||
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
|
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$mysoc,$object->contact,$usecontact,'target');
|
||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user