22 if (empty($conf) || !is_object($conf)) {
23 print
"Error, template page can't be called as URL";
27 print
"<!-- BEGIN PHP TEMPLATE mrp/tpl/linkedobjectblock.tpl.php -->\n";
30 global $noMoreLinkedObjectBlockAfter;
32 $langs = $GLOBALS[
'langs'];
33 $linkedObjectBlock = $GLOBALS[
'linkedObjectBlock'];
34 $object = $GLOBALS[
'object'];
42 $mo_static =
new Mo($db);
43 $res = $mo_static->fetch($object->id);
44 $TMoChilds = $mo_static->getMoChilds();
46 foreach ($TMoChilds as $key => $objectlink) {
51 echo
'<tr class="'.$trclass.
'" >';
52 echo
'<td class="linkedcol-element" >'.$langs->trans(
"ManufacturingOrder");
53 if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
54 print
'<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0,
'', 0, 1).
'&action=selectlines" data-element="'.$objectlink->element.
'" data-id="'.$objectlink->id.
'" > <i class="fa fa-indent"></i> </a';
57 echo
'<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).
'</td>';
59 echo
'<td class="linkedcol-ref" align="center">';
62 echo
'<td class="linkedcol-date" align="center">'.dol_print_date($objectlink->date_creation,
'day').
'</td>';
63 echo
'<td class="linkedcol-amount right">-</td>';
64 echo
'<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).
'</td>';
65 echo
'<td class="linkedcol-action right">';
68 $sql =
" Select rowid from " . MAIN_DB_PREFIX .
"element_element";
69 $sql .=
" WHERE fk_source = ". (int) $object->id .
" and fk_target = '" .
dol_escape_htmltag($key) .
"'";
74 $obj = $db->fetch_object(
$resql);
75 if ($obj->rowid && $obj->rowid > 0 ) $k = $obj->rowid;
77 echo
'<a class="reposition" href="' . $_SERVER[
"PHP_SELF"] .
'?id=' . $object->id .
'&action=dellink&token=' .
newToken() .
'&dellinkid=' . $k .
'">' .
img_picto($langs->transnoentitiesnoconv(
"RemoveLink"),
'unlink') .
'</a>';
82 echo
"<!-- END PHP TEMPLATE -->\n";
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
if(isModEnabled('facture')&&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur')&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)&&$user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice')&&$user->rights->supplier_invoice->lire)) if(isModEnabled('don')&&!empty($user->rights->don->lire)) if(isModEnabled('tax')&&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture')&&isModEnabled('commande')&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
newToken()
Return the value of token currently saved into session with name 'newtoken'.