diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ecb5ebe6897..511427c0b30 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2013 Cedric Gross * Copyright (C) 2013 Florian Henry * Copyright (C) 2016-2025 Ferran Marcet - * Copyright (C) 2018-2025 Alexandre Spangaro + * Copyright (C) 2018-2026 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2022 Sylvain Legrand * Copyright (C) 2022-2023 Solution Libre SAS @@ -2563,7 +2563,7 @@ class Facture extends CommonInvoice $line->fk_warehouse = $objp->fk_warehouse; // Accountancy - $line->fk_accounting_account = $objp->fk_code_ventilation; + $line->fk_code_ventilation = $objp->fk_code_ventilation; // Multicurrency $line->fk_multicurrency = $objp->fk_multicurrency; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 1cbacadc7ea..079a81e8b6e 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2023 Nick Fragoulis * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Alexandre Spangaro + * Copyright (C) 2024-2026 Alexandre Spangaro * * 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 @@ -2359,5 +2359,5 @@ abstract class CommonInvoiceLine extends CommonObjectLine /** * @var int */ - public $fk_accounting_account; + public $fk_code_ventilation; } diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 7f85b8d3155..2ab037ed6ca 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -1,15 +1,15 @@ - * Copyright (C) 2010-2011 Laurent Destailleur - * Copyright (C) 2012-2013 Christophe Battarel - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2017 Juanjo Menent - * Copyright (C) 2022 OpenDSI - * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Alexandre Spangaro - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2010-2013 Regis Houssin + * Copyright (C) 2010-2011 Laurent Destailleur + * Copyright (C) 2012-2013 Christophe Battarel + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2017 Juanjo Menent + * Copyright (C) 2022 OpenDSI + * Copyright (C) 2024-2025 MDW + * Copyright (C) 2024-2026 Alexandre Spangaro + * Copyright (C) 2024 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 @@ -308,9 +308,9 @@ if (empty($reshook)) { } } -if (isModEnabled('accounting') && !empty($line->fk_accounting_account) && $line->fk_accounting_account > 0) { +if (isModEnabled('accounting') && !empty($line->fk_code_ventilation) && $line->fk_code_ventilation > 0) { $accountingaccount = new AccountingAccount($this->db); - $accountingaccount->fetch($line->fk_accounting_account); + $accountingaccount->fetch($line->fk_code_ventilation); print '

'.$langs->trans('AccountingAffectation').' : '.$accountingaccount->getNomUrl(0, 1, 1); } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 77bd73fa730..7b4ac75ba9d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Bahfir Abbes * Copyright (C) 2015-2022 Ferran Marcet - * Copyright (C) 2016-2023 Alexandre Spangaro + * Copyright (C) 2016-2026 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2022 Gauthier VERDOL @@ -1118,7 +1118,7 @@ class FactureFournisseur extends CommonInvoice $line->extraparams = !empty($obj->extraparams) ? (array) json_decode($obj->extraparams, true) : array(); // Accountancy - $line->fk_accounting_account = $obj->fk_code_ventilation; + $line->fk_code_ventilation = $obj->fk_code_ventilation; // Multicurrency $line->fk_multicurrency = $obj->fk_multicurrency;