From 3d23322556a9c3f8bee1d5080e3a7f6e2bf852ff Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 08:59:44 +0100 Subject: [PATCH 1/2] FIX: bad accountancy code autoselection for supplier ventilation --- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/supplier/list.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 8e5f7690dd1..22713357ff8 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -839,7 +839,7 @@ class AccountingAccount extends CommonObject } $suggestedid = $accountingAccount['dom']; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ? $suggestedaccountingaccountfor = 'eecwithoutvatnumber'; - } elseif ($isSellerInEEC && $isBuyerInEEC && !empty($product->accountancy_code_sell_intra)) { + } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale if ($type == 'customer' && !empty($product->accountancy_code_sell_intra)) { $code_p = $product->accountancy_code_sell_intra; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index aae34a51e03..85f64242c64 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -623,6 +623,7 @@ if ($result) { $code_buy_t=$return['code_t']; } //var_dump($return); + //exit; if (!empty($code_buy_p)) { // Value was defined previously From 39d986ae591d64b892ce44c7d3bff2534229271f Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Dec 2023 09:00:39 +0100 Subject: [PATCH 2/2] FIX: bad accountancy code autoselection for supplier ventilation --- htdocs/accountancy/supplier/list.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 85f64242c64..aae34a51e03 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -623,7 +623,6 @@ if ($result) { $code_buy_t=$return['code_t']; } //var_dump($return); - //exit; if (!empty($code_buy_p)) { // Value was defined previously