Use 2 distinct left menu entries for leads and projects
This commit is contained in:
parent
6ed67ea77f
commit
771922f427
@ -627,9 +627,10 @@ class FormProjets
|
||||
{
|
||||
$sellist = '<select class="flat oppstatus'.($morecss?' '.$morecss:'').'" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
if ($showempty) $sellist.= '<option value="-1"> </option>'; // Without  , strange move of screen when switching value
|
||||
if ($showallnone) $sellist.= '<option value="all"'.($preselected == 'all'?' selected="selected"':'').'>--'.$langs->trans("OnlyOpportunitiesShort").'--</option>';
|
||||
if ($showallnone) $sellist.= '<option value="openedopp"'.($preselected == 'openedopp'?' selected="selected"':'').'>--'.$langs->trans("OpenedOpportunitiesShort").'--</option>';
|
||||
if ($showallnone) $sellist.= '<option value="none"'.($preselected == 'none'?' selected="selected"':'').'>--'.$langs->trans("NotAnOpportunityShort").'--</option>';
|
||||
if ($showallnone) $sellist.= '<option value="all"'.($preselected == 'all'?' selected="selected"':'').'>-- '.$langs->trans("OnlyOpportunitiesShort").' --</option>';
|
||||
if ($showallnone) $sellist.= '<option value="openedopp"'.($preselected == 'openedopp'?' selected="selected"':'').'>-- '.$langs->trans("OpenedOpportunitiesShort").' --</option>';
|
||||
if ($showallnone) $sellist.= '<option value="notopenedopp"'.($preselected == 'notopenedopp'?' selected="selected"':'').'>-- '.$langs->trans("NotOpenedOpportunitiesShort").' --</option>';
|
||||
if ($showallnone) $sellist.= '<option value="none"'.($preselected == 'none'?' selected="selected"':'').'>-- '.$langs->trans("NotAnOpportunityShort").' --</option>';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
@ -305,10 +305,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2650__+MAX_llx_menu__, 'accountancy', 'cat', 14__+MAX_llx_menu__, '/categories/index.php?leftmenu=bank&type=5', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 2651__+MAX_llx_menu__, 'accountancy', '', 2650__+MAX_llx_menu__, '/categories/card.php?leftmenu=bank&action=create&type=5', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__);
|
||||
-- Project
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'Projects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'NewProject', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3600__+MAX_llx_menu__, 'project', 'projects', 7__+MAX_llx_menu__, '/projet/index.php?leftmenu=projects', 'LeadsOrProjects', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3601__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/card.php?leftmenu=projects&action=create', 'New', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3602__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects', 'List', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3603__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/stats/index.php?leftmenu=projects', 'Statistics', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled && $conf->global->PROJECT_USE_OPPORTUNITIES != 0', __HANDLER__, 'left', 3603__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&search_opp_status=openedopp&search_status=99', 'ListOpenLeads', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled && $conf->global->PROJECT_USE_OPPORTUNITIES != 2', __HANDLER__, 'left', 3604__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/list.php?leftmenu=projects&search_opp_status=notopenedopp&search_status=99', 'ListOpenProjects', 1, 'projects', '$user->rights->projet->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled', __HANDLER__, 'left', 3605__+MAX_llx_menu__, 'project', '', 3600__+MAX_llx_menu__, '/projet/stats/index.php?leftmenu=projects', 'Statistics', 1, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__);
|
||||
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled && !$conf->global->PROJECT_HIDE_TASKS', __HANDLER__, 'left', 3700__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/index.php?leftmenu=projects', 'Activities', 0, 'projects', '$user->rights->projet->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled && !$conf->global->PROJECT_HIDE_TASKS', __HANDLER__, 'left', 3701__+MAX_llx_menu__, 'project', '', 3700__+MAX_llx_menu__, '/projet/tasks.php?leftmenu=projects&action=create', 'NewTask', 1, 'projects', '$user->rights->projet->creer', '', 2, 1, __ENTITY__);
|
||||
|
||||
@ -236,7 +236,21 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
||||
else $classname = 'class="tmenu"';
|
||||
$idsel='project';
|
||||
|
||||
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $langs->trans("Projects"), 0, $showmode, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||
$title = $langs->trans("LeadsOrProjects"); // Leads and opportunities by default
|
||||
$showmodel = $showmodep = $showmode;
|
||||
if (empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
$title = $langs->trans("Projects");
|
||||
$showmodel = 0;
|
||||
}
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) {
|
||||
$title = $langs->trans("Leads");
|
||||
$showmodep = 0;
|
||||
}
|
||||
|
||||
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $title, 0, $showmode, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=openedopp', $langs->trans("ListLeads"), 0, $showmodel & $conf->global->PROJECT_USE_OPPORTUNITIES, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||
//$menu->add('/projet/index.php?mainmenu=project&leftmenu=&search_opp_status=notopenedopp', $langs->trans("ListProjects"), 0, $showmodep, $atarget, "project", '', 70, $id, $idsel, $classname);
|
||||
}
|
||||
|
||||
// HRM
|
||||
@ -1338,17 +1352,42 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
|
||||
$search_project_user = GETPOST('search_project_user','int');
|
||||
|
||||
$tmpentry=array('enabled'=>(! empty($conf->projet->enabled)),
|
||||
'perms'=>(! empty($user->rights->projet->lire)),
|
||||
'module'=>'projet');
|
||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
|
||||
$titleboth=$langs->trans("LeadsOrProjects");
|
||||
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0)
|
||||
{
|
||||
$titleboth=$langs->trans("Projects");
|
||||
$titlenew = $langs->trans("NewProject");
|
||||
}
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
$titleboth=$langs->trans("Leads");
|
||||
$titlenew = $langs->trans("NewLead");
|
||||
}
|
||||
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("Projects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects".($search_project_user?'&search_project_user='.$search_project_user:'')."&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user?'&search_project_user='.$search_project_user:''), $titleboth, 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user?'&search_project_user='.$search_project_user:''), $titlenew, 1, $user->rights->projet->creer);
|
||||
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0)
|
||||
{
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user?'&search_project_user='.$search_project_user:'').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
}
|
||||
elseif ($conf->global->PROJECT_USE_OPPORTUNITIES == 1)
|
||||
{
|
||||
$newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99&contextpage=lead', $langs->trans("ListOpenLeads"), 2, $showmode);
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=notopenedopp&search_status=99&contextpage=project', $langs->trans("ListOpenProjects"), 2, $showmode);
|
||||
}
|
||||
elseif ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99', $langs->trans("List"), 2, $showmode);
|
||||
}
|
||||
|
||||
// All project i have permission on
|
||||
/*
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
*/
|
||||
$newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire);
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
@ -1360,13 +1399,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire);
|
||||
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user?'&search_project_user='.$search_project_user:''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
/*$newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/list.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/perweek.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->lire);
|
||||
*/
|
||||
}
|
||||
|
||||
// Categories
|
||||
|
||||
@ -36,7 +36,6 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
*/
|
||||
class modProjet extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
@ -361,7 +360,7 @@ class modProjet extends DolibarrModules
|
||||
$sql[] ="INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('beluga','project',".$conf->entity.")";
|
||||
$sql[] ="DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = 'baleine' AND type = 'project' AND entity = ".$conf->entity;
|
||||
$sql[] ="INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('baleine','project',".$conf->entity.")";
|
||||
|
||||
|
||||
|
||||
return $this->_init($sql,$options);
|
||||
}
|
||||
|
||||
@ -550,8 +550,8 @@ Module320Name=RSS Feed
|
||||
Module320Desc=Add RSS feed inside Dolibarr screen pages
|
||||
Module330Name=Bookmarks and shortcuts
|
||||
Module330Desc=Create shortcuts, always accessible, to the internal or external pages to which you frequently access
|
||||
Module400Name=Projects/Opportunities/Leads
|
||||
Module400Desc=Management of projects, opportunities/leads and/or tasks. You can also assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view.
|
||||
Module400Name=Projects or Leads
|
||||
Module400Desc=Management of projects, leads/opportunities and/or tasks. You can also assign any element (invoice, order, proposal, intervention, ...) to a project and get a transversal view from the project view.
|
||||
Module410Name=Webcalendar
|
||||
Module410Desc=Webcalendar integration
|
||||
Module500Name=Taxes and Special expenses
|
||||
@ -916,7 +916,7 @@ DictionaryEMailTemplates=Email Templates
|
||||
DictionaryUnits=Units
|
||||
DictionaryProspectStatus=Prospection status
|
||||
DictionaryHolidayTypes=Types of leaves
|
||||
DictionaryOpportunityStatus=Opportunity status for project/lead
|
||||
DictionaryOpportunityStatus=Lead status for project/lead
|
||||
DictionaryExpenseTaxCat=Expense report - Transportation categories
|
||||
DictionaryExpenseTaxRange=Expense report - Range by transportation category
|
||||
SetupSaved=Setup saved
|
||||
@ -1726,7 +1726,7 @@ PositionIntoComboList=Position of line into combo lists
|
||||
SellTaxRate=Sale tax rate
|
||||
RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases.
|
||||
UrlTrackingDesc=If the provider or transport service offer a page or web site to check status of your shipping, you can enter it here. You can use the key {TRACKID} into URL parameters so the system will replace it with value of tracking number user entered into shipment card.
|
||||
OpportunityPercent=When you create an opportunity, you will define an estimated amount of project/lead. According to status of opportunity, this amount may be multiplied by this rate to evaluate global amount all your opportunities may generate. Value is percent (between 0 and 100).
|
||||
OpportunityPercent=When you create a lead, you will define an estimated amount of project/lead. According to status of lead, this amount may be multiplied by this rate to evaluate global amount all your opportunities may generate. Value is percent (between 0 and 100).
|
||||
TemplateForElement=This template record is dedicated to which element
|
||||
TypeOfTemplate=Type of template
|
||||
TemplateIsVisibleByOwnerOnly=Template is visible by owner only
|
||||
|
||||
@ -173,7 +173,7 @@ ErrorGlobalVariableUpdater4=SOAP client failed with error '%s'
|
||||
ErrorGlobalVariableUpdater5=No global variable selected
|
||||
ErrorFieldMustBeANumeric=Field <b>%s</b> must be a numeric value
|
||||
ErrorMandatoryParametersNotProvided=Mandatory parameter(s) not provided
|
||||
ErrorOppStatusRequiredIfAmount=You set an estimated amount for this opportunity/lead. So you must also enter its status
|
||||
ErrorOppStatusRequiredIfAmount=You set an estimated amount for this lead/lead. So you must also enter its status
|
||||
ErrorFailedToLoadModuleDescriptorForXXX=Failed to load module descriptor class for %s
|
||||
ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In Module Descriptor (bad value for key fk_menu)
|
||||
ErrorSavingChanges=An error has occurred when saving the changes
|
||||
|
||||
@ -860,6 +860,13 @@ EMailTemplates=Email templates
|
||||
FileNotShared=File not shared to external public
|
||||
Project=Project
|
||||
Projects=Projects
|
||||
LeadOrProject=Lead | Project
|
||||
LeadsOrProjects=Leads | Projects
|
||||
Lead=Lead
|
||||
Leads=Leads
|
||||
ListOpenLeads=List open leads
|
||||
ListOpenProjects=List open projects
|
||||
NewLeadOrProject=New lead or project
|
||||
Rights=Permissions
|
||||
LineNb=Line no.
|
||||
IncotermLabel=Incoterms
|
||||
|
||||
@ -33,8 +33,8 @@ ConfirmDeleteAProject=Are you sure you want to delete this project?
|
||||
ConfirmDeleteATask=Are you sure you want to delete this task?
|
||||
OpenedProjects=Open projects
|
||||
OpenedTasks=Open tasks
|
||||
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status
|
||||
OpportunitiesStatusForProjects=Opportunities amount of projects by status
|
||||
OpportunitiesStatusForOpenedProjects=Leads amount of open projects by status
|
||||
OpportunitiesStatusForProjects=Leads amount of projects by status
|
||||
ShowProject=Show project
|
||||
ShowTask=Show task
|
||||
SetProject=Set project
|
||||
@ -147,11 +147,11 @@ ProjectModifiedInDolibarr=Project %s modified
|
||||
TaskCreatedInDolibarr=Task %s created
|
||||
TaskModifiedInDolibarr=Task %s modified
|
||||
TaskDeletedInDolibarr=Task %s deleted
|
||||
OpportunityStatus=Opportunity status
|
||||
OpportunityStatus=Lead status
|
||||
OpportunityStatusShort=Opp. status
|
||||
OpportunityProbability=Opportunity probability
|
||||
OpportunityProbability=Lead probability
|
||||
OpportunityProbabilityShort=Opp. probab.
|
||||
OpportunityAmount=Opportunity amount
|
||||
OpportunityAmount=Lead amount
|
||||
OpportunityAmountShort=Opp. amount
|
||||
OpportunityAmountAverageShort=Average Opp. amount
|
||||
OpportunityAmountWeigthedShort=Weighted Opp. amount
|
||||
@ -195,21 +195,22 @@ ManageTasks=Use projects to follow tasks and time
|
||||
ManageOpportunitiesStatus=Use projects to follow leads/opportinuties
|
||||
ProjectNbProjectByMonth=No. of created projects by month
|
||||
ProjectNbTaskByMonth=No. of created tasks by month
|
||||
ProjectOppAmountOfProjectsByMonth=Amount of opportunities by month
|
||||
ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of opportunities by month
|
||||
ProjectOpenedProjectByOppStatus=Open project/lead by opportunity status
|
||||
ProjectOppAmountOfProjectsByMonth=Amount of leads by month
|
||||
ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month
|
||||
ProjectOpenedProjectByOppStatus=Open project/lead by lead status
|
||||
ProjectsStatistics=Statistics on projects/leads
|
||||
TasksStatistics=Statistics on project/lead tasks
|
||||
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
|
||||
IdTaskTime=Id task time
|
||||
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
|
||||
OpenedProjectsByThirdparties=Open projects by third parties
|
||||
OnlyOpportunitiesShort=Only opportunities
|
||||
OpenedOpportunitiesShort=Open opportunities
|
||||
NotAnOpportunityShort=Not an opportunity
|
||||
OpportunityTotalAmount=Opportunities total amount
|
||||
OpportunityPonderatedAmount=Opportunities weighted amount
|
||||
OpportunityPonderatedAmountDesc=Opportunities amount weighted with probability
|
||||
OnlyOpportunitiesShort=Only leads
|
||||
OpenedOpportunitiesShort=Open leads
|
||||
NotOpenedOpportunitiesShort=Not open leads
|
||||
NotAnOpportunityShort=Not a lead
|
||||
OpportunityTotalAmount=Total amount of leads
|
||||
OpportunityPonderatedAmount=Weighted amount of leads
|
||||
OpportunityPonderatedAmountDesc=Leads amount weighted with probability
|
||||
OppStatusPROSP=Prospection
|
||||
OppStatusQUAL=Qualification
|
||||
OppStatusPROPO=Proposal
|
||||
|
||||
@ -472,6 +472,17 @@ $help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
|
||||
llxHeader("",$title,$help_url);
|
||||
|
||||
$titleboth=$langs->trans("LeadsOrProjects");
|
||||
$titlenew = $langs->trans("NewLeadOrProject"); // Leads and opportunities by default
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 0)
|
||||
{
|
||||
$titleboth=$langs->trans("Projects");
|
||||
$titlenew = $langs->trans("NewProject");
|
||||
}
|
||||
if ($conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
||||
$titleboth=$langs->trans("Leads");
|
||||
$titlenew = $langs->trans("NewLead");
|
||||
}
|
||||
|
||||
if ($action == 'create' && $user->rights->projet->creer)
|
||||
{
|
||||
@ -482,7 +493,7 @@ if ($action == 'create' && $user->rights->projet->creer)
|
||||
$thirdparty=new Societe($db);
|
||||
if ($socid > 0) $thirdparty->fetch($socid);
|
||||
|
||||
print load_fiche_titre($langs->trans("NewProject"), '', 'title_project');
|
||||
print load_fiche_titre($titlenew, '', 'title_project');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -352,6 +352,7 @@ if ($search_opp_status)
|
||||
if (is_numeric($search_opp_status) && $search_opp_status > 0) $sql .= " AND p.fk_opp_status = ".$db->escape($search_opp_status);
|
||||
if ($search_opp_status == 'all') $sql .= " AND p.fk_opp_status IS NOT NULL";
|
||||
if ($search_opp_status == 'openedopp') $sql .= " AND p.fk_opp_status IS NOT NULL AND p.fk_opp_status NOT IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON','LOST'))";
|
||||
if ($search_opp_status == 'notopenedopp') $sql .= " AND (p.fk_opp_status IS NULL OR p.fk_opp_status IN (SELECT rowid FROM ".MAIN_DB_PREFIX."c_lead_status WHERE code IN ('WON')))";
|
||||
if ($search_opp_status == 'none') $sql .= " AND p.fk_opp_status IS NULL";
|
||||
}
|
||||
if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
|
||||
@ -424,7 +425,7 @@ if ($search_ref != '') $param.='&search_ref='.$search_ref;
|
||||
if ($search_label != '') $param.='&search_label='.$search_label;
|
||||
if ($search_societe != '') $param.='&search_societe='.$search_societe;
|
||||
if ($search_status >= 0) $param.='&search_status='.$search_status;
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','openedopp','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','openedopp','notopenedopp','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ($search_opp_percent != '') $param.='&search_opp_percent='.urlencode($search_opp_percent);
|
||||
if ($search_public != '') $param.='&search_public='.$search_public;
|
||||
if ($search_project_user != '') $param.='&search_project_user='.$search_project_user;
|
||||
@ -538,18 +539,21 @@ print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Project ref
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_ref" value="'.dol_escape_htmltag($search_ref).'" size="6">';
|
||||
print '</td>';
|
||||
}
|
||||
// Project label
|
||||
if (! empty($arrayfields['p.title']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_label" size="8" value="'.dol_escape_htmltag($search_label).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Third party
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
@ -592,6 +596,7 @@ if (! empty($arrayfields['p.public']['checked']))
|
||||
print $form->selectarray('search_public',$array,$search_public);
|
||||
print '</td>';
|
||||
}
|
||||
// Opp status
|
||||
if (! empty($arrayfields['p.fk_opp_status']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowrap center">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user