NEW add objectLink expedition
This commit is contained in:
parent
dee5d8f9e8
commit
8c0b1efce4
@ -8414,7 +8414,7 @@ class Form
|
|||||||
if (empty($conf->supplier_proposal->enabled)) {
|
if (empty($conf->supplier_proposal->enabled)) {
|
||||||
continue; // Do not show if module disabled
|
continue; // Do not show if module disabled
|
||||||
}
|
}
|
||||||
} elseif ($objecttype == 'shipping' || $objecttype == 'shipment') {
|
} elseif ($objecttype == 'shipping' || $objecttype == 'shipment' || $objecttype == 'expedition') {
|
||||||
$tplpath = 'expedition';
|
$tplpath = 'expedition';
|
||||||
if (empty($conf->expedition->enabled)) {
|
if (empty($conf->expedition->enabled)) {
|
||||||
continue; // Do not show if module disabled
|
continue; // Do not show if module disabled
|
||||||
@ -8533,6 +8533,7 @@ class Form
|
|||||||
|
|
||||||
$possiblelinks = array(
|
$possiblelinks = array(
|
||||||
'propal'=>array('enabled'=>$conf->propal->enabled, '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').')'),
|
'propal'=>array('enabled'=>$conf->propal->enabled, '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').')'),
|
||||||
'order'=>array('enabled'=>$conf->commande->enabled, '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').')'),
|
'order'=>array('enabled'=>$conf->commande->enabled, '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').')'),
|
||||||
'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', '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()."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', '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()."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'),
|
||||||
'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, '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').')'),
|
'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, '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').')'),
|
||||||
|
|||||||
@ -2551,8 +2551,8 @@ if ($action == 'create') {
|
|||||||
|
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
//$linktoelem = $form->showLinkToObjectBlock($object, null, array('order'));
|
$linktoelem = $form->showLinkToObjectBlock($object, null, array('shipping'));
|
||||||
$somethingshown = $form->showLinkedObjectBlock($object, '');
|
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichehalfright">';
|
print '</div><div class="fichehalfright">';
|
||||||
|
|||||||
@ -60,8 +60,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
|
|||||||
// For now, shipments must stay linked to order, so link is not deletable
|
// For now, shipments must stay linked to order, so link is not deletable
|
||||||
if ($object->element != 'commande') {
|
if ($object->element != 'commande') {
|
||||||
?>
|
?>
|
||||||
<a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
|
<a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td> <?php
|
||||||
<?php
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@ -799,6 +799,7 @@ URLPhoto=URL of photo/logo
|
|||||||
SetLinkToAnotherThirdParty=Link to another third party
|
SetLinkToAnotherThirdParty=Link to another third party
|
||||||
LinkTo=Link to
|
LinkTo=Link to
|
||||||
LinkToProposal=Link to proposal
|
LinkToProposal=Link to proposal
|
||||||
|
LinkToExpedition= Link to expedition
|
||||||
LinkToOrder=Link to order
|
LinkToOrder=Link to order
|
||||||
LinkToInvoice=Link to invoice
|
LinkToInvoice=Link to invoice
|
||||||
LinkToTemplateInvoice=Link to template invoice
|
LinkToTemplateInvoice=Link to template invoice
|
||||||
|
|||||||
@ -799,6 +799,7 @@ URLPhoto=URL de la photo/logo
|
|||||||
SetLinkToAnotherThirdParty=Lier vers un autre tiers
|
SetLinkToAnotherThirdParty=Lier vers un autre tiers
|
||||||
LinkTo=Lier à
|
LinkTo=Lier à
|
||||||
LinkToProposal=Lier à une proposition commerciale
|
LinkToProposal=Lier à une proposition commerciale
|
||||||
|
LinkToExpedition=Lier à une expédition
|
||||||
LinkToOrder=Lier à une commande
|
LinkToOrder=Lier à une commande
|
||||||
LinkToInvoice=Lier à une facture
|
LinkToInvoice=Lier à une facture
|
||||||
LinkToTemplateInvoice=Lien vers le modèle de facture
|
LinkToTemplateInvoice=Lien vers le modèle de facture
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user