|
@@ -326,14 +326,18 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|
|
$morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1);
|
|
|
$morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1);*/
|
|
|
// Thirdparty
|
|
|
- $morehtmlref .= $object->thirdparty->getNomUrl(1, 'customer');
|
|
|
- if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
|
|
- $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)';
|
|
|
+ if (is_object($object->thirdparty)) {
|
|
|
+ $morehtmlref .= $object->thirdparty->getNomUrl(1, 'customer');
|
|
|
+ if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
|
|
+ $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)';
|
|
|
+ }
|
|
|
}
|
|
|
// Project
|
|
|
if (isModEnabled('project')) {
|
|
|
$langs->load("projects");
|
|
|
- $morehtmlref .= '<br>';
|
|
|
+ if (is_object($object->thirdparty)) {
|
|
|
+ $morehtmlref .= '<br>';
|
|
|
+ }
|
|
|
if ($permissiontoadd) {
|
|
|
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
|
|
|
if ($action != 'classify') {
|
|
@@ -619,13 +623,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|
|
if (!empty($arrayfields['p.ref']['checked'])) {
|
|
|
// Product Ref
|
|
|
print '<td class="liste_titre left">';
|
|
|
- print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($idproduct ? $product->ref : $search_product_ref).'">';
|
|
|
+ print '<input class="flat maxwidth75" type="text" name="search_product_ref" value="'.dol_escape_htmltag($search_product_ref).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
if (!empty($arrayfields['p.label']['checked'])) {
|
|
|
// Product label
|
|
|
print '<td class="liste_titre left">';
|
|
|
- print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($idproduct ? $product->label : $search_product).'">';
|
|
|
+ print '<input class="flat maxwidth100" type="text" name="search_product" value="'.dol_escape_htmltag($search_product).'">';
|
|
|
print '</td>';
|
|
|
}
|
|
|
// Batch
|