FIX #36735 Invoice & Supplier invoice - Inconsistency of fk_code_ventilation for lines (FactureLigne & SupplierInvoiceLine) (#36792)
This commit is contained in:
parent
70a03a60a5
commit
39b251f3ca
4 changed files with 19 additions and 19 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016-2025 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Sylvain Legrand <contact@infras.fr>
|
||||
* Copyright (C) 2022-2023 Solution Libre SAS <contact@solution-libre.fr>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* 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 '<div class="clearboth"></div><br><span class="opacitymedium">'.$langs->trans('AccountingAffectation').' : </span>'.$accountingaccount->getNomUrl(0, 1, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
* Copyright (C) 2014-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||
* Copyright (C) 2015-2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2016-2026 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue