diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 47a984cd467..d84f546fb01 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -49,20 +49,30 @@ $search_pcgtype = GETPOST('search_pcgtype', 'alpha'); $chartofaccounts = GETPOST('chartofaccounts', 'int'); // Security check -if ($user->socid > 0) accessforbidden(); -if (!$user->rights->accounting->chartofaccount) accessforbidden(); +if ($user->socid > 0) { + accessforbidden(); +} +if (!$user->rights->accounting->chartofaccount) { + accessforbidden(); +} // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +if (empty($page) || $page == -1) { + $page = 0; +} // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (!$sortfield) $sortfield = "aa.account_number"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortfield) { + $sortfield = "aa.account_number"; +} +if (!$sortorder) { + $sortorder = "ASC"; +} $arrayfields = array( 'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1), @@ -74,7 +84,9 @@ $arrayfields = array( 'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1) ); -if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['aa.reconcilable']); +if ($conf->global->MAIN_FEATURES_LEVEL < 2) { + unset($arrayfields['aa.reconcilable']); +} $accounting = new AccountingAccount($db); @@ -84,21 +96,27 @@ $accounting = new AccountingAccount($db); * Actions */ -if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha')) { $massaction = ''; } +if (GETPOST('cancel', 'alpha')) { + $action = 'list'; $massaction = ''; +} +if (!GETPOST('confirmmassaction', 'alpha')) { + $massaction = ''; +} $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} -if (empty($reshook)) -{ - if (!empty($cancel)) $action = ''; +if (empty($reshook)) { + if (!empty($cancel)) { + $action = ''; + } include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers - { + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers $search_account = ""; $search_label = ""; $search_labelshort = ""; @@ -107,23 +125,21 @@ if (empty($reshook)) $search_array_options = array(); } if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on - || (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified - { - if ($chartofaccounts > 0) - { + || (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) { // a submit of form is done and chartofaccounts combo has been modified + if ($chartofaccounts > 0) { // Get language code for this $chartofaccounts $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a'; $sql .= ' WHERE c.rowid = a.fk_country AND a.rowid = '.(int) $chartofaccounts; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); $country_code = $obj->code; - } else dol_print_error($db); + } else { + dol_print_error($db); + } // Try to load sql file - if ($country_code) - { + if ($country_code) { $sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql'; $offsetforchartofaccount = 0; @@ -131,16 +147,14 @@ if (empty($reshook)) // and pass CCCNNNNN + (num of company * 100 000 000) as offset to the run_sql as a new parameter to say to update sql on the fly to add offset to rowid and account_parent value. // This is to be sure there is no conflict for each chart of account, whatever is country, whatever is company when multicompany is used. $tmp = file_get_contents($sqlfile); - if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) - { + if (preg_match('/-- ADD (\d+) to rowid/ims', $tmp, $reg)) { $offsetforchartofaccount += $reg[1]; } $offsetforchartofaccount += ($conf->entity * 100000000); $result = run_sql($sqlfile, 1, $conf->entity, 1, '', 'default', 32768, 0, $offsetforchartofaccount); - if ($result > 0) - { + if ($result > 0) { setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs'); } else { setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings'); @@ -198,8 +212,11 @@ $sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.account_number, aa.a $sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = ".$conf->entity; -if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; -else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; +if ($db->type == 'pgsql') { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; +} else { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = aa.account_parent AND a2.entity = ".$conf->entity; +} $sql .= " WHERE asy.rowid = ".$pcgver; //print $sql; if (strlen(trim($search_account))) { @@ -224,31 +241,38 @@ if (strlen(trim($search_account))) { $search_account_tmp_clean = $search_account_tmp; $search_account_clean = $search_account; $startchar = '%'; - if (strpos($search_account_tmp, '^') === 0) - { + if (strpos($search_account_tmp, '^') === 0) { $startchar = ''; $search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp); $search_account_clean = preg_replace('/^\^/', '', $search_account); } $sql .= " AND (aa.account_number LIKE '".$db->escape($startchar.$search_account_tmp_clean)."'"; $sql .= " OR aa.account_number LIKE '".$db->escape($startchar.$search_account_clean)."%')"; - } else $sql .= natural_search("aa.account_number", $search_account_tmp); + } else { + $sql .= natural_search("aa.account_number", $search_account_tmp); + } } } -if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label); -if (strlen(trim($search_labelshort))) $sql .= natural_search("aa.labelshort", $search_labelshort); -if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') $sql .= natural_search("aa.account_parent", $search_accountparent, 2); -if (strlen(trim($search_pcgtype))) $sql .= natural_search("aa.pcg_type", $search_pcgtype); +if (strlen(trim($search_label))) { + $sql .= natural_search("aa.label", $search_label); +} +if (strlen(trim($search_labelshort))) { + $sql .= natural_search("aa.labelshort", $search_labelshort); +} +if (strlen(trim($search_accountparent)) && $search_accountparent != '-1') { + $sql .= natural_search("aa.account_parent", $search_accountparent, 2); +} +if (strlen(trim($search_pcgtype))) { + $sql .= natural_search("aa.pcg_type", $search_pcgtype); +} $sql .= $db->order($sortfield, $sortorder); // Count total nb of records $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $resql = $db->query($sql); $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 $page = 0; $offset = 0; } @@ -259,22 +283,36 @@ $sql .= $db->plimit($limit + 1, $offset); dol_syslog('accountancy/admin/account.php:: $sql='.$sql); $resql = $db->query($sql); -if ($resql) -{ +if ($resql) { $num = $db->num_rows($resql); $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($search_account) $param .= '&search_account='.urlencode($search_account); - if ($search_label) $param .= '&search_label='.urlencode($search_label); - if ($search_labelshort) $param .= '&search_labelshort='.urlencode($search_labelshort); - if ($search_accountparent > 0 || $search_accountparent == '0') $param .= '&search_accountparent='.urlencode($search_accountparent); - if ($search_pcgtype) $param .= '&search_pcgtype='.urlencode($search_pcgtype); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { + $param .= '&contextpage='.urlencode($contextpage); + } + if ($limit > 0 && $limit != $conf->liste_limit) { + $param .= '&limit='.urlencode($limit); + } + if ($search_account) { + $param .= '&search_account='.urlencode($search_account); + } + if ($search_label) { + $param .= '&search_label='.urlencode($search_label); + } + if ($search_labelshort) { + $param .= '&search_labelshort='.urlencode($search_labelshort); + } + if ($search_accountparent > 0 || $search_accountparent == '0') { + $param .= '&search_accountparent='.urlencode($search_accountparent); + } + if ($search_pcgtype) { + $param .= '&search_pcgtype='.urlencode($search_pcgtype); + } + if ($optioncss != '') { + $param .= '&optioncss='.urlencode($optioncss); + } - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { print ' ';*/ + + +// Part to create +if ($action == 'create') { + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("ConferenceOrBooth")), '', 'object_'.$object->picto); + + print '
'; + + //dol_set_focus('input[name="ref"]'); +} + +// Part to edit record +if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("ConferenceOrBooth"), '', 'object_'.$object->picto); + + print ''; +} + +// Part to show record +if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { + $res = $object->fetch_optionals(); + + $head = conferenceorboothPrepareHead($object); + print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBooth"), -1, $object->picto); + + $formconfirm = ''; + + // Confirmation to delete + if ($action == 'delete') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteConferenceOrBooth'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); + } + // Confirmation to delete line + if ($action == 'deleteline') { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + // Clone confirmation + if ($action == 'clone') { + // Create an array for form + $formquestion = array(); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + } + + // Confirmation of action xxxx + if ($action == 'xxx') { + $formquestion = array(); + /* + $forcecombo=0; + if ($conf->browser->name == 'ie') $forcecombo = 1; // There is a bug in IE10 that make combo inside popup crazy + $formquestion = array( + // 'text' => $langs->trans("ConfirmClone"), + // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), + // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), + // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) + ); + */ + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); + } + + // Call Hook formConfirm + $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid); + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { + $formconfirm .= $hookmanager->resPrint; + } elseif ($reshook > 0) { + $formconfirm = $hookmanager->resPrint; + } + + // Print form confirm + print $formconfirm; + + + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; + + $morehtmlref = '| '.$langs->trans("NbOfAttachedFiles").' | '.count($filearray).' | ||
| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' | ||
| '.$langs->trans("DraftMyObjects").($num?''.$num.'':'').' | ||
|---|---|---|
| '; + + $myobjectstatic->id=$obj->rowid; + $myobjectstatic->ref=$obj->ref; + $myobjectstatic->ref_client=$obj->ref_client; + $myobjectstatic->total_ht = $obj->total_ht; + $myobjectstatic->total_tva = $obj->total_tva; + $myobjectstatic->total_ttc = $obj->total_ttc; + + print $myobjectstatic->getNomUrl(1); + print ' | '; + print ''; + print ' | '; + print ''.price($obj->total_ttc).' |
| '.$langs->trans("Total").' | '.price($total)." | |
| '.$langs->trans("NoOrder").' | ||
| '; + print $langs->trans("BoxTitleLatestModifiedMyObjects", $max); + print ' | '; + print ''.$langs->trans("DateModificationShort").' | '; + print '|
|---|---|---|
| '.$myobjectstatic->getNomUrl(1).' | '; + print ''; + print " | "; + print ''.dol_print_date($db->jdate($objp->tms), 'day')." | "; + print '
| '.$langs->trans("None").' | ||
| '.$langs->trans("Categories").' | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| '; + print ' | |||||||||||||||||
| ';
$sql = "SELECT c.label, count(*) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 0462f9d3391..5370dcfa8f9 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -228,7 +228,7 @@ if (empty($reshook))
}
}
- if ($action == 'update' && !$_POST["cancel"] && $user->rights->projet->creer)
+ if ($action == 'update' && empty(GETPOST('cancel')) && $user->rights->projet->creer)
{
$error = 0;
@@ -1132,7 +1132,7 @@ if ($action == 'create' && $user->rights->projet->creer)
if ($action == 'edit' && $userWrite > 0)
{
print ' ';
- print ' ';
+ print ' ';
print '';
print ' ';
}
@@ -1223,14 +1223,14 @@ if ($action == 'create' && $user->rights->projet->creer)
// Send
if (empty($user->socid)) {
- if ($object->statut != 2)
+ if ($object->statut != Project::STATUS_CLOSED)
{
print ''.$langs->trans('SendMail').'';
}
}
// Modify
- if ($object->statut != 2 && $user->rights->projet->creer)
+ if ($object->statut != Project::STATUS_CLOSED && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
@@ -1241,7 +1241,7 @@ if ($action == 'create' && $user->rights->projet->creer)
}
// Validate
- if ($object->statut == 0 && $user->rights->projet->creer)
+ if ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
@@ -1252,7 +1252,7 @@ if ($action == 'create' && $user->rights->projet->creer)
}
// Close
- if ($object->statut == 1 && $user->rights->projet->creer)
+ if ($object->statut == Project::STATUS_VALIDATED && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
@@ -1263,7 +1263,7 @@ if ($action == 'create' && $user->rights->projet->creer)
}
// Reopen
- if ($object->statut == 2 && $user->rights->projet->creer)
+ if ($object->statut == Project::STATUS_CLOSED && $user->rights->projet->creer)
{
if ($userWrite > 0)
{
@@ -1340,9 +1340,9 @@ if ($action == 'create' && $user->rights->projet->creer)
}
// Delete
- if ($user->rights->projet->supprimer || ($object->statut == 0 && $user->rights->projet->creer))
+ if ($user->rights->projet->supprimer || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer))
{
- if ($userDelete > 0 || ($object->statut == 0 && $user->rights->projet->creer))
+ if ($userDelete > 0 || ($object->statut == Project::STATUS_DRAFT && $user->rights->projet->creer))
{
print ''.$langs->trans("Delete").'';
} else {
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index ff4be5e8d77..d693bb94468 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -201,6 +201,10 @@ class Project extends CommonObject
'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_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),
+ 'accept_booth_suggestions' =>array('type'=>'integer', 'label'=>'AllowUnknownPeopleSuggestBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>147),
+ 'price_registration' =>array('type'=>'double(24,8)', 'label'=>'PriceOfRegistration', 'enabled'=>1, 'visible'=>-1, 'position'=>148),
+ 'price_booth' =>array('type'=>'double(24,8)', 'label'=>'PriceOfBooth', 'enabled'=>1, 'visible'=>-1, 'position'=>149),
'datec' =>array('type'=>'datetime', 'label'=>'DateCreationShort', 'enabled'=>1, 'visible'=>-2, 'position'=>200),
'tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>205),
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>210),
@@ -257,6 +261,10 @@ class Project extends CommonObject
if (empty($conf->eventorganization->enabled)) {
$this->fields['usage_organize_event']['visible'] = 0;
+ $this->fields['accept_conference_suggestions']['enabled'] = 0;
+ $this->fields['accept_booth_suggestions']['enabled'] = 0;
+ $this->fields['price_registration']['enabled'] = 0;
+ $this->fields['price_booth']['enabled'] = 0;
}
}
@@ -316,6 +324,10 @@ class Project extends CommonObject
$sql .= ", usage_task";
$sql .= ", usage_bill_time";
$sql .= ", usage_organize_event";
+ $sql .= ", accept_conference_suggestions";
+ $sql .= ", accept_booth_suggestions";
+ $sql .= ", price_registration";
+ $sql .= ", price_booth";
$sql .= ", email_msgid";
$sql .= ", note_private";
$sql .= ", note_public";
@@ -339,6 +351,10 @@ class Project extends CommonObject
$sql .= ", ".($this->usage_task ? 1 : 0);
$sql .= ", ".($this->usage_bill_time ? 1 : 0);
$sql .= ", ".($this->usage_organize_event ? 1 : 0);
+ $sql .= ", ".($this->accept_conference_suggestions ? 1 : 0);
+ $sql .= ", ".($this->accept_booth_suggestions ? 1 : 0);
+ $sql .= ", ".(strcmp($this->price_registration, '') ? price2num($this->price_registration) : 'null');
+ $sql .= ", ".(strcmp($this->price_booth, '') ? price2num($this->price_booth) : '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_public ? "'".$this->db->escape($this->note_public)."'" : 'null');
@@ -442,6 +458,10 @@ class Project extends CommonObject
$sql .= ", usage_task = ".($this->usage_task ? 1 : 0);
$sql .= ", usage_bill_time = ".($this->usage_bill_time ? 1 : 0);
$sql .= ", usage_organize_event = ".($this->usage_organize_event ? 1 : 0);
+ $sql .= ", accept_conference_suggestions = ".($this->accept_conference_suggestions ? 1 : 0);
+ $sql .= ", accept_booth_suggestions = ".($this->accept_booth_suggestions ? 1 : 0);
+ $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 .= " WHERE rowid = ".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG);
@@ -531,7 +551,8 @@ class Project extends CommonObject
$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 .= " 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";
$sql .= " FROM ".MAIN_DB_PREFIX."projet";
if (!empty($id))
{
@@ -588,6 +609,10 @@ class Project extends CommonObject
$this->usage_task = (int) $obj->usage_task;
$this->usage_bill_time = (int) $obj->usage_bill_time;
$this->usage_organize_event = (int) $obj->usage_organize_event;
+ $this->accept_conference_suggestions = (int) $obj->accept_conference_suggestions;
+ $this->accept_booth_suggestions = (int) $obj->accept_booth_suggestions;
+ $this->price_registration = $obj->price_registration;
+ $this->price_booth = $obj->price_booth;
$this->email_msgid = $obj->email_msgid;
$this->db->free($resql);
diff --git a/htdocs/projet/event.php b/htdocs/projet/event.php
new file mode 100644
index 00000000000..0f565c7923c
--- /dev/null
+++ b/htdocs/projet/event.php
@@ -0,0 +1,344 @@
+
+ * Copyright (C) 2012 Laurent Destailleur ';
+ // Title
+ $morehtmlref .= $object->title;
+ // Thirdparty
+ if ($object->thirdparty->id > 0)
+ {
+ $morehtmlref .= ' ';
+
+ // Define a complementary filter for search of next/prev ref.
+ if (!$user->rights->projet->all->lire)
+ {
+ $objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
+ $object->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
+ }
+
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+
+
+ print ''.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'project'); + } + $morehtmlref .= ' ';
+ print ' ';
+ print '';
+
+ print ' ';
+ print '
';
+ print ' ';
+ print '';
+
+ if ($action == 'edit') {
+ print ' | |||||||||||||||||