From 452f7be441b71b5ff9151e2bfc65316f38cf19d3 Mon Sep 17 00:00:00 2001
From: Maxime Kohlhaas <maxime@atm-consulting.fr>
Date: Tue, 30 Aug 2016 14:44:35 +0200
Subject: [PATCH] Fix migration for entity in remise table

---
 htdocs/install/upgrade2.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 8db34216f18..cde5b8e199e 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -3692,7 +3692,7 @@ function migrate_remise_entity($db,$langs,$conf)
 	$db->begin();
 
 	$sqlSelect = "SELECT sr.rowid, s.entity";
-	$sqlSelect.= " FROM ".MAIN_DB_PREFIX."societe_remise as sr, ".MAIN_DB_PREFIX."societe as s";
+	$sqlSelect.= " FROM ".MAIN_DB_PREFIX."societe_remise_except as sr, ".MAIN_DB_PREFIX."societe as s";
 	$sqlSelect.= " WHERE sr.fk_soc = s.rowid and sr.entity != s.entity";
 
 	//print $sqlSelect;
-- 
GitLab