keep tab project

This commit is contained in:
Florian HENRY 2021-04-02 11:25:14 +02:00
parent 9794908b0d
commit 88b481e5a8
4 changed files with 25 additions and 5 deletions

View File

@ -104,7 +104,7 @@ class ConferenceOrBoothAttendee extends CommonObject
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty",),
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>1, 'visible'=>0, 'index'=>1,),
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>1, 'index'=>1,),
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
'date_subscription' => array('type'=>'datetime', 'label'=>'DateSubscription', 'enabled'=>'1', 'position'=>56, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'1',),
'amount' => array('type'=>'price', 'label'=>'AmountOfSubscriptionPaid', 'enabled'=>'1', 'position'=>57, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"AmountOfSubscriptionPaid",),
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
@ -745,6 +745,10 @@ class ConferenceOrBoothAttendee extends CommonObject
if ($option == 'conforboothid') {
$url .= '&conforboothid='.$this->fk_actioncomm;
}
if ($option == 'conforboothidproject') {
$url .= '&conforboothid='.$this->fk_actioncomm.'&withproject=1' ;
}
}
$linkclose = '';

View File

@ -110,7 +110,12 @@ if ($reshook < 0) {
if (empty($reshook)) {
$error = 0;
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1);
if (!empty($withproject)) {
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php?withproject=1', 1);
} else {
$backurlforlist = dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1);
}
if (empty($backtopage) || ($cancel && empty($id))) {
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
@ -492,7 +497,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Object card
// ------------------------------------------------------------
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1&conforboothid='.$confOrBooth->id .'">'.$langs->trans("BackToList").'</a>';
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1&conforboothid='.$confOrBooth->id .$withProjectUrl.'">'.$langs->trans("BackToList").'</a>';
$morehtmlref = '<div class="refidno">';
/*

View File

@ -604,7 +604,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF']).(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl, '', $permissiontoadd);
$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?action=create'.(!empty($confOrBooth->id)?'&conforboothid='.$confOrBooth->id:'').$withProjectUrl.'&backtopage='.urlencode($_SERVER['PHP_SELF'].(!empty($confOrBooth->id)?'?conforboothid='.$confOrBooth->id:'').$withProjectUrl), '', $permissiontoadd);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
@ -776,7 +776,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
if ($key == 'status') {
print $object->getLibStatut(5);
} elseif ($key == 'ref') {
print $object->getNomUrl(1, 'conforboothid');
print $object->getNomUrl(1, (!empty($withproject)?'conforboothidproject':'conforboothid'));
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}

View File

@ -115,6 +115,17 @@ class Project extends CommonObject
*/
public $usage_bill_time; // Is the time spent on project must be invoiced or not
/**
* @var boolean Use opportunities management
*/
public $usage_opportunity;
/**
* @var boolean Use task management
*/
public $usage_task;
/**
* @var boolean Event organization: Use Event Organization
*/