Skip to content
Browse files

War bug

  • Loading branch information...
1 parent 317abb4 commit 6d2a3edf6964be7fb006e7c746dc7d1495657ce9 @eldy eldy committed Apr 7, 2012
View
13 htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -1,6 +1,6 @@
<?php
/* 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
* it under the terms of the GNU General Public License as published by
@@ -31,8 +31,7 @@
/**
- * \class pdf_canelle
- * \brief Class to generate the supplier invoices with the canelle model
+ * Class to generate the supplier invoices with the canelle model
*/
class pdf_canelle extends ModelePDFSuppliersInvoices
{
@@ -882,7 +881,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
// If BILLING contact defined on invoice, we use it
$usecontact=false;
- $arrayidcontact=$object->getIdContact('external','BILLING');
+ $arrayidcontact=$object->getIdContact('internal','BILLING');
if (count($arrayidcontact) > 0)
{
$usecontact=true;
@@ -894,15 +893,15 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
// On peut utiliser le nom de la societe du contact
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);
}
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
$posy=42;
View
8 htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -954,7 +954,7 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
// If BILLING contact defined on invoice, we use it
$usecontact=false;
- $arrayidcontact=$object->getIdContact('external','BILLING');
+ $arrayidcontact=$object->getIdContact('internal','BILLING');
if (count($arrayidcontact) > 0)
{
$usecontact=true;
@@ -966,15 +966,15 @@ function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
// On peut utiliser le nom de la societe du contact
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);
}
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
$posy=42;

0 comments on commit 6d2a3ed

Please sign in to comment.
Something went wrong with that request. Please try again.