$this->export_dependencies_array[$r]=array('payment'=>'p.rowid');// To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
// Add extra fields
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'facture'";