Fix: used field entity of document
This commit is contained in:
parent
e997af242b
commit
3dcfd254d5
@ -175,7 +175,7 @@ class modCommande extends DolibarrModules
|
||||
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'commandedet as cd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)';
|
||||
$this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ class modFacture extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement as p ON pf.fk_paiement = p.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity;
|
||||
$r++;
|
||||
}
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ class modFicheinter extends DolibarrModules
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'fichinter as f, '.MAIN_DB_PREFIX.'fichinterdet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_fichinter';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity;
|
||||
$r++;
|
||||
|
||||
}
|
||||
|
||||
@ -263,7 +263,7 @@ class modFournisseur extends DolibarrModules
|
||||
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity;
|
||||
|
||||
$r++;
|
||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
@ -279,7 +279,7 @@ class modFournisseur extends DolibarrModules
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid';
|
||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -153,7 +153,7 @@ class modPropale extends DolibarrModules
|
||||
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'propal as c, '.MAIN_DB_PREFIX.'propaldet as cd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (cd.fk_product = p.rowid)';
|
||||
$this->export_sql_end[$r] .=' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal';
|
||||
$this->export_sql_end[$r] .=' AND s.entity = '.$conf->entity;
|
||||
$this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user