瀏覽代碼

MMICore tooltip for supplier order with supplier name

Mathieu Moulin 2 年之前
父節點
當前提交
3b91fab419

+ 1 - 2
htdocs/commande/card.php

@@ -2861,10 +2861,9 @@ if ($action == 'create' && $usercancreate) {
 			$compatibleImportElementsList = false;
 			if ($usercancreate
 				&& $object->statut == Commande::STATUS_DRAFT) {
-				$compatibleImportElementsList = array('commande', 'propal'); // import from linked elements
+				$compatibleImportElementsList = array('commande', 'propal', 'order_supplier'); // import from linked elements
 			}
 			$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, $compatibleImportElementsList);
-
 			// Show online payment link
 			$useonlinepayment = (!empty($conf->paypal->enabled) || !empty($conf->stripe->enabled) || !empty($conf->paybox->enabled));
 			// Added by MMI Mathieu Moulin iProspective

+ 1 - 1
htdocs/core/class/html.form.class.php

@@ -8646,7 +8646,7 @@ class Form
 						global $noMoreLinkedObjectBlockAfter;
 						$noMoreLinkedObjectBlockAfter = 1;
 					}
-
+					//var_dump($reldir.'/'.$tplname.'.tpl.php'); var_dump($linkedObjectBlock);
 					$res = @include dol_buildpath($reldir.'/'.$tplname.'.tpl.php');
 					if ($res) {
 						$nboftypesoutput++;

+ 4 - 0
htdocs/fourn/class/fournisseur.commande.class.php

@@ -841,6 +841,10 @@ class CommandeFournisseur extends CommonOrder
 			if (isset($this->statut)) {
 				$label .= ' '.$this->getLibStatut(5);
 			}
+			$this->fetch_thirdparty();
+			if (!empty($this->thirdparty)) {
+				$label .= '<br><b>'.$langs->trans('Societe').':</b> '.$this->thirdparty->name;
+			}
 			if (!empty($this->ref)) {
 				$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
 			}

+ 1 - 1
htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php

@@ -46,7 +46,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
 	?>
 	<tr class="<?php echo $trclass; ?>">
 		<td><?php echo $langs->trans("SupplierOrder"); ?></td>
-		<td><a href="<?php echo DOL_URL_ROOT.'/fourn/commande/card.php?id='.$objectlink->id ?>"><?php echo img_object($langs->trans("ShowOrder"), "order").' '.$objectlink->ref; ?></a></td>
+		<td><?php echo $objectlink->getNomUrl(1); ?></td>
 		<td class="left"><?php echo $objectlink->ref_supplier; ?></td>
 		<td class="center"><?php echo dol_print_date($objectlink->date, 'day'); ?></td>
 		<td class="right"><?php