$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.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'";
$resql=$this->db->query($sql);
if($resql)// This can fail when class is used on old database (during migration for example)
$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'";
$resql=$this->db->query($sql);
if($resql)// This can fail when class is used on old database (during migration for example)