|
@@ -1251,7 +1251,8 @@ class Reception extends CommonObject
|
|
|
*/
|
|
|
public function getNomUrl($withpicto = 0, $option = 0, $max = 0, $short = 0, $notooltip = 0)
|
|
|
{
|
|
|
- global $conf, $langs, $hookmanager;
|
|
|
+ global $langs, $hookmanager;
|
|
|
+
|
|
|
$result = '';
|
|
|
$label = img_picto('', $this->picto).' <u>'.$langs->trans("Reception").'</u>';
|
|
|
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
|
|
@@ -1356,6 +1357,44 @@ class Reception extends CommonObject
|
|
|
return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Return clicable link of object (with eventually picto)
|
|
|
+ *
|
|
|
+ * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
|
|
+ * @param array $arraydata Array of data
|
|
|
+ * @return string HTML Code for Kanban thumb.
|
|
|
+ */
|
|
|
+ public function getKanbanView($option = '', $arraydata = null)
|
|
|
+ {
|
|
|
+ global $langs, $conf;
|
|
|
+
|
|
|
+ $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
|
|
|
+
|
|
|
+ $return = '<div class="box-flex-item box-flex-grow-zero">';
|
|
|
+ $return .= '<div class="info-box info-box-sm">';
|
|
|
+ $return .= '<div class="info-box-icon bg-infobox-action">';
|
|
|
+ $return .= img_picto('', 'order');
|
|
|
+ $return .= '</div>';
|
|
|
+ $return .= '<div class="info-box-content">';
|
|
|
+ $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
|
|
+ if ($selected >= 0) {
|
|
|
+ $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
|
|
+ }
|
|
|
+ if (property_exists($this, 'thirdparty') && is_object($this->thirdparty)) {
|
|
|
+ $return .= '<br><div class="info-box-ref tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).'</div>';
|
|
|
+ }
|
|
|
+ if (property_exists($this, 'total_ht')) {
|
|
|
+ $return .= '<div class="info-box-ref amount">'.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency).' '.$langs->trans('HT').'</div>';
|
|
|
+ }
|
|
|
+ if (method_exists($this, 'getLibStatut')) {
|
|
|
+ $return .= '<div class="info-box-status">'.$this->getLibStatut(3).'</div>';
|
|
|
+ }
|
|
|
+ $return .= '</div>';
|
|
|
+ $return .= '</div>';
|
|
|
+ $return .= '</div>';
|
|
|
+ return $return;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Initialise an instance with random values.
|
|
|
* Used to build previews or test instances.
|