Skip to content

Commit

Permalink
FIX : We want to be able to import data for extrafields of entity 0 too
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-gauthier committed Jan 13, 2020
1 parent 1292575 commit 5455130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion htdocs/core/modules/modSociete.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public function __construct($db)
's.multicurrency_code' => 'MulticurrencyCurrency'
);
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM " . MAIN_DB_PREFIX . "extrafields WHERE elementtype = 'societe' AND entity = " . $conf->entity;
$sql = "SELECT name, label, fieldrequired FROM " . MAIN_DB_PREFIX . "extrafields WHERE elementtype = 'societe' AND entity IN (0," . $conf->entity .")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
Expand Down

0 comments on commit 5455130

Please sign in to comment.