Merge pull request #5135 from atm-alexis/develop_NEW_allow_link_project
NEW allow a document to be linked to project from another customer
This commit is contained in:
commit
d2df537d43
@ -138,7 +138,7 @@ class FormProjets
|
|||||||
$sql.= " WHERE p.entity IN (".getEntity('project', 1).")";
|
$sql.= " WHERE p.entity IN (".getEntity('project', 1).")";
|
||||||
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||||
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
||||||
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
if ($socid > 0 && empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
||||||
if (!empty($filterkey)) {
|
if (!empty($filterkey)) {
|
||||||
$sql .= ' AND p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
$sql .= ' AND p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||||
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
|
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||||
@ -204,7 +204,7 @@ class FormProjets
|
|||||||
if ($discard_close == 2) $disabled=1;
|
if ($discard_close == 2) $disabled=1;
|
||||||
$labeltoshow.=' - '.$langs->trans("Closed");
|
$labeltoshow.=' - '.$langs->trans("Closed");
|
||||||
}
|
}
|
||||||
else if ($socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
else if ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
|
||||||
{
|
{
|
||||||
$disabled=1;
|
$disabled=1;
|
||||||
$labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany");
|
$labeltoshow.=' - '.$langs->trans("LinkedToAnotherCompany");
|
||||||
|
|||||||
@ -68,6 +68,7 @@ SearchFilter=Search filters options
|
|||||||
NumberOfKeyToSearch=Nbr of characters to trigger search: %s
|
NumberOfKeyToSearch=Nbr of characters to trigger search: %s
|
||||||
ViewFullDateActions=Show full dates events in the third sheet
|
ViewFullDateActions=Show full dates events in the third sheet
|
||||||
NotAvailableWhenAjaxDisabled=Not available when Ajax disabled
|
NotAvailableWhenAjaxDisabled=Not available when Ajax disabled
|
||||||
|
AllowToSelectProjectFromOtherCompany=In document, allow to link it to project from another company
|
||||||
JavascriptDisabled=JavaScript disabled
|
JavascriptDisabled=JavaScript disabled
|
||||||
UsePopupCalendar=Use popup for dates input
|
UsePopupCalendar=Use popup for dates input
|
||||||
UsePreviewTabs=Use preview tabs
|
UsePreviewTabs=Use preview tabs
|
||||||
|
|||||||
@ -933,7 +933,22 @@ else
|
|||||||
print '<input type="submit" class="button" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
}
|
}
|
||||||
print '</tr></table></form>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td>'.$langs->trans("AllowToSelectProjectFromOtherCompany").'</td>';
|
||||||
|
|
||||||
|
print '<td align="center" width="300">';
|
||||||
|
echo ajax_constantonoff('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY');
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="center" width="20"> </td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print '</table></form>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user