diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index b586c69d464..9bd14d120fe 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -1756,8 +1756,8 @@ abstract class CommonInvoice extends CommonObject if ($this->ref_client) { $complementaryinfo .= '/20/'.$this->ref_client; } - if ($this->thirdparty->vat_number) { - $complementaryinfo .= '/30/'.$this->thirdparty->vat_number; + if ($this->thirdparty->tva_intra) { + $complementaryinfo .= '/30/'.$this->thirdparty->tva_intra; } // Header diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 5e4b75a183e..7ff463df8b3 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -5,7 +5,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2022 Frédéric France * * 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 @@ -1567,7 +1567,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders 'border-left' => false, // remove left line separator ); - if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) { + if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) { $this->cols['photo']['status'] = true; }