NEW Add date event (!= date project) and location on event organization
This commit is contained in:
parent
11aaf4748c
commit
1d21d73400
@ -348,8 +348,15 @@ if ($projectid > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($project->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Project").')</td><td>';
|
||||||
$start = dol_print_date($project->date_start, 'day');
|
$start = dol_print_date($project->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($project->date_end, 'day');
|
$end = dol_print_date($project->date_end, 'day');
|
||||||
@ -360,13 +367,23 @@ if ($projectid > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Date start - end of event
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Event").')</td><td>';
|
||||||
if (strcmp($project->budget_amount, '')) {
|
$start = dol_print_date($project->date_start_event, 'day');
|
||||||
print price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
print ($start ? $start : '?');
|
||||||
|
$end = dol_print_date($project->date_end_event, 'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end ? $end : '?');
|
||||||
|
if ($object->hasDelay()) {
|
||||||
|
print img_warning("Late");
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Location event
|
||||||
|
print '<tr><td>'.$langs->trans("Location").'</td><td>';
|
||||||
|
print $project->location;
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
$objectconf = $object;
|
$objectconf = $object;
|
||||||
|
|||||||
@ -474,8 +474,15 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Project").')</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -486,13 +493,23 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Date start - end of event
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '<tr><td>'.$langs->trans("Dates").' ('.$langs->trans("Event").')</td><td>';
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
$start = dol_print_date($projectstatic->date_start_event, 'day');
|
||||||
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
print ($start ? $start : '?');
|
||||||
|
$end = dol_print_date($projectstatic->date_end_event, 'day');
|
||||||
|
print ' - ';
|
||||||
|
print ($end ? $end : '?');
|
||||||
|
if ($projectstatic->hasDelay()) {
|
||||||
|
print img_warning("Late");
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Location event
|
||||||
|
print '<tr><td>'.$langs->trans("Location").'</td><td>';
|
||||||
|
print $projectstatic->location;
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
$objectconf = $object;
|
$objectconf = $object;
|
||||||
|
|||||||
@ -196,3 +196,8 @@ ALTER TABLE llx_societe_remise_except ADD COLUMN multicurrency_code varchar(3) N
|
|||||||
ALTER TABLE llx_societe_remise_except ADD COLUMN multicurrency_tx double(24,8) NULL;
|
ALTER TABLE llx_societe_remise_except ADD COLUMN multicurrency_tx double(24,8) NULL;
|
||||||
|
|
||||||
ALTER TABLE llx_hrm_evaluationdet CHANGE COLUMN rank rankorder integer;
|
ALTER TABLE llx_hrm_evaluationdet CHANGE COLUMN rank rankorder integer;
|
||||||
|
|
||||||
|
ALTER TABLE llx_projet ADD COLUMN date_start_event datetime;
|
||||||
|
ALTER TABLE llx_projet ADD COLUMN date_end_event datetime;
|
||||||
|
ALTER TABLE llx_projet ADD COLUMN location varchar(255);
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,10 @@ create table llx_projet
|
|||||||
usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity
|
usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity
|
||||||
usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet
|
usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet
|
||||||
usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices
|
usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices
|
||||||
usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event or receive attendees registration
|
usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event or receive attendees registration
|
||||||
|
date_start_event datetime, -- date start event
|
||||||
|
date_end_event datetime, -- date end event
|
||||||
|
location varchar(255), -- location
|
||||||
accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences
|
accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences
|
||||||
accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth
|
accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth
|
||||||
max_attendees integer DEFAULT 0,
|
max_attendees integer DEFAULT 0,
|
||||||
|
|||||||
@ -55,13 +55,15 @@ $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
|
|||||||
|
|
||||||
$status = GETPOST('status', 'int');
|
$status = GETPOST('status', 'int');
|
||||||
$opp_status = GETPOST('opp_status', 'int');
|
$opp_status = GETPOST('opp_status', 'int');
|
||||||
$opp_percent = price2num(GETPOST('opp_percent', 'alpha'));
|
$opp_percent = price2num(GETPOST('opp_percent', 'alphanohtml'));
|
||||||
$objcanvas = GETPOST("objcanvas", "alpha");
|
$objcanvas = GETPOST("objcanvas", "alphanohtml");
|
||||||
$comefromclone = GETPOST("comefromclone", "alpha");
|
$comefromclone = GETPOST("comefromclone", "alphanohtml");
|
||||||
|
$date_start = dol_mktime(0, 0, 0, GETPOST('projectstartmonth', 'int'), GETPOST('projectstartday', 'int'), GETPOST('projectstartyear', 'int'));
|
||||||
|
$date_end = dol_mktime(0, 0, 0, GETPOST('projectendmonth', 'int'), GETPOST('projectendday', 'int'), GETPOST('projectendyear', 'int'));
|
||||||
|
$date_start_event = dol_mktime(0, 0, 0, GETPOST('date_start_eventmonth', 'int'), GETPOST('date_start_eventday', 'int'), GETPOST('date_start_eventyear', 'int'));
|
||||||
|
$date_end_event = dol_mktime(0, 0, 0, GETPOST('date_end_eventmonth', 'int'), GETPOST('date_end_eventday', 'int'), GETPOST('date_end_eventyear', 'int'));
|
||||||
|
$location = GETPOST('location', 'alphanohtml');
|
||||||
|
|
||||||
if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !GETPOST("cancel"))) {
|
|
||||||
accessforbidden();
|
|
||||||
}
|
|
||||||
|
|
||||||
$mine = GETPOST('mode') == 'mine' ? 1 : 0;
|
$mine = GETPOST('mode') == 'mine' ? 1 : 0;
|
||||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||||
@ -88,14 +90,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
$date_start = dol_mktime(0, 0, 0, GETPOST('projectstartmonth', 'int'), GETPOST('projectstartday', 'int'), GETPOST('projectstartyear', 'int'));
|
|
||||||
$date_end = dol_mktime(0, 0, 0, GETPOST('projectendmonth', 'int'), GETPOST('projectendday', 'int'), GETPOST('projectendyear', 'int'));
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||||
restrictedArea($user, 'projet', $object->id, 'projet&project');
|
restrictedArea($user, 'projet', $object->id, 'projet&project');
|
||||||
|
|
||||||
|
if ($id == '' && $ref == '' && ($action != "create" && $action != "add" && $action != "update" && !GETPOST("cancel"))) {
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$permissiondellink = $user->rights->projet->creer; // Used by the include of actions_dellink.inc.php
|
$permissiondellink = $user->rights->projet->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
|
||||||
|
|
||||||
@ -187,6 +190,9 @@ if (empty($reshook)) {
|
|||||||
$object->date_c = dol_now();
|
$object->date_c = dol_now();
|
||||||
$object->date_start = $date_start;
|
$object->date_start = $date_start;
|
||||||
$object->date_end = $date_end;
|
$object->date_end = $date_end;
|
||||||
|
$object->date_start_event = $date_start_event;
|
||||||
|
$object->date_end_event = $date_end_event;
|
||||||
|
$object->location = $location;
|
||||||
$object->statut = $status;
|
$object->statut = $status;
|
||||||
$object->opp_status = $opp_status;
|
$object->opp_status = $opp_status;
|
||||||
$object->opp_percent = $opp_percent;
|
$object->opp_percent = $opp_percent;
|
||||||
@ -281,6 +287,9 @@ if (empty($reshook)) {
|
|||||||
$object->public = GETPOST('public', 'alpha');
|
$object->public = GETPOST('public', 'alpha');
|
||||||
$object->date_start = (!GETPOST('projectstart')) ? '' : $date_start;
|
$object->date_start = (!GETPOST('projectstart')) ? '' : $date_start;
|
||||||
$object->date_end = (!GETPOST('projectend')) ? '' : $date_end;
|
$object->date_end = (!GETPOST('projectend')) ? '' : $date_end;
|
||||||
|
$object->date_start_event = (!GETPOST('date_start_event')) ? '' : $date_start_event;
|
||||||
|
$object->date_end_event = (!GETPOST('date_end_event')) ? '' : $date_end_event;
|
||||||
|
$object->location = $location;
|
||||||
if (GETPOSTISSET('opp_amount')) {
|
if (GETPOSTISSET('opp_amount')) {
|
||||||
$object->opp_amount = price2num(GETPOST('opp_amount', 'alpha'));
|
$object->opp_amount = price2num(GETPOST('opp_amount', 'alpha'));
|
||||||
}
|
}
|
||||||
@ -603,6 +612,23 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') ? ' checked="checked"' : '') :'').'"> ';
|
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') ? ' checked="checked"' : '') :'').'"> ';
|
||||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||||
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
||||||
|
print '<script>';
|
||||||
|
print '$( document ).ready(function() {
|
||||||
|
jQuery("#usage_organize_event").change(function() {
|
||||||
|
if (jQuery("#usage_organize_event").prop("checked")) {
|
||||||
|
console.log("Show organize event fields");
|
||||||
|
jQuery(".classuseorganizeevent").show();
|
||||||
|
} else {
|
||||||
|
console.log("Hide organize event fields "+jQuery("#usage_organize_event").prop("checked"));
|
||||||
|
jQuery(".classuseorganizeevent").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
';
|
||||||
|
if (!GETPOST('usage_organize_event')) {
|
||||||
|
print 'jQuery(".classuseorganizeevent").hide();';
|
||||||
|
}
|
||||||
|
print '});';
|
||||||
|
print '</script>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -673,16 +699,6 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
|
||||||
print $form->selectDate(($date_start ? $date_start : ''), 'projectstart', 0, 0, 0, '', 1, 0);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Date end
|
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
|
||||||
print $form->selectDate(($date_end ? $date_end : -1), 'projectend', 0, 0, 0, '', 1, 0);
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
||||||
// Opportunity status
|
// Opportunity status
|
||||||
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
print '<tr class="classuseopportunity"><td>'.$langs->trans("OpportunityStatus").'</td>';
|
||||||
@ -708,6 +724,27 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : '').'"></td>';
|
print '<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : '').'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
// Date project
|
||||||
|
print '<tr><td>'.$langs->trans("Date").(isModEnabled('eventorganization') ? ' <span class="classuseorganizeevent">('.$langs->trans("Project").')</span>' : '').'</td><td>';
|
||||||
|
print $form->selectDate(($date_start ? $date_start : ''), 'projectstart', 0, 0, 0, '', 1, 0);
|
||||||
|
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
||||||
|
print $form->selectDate(($date_end ? $date_end : -1), 'projectend', 0, 0, 0, '', 1, 0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
if (isModEnabled('eventorganization')) {
|
||||||
|
// Date event
|
||||||
|
print '<tr class="classuseorganizeevent"><td>'.$langs->trans("Date").' ('.$langs->trans("Event").')</td><td>';
|
||||||
|
print $form->selectDate(($date_start_event ? $date_start_event : -1), 'date_start_event', 0, 0, 0, '', 1, 0);
|
||||||
|
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
||||||
|
print $form->selectDate(($date_end_event ? $date_end_event : -1), 'date_end_event', 0, 0, 0, '', 1, 0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Location
|
||||||
|
print '<tr class="classuseorganizeevent"><td>'.$langs->trans("Location").'</td>';
|
||||||
|
print '<td><input class="minwidth300 maxwidth500" type="text" name="location" value="'.dol_escape_htmltag($location).'"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -852,11 +889,12 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Status").'</td><td>';
|
||||||
print '<select class="flat" name="status">';
|
print '<select class="flat" name="status" id="status">';
|
||||||
foreach ($object->statuts_short as $key => $val) {
|
foreach ($object->statuts_short as $key => $val) {
|
||||||
print '<option value="'.$key.'"'.((GETPOSTISSET('status') ?GETPOST('status') : $object->statut) == $key ? ' selected="selected"' : '').'>'.$langs->trans($val).'</option>';
|
print '<option value="'.$key.'"'.((GETPOSTISSET('status') ? GETPOST('status') : $object->statut) == $key ? ' selected="selected"' : '').'>'.$langs->trans($val).'</option>';
|
||||||
}
|
}
|
||||||
print '</select>';
|
print '</select>';
|
||||||
|
print ajax_combobox('status');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Usage
|
// Usage
|
||||||
@ -902,6 +940,21 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
|
print '<input type="checkbox" id="usage_organize_event" name="usage_organize_event"'. (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($object->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
|
||||||
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
$htmltext = $langs->trans("EventOrganizationDescriptionLong");
|
||||||
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
print '<label for="usage_organize_event">'.$form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext).'</label>';
|
||||||
|
print '<script>';
|
||||||
|
print '$( document ).ready(function() {
|
||||||
|
jQuery("#usage_organize_event").change(function() {
|
||||||
|
if (jQuery("#usage_organize_event").prop("checked")) {
|
||||||
|
console.log("Show organize event fields");
|
||||||
|
jQuery(".classuseorganizeevent").show();
|
||||||
|
} else {
|
||||||
|
console.log("Hide organize event fields "+jQuery("#usage_organize_event").prop("checked"));
|
||||||
|
jQuery(".classuseorganizeevent").hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
';
|
||||||
|
print '
|
||||||
|
});';
|
||||||
|
print '</script>';
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -981,9 +1034,18 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
||||||
|
print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ? price2num($object->budget_amount) : '')).'">';
|
||||||
|
print $langs->getCurrencySymbol($conf->currency);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
// Date project
|
||||||
|
print '<tr><td>'.$langs->trans("Date").(isModEnabled('eventorganization') ? ' <span class="classuseorganizeevent">('.$langs->trans("Project").')</span>' : '').'</td><td>';
|
||||||
print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0);
|
print $form->selectDate($object->date_start ? $object->date_start : -1, 'projectstart', 0, 0, 0, '', 1, 0);
|
||||||
|
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
||||||
|
print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0);
|
||||||
print ' <input type="checkbox" class="valignmiddle" id="reportdate" name="reportdate" value="yes" ';
|
print ' <input type="checkbox" class="valignmiddle" id="reportdate" name="reportdate" value="yes" ';
|
||||||
if ($comefromclone) {
|
if ($comefromclone) {
|
||||||
print ' checked ';
|
print ' checked ';
|
||||||
@ -991,17 +1053,19 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label>';
|
print '/><label for="reportdate" class="opacitymedium">'.$langs->trans("ProjectReportDate").'</label>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end
|
if (isModEnabled('eventorganization')) {
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
// Date event
|
||||||
print $form->selectDate($object->date_end ? $object->date_end : -1, 'projectend', 0, 0, 0, '', 1, 0);
|
print '<tr class="classuseorganizeevent"><td>'.$langs->trans("Date").' ('.$langs->trans("Event").')</td><td>';
|
||||||
print '</td></tr>';
|
print $form->selectDate(($date_start_event ? $date_start_event : ($object->date_start_event ? $object->date_start_event : -1)), 'date_start_event', 0, 0, 0, '', 1, 0);
|
||||||
|
print ' <span class="opacitymedium"> '.$langs->trans("to").' </span> ';
|
||||||
|
print $form->selectDate(($date_end_event ? $date_end_event : ($object->date_end_event ? $object->date_end_event : -1)), 'date_end_event', 0, 0, 0, '', 1, 0);
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
// Location
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td>';
|
print '<tr class="classuseorganizeevent"><td>'.$langs->trans("Location").'</td>';
|
||||||
print '<td><input size="5" type="text" name="budget_amount" value="'.(GETPOSTISSET('budget_amount') ? GETPOST('budget_amount') : (strcmp($object->budget_amount, '') ? price2num($object->budget_amount) : '')).'">';
|
print '<td><input class="minwidth300 maxwidth500" type="text" name="location" value="'.dol_escape_htmltag(GETPOSTISSET('location') ? GETPOST('location') : $object->location).'"></td>';
|
||||||
print $langs->getCurrencySymbol($conf->currency);
|
print '</tr>';
|
||||||
print '</td>';
|
}
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td>';
|
||||||
@ -1143,18 +1207,6 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
|
||||||
$start = dol_print_date($object->date_start, 'day');
|
|
||||||
print ($start ? $start : '?');
|
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
|
||||||
print ' - ';
|
|
||||||
print ($end ? $end : '?');
|
|
||||||
if ($object->hasDelay()) {
|
|
||||||
print img_warning("Late");
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
if (strcmp($object->budget_amount, '')) {
|
if (strcmp($object->budget_amount, '')) {
|
||||||
@ -1162,6 +1214,18 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
|
$start = dol_print_date($object->date_start, 'day');
|
||||||
|
print ($start ? $start : '?');
|
||||||
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
|
print ' <span class="opacitymedium">-</span> ';
|
||||||
|
print ($end ? $end : '?');
|
||||||
|
if ($object->hasDelay()) {
|
||||||
|
print img_warning("Late");
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -87,29 +87,44 @@ class Project extends CommonObject
|
|||||||
public $title;
|
public $title;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Date start
|
* @var int Date start
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see $date_start
|
* @see $date_start
|
||||||
*/
|
*/
|
||||||
public $dateo;
|
public $dateo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Date start
|
* @var int Date start
|
||||||
*/
|
*/
|
||||||
public $date_start;
|
public $date_start;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Date end
|
* @var int Date end
|
||||||
* @deprecated
|
* @deprecated
|
||||||
* @see $date_end
|
* @see $date_end
|
||||||
*/
|
*/
|
||||||
public $datee;
|
public $datee;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Date end
|
* @var int Date end
|
||||||
*/
|
*/
|
||||||
public $date_end;
|
public $date_end;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Date start event
|
||||||
|
*/
|
||||||
|
public $date_start_event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Date end event
|
||||||
|
*/
|
||||||
|
public $date_end_event;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Location
|
||||||
|
*/
|
||||||
|
public $location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Date close
|
* @var int Date close
|
||||||
*/
|
*/
|
||||||
@ -264,30 +279,35 @@ class Project extends CommonObject
|
|||||||
'datee' =>array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>1, 'visible'=>1, 'position'=>35),
|
'datee' =>array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>1, 'visible'=>1, 'position'=>35),
|
||||||
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>1),
|
'description' =>array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>1),
|
||||||
'public' =>array('type'=>'integer', 'label'=>'Visibility', 'enabled'=>1, 'visible'=>1, 'position'=>65),
|
'public' =>array('type'=>'integer', 'label'=>'Visibility', 'enabled'=>1, 'visible'=>1, 'position'=>65),
|
||||||
'fk_opp_status' =>array('type'=>'integer', 'label'=>'OpportunityStatusShort', 'enabled'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'visible'=>1, 'position'=>75),
|
'fk_opp_status' =>array('type'=>'integer', 'label'=>'OpportunityStatusShort', 'enabled'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'visible'=>1, 'position'=>75),
|
||||||
'opp_percent' =>array('type'=>'double(5,2)', 'label'=>'OpportunityProbabilityShort', 'enabled'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'visible'=>1, 'position'=>80),
|
'opp_percent' =>array('type'=>'double(5,2)', 'label'=>'OpportunityProbabilityShort', 'enabled'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'visible'=>1, 'position'=>80),
|
||||||
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>85, 'searchall'=>1),
|
'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>85, 'searchall'=>1),
|
||||||
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>90, 'searchall'=>1),
|
'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>90, 'searchall'=>1),
|
||||||
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>95),
|
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>95),
|
||||||
'date_close' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>0, 'position'=>105),
|
'date_close' =>array('type'=>'datetime', 'label'=>'DateClosing', 'enabled'=>1, 'visible'=>0, 'position'=>105),
|
||||||
'fk_user_close' =>array('type'=>'integer', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>0, 'position'=>110),
|
'fk_user_close' =>array('type'=>'integer', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>0, 'position'=>110),
|
||||||
'opp_amount' =>array('type'=>'double(24,8)', 'label'=>'OpportunityAmountShort', 'enabled'=>1, 'visible'=>'!empty($conf->global->PROJECT_USE_OPPORTUNITIES)', 'position'=>115),
|
'opp_amount' =>array('type'=>'double(24,8)', 'label'=>'OpportunityAmountShort', 'enabled'=>1, 'visible'=>'getDolGlobalString("PROJECT_USE_OPPORTUNITIES")', 'position'=>115),
|
||||||
'budget_amount' =>array('type'=>'double(24,8)', 'label'=>'Budget', 'enabled'=>1, 'visible'=>1, 'position'=>119),
|
'budget_amount' =>array('type'=>'double(24,8)', 'label'=>'Budget', 'enabled'=>1, 'visible'=>1, 'position'=>119),
|
||||||
'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
|
'usage_bill_time' =>array('type'=>'integer', 'label'=>'UsageBillTimeShort', 'enabled'=>1, 'visible'=>-1, 'position'=>130),
|
||||||
'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
'usage_opportunity' =>array('type'=>'integer', 'label'=>'UsageOpportunity', 'enabled'=>1, 'visible'=>-1, 'position'=>135),
|
||||||
'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
|
'usage_task' =>array('type'=>'integer', 'label'=>'UsageTasks', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
|
||||||
'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
|
'usage_organize_event' =>array('type'=>'integer', 'label'=>'UsageOrganizeEvent', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
|
||||||
'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>146),
|
// Properties for event organization
|
||||||
'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>147),
|
'date_start_event' =>array('type'=>'date', 'label'=>'DateStartEvent', 'enabled'=>1, 'visible'=>1, 'position'=>200),
|
||||||
'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>148),
|
'date_end_event' =>array('type'=>'date', 'label'=>'DateEndEvent', 'enabled'=>1, 'visible'=>1, 'position'=>201),
|
||||||
'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>149),
|
'location' =>array('type'=>'text', 'label'=>'Location', 'enabled'=>1, 'visible'=>3, 'position'=>55, 'searchall'=>202),
|
||||||
'max_attendees' =>array('type'=>'integer', 'label'=>'MaxNbOfAttendees', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
|
'accept_conference_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestConf', 'enabled'=>1, 'visible'=>-1, 'position'=>210),
|
||||||
'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>200),
|
'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>211),
|
||||||
'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>205),
|
'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>212),
|
||||||
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>210),
|
'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
|
||||||
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>0, 'position'=>215),
|
'max_attendees' =>array('type'=>'integer', 'label'=>'MaxNbOfAttendees', 'enabled'=>1, 'visible'=>-1, 'position'=>215),
|
||||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>0, 'position'=>220),
|
// Generic
|
||||||
'email_msgid'=>array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'enabled'=>1, 'visible'=>-1, 'position'=>250, 'help'=>'EmailMsgIDWhenSourceisEmail'),
|
'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>400),
|
||||||
|
'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>405),
|
||||||
|
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>410),
|
||||||
|
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>0, 'position'=>415),
|
||||||
|
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>0, 'position'=>420),
|
||||||
|
'email_msgid'=>array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'enabled'=>1, 'visible'=>-1, 'position'=>450, 'help'=>'EmailMsgIDWhenSourceisEmail'),
|
||||||
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500)
|
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500)
|
||||||
);
|
);
|
||||||
// END MODULEBUILDER PROPERTIES
|
// END MODULEBUILDER PROPERTIES
|
||||||
@ -408,6 +428,9 @@ class Project extends CommonObject
|
|||||||
$sql .= ", price_registration";
|
$sql .= ", price_registration";
|
||||||
$sql .= ", price_booth";
|
$sql .= ", price_booth";
|
||||||
$sql .= ", max_attendees";
|
$sql .= ", max_attendees";
|
||||||
|
$sql .= ", date_start_event";
|
||||||
|
$sql .= ", date_end_event";
|
||||||
|
$sql .= ", location";
|
||||||
$sql .= ", email_msgid";
|
$sql .= ", email_msgid";
|
||||||
$sql .= ", note_private";
|
$sql .= ", note_private";
|
||||||
$sql .= ", note_public";
|
$sql .= ", note_public";
|
||||||
@ -436,6 +459,9 @@ class Project extends CommonObject
|
|||||||
$sql .= ", ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : 'null');
|
$sql .= ", ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : 'null');
|
||||||
$sql .= ", ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : 'null');
|
$sql .= ", ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : 'null');
|
||||||
$sql .= ", ".(strcmp($this->max_attendees, '') ? ((int) $this->max_attendees) : 'null');
|
$sql .= ", ".(strcmp($this->max_attendees, '') ? ((int) $this->max_attendees) : 'null');
|
||||||
|
$sql .= ", ".($this->date_start_event != '' ? "'".$this->db->idate($this->date_start_event)."'" : 'null');
|
||||||
|
$sql .= ", ".($this->date_end_event != '' ? "'".$this->db->idate($this->date_end_event)."'" : 'null');
|
||||||
|
$sql .= ", ".($this->location ? "'".$this->db->escape($this->location)."'" : 'null');
|
||||||
$sql .= ", ".($this->email_msgid ? "'".$this->db->escape($this->email_msgid)."'" : 'null');
|
$sql .= ", ".($this->email_msgid ? "'".$this->db->escape($this->email_msgid)."'" : 'null');
|
||||||
$sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : 'null');
|
$sql .= ", ".($this->note_private ? "'".$this->db->escape($this->note_private)."'" : 'null');
|
||||||
$sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : 'null');
|
$sql .= ", ".($this->note_public ? "'".$this->db->escape($this->note_public)."'" : 'null');
|
||||||
@ -530,11 +556,11 @@ class Project extends CommonObject
|
|||||||
$sql .= ", fk_opp_status = ".((is_numeric($this->opp_status) && $this->opp_status > 0) ? $this->opp_status : 'null');
|
$sql .= ", fk_opp_status = ".((is_numeric($this->opp_status) && $this->opp_status > 0) ? $this->opp_status : 'null');
|
||||||
$sql .= ", opp_percent = ".((is_numeric($this->opp_percent) && $this->opp_percent != '') ? $this->opp_percent : 'null');
|
$sql .= ", opp_percent = ".((is_numeric($this->opp_percent) && $this->opp_percent != '') ? $this->opp_percent : 'null');
|
||||||
$sql .= ", public = ".($this->public ? 1 : 0);
|
$sql .= ", public = ".($this->public ? 1 : 0);
|
||||||
$sql .= ", datec=".($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
|
$sql .= ", datec = ".($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
|
||||||
$sql .= ", dateo=".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
$sql .= ", dateo = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
|
||||||
$sql .= ", datee=".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
|
$sql .= ", datee = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
|
||||||
$sql .= ", date_close=".($this->date_close != '' ? "'".$this->db->idate($this->date_close)."'" : 'null');
|
$sql .= ", date_close = ".($this->date_close != '' ? "'".$this->db->idate($this->date_close)."'" : 'null');
|
||||||
$sql .= ", fk_user_close=".($this->fk_user_close > 0 ? $this->fk_user_close : "null");
|
$sql .= ", fk_user_close = ".($this->fk_user_close > 0 ? $this->fk_user_close : "null");
|
||||||
$sql .= ", opp_amount = ".(strcmp($this->opp_amount, '') ? price2num($this->opp_amount) : "null");
|
$sql .= ", opp_amount = ".(strcmp($this->opp_amount, '') ? price2num($this->opp_amount) : "null");
|
||||||
$sql .= ", budget_amount = ".(strcmp($this->budget_amount, '') ? price2num($this->budget_amount) : "null");
|
$sql .= ", budget_amount = ".(strcmp($this->budget_amount, '') ? price2num($this->budget_amount) : "null");
|
||||||
$sql .= ", fk_user_modif = ".$user->id;
|
$sql .= ", fk_user_modif = ".$user->id;
|
||||||
@ -547,6 +573,9 @@ class Project extends CommonObject
|
|||||||
$sql .= ", price_registration = ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : "null");
|
$sql .= ", price_registration = ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : "null");
|
||||||
$sql .= ", price_booth = ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : "null");
|
$sql .= ", price_booth = ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : "null");
|
||||||
$sql .= ", max_attendees = ".(strcmp($this->max_attendees, '') ? price2num($this->max_attendees) : "null");
|
$sql .= ", max_attendees = ".(strcmp($this->max_attendees, '') ? price2num($this->max_attendees) : "null");
|
||||||
|
$sql .= ", date_start_event = ".($this->date_start_event != '' ? "'".$this->db->idate($this->date_start_event)."'" : 'null');
|
||||||
|
$sql .= ", date_end_event = ".($this->date_end_event != '' ? "'".$this->db->idate($this->date_end_event)."'" : 'null');
|
||||||
|
$sql .= ", location = '".$this->db->escape($this->location)."'";
|
||||||
$sql .= ", entity = ".((int) $this->entity);
|
$sql .= ", entity = ".((int) $this->entity);
|
||||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||||
|
|
||||||
@ -631,9 +660,9 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT rowid, entity, ref, title, description, public, datec, opp_amount, budget_amount,";
|
$sql = "SELECT rowid, entity, ref, title, description, public, datec, opp_amount, budget_amount,";
|
||||||
$sql .= " tms, dateo, datee, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,";
|
$sql .= " tms, dateo as date_start, datee as date_end, date_close, fk_soc, fk_user_creat, fk_user_modif, fk_user_close, fk_statut as status, fk_opp_status, opp_percent,";
|
||||||
$sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, email_msgid,";
|
$sql .= " note_private, note_public, model_pdf, usage_opportunity, usage_task, usage_bill_time, usage_organize_event, email_msgid,";
|
||||||
$sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth, max_attendees";
|
$sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth, max_attendees, date_start_event, date_end_event, location";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."projet";
|
$sql .= " FROM ".MAIN_DB_PREFIX."projet";
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$sql .= " WHERE rowid = ".((int) $id);
|
$sql .= " WHERE rowid = ".((int) $id);
|
||||||
@ -665,8 +694,8 @@ class Project extends CommonObject
|
|||||||
$this->datec = $this->db->jdate($obj->datec); // TODO deprecated
|
$this->datec = $this->db->jdate($obj->datec); // TODO deprecated
|
||||||
$this->date_m = $this->db->jdate($obj->tms);
|
$this->date_m = $this->db->jdate($obj->tms);
|
||||||
$this->datem = $this->db->jdate($obj->tms); // TODO deprecated
|
$this->datem = $this->db->jdate($obj->tms); // TODO deprecated
|
||||||
$this->date_start = $this->db->jdate($obj->dateo);
|
$this->date_start = $this->db->jdate($obj->date_start);
|
||||||
$this->date_end = $this->db->jdate($obj->datee);
|
$this->date_end = $this->db->jdate($obj->date_end);
|
||||||
$this->date_close = $this->db->jdate($obj->date_close);
|
$this->date_close = $this->db->jdate($obj->date_close);
|
||||||
$this->note_private = $obj->note_private;
|
$this->note_private = $obj->note_private;
|
||||||
$this->note_public = $obj->note_public;
|
$this->note_public = $obj->note_public;
|
||||||
@ -692,6 +721,9 @@ class Project extends CommonObject
|
|||||||
$this->price_registration = $obj->price_registration;
|
$this->price_registration = $obj->price_registration;
|
||||||
$this->price_booth = $obj->price_booth;
|
$this->price_booth = $obj->price_booth;
|
||||||
$this->max_attendees = $obj->max_attendees;
|
$this->max_attendees = $obj->max_attendees;
|
||||||
|
$this->date_start_event = $this->db->jdate($obj->date_start_event);
|
||||||
|
$this->date_end_event = $this->db->jdate($obj->date_end_event);
|
||||||
|
$this->location = $obj->location;
|
||||||
$this->email_msgid = $obj->email_msgid;
|
$this->email_msgid = $obj->email_msgid;
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|||||||
@ -134,15 +134,6 @@ if ($object->public) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
|
||||||
print dol_print_date($object->date_start, 'day');
|
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
|
||||||
if ($end) {
|
|
||||||
print ' - '.$end;
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Budget
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
if (strcmp($object->budget_amount, '')) {
|
if (strcmp($object->budget_amount, '')) {
|
||||||
@ -150,6 +141,15 @@ if (strcmp($object->budget_amount, '')) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
|
print dol_print_date($object->date_start, 'day');
|
||||||
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
|
if ($end) {
|
||||||
|
print ' - '.$end;
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
// include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
// include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -385,8 +385,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start, 'day');
|
$start = dol_print_date($object->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
@ -397,13 +404,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($object->budget_amount, '')) {
|
|
||||||
print '<span class="amount">'.price($object->budget_amount, '', $langs, 0, 0, 0, $conf->currency).'</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -307,8 +307,15 @@ if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start, 'day');
|
$start = dol_print_date($object->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
@ -319,13 +326,6 @@ if ($object->hasDelay()) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($object->budget_amount, '')) {
|
|
||||||
print '<span class="amount">'.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -179,8 +179,15 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) {
|
||||||
|
print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start, 'day');
|
$start = dol_print_date($object->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
@ -191,13 +198,6 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($object->budget_amount, '')) {
|
|
||||||
print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -1355,7 +1355,8 @@ while ($i < $imaxinloop) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Date start
|
|
||||||
|
// Date start project
|
||||||
if (!empty($arrayfields['p.dateo']['checked'])) {
|
if (!empty($arrayfields['p.dateo']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_start), 'day');
|
print dol_print_date($db->jdate($obj->date_start), 'day');
|
||||||
@ -1364,7 +1365,7 @@ while ($i < $imaxinloop) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Date end
|
// Date end project
|
||||||
if (!empty($arrayfields['p.datee']['checked'])) {
|
if (!empty($arrayfields['p.datee']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_end), 'day');
|
print dol_print_date($db->jdate($obj->date_end), 'day');
|
||||||
@ -1373,6 +1374,7 @@ while ($i < $imaxinloop) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Visibility
|
// Visibility
|
||||||
if (!empty($arrayfields['p.public']['checked'])) {
|
if (!empty($arrayfields['p.public']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
|||||||
@ -614,8 +614,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($object->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start, 'day');
|
$start = dol_print_date($object->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($object->date_end, 'day');
|
$end = dol_print_date($object->date_end, 'day');
|
||||||
@ -626,13 +633,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($object->budget_amount, '')) {
|
|
||||||
print '<span class="amount">'.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
@ -750,12 +750,12 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start
|
// Date start task
|
||||||
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateStart").'</td><td>';
|
||||||
print $form->selectDate((!empty($date_start) ? $date_start : ''), 'dateo', 1, 1, 0, '', 1, 1);
|
print $form->selectDate((!empty($date_start) ? $date_start : ''), 'dateo', 1, 1, 0, '', 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date end
|
// Date end task
|
||||||
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateEnd").'</td><td>';
|
||||||
print $form->selectDate((!empty($date_end) ? $date_end : -1), 'datee', -1, 1, 0, '', 1, 1);
|
print $form->selectDate((!empty($date_end) ? $date_end : -1), 'datee', -1, 1, 0, '', 1, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -221,8 +221,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -233,13 +240,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -257,8 +257,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -269,13 +276,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -214,8 +214,15 @@ if ($object->id > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -226,13 +233,6 @@ if ($object->id > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -1117,7 +1117,8 @@ while ($i < $imaxinloop) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Date start
|
|
||||||
|
// Date start project
|
||||||
if (!empty($arrayfields['t.dateo']['checked'])) {
|
if (!empty($arrayfields['t.dateo']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_start), 'day');
|
print dol_print_date($db->jdate($obj->date_start), 'day');
|
||||||
@ -1126,7 +1127,7 @@ while ($i < $imaxinloop) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Date end
|
// Date end project
|
||||||
if (!empty($arrayfields['t.datee']['checked'])) {
|
if (!empty($arrayfields['t.datee']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print dol_print_date($db->jdate($obj->date_end), 'day');
|
print dol_print_date($db->jdate($obj->date_end), 'day');
|
||||||
|
|||||||
@ -203,8 +203,15 @@ if ($object->id > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -215,13 +222,6 @@ if ($object->id > 0) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|||||||
@ -325,8 +325,15 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -337,13 +344,6 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
@ -578,7 +578,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - Date end
|
// Date start - Date end task
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td colspan="3">';
|
print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td colspan="3">';
|
||||||
$start = dol_print_date($object->date_start, 'dayhour');
|
$start = dol_print_date($object->date_start, 'dayhour');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
|
|||||||
@ -967,8 +967,15 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Budget
|
||||||
print '<tr><td>'.$langs->trans("DateStart").' - '.$langs->trans("DateEnd").'</td><td>';
|
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
||||||
|
if (strcmp($projectstatic->budget_amount, '')) {
|
||||||
|
print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
||||||
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Date start - end project
|
||||||
|
print '<tr><td>'.$langs->trans("Dates").'</td><td>';
|
||||||
$start = dol_print_date($projectstatic->date_start, 'day');
|
$start = dol_print_date($projectstatic->date_start, 'day');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
$end = dol_print_date($projectstatic->date_end, 'day');
|
$end = dol_print_date($projectstatic->date_end, 'day');
|
||||||
@ -979,16 +986,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Budget
|
|
||||||
print '<tr><td>'.$langs->trans("Budget").'</td><td>';
|
|
||||||
if (strcmp($projectstatic->budget_amount, '')) {
|
|
||||||
print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
|
|
||||||
}
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$cols = 2;
|
$cols = 2;
|
||||||
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
$savobject = $object;
|
||||||
|
$object = $projectstatic;
|
||||||
|
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
|
||||||
|
$object = $savobject;
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
@ -1127,7 +1130,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date start - Date end
|
// Date start - Date end task
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
|
||||||
$start = dol_print_date($object->date_start, 'dayhour');
|
$start = dol_print_date($object->date_start, 'dayhour');
|
||||||
print ($start ? $start : '?');
|
print ($start ? $start : '?');
|
||||||
|
|||||||
@ -646,7 +646,7 @@ print '<div class="center subscriptionformhelptext justify">';
|
|||||||
|
|
||||||
// Welcome message
|
// Welcome message
|
||||||
|
|
||||||
print $langs->trans("EvntOrgWelcomeMessage", $project->title . ' '. $conference->label);
|
print '<span class="opacitymedium">'.$langs->trans("EvntOrgWelcomeMessage", $project->title . ' '. $conference->label).'</span>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
$maxattendees = 0;
|
$maxattendees = 0;
|
||||||
if ($conference->id) {
|
if ($conference->id) {
|
||||||
@ -691,8 +691,8 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
|
|||||||
print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />';
|
print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />';
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
print '<br><span class="opacitymedium">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span><br>';
|
//print '<span class="opacitymedium">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span><br>';
|
||||||
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
|
||||||
|
|
||||||
print dol_get_fiche_head('');
|
print dol_get_fiche_head('');
|
||||||
@ -711,18 +711,22 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
|
|||||||
print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
|
print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
print '<tr><td>' . $langs->trans("EmailAttendee") . '<span style="color: red">*</span></td><td>';
|
print '<tr><td><span class="fieldrequired">' . $langs->trans("EmailAttendee") . '</span></td><td>';
|
||||||
print img_picto('', 'email', 'class="pictofixedwidth"');
|
print img_picto('', 'email', 'class="pictofixedwidth"');
|
||||||
print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n";
|
print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('email')) . '" required></td></tr>' . "\n";
|
||||||
|
|
||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company");
|
print '<tr id="trcompany" class="trcompany"><td>';
|
||||||
if (!empty(floatval($project->price_registration))) {
|
if (!empty(floatval($project->price_registration))) {
|
||||||
print '<span style="color: red">*</span>';
|
print '<span class="fieldrequired">';
|
||||||
}
|
}
|
||||||
print ' </td><td>';
|
print $langs->trans("Company");
|
||||||
|
if (!empty(floatval($project->price_registration))) {
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
|
print '</td><td>';
|
||||||
print img_picto('', 'company', 'class="pictofixedwidth"');
|
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||||
print '<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n";
|
print '<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('societe')) . '"'.(empty(floatval($project->price_registration)) ? '' : ' required').'></td></tr>' . "\n";
|
||||||
|
|
||||||
// Email company for invoice
|
// Email company for invoice
|
||||||
if ($project->price_registration) {
|
if ($project->price_registration) {
|
||||||
@ -743,7 +747,7 @@ if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>' . $langs->trans('Country') . '<span style="color: red">*</span></td><td>';
|
print '<tr><td><span class="fieldrequired"' . $langs->trans('Country') . '</span></td><td>';
|
||||||
print img_picto('', 'country', 'class="pictofixedwidth"');
|
print img_picto('', 'country', 'class="pictofixedwidth"');
|
||||||
$country_id = GETPOST('country_id');
|
$country_id = GETPOST('country_id');
|
||||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user