diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index b738933c89c..127f1795e19 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -425,7 +425,6 @@ if ($result) {
$objp->code_sell_l = '';
$objp->code_sell_p = '';
- $objp->aarowid_suggest = '';
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
@@ -437,7 +436,7 @@ if ($result) {
$facture_static->type = $objp->ftype;
$code_sell_p_notset = '';
- $objp->aarowid_suggest = $objp->aarowid;
+ $objp->aarowid_suggest = ''; // Will be set later
$isBuyerInEEC = isInEEC($objp);
@@ -471,8 +470,9 @@ if ($result) {
}
if ($objp->code_sell_l == -1) $objp->code_sell_l='';
+ // Search suggested account for product/service
$suggestedaccountingaccountfor = '';
- if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
+ if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country)
$objp->code_sell_p = $objp->code_sell;
$objp->aarowid_suggest = $objp->aarowid;
$suggestedaccountingaccountfor = '';
@@ -561,12 +561,19 @@ if ($result) {
// Suggested accounting account
print '