Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
parent
1f87f515ad
commit
98b686b531
@ -366,6 +366,7 @@ class Contrat extends CommonObject
|
||||
* @param int|string $date_start Date start (now if empty)
|
||||
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
|
||||
* @param string $comment Comment
|
||||
* @param int|string $date_end Date end
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @see ()
|
||||
*/
|
||||
|
||||
@ -8664,17 +8664,17 @@ class Form
|
||||
|
||||
$possiblelinks = array(
|
||||
'propal'=>array(
|
||||
'enabled'=>(!empty($conf->propal->enabled) ? $conf->propal->enabled : 0),
|
||||
'enabled'=>isModEnabled('propal'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToProposal',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('propal').')'),
|
||||
'shipping'=>array(
|
||||
'enabled'=>$conf->expedition->enabled,
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToExpedition',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."expedition as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('shipping').')'),
|
||||
'shipping'=>array(
|
||||
'enabled'=>isModEnabled('expedition'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToExpedition',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."expedition as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('shipping').')'),
|
||||
'order'=>array(
|
||||
'enabled'=>(!empty($conf->commande->enabled) ? $conf->commande->enabled : 0),
|
||||
'enabled'=>isModEnabled('commande'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToOrder',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande').')'),
|
||||
@ -8689,14 +8689,14 @@ class Form
|
||||
'label'=>'LinkToTemplateInvoice',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.titre as ref, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."facture_rec as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||
'contrat'=>array(
|
||||
'enabled'=>(!empty($conf->contrat->enabled) ? $conf->contrat->enabled : 0),
|
||||
'enabled'=>isModEnabled('contrat'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToContract',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_customer as ref_client, t.ref_supplier, SUM(td.total_ht) as total_ht
|
||||
FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."contrat as t, ".$this->db->prefix()."contratdet as td WHERE t.fk_soc = s.rowid AND td.fk_contrat = t.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('contract').') GROUP BY s.rowid, s.nom, s.client, t.rowid, t.ref, t.ref_customer, t.ref_supplier'
|
||||
),
|
||||
'fichinter'=>array(
|
||||
'enabled'=>(!empty($conf->ficheinter->enabled) ? $conf->ficheinter->enabled : 0),
|
||||
'enabled'=>isModEnabled('ficheinter'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToIntervention',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('intervention').')'),
|
||||
@ -8715,12 +8715,12 @@ class Form
|
||||
'perms'=>1, 'label'=>'LinkToSupplierInvoice',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('facture_fourn').')'),
|
||||
'ticket'=>array(
|
||||
'enabled'=>(!empty($conf->ticket->enabled) ? $conf->ticket->enabled : 0),
|
||||
'enabled'=>isModEnabled('ticket'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToTicket',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.track_id, '0' as total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."ticket as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('ticket').')'),
|
||||
'mo'=>array(
|
||||
'enabled'=>(!empty($conf->mrp->enabled) ? $conf->mrp->enabled : 0),
|
||||
'enabled'=>isModEnabled('mrp'),
|
||||
'perms'=>1,
|
||||
'label'=>'LinkToMo',
|
||||
'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.rowid, '0' as total_ht FROM ".$this->db->prefix()."societe as s INNER JOIN ".$this->db->prefix()."mrp_mo as t ON t.fk_soc = s.rowid WHERE t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('mo').')')
|
||||
|
||||
@ -735,8 +735,7 @@ if (!empty($conf->global->MEMBER_SKIP_TABLE) || !empty($conf->global->MEMBER_NEW
|
||||
print "</form>\n";
|
||||
print "<br>";
|
||||
print '</div></div>';
|
||||
}
|
||||
else { // Show the table of membership types
|
||||
} else { // Show the table of membership types
|
||||
// Get units
|
||||
$measuringUnits = new CUnits($db);
|
||||
$result = $measuringUnits->fetchAll('', '', 0, 0, array('t.active' => 1));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user