Merge branch 'Dolibarr:develop' into develop
This commit is contained in:
commit
9eefafb2ae
@ -479,7 +479,7 @@ class AccountancyExport
|
|||||||
/**
|
/**
|
||||||
* Export format : CIEL (Format XIMPORT)
|
* Export format : CIEL (Format XIMPORT)
|
||||||
* Format since 2003 compatible CIEL version > 2002 / Sage50
|
* Format since 2003 compatible CIEL version > 2002 / Sage50
|
||||||
* Last review for this format : 2021/07/28 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
* Last review for this format : 2021-09-13 Alexandre Spangaro (aspangaro@open-dsi.fr)
|
||||||
*
|
*
|
||||||
* Help : https://sage50c.online-help.sage.fr/aide-technique/
|
* Help : https://sage50c.online-help.sage.fr/aide-technique/
|
||||||
* In sage software | Use menu : "Exchange" > "Importing entries..."
|
* In sage software | Use menu : "Exchange" > "Importing entries..."
|
||||||
@ -507,7 +507,7 @@ class AccountancyExport
|
|||||||
|
|
||||||
$Tab = array();
|
$Tab = array();
|
||||||
$Tab['num_ecriture'] = str_pad($data->piece_num, 5);
|
$Tab['num_ecriture'] = str_pad($data->piece_num, 5);
|
||||||
$Tab['code_journal'] = str_pad($data->code_journal, 2);
|
$Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
|
||||||
$Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
|
$Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
|
||||||
$Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
|
$Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
|
||||||
$Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
|
$Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
|
||||||
@ -515,9 +515,9 @@ class AccountancyExport
|
|||||||
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
|
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
|
||||||
$Tab['montant'] = str_pad(price2fec(abs($data->debit - $data->credit)), 13, ' ', STR_PAD_LEFT);
|
$Tab['montant'] = str_pad(price2fec(abs($data->debit - $data->credit)), 13, ' ', STR_PAD_LEFT);
|
||||||
$Tab['type_montant'] = str_pad($data->sens, 1);
|
$Tab['type_montant'] = str_pad($data->sens, 1);
|
||||||
$Tab['vide'] = str_repeat(' ', 18);
|
$Tab['vide'] = str_repeat(' ', 18); // Analytical accounting - Not managed in Dolibarr
|
||||||
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
|
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
|
||||||
$Tab['end'] = 'O2003';
|
$Tab['end'] = 'O2003'; // 0 = EUR | 2003 = Format Ciel
|
||||||
|
|
||||||
$Tab['end_line'] = $end_line;
|
$Tab['end_line'] = $end_line;
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ if ($action == 'setMEMBER_ENABLE_PUBLIC') {
|
|||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
||||||
$amount = GETPOST('MEMBER_NEWFORM_AMOUNT');
|
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
|
||||||
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||||
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||||
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
$forcetype = GETPOST('MEMBER_NEWFORM_FORCETYPE', 'int');
|
||||||
@ -205,7 +205,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
print '<tr class="oddeven" id="tramount"><td>';
|
print '<tr class="oddeven" id="tramount"><td>';
|
||||||
print $langs->trans("DefaultAmount");
|
print $langs->trans("DefaultAmount");
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print '<input type="text" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" size="5" value="'.(!empty($conf->global->MEMBER_NEWFORM_AMOUNT) ? $conf->global->MEMBER_NEWFORM_AMOUNT : '').'">';
|
print '<input type="text" class="right width75" id="MEMBER_NEWFORM_AMOUNT" name="MEMBER_NEWFORM_AMOUNT" value="'.(!empty($conf->global->MEMBER_NEWFORM_AMOUNT) ? $conf->global->MEMBER_NEWFORM_AMOUNT : '').'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Can edit
|
// Can edit
|
||||||
|
|||||||
@ -660,7 +660,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||||
@ -731,7 +731,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
||||||
@ -802,7 +802,7 @@ if (empty($reshook)) {
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_EXCLUSION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_EXCLUSION;
|
||||||
@ -1509,7 +1509,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
$outputlangs = new Translate('', $conf);
|
$outputlangs = new Translate('', $conf);
|
||||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||||
// Load traductions files required by page
|
// Load traductions files required by page
|
||||||
$outputlangs->loadLangs(array("main", "members"));
|
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||||
// Get email content from template
|
// Get email content from template
|
||||||
$arraydefaultmessage = null;
|
$arraydefaultmessage = null;
|
||||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||||
|
|||||||
@ -213,7 +213,7 @@ if ($action == 'edit') {
|
|||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
|
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
foreach ($arrayofparameters as $constname => $val) {
|
foreach ($arrayofparameters as $constname => $val) {
|
||||||
if ($val['enabled']==1) {
|
if ($val['enabled']==1) {
|
||||||
@ -264,7 +264,7 @@ if ($action == 'edit') {
|
|||||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname);
|
print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname, 'customerorprospect', 'form', '', 1);
|
||||||
} elseif ($val['type'] == 'securekey') {
|
} elseif ($val['type'] == 'securekey') {
|
||||||
print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ?GETPOST($constname, 'alpha') : $conf->global->{$constname}).'" size="40">';
|
print '<input required="required" type="text" class="flat" id="'.$constname.'" name="'.$constname.'" value="'.(GETPOST($constname, 'alpha') ?GETPOST($constname, 'alpha') : $conf->global->{$constname}).'" size="40">';
|
||||||
if (!empty($conf->use_javascript_ajax)) {
|
if (!empty($conf->use_javascript_ajax)) {
|
||||||
@ -305,7 +305,7 @@ if ($action == 'edit') {
|
|||||||
} else {
|
} else {
|
||||||
if (!empty($arrayofparameters)) {
|
if (!empty($arrayofparameters)) {
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
foreach ($arrayofparameters as $constname => $val) {
|
foreach ($arrayofparameters as $constname => $val) {
|
||||||
if ($val['enabled']==1) {
|
if ($val['enabled']==1) {
|
||||||
@ -362,7 +362,7 @@ if ($action == 'edit') {
|
|||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$resprod = $product->fetch($conf->global->{$constname});
|
$resprod = $product->fetch($conf->global->{$constname});
|
||||||
if ($resprod > 0) {
|
if ($resprod > 0) {
|
||||||
print $product->ref;
|
print $product->getNomUrl(1);
|
||||||
} elseif ($resprod < 0) {
|
} elseif ($resprod < 0) {
|
||||||
setEventMessages(null, $object->errors, "errors");
|
setEventMessages(null, $object->errors, "errors");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,6 +47,8 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
// Constant and translation of the module description
|
// Constant and translation of the module description
|
||||||
$modules = array(
|
$modules = array(
|
||||||
|
'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
|
||||||
|
'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
|
||||||
'SOCIETE' => 'FCKeditorForCompany',
|
'SOCIETE' => 'FCKeditorForCompany',
|
||||||
'PRODUCTDESC' => 'FCKeditorForProduct',
|
'PRODUCTDESC' => 'FCKeditorForProduct',
|
||||||
'DETAILS' => 'FCKeditorForProductDetails',
|
'DETAILS' => 'FCKeditorForProductDetails',
|
||||||
@ -54,11 +56,11 @@ $modules = array(
|
|||||||
'MAILING' => 'FCKeditorForMailing',
|
'MAILING' => 'FCKeditorForMailing',
|
||||||
'MAIL' => 'FCKeditorForMail',
|
'MAIL' => 'FCKeditorForMail',
|
||||||
'TICKET' => 'FCKeditorForTicket',
|
'TICKET' => 'FCKeditorForTicket',
|
||||||
'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
|
|
||||||
'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
|
|
||||||
);
|
);
|
||||||
// Conditions for the option to be offered
|
// Conditions for the option to be offered
|
||||||
$conditions = array(
|
$conditions = array(
|
||||||
|
'NOTE_PUBLIC' => 1,
|
||||||
|
'NOTE_PRIVATE' => 1,
|
||||||
'SOCIETE' => 1,
|
'SOCIETE' => 1,
|
||||||
'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)),
|
'PRODUCTDESC' => (!empty($conf->product->enabled) || !empty($conf->service->enabled)),
|
||||||
'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
'DETAILS' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->supplier_proposal->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)),
|
||||||
@ -66,11 +68,11 @@ $conditions = array(
|
|||||||
'MAILING' => !empty($conf->mailing->enabled),
|
'MAILING' => !empty($conf->mailing->enabled),
|
||||||
'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
||||||
'TICKET' => !empty($conf->ticket->enabled),
|
'TICKET' => !empty($conf->ticket->enabled),
|
||||||
'NOTE_PUBLIC' => 1,
|
|
||||||
'NOTE_PRIVATE' => 1,
|
|
||||||
);
|
);
|
||||||
// Picto
|
// Picto
|
||||||
$picto = array(
|
$picto = array(
|
||||||
|
'NOTE_PUBLIC' => 'generic',
|
||||||
|
'NOTE_PRIVATE' => 'generic',
|
||||||
'SOCIETE' => 'generic',
|
'SOCIETE' => 'generic',
|
||||||
'PRODUCTDESC' => 'product',
|
'PRODUCTDESC' => 'product',
|
||||||
'DETAILS' => 'product',
|
'DETAILS' => 'product',
|
||||||
@ -78,8 +80,6 @@ $picto = array(
|
|||||||
'MAILING' => 'email',
|
'MAILING' => 'email',
|
||||||
'MAIL' => 'email',
|
'MAIL' => 'email',
|
||||||
'TICKET' => 'ticket',
|
'TICKET' => 'ticket',
|
||||||
'NOTE_PUBLIC' => 'generic',
|
|
||||||
'NOTE_PRIVATE' => 'generic',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -228,7 +228,7 @@ if (!empty($conf->agenda->enabled)) {
|
|||||||
$elementList['actioncomm_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventPush'));
|
$elementList['actioncomm_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventPush'));
|
||||||
}
|
}
|
||||||
if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) {
|
if (!empty($conf->eventorganization->enabled) && !empty($user->rights->eventorganization->read)) {
|
||||||
$elementList['eventorganization_send'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization'));
|
$elementList['conferenceorbooth'] = img_picto('', 'action', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToSendEventOrganization'));
|
||||||
}
|
}
|
||||||
if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) {
|
if (!empty($conf->partnership->enabled) && !empty($user->rights->partnership->read)) {
|
||||||
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToPartnership'));
|
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToPartnership'));
|
||||||
@ -1071,8 +1071,8 @@ if ($resql) {
|
|||||||
if ($showfield) {
|
if ($showfield) {
|
||||||
print '<!-- '.$fieldlist[$field].' -->';
|
print '<!-- '.$fieldlist[$field].' -->';
|
||||||
print '<td class="'.$class.'"';
|
print '<td class="'.$class.'"';
|
||||||
if ($value == 'topic') {
|
if (in_array($value, array('code', 'label', 'topic'))) {
|
||||||
print ' title="'.$valuetoshow.'"';
|
print ' title="'.dol_escape_htmltag($valuetoshow).'"';
|
||||||
}
|
}
|
||||||
print '>';
|
print '>';
|
||||||
print $valuetoshow;
|
print $valuetoshow;
|
||||||
|
|||||||
@ -101,6 +101,10 @@ if ($action == 'setMAIN_ENABLE_OVERWRITE_TRANSLATION') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'update') {
|
if ($action == 'update') {
|
||||||
|
if ($transkey == '') {
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Key")), null, 'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
if ($transvalue == '') {
|
if ($transvalue == '') {
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NewTranslationStringToShow")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NewTranslationStringToShow")), null, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -108,7 +112,7 @@ if ($action == 'update') {
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".GETPOST('rowid', 'int');
|
$sql = "UPDATE ".MAIN_DB_PREFIX."overwrite_trans set transkey = '".$db->escape($transkey)."', transvalue = '".$db->escape($transvalue)."' WHERE rowid = ".((int) GETPOST('rowid', 'int'));
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -324,7 +328,13 @@ if ($mode == 'overwrite') {
|
|||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
print '<td>'.$obj->lang.'</td>'."\n";
|
print '<td>'.$obj->lang.'</td>'."\n";
|
||||||
print '<td>'.$obj->transkey.'</td>'."\n";
|
print '<td>';
|
||||||
|
if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) {
|
||||||
|
print '<input type="text" class="quatrevingtpercent" name="transkey" value="'.dol_escape_htmltag($obj->transkey).'">';
|
||||||
|
} else {
|
||||||
|
print $obj->transkey;
|
||||||
|
}
|
||||||
|
print '</td>'."\n";
|
||||||
|
|
||||||
// Value
|
// Value
|
||||||
print '<td class="small">';
|
print '<td class="small">';
|
||||||
|
|||||||
@ -946,7 +946,7 @@ class BOM extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new BOMLine($this->db);
|
$objectline = new BOMLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -781,7 +781,7 @@ class FormCompany extends Form
|
|||||||
|
|
||||||
$out .= '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
$out .= '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
if ($showempty) {
|
if ($showempty) {
|
||||||
$out .= '<option value="0"></option>';
|
$out .= '<option value="0"> </option>';
|
||||||
}
|
}
|
||||||
foreach ($lesTypes as $key => $value) {
|
foreach ($lesTypes as $key => $value) {
|
||||||
$out .= '<option value="'.$key.'"';
|
$out .= '<option value="'.$key.'"';
|
||||||
@ -998,16 +998,16 @@ class FormCompany extends Form
|
|||||||
/**
|
/**
|
||||||
* Return a HTML select for thirdparty type
|
* Return a HTML select for thirdparty type
|
||||||
*
|
*
|
||||||
* @param int $selected selected value
|
* @param int $selected Selected value
|
||||||
* @param string $htmlname HTML select name
|
* @param string $htmlname HTML select name
|
||||||
* @param string $htmlidname HTML select id
|
* @param string $htmlidname HTML select id
|
||||||
* @param string $typeinput HTML output
|
* @param string $typeinput HTML output
|
||||||
* @param string $morecss More css
|
* @param string $morecss More css
|
||||||
* @return string HTML string
|
* @param string $allowempty Allow empty value or not
|
||||||
|
* @return string HTML string
|
||||||
*/
|
*/
|
||||||
public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '')
|
public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '', $allowempty = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) {
|
if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) {
|
||||||
return '' ;
|
return '' ;
|
||||||
@ -1015,8 +1015,14 @@ class FormCompany extends Form
|
|||||||
|
|
||||||
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
|
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
|
||||||
if ($typeinput == 'form') {
|
if ($typeinput == 'form') {
|
||||||
if ($selected == '' || $selected == '-1') {
|
if ($allowempty || ($selected == '' || $selected == '-1')) {
|
||||||
$out .= '<option value="-1"> </option>';
|
$out .= '<option value="-1">';
|
||||||
|
if (is_numeric($allowempty)) {
|
||||||
|
$out .= ' ';
|
||||||
|
} else {
|
||||||
|
$out .= $langs->trans($allowempty);
|
||||||
|
}
|
||||||
|
$out .= '</option>';
|
||||||
}
|
}
|
||||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||||
$out .= '<option value="2"'.($selected == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
|
$out .= '<option value="2"'.($selected == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
|
||||||
|
|||||||
@ -589,23 +589,29 @@ class FormTicket
|
|||||||
/**
|
/**
|
||||||
* Return html list of ticket anaytic codes
|
* Return html list of ticket anaytic codes
|
||||||
*
|
*
|
||||||
* @param string $selected Id categorie pre-selectionnée
|
* @param string $selected Id categorie pre-selectionnée
|
||||||
* @param string $htmlname Name of select component
|
* @param string $htmlname Name of select component
|
||||||
* @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users.
|
* @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users.
|
||||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||||
* @param int $empty 1=peut etre vide, 0 sinon
|
* @param int $empty 1=peut etre vide, 0 sinon
|
||||||
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
* @param int $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||||
* @param int $maxlength Max length of label
|
* @param int $maxlength Max length of label
|
||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
|
* @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
|
||||||
|
* @param Translate $outputlangs Output lnaguage
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0)
|
public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null)
|
||||||
{
|
{
|
||||||
global $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
|
dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
|
||||||
|
|
||||||
|
if (empty($outputlangs)) {
|
||||||
|
$outputlangs = $langs;
|
||||||
|
}
|
||||||
|
$outputlangs->load("ticket");
|
||||||
|
|
||||||
$ticketstat = new Ticket($this->db);
|
$ticketstat = new Ticket($this->db);
|
||||||
$ticketstat->loadCacheCategoriesTickets();
|
$ticketstat->loadCacheCategoriesTickets();
|
||||||
|
|
||||||
@ -629,6 +635,13 @@ class FormTicket
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$label = ($arraycategories['label'] != '-' ? $arraycategories['label'] : '');
|
||||||
|
if ($outputlangs->trans("TicketCategoryShort".$arraycategories['code']) != ("TicketCategoryShort".$arraycategories['code'])) {
|
||||||
|
$label = $outputlangs->trans("TicketCategoryShort".$arraycategories['code']);
|
||||||
|
} elseif ($outputlangs->trans($arraycategories['code']) != $arraycategories['code']) {
|
||||||
|
$label = $outputlangs->trans($arraycategories['code']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($format == 0) {
|
if ($format == 0) {
|
||||||
print '<option value="'.$id.'"';
|
print '<option value="'.$id.'"';
|
||||||
}
|
}
|
||||||
@ -657,7 +670,7 @@ class FormTicket
|
|||||||
print '>';
|
print '>';
|
||||||
|
|
||||||
if ($format == 0) {
|
if ($format == 0) {
|
||||||
$value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
|
$value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format == 1) {
|
if ($format == 1) {
|
||||||
@ -665,7 +678,7 @@ class FormTicket
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($format == 2) {
|
if ($format == 2) {
|
||||||
$value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
|
$value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($format == 3) {
|
if ($format == 3) {
|
||||||
@ -691,15 +704,16 @@ class FormTicket
|
|||||||
$stringtoprint .= '<select id ="'.$htmlname.'" class="maxwidth500 minwidth400" child_id="0">';
|
$stringtoprint .= '<select id ="'.$htmlname.'" class="maxwidth500 minwidth400" child_id="0">';
|
||||||
$stringtoprint .= '<option value=""> </option>';
|
$stringtoprint .= '<option value=""> </option>';
|
||||||
|
|
||||||
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ";
|
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ";
|
||||||
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
|
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
|
||||||
$sql .= " WHERE ctc.active > 0";
|
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
|
||||||
if ($filtertype == 'public=1') {
|
if ($filtertype == 'public=1') {
|
||||||
$sql .= " AND ctc.public = 1";
|
$sql .= " AND ctc.public = 1";
|
||||||
}
|
}
|
||||||
$sql .= " AND ctc.fk_parent = 0";
|
$sql .= " AND ctc.fk_parent = 0";
|
||||||
$sql .= $this->db->order('ctc.pos', 'ASC');
|
$sql .= $this->db->order('ctc.pos', 'ASC');
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num_rows_level0 = $this->db->num_rows($resql);
|
$num_rows_level0 = $this->db->num_rows($resql);
|
||||||
@ -707,23 +721,31 @@ class FormTicket
|
|||||||
while ($i < $num_rows_level0) {
|
while ($i < $num_rows_level0) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($obj) {
|
if ($obj) {
|
||||||
|
$label = ($obj->label != '-' ? $obj->label : '');
|
||||||
|
if ($outputlangs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code)) {
|
||||||
|
$label = $outputlangs->trans("TicketCategoryShort".$obj->code);
|
||||||
|
} elseif ($outputlangs->trans($obj->code) != $obj->code) {
|
||||||
|
$label = $outputlangs->trans($obj->code);
|
||||||
|
}
|
||||||
|
|
||||||
$grouprowid = $obj->rowid;
|
$grouprowid = $obj->rowid;
|
||||||
$groupvalue = $obj->code;
|
$groupvalue = $obj->code;
|
||||||
$grouplabel = $obj->label;
|
$grouplabel = $label;
|
||||||
|
|
||||||
$isparent = $obj->isparent;
|
$isparent = $obj->isparent;
|
||||||
$iselected = $groupticket == $obj->code ?'selected':'';
|
$iselected = $groupticket == $obj->code ?'selected':'';
|
||||||
$stringtoprint .= '<option '.$iselected.' class="'.$htmlname.dol_escape_htmltag($grouprowid).'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>';
|
$stringtoprint .= '<option '.$iselected.' class="'.$htmlname.dol_escape_htmltag($grouprowid).'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>';
|
||||||
if ($isparent == 'NOTPARENT') {
|
if ($isparent == 'NOTPARENT') {
|
||||||
$arraycodenotparent[] = $groupvalue;
|
$arraycodenotparent[] = $groupvalue;
|
||||||
}
|
}
|
||||||
$arrayidused[]=$grouprowid;
|
$arrayidused[] = $grouprowid;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
if ($num_rows_level0 == 1) {
|
if (count($arrayidused) == 1) {
|
||||||
return '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="'.dol_escape_htmltag($groupvalue).'">';
|
return '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="'.dol_escape_htmltag($groupvalue).'">';
|
||||||
} else {
|
} else {
|
||||||
$stringtoprint .= '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'_select" class="maxwidth500 minwidth400">';
|
$stringtoprint .= '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'_select" class="maxwidth500 minwidth400">';
|
||||||
@ -737,11 +759,11 @@ class FormTicket
|
|||||||
$stringtoprint .= '<select id ="'.$htmlname.'_child_'.$levelid.'" class="maxwidth500 minwidth400 groupticketchild" child_id="'.$levelid.'">';
|
$stringtoprint .= '<select id ="'.$htmlname.'_child_'.$levelid.'" class="maxwidth500 minwidth400 groupticketchild" child_id="'.$levelid.'">';
|
||||||
$stringtoprint .= '<option value=""> </option>';
|
$stringtoprint .= '<option value=""> </option>';
|
||||||
|
|
||||||
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctcjoin.code as codefather, ";
|
$sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ctcjoin.code as codefather, ";
|
||||||
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
|
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
|
||||||
$sql .= " JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctcjoin ON ctc.fk_parent = ctcjoin.rowid";
|
$sql .= " JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctcjoin ON ctc.fk_parent = ctcjoin.rowid";
|
||||||
$sql .= " WHERE ctc.active = 1";
|
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
|
||||||
if ($filtertype == 'public=1') {
|
if ($filtertype == 'public=1') {
|
||||||
$sql .= " AND ctc.public = 1";
|
$sql .= " AND ctc.public = 1";
|
||||||
}
|
}
|
||||||
@ -755,6 +777,7 @@ class FormTicket
|
|||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
$sql .= $this->db->order('ctc.pos', 'ASC');
|
$sql .= $this->db->order('ctc.pos', 'ASC');
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$num_rows = $this->db->num_rows($resql);
|
$num_rows = $this->db->num_rows($resql);
|
||||||
@ -763,9 +786,16 @@ class FormTicket
|
|||||||
while ($i < $num_rows) {
|
while ($i < $num_rows) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
if ($obj) {
|
if ($obj) {
|
||||||
|
$label = ($obj->label != '-' ? $obj->label : '');
|
||||||
|
if ($outputlangs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code)) {
|
||||||
|
$label = $outputlangs->trans("TicketCategoryShort".$obj->code);
|
||||||
|
} elseif ($outputlangs->trans($obj->code) != $obj->code) {
|
||||||
|
$label = $outputlangs->trans($obj->code);
|
||||||
|
}
|
||||||
|
|
||||||
$grouprowid = $obj->rowid;
|
$grouprowid = $obj->rowid;
|
||||||
$groupvalue = $obj->code;
|
$groupvalue = $obj->code;
|
||||||
$grouplabel = $obj->label;
|
$grouplabel = $label;
|
||||||
$isparent = $obj->isparent;
|
$isparent = $obj->isparent;
|
||||||
$fatherid = $obj->fk_parent;
|
$fatherid = $obj->fk_parent;
|
||||||
$arrayidused[] = $grouprowid;
|
$arrayidused[] = $grouprowid;
|
||||||
|
|||||||
@ -1135,7 +1135,7 @@ function price2numjs(amount) {
|
|||||||
var res = Math.round10(amount, - rounding);
|
var res = Math.round10(amount, - rounding);
|
||||||
// Other solution is
|
// Other solution is
|
||||||
// var res = dolroundjs(amount, rounding)
|
// var res = dolroundjs(amount, rounding)
|
||||||
console.log("res="+res)
|
console.log("price2numjs text="+amount+" return="+res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,16 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
* Prepare array with list of tabs
|
* Prepare array with list of tabs
|
||||||
*
|
*
|
||||||
* @param Project $project Object related to tabs
|
* @param Project $project Object related to tabs
|
||||||
|
* @param string $moreparam More param on url
|
||||||
* @return array Array of tabs to show
|
* @return array Array of tabs to show
|
||||||
*/
|
*/
|
||||||
function project_prepare_head(Project $project)
|
function project_prepare_head(Project $project, $moreparam = '')
|
||||||
{
|
{
|
||||||
global $db, $langs, $conf, $user;
|
global $db, $langs, $conf, $user;
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.$project->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
|
||||||
$head[$h][1] = $langs->trans("Project");
|
$head[$h][1] = $langs->trans("Project");
|
||||||
$head[$h][2] = 'project';
|
$head[$h][2] = 'project';
|
||||||
$h++;
|
$h++;
|
||||||
@ -56,7 +57,7 @@ function project_prepare_head(Project $project)
|
|||||||
$nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external'));
|
$nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external'));
|
||||||
dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result.
|
dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result.
|
||||||
}
|
}
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$project->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
|
||||||
$head[$h][1] = $langs->trans("ProjectContact");
|
$head[$h][1] = $langs->trans("ProjectContact");
|
||||||
if ($nbContacts > 0) {
|
if ($nbContacts > 0) {
|
||||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContacts.'</span>';
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbContacts.'</span>';
|
||||||
@ -80,7 +81,7 @@ function project_prepare_head(Project $project)
|
|||||||
$nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0));
|
$nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0));
|
||||||
dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result.
|
dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result.
|
||||||
}
|
}
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
|
||||||
$head[$h][1] = $langs->trans("Tasks");
|
$head[$h][1] = $langs->trans("Tasks");
|
||||||
if ($nbTasks > 0) {
|
if ($nbTasks > 0) {
|
||||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbTasks).'</span>';
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbTasks).'</span>';
|
||||||
@ -113,7 +114,7 @@ function project_prepare_head(Project $project)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.urlencode($project->id);
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
|
||||||
$head[$h][1] = $langs->trans("TimeSpent");
|
$head[$h][1] = $langs->trans("TimeSpent");
|
||||||
if ($nbTimeSpent > 0) {
|
if ($nbTimeSpent > 0) {
|
||||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">...</span>';
|
$head[$h][1] .= '<span class="badge marginleftonlyshort">...</span>';
|
||||||
|
|||||||
@ -69,12 +69,12 @@ class modFckeditor extends DolibarrModules
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$this->const = array();
|
$this->const = array();
|
||||||
$this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWIG for description and note (except products/services)");
|
$this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWIG for description and note (except products/services)");
|
||||||
$this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC", "yesno", "1", "WYSIWIG for products/services description and note");
|
$this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC", "yesno", "1", "WYSIWIG for products/services description and note");
|
||||||
$this->const[2] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
|
$this->const[2] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
|
||||||
$this->const[3] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
$this->const[3] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
||||||
$this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
|
$this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
|
||||||
$this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
$this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWIG for products details lines for all entities");
|
||||||
$this->const[6] = array("FCKEDITOR_SKIN", "string", "moono-lisa", "Skin by default for fckeditor");
|
$this->const[6] = array("FCKEDITOR_SKIN", "string", "moono-lisa", "Skin by default for fckeditor");
|
||||||
|
|
||||||
// Boxes
|
// Boxes
|
||||||
|
|||||||
@ -184,7 +184,7 @@ if ($action == 'presend') {
|
|||||||
$listeuser = array();
|
$listeuser = array();
|
||||||
$fuserdest = new User($db);
|
$fuserdest = new User($db);
|
||||||
|
|
||||||
$result = $fuserdest->fetchAll('ASC', 't.lastname', 0, 0, array('customsql'=>'t.statut=1 AND t.employee=1 AND t.email IS NOT NULL AND t.email<>\'\''), 'AND', true);
|
$result = $fuserdest->fetchAll('ASC', 't.lastname', 0, 0, array('customsql'=>"t.statut=1 AND t.employee=1 AND t.email IS NOT NULL AND t.email <> ''"), 'AND', true);
|
||||||
if ($result > 0 && is_array($fuserdest->users) && count($fuserdest->users) > 0) {
|
if ($result > 0 && is_array($fuserdest->users) && count($fuserdest->users) > 0) {
|
||||||
foreach ($fuserdest->users as $uuserdest) {
|
foreach ($fuserdest->users as $uuserdest) {
|
||||||
$listeuser[$uuserdest->id] = $uuserdest->user_get_property($uuserdest->id, 'email');
|
$listeuser[$uuserdest->id] = $uuserdest->user_get_property($uuserdest->id, 'email');
|
||||||
|
|||||||
@ -246,7 +246,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
|
|
||||||
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
|
||||||
|
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.urlencode($id).'&type=conf';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.urlencode($id).'&type=conf';
|
||||||
|
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
@ -749,7 +749,7 @@ class ConferenceOrBooth extends ActionComm
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new ConferenceOrBoothLine($this->db);
|
$objectline = new ConferenceOrBoothLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorbooth = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorbooth = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -103,7 +103,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
public $fields=array(
|
public $fields=array(
|
||||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
|
||||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
|
'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", 'picto'=>'company', 'css'=>'maxwidth500'),
|
'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", 'picto'=>'company', 'css'=>'maxwidth500'),
|
||||||
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
|
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
|
||||||
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project'),
|
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project'),
|
||||||
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
|
||||||
@ -197,8 +197,10 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
if (!empty($conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT)) {
|
if (!empty($conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT)) {
|
||||||
$this->fields['fk_soc']['type'] .= ' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.')';
|
$this->fields['fk_soc']['type'] .= ' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.')';
|
||||||
}
|
}
|
||||||
if ($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE!=='') {
|
if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE)
|
||||||
$this->fields['fk_soc']['type'] .= ' AND client='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
|
&& $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== ''
|
||||||
|
&& $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== '-1') {
|
||||||
|
$this->fields['fk_soc']['type'] .= ' AND client = '.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example to show how to set values of fields definition dynamically
|
// Example to show how to set values of fields definition dynamically
|
||||||
@ -390,7 +392,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
* @param string $sortfield Sort field
|
* @param string $sortfield Sort field
|
||||||
* @param int $limit limit
|
* @param int $limit limit
|
||||||
* @param int $offset Offset
|
* @param int $offset Offset
|
||||||
* @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...)
|
* @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...). WARNING: customerurl must be a sanitized SQL string.
|
||||||
* @param string $filtermode Filter mode (AND or OR)
|
* @param string $filtermode Filter mode (AND or OR)
|
||||||
* @return array|int int <0 if KO, array of pages if OK
|
* @return array|int int <0 if KO, array of pages if OK
|
||||||
*/
|
*/
|
||||||
@ -416,9 +418,9 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
if (count($filter) > 0) {
|
if (count($filter) > 0) {
|
||||||
foreach ($filter as $key => $value) {
|
foreach ($filter as $key => $value) {
|
||||||
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
|
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
|
||||||
$sqlwhere[] = $key.'='.$value;
|
$sqlwhere[] = $key.'='.((int) $value);
|
||||||
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
|
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
|
||||||
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||||
} elseif ($key == 'customsql') {
|
} elseif ($key == 'customsql') {
|
||||||
$sqlwhere[] = $value;
|
$sqlwhere[] = $value;
|
||||||
} elseif (strpos($value, '%') === false) {
|
} elseif (strpos($value, '%') === false) {
|
||||||
@ -949,7 +951,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new ConferenceOrBoothAttendeeLine($this->db);
|
$objectline = new ConferenceOrBoothAttendeeLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -152,7 +152,7 @@ if (!$permissiontoread) accessforbidden();
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (preg_match('/^set/', $action) && $projectid > 0) {
|
if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
|
||||||
$project = new Project($db);
|
$project = new Project($db);
|
||||||
//If "set" fields keys is in projects fields
|
//If "set" fields keys is in projects fields
|
||||||
$project_attr=preg_replace('/^set/', '', $action);
|
$project_attr=preg_replace('/^set/', '', $action);
|
||||||
@ -447,7 +447,7 @@ if ($projectid > 0) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$project->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$project->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 'md5');
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 'md5');
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
|
|||||||
@ -382,7 +382,7 @@ if (!empty($withproject)) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
@ -496,7 +496,15 @@ if (($id || $ref) && $action == 'edit') {
|
|||||||
|
|
||||||
// Part to show record
|
// Part to show record
|
||||||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
|
||||||
$res = $object->fetch_optionals();
|
$object->fetch_optionals();
|
||||||
|
|
||||||
|
$moreparam = '';
|
||||||
|
if ($withproject) {
|
||||||
|
$moreparam .= '&withproject=1';
|
||||||
|
}
|
||||||
|
if ($fk_project) {
|
||||||
|
$moreparam .= '&fk_project='.((int) $fk_project);
|
||||||
|
}
|
||||||
|
|
||||||
$head = conferenceorboothattendeePrepareHead($object);
|
$head = conferenceorboothattendeePrepareHead($object);
|
||||||
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
|
||||||
@ -538,13 +546,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
// Object card
|
// Object card
|
||||||
// ------------------------------------------------------------
|
// ------------------------------------------------------------
|
||||||
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1&conforboothid='.$confOrBooth->id .$withProjectUrl.'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.dol_buildpath('/eventorganization/conferenceorboothattendee_list.php', 1).'?restore_lastsearch_values=1'.($confOrBooth->id > 0 ? '&conforboothid='.((int) $confOrBooth->id) : '').$moreparam.'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$morehtmlref = '<div class="refidno">';
|
$morehtmlref = '<div class="refidno">';
|
||||||
|
|
||||||
$morehtmlref .= '</div>';
|
$morehtmlref .= '</div>';
|
||||||
|
|
||||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $moreparam);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
print '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
|
|||||||
@ -36,6 +36,7 @@ if ($conf->categorie->enabled) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
global $dolibarr_main_url_root;
|
||||||
|
|
||||||
// for other modules
|
// for other modules
|
||||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||||
@ -158,6 +159,24 @@ if (!$permissiontoread) accessforbidden();
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
|
||||||
|
$project = new Project($db);
|
||||||
|
//If "set" fields keys is in projects fields
|
||||||
|
$project_attr=preg_replace('/^set/', '', $action);
|
||||||
|
if (array_key_exists($project_attr, $project->fields)) {
|
||||||
|
$result = $project->fetch($projectid);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages(null, $project->errors, 'errors');
|
||||||
|
} else {
|
||||||
|
$project->{$project_attr}=GETPOST($project_attr);
|
||||||
|
$result=$project->update($user);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages(null, $project->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('cancel', 'alpha')) {
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
$action = 'list';
|
$action = 'list';
|
||||||
$massaction = '';
|
$massaction = '';
|
||||||
@ -541,7 +560,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||||
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
//print '<input type="text" value="'.$linksuggest.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
@ -557,8 +576,8 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||||
//print '</span>';
|
//print '</span>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
|
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global';
|
||||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
|
||||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||||
//print '<div class="urllink">';
|
//print '<div class="urllink">';
|
||||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||||
|
|||||||
@ -196,7 +196,7 @@ function conferenceorboothattendeePrepareHead($object)
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_card.php", 1).'?id='.$object->id.'&conforboothid='.$object->fk_actioncomm;
|
$head[$h][0] = DOL_URL_ROOT."/eventorganization/conferenceorboothattendee_card.php?id=".((int) $object->id).($object->fk_actioncomm > 0 ? '&conforboothid='.((int) $object->fk_actioncomm) : '').($object->fk_project > 0 ? '&withproject=1&fk_project='.((int) $object->fk_project) : '');
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'card';
|
$head[$h][2] = 'card';
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -1458,8 +1458,8 @@ class Expedition extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete batch expedition line
|
// delete batch expedition line (we try deletion even if module not enabled in case of the module were enabled and disabled previously)
|
||||||
if (!$error && $conf->productbatch->enabled) {
|
if (!$error) {
|
||||||
if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) {
|
if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) {
|
||||||
$error++; $this->errors[] = "Error ".$this->db->lasterror();
|
$error++; $this->errors[] = "Error ".$this->db->lasterror();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -631,6 +631,12 @@ if ($resql) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// End date
|
||||||
|
if (!empty($arrayfields['cp.date_valid']['checked'])) {
|
||||||
|
print '<td class="liste_titre center nowraponall">';
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
@ -691,6 +697,9 @@ if ($resql) {
|
|||||||
if (!empty($arrayfields['cp.date_fin']['checked'])) {
|
if (!empty($arrayfields['cp.date_fin']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
|
if (!empty($arrayfields['cp.date_valid']['checked'])) {
|
||||||
|
print_liste_field_titre($arrayfields['cp.date_valid']['label'], $_SERVER["PHP_SELF"], "cp.date_valid", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
@ -820,6 +829,18 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!empty($arrayfields['cp.date_valid']['checked'])) { // date_valid is both date_valid but also date_approval
|
||||||
|
print '<td class="center">';
|
||||||
|
print dol_print_date($db->jdate($obj->date_valid), 'day');
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) $totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
/*if (!empty($arrayfields['cp.date_approve']['checked'])) {
|
||||||
|
print '<td class="center">';
|
||||||
|
print dol_print_date($db->jdate($obj->date_approve), 'day');
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) $totalarray['nbfield']++;
|
||||||
|
}*/
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
|
|||||||
@ -29,18 +29,19 @@ INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private,
|
|||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__<br>\n\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 1);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(ThisIsContentOfSubscriptionReminderEmail)__<br>\n<br>__ONLINE_PAYMENT_TEXT_AND_URL__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Password)__ : __MEMBER_PASSWORD__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civility)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
-- Recruiting
|
-- Recruiting
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
-- Event organization
|
-- Event organization
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__(Sincerely)__<br /><br />__MYCOMPANY_NAME__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
|
||||||
-- Partnership
|
-- Partnership
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipWillSoonBeCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipWillSoonBeCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');
|
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipWillSoonBeCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__', 0, '<body>\n <p>__(Hello)__,<br><br>\n__(YourPartnershipWillSoonBeCanceledContent)__</p>\n<br />\n\n<br />\n\n __(Sincerely)__ <br />\n __[MAIN_INFO_SOCIETE_NOM]__ <br />\n </body>\n');
|
||||||
|
|||||||
@ -267,12 +267,14 @@ INSERT INTO llx_payment_vat (rowid, fk_tva, datec, datep, amount, fk_typepaiemen
|
|||||||
ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;
|
ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
-- Event organization
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__<br /><br />__ONLINE_PAYMENT_TEXT_AND_URL__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__<br /><br />__(Sincerely)__<br /><br />__MYCOMPANY_NAME__<br />__USER_SIGNATURE__', null, '1', null);
|
-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,<br /><br />__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
|
||||||
ALTER TABLE llx_projet ADD COLUMN accept_conference_suggestions integer DEFAULT 0;
|
ALTER TABLE llx_projet ADD COLUMN accept_conference_suggestions integer DEFAULT 0;
|
||||||
ALTER TABLE llx_projet ADD COLUMN accept_booth_suggestions integer DEFAULT 0;
|
ALTER TABLE llx_projet ADD COLUMN accept_booth_suggestions integer DEFAULT 0;
|
||||||
|
|||||||
@ -47,6 +47,15 @@ ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;
|
|||||||
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__,<br /><br />__(OrganizationEventConfRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__,<br /><br />__(OrganizationEventBoothRequestWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfBoothWasReceived)__<br /><br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__,<br /><br />__(OrganizationEventPaymentOfRegistrationWasReceived)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToAttendees)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__,<br /><br />__(OrganizationEventBulkMailToSpeakers)__<br /><br />__(Sincerely)__<br />__USER_SIGNATURE__', null, '1', null);
|
||||||
|
|
||||||
|
|
||||||
-- v15
|
-- v15
|
||||||
|
|
||||||
ALTER TABLE llx_holiday ADD COLUMN date_approve DATETIME DEFAULT NULL;
|
ALTER TABLE llx_holiday ADD COLUMN date_approve DATETIME DEFAULT NULL;
|
||||||
|
|||||||
@ -901,7 +901,7 @@ class KnowledgeRecord extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new KnowledgeRecordLine($this->db);
|
$objectline = new KnowledgeRecordLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_knowledgerecord = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_knowledgerecord = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -1706,8 +1706,10 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts
|
|||||||
##### FCKeditor #####
|
##### FCKeditor #####
|
||||||
AdvancedEditor=Advanced editor
|
AdvancedEditor=Advanced editor
|
||||||
ActivateFCKeditor=Activate advanced editor for:
|
ActivateFCKeditor=Activate advanced editor for:
|
||||||
FCKeditorForCompany=WYSIWIG creation/edition of elements description and note (except products/services)
|
FCKeditorForNotePublic=WYSIWIG creation/edition of the field public notes of elements
|
||||||
FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note
|
FCKeditorForNotePrivate=WYSIWIG creation/edition of the field private notes of elements
|
||||||
|
FCKeditorForCompany=WYSIWIG creation/edition of the field description of elements (except products/services)
|
||||||
|
FCKeditorForProduct=WYSIWIG creation/edition of the field description of products/services
|
||||||
FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <span class="warning">Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.</span>
|
FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). <span class="warning">Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.</span>
|
||||||
FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing)
|
FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing)
|
||||||
FCKeditorForUserSignature=WYSIWIG creation/edition of user signature
|
FCKeditorForUserSignature=WYSIWIG creation/edition of user signature
|
||||||
|
|||||||
@ -32,14 +32,9 @@ PaymentEvent=Payment of event
|
|||||||
# Admin page
|
# Admin page
|
||||||
#
|
#
|
||||||
NewRegistration=Registration
|
NewRegistration=Registration
|
||||||
<<<<<<< HEAD
|
|
||||||
EventOrganizationSetup = Event Organization setup
|
|
||||||
Settings = Settings
|
|
||||||
=======
|
|
||||||
EventOrganizationSetup=Event Organization setup
|
EventOrganizationSetup=Event Organization setup
|
||||||
EventOrganization=Event organization
|
EventOrganization=Event organization
|
||||||
Settings=Settings
|
Settings=Settings
|
||||||
>>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git
|
|
||||||
EventOrganizationSetupPage = Event Organization setup page
|
EventOrganizationSetupPage = Event Organization setup page
|
||||||
EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated
|
EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated
|
||||||
EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project<br><br>For example: <br>Send Call for Conference<br>Send Call for Booth<br>Receive call for conferences<br>Receive call for Booth<br>Open subscriptions to events for attendees<br>Send remind of event to speakers<br>Send remind of event to Booth hoster<br>Send remind of event to attendees
|
EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project<br><br>For example: <br>Send Call for Conference<br>Send Call for Booth<br>Receive call for conferences<br>Receive call for Booth<br>Open subscriptions to events for attendees<br>Send remind of event to speakers<br>Send remind of event to Booth hoster<br>Send remind of event to attendees
|
||||||
@ -47,8 +42,8 @@ EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Category to add to third-parties autom
|
|||||||
EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth
|
EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference.
|
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference.
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth.
|
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth.
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a subscription to a booth has been paid.
|
EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a registration to a booth has been paid.
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a subscription to an event has been paid.
|
EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a registration to an event has been paid.
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes
|
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes
|
||||||
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers
|
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers
|
||||||
EVENTORGANIZATION_FILTERATTENDEES_CAT = Filter thirdpartie's select list in attendees creation card/form with category
|
EVENTORGANIZATION_FILTERATTENDEES_CAT = Filter thirdpartie's select list in attendees creation card/form with category
|
||||||
@ -62,7 +57,7 @@ ManageOrganizeEvent = Manage the organization of an event
|
|||||||
ConferenceOrBooth = Conference Or Booth
|
ConferenceOrBooth = Conference Or Booth
|
||||||
ConferenceOrBoothTab = Conference Or Booth
|
ConferenceOrBoothTab = Conference Or Booth
|
||||||
AmountPaid = Amount paid
|
AmountPaid = Amount paid
|
||||||
DateOfRegistration = Date of subscription
|
DateOfRegistration = Date of registration
|
||||||
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -72,8 +67,8 @@ YourOrganizationEventConfRequestWasReceived = Your request for conference was re
|
|||||||
YourOrganizationEventBoothRequestWasReceived = Your request for booth was received
|
YourOrganizationEventBoothRequestWasReceived = Your request for booth was received
|
||||||
EventOrganizationEmailAskConf = Request for conference
|
EventOrganizationEmailAskConf = Request for conference
|
||||||
EventOrganizationEmailAskBooth = Request for booth
|
EventOrganizationEmailAskBooth = Request for booth
|
||||||
EventOrganizationEmailSubsBooth = Subscription for booth
|
EventOrganizationEmailBoothPayment = Payment of your booth
|
||||||
EventOrganizationEmailSubsEvent = Subscription for an event
|
EventOrganizationEmailRegistrationPayment = Registration for an event
|
||||||
EventOrganizationMassEmailAttendees = Communication to attendees
|
EventOrganizationMassEmailAttendees = Communication to attendees
|
||||||
EventOrganizationMassEmailSpeakers = Communication to speakers
|
EventOrganizationMassEmailSpeakers = Communication to speakers
|
||||||
|
|
||||||
@ -134,6 +129,14 @@ ConferenceIsNotConfirmed=Registration not available, conference is not confirmed
|
|||||||
DateMustBeBeforeThan=%s must be before %s
|
DateMustBeBeforeThan=%s must be before %s
|
||||||
DateMustBeAfterThan=%s must be after %s
|
DateMustBeAfterThan=%s must be after %s
|
||||||
|
|
||||||
|
NewSubscription=Registration
|
||||||
|
OrganizationEventConfRequestWasReceived=Your suggestion for a conference has been received
|
||||||
|
OrganizationEventBoothRequestWasReceived=Your request for a booth has been received
|
||||||
|
OrganizationEventPaymentOfBoothWasReceived=Your payment for your booth has been recorded
|
||||||
|
OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded
|
||||||
|
OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
|
||||||
|
OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vote page
|
# Vote page
|
||||||
#
|
#
|
||||||
@ -145,17 +148,10 @@ VoteOk = Your vote has been accepted.
|
|||||||
AlreadyVoted = You have already voted for this event.
|
AlreadyVoted = You have already voted for this event.
|
||||||
VoteError = An error has occurred during the vote, please try again.
|
VoteError = An error has occurred during the vote, please try again.
|
||||||
|
|
||||||
#
|
SubscriptionOk = Your registration has been validated
|
||||||
# SubscriptionOk page
|
|
||||||
#
|
|
||||||
SubscriptionOk = Your subscription has been validated
|
|
||||||
#
|
|
||||||
# Subscription validation mail
|
|
||||||
#
|
|
||||||
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
|
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
|
||||||
#
|
|
||||||
# Payment page
|
|
||||||
#
|
|
||||||
Attendee = Attendee
|
Attendee = Attendee
|
||||||
PaymentConferenceAttendee = Conference attendee payment
|
PaymentConferenceAttendee = Conference attendee payment
|
||||||
PaymentBoothLocation = Booth location payment
|
PaymentBoothLocation = Booth location payment
|
||||||
|
|
||||||
|
RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email <b>%s</b>
|
||||||
|
|||||||
@ -22,7 +22,7 @@ ProductService=Product or Service
|
|||||||
AllProducts=All products and services
|
AllProducts=All products and services
|
||||||
ChooseProduct/Service=Choose product or service
|
ChooseProduct/Service=Choose product or service
|
||||||
ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined
|
ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined
|
||||||
ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found).
|
ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0%% on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100%% if no default value can be found).
|
||||||
MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts
|
MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts
|
||||||
UseDiscountAsProduct=As a product
|
UseDiscountAsProduct=As a product
|
||||||
UseDiscountAsService=As a service
|
UseDiscountAsService=As a service
|
||||||
|
|||||||
@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
|
|||||||
TicketSeverityShortHIGH=High
|
TicketSeverityShortHIGH=High
|
||||||
TicketSeverityShortBLOCKING=Critical, Blocking
|
TicketSeverityShortBLOCKING=Critical, Blocking
|
||||||
|
|
||||||
|
TicketCategoryShortOTHER=Other
|
||||||
|
|
||||||
ErrorBadEmailAddress=Field '%s' incorrect
|
ErrorBadEmailAddress=Field '%s' incorrect
|
||||||
MenuTicketMyAssign=My tickets
|
MenuTicketMyAssign=My tickets
|
||||||
MenuTicketMyAssignNonClosed=My open tickets
|
MenuTicketMyAssignNonClosed=My open tickets
|
||||||
|
|||||||
@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
|
|||||||
TicketSeverityShortHIGH=Élevé
|
TicketSeverityShortHIGH=Élevé
|
||||||
TicketSeverityShortBLOCKING=Critique, bloquant
|
TicketSeverityShortBLOCKING=Critique, bloquant
|
||||||
|
|
||||||
|
TicketCategoryShortOTHER=Autre
|
||||||
|
|
||||||
ErrorBadEmailAddress=Champ '%s' incorrect
|
ErrorBadEmailAddress=Champ '%s' incorrect
|
||||||
MenuTicketMyAssign=Mes tickets
|
MenuTicketMyAssign=Mes tickets
|
||||||
MenuTicketMyAssignNonClosed=Mes tickets ouverts
|
MenuTicketMyAssignNonClosed=Mes tickets ouverts
|
||||||
|
|||||||
@ -208,7 +208,7 @@ $methods = array(
|
|||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"remises\">";
|
print '<input type="hidden" name="action" value="remises">';
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").'</td>';
|
print '<td>'.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
@ -224,13 +224,13 @@ print '</form>';
|
|||||||
// INTERNAL CONTACT TYPE USED AS COMMERCIAL AGENT
|
// INTERNAL CONTACT TYPE USED AS COMMERCIAL AGENT
|
||||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"contact\">";
|
print '<input type="hidden" name="action" value="contact">';
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
print '<td>'.$langs->trans("AgentContactType").'</td>';
|
print '<td>'.$langs->trans("AgentContactType").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
$formcompany = new FormCompany($db);
|
$formcompany = new FormCompany($db);
|
||||||
$facture = new Facture($db);
|
$facture = new Facture($db);
|
||||||
print $formcompany->selectTypeContact($facture, $conf->global->AGENT_CONTACT_TYPE, "AGENT_CONTACT_TYPE", "internal", "code", 1);
|
print $formcompany->selectTypeContact($facture, $conf->global->AGENT_CONTACT_TYPE, "AGENT_CONTACT_TYPE", "internal", "code", 1, "maxwidth250");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -960,7 +960,7 @@ class MyObject extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new MyObjectLine($this->db);
|
$objectline = new MyObjectLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_myobject = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_myobject = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -1206,7 +1206,7 @@ class Mo extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new MoLine($this->db);
|
$objectline = new MoLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_mo = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_mo = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -1157,7 +1157,7 @@ class Partnership extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new PartnershipLine($this->db);
|
$objectline = new PartnershipLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_partnership = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_partnership = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -623,7 +623,7 @@ if ($id > 0 || $ref) {
|
|||||||
// Currency
|
// Currency
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$currencycodetouse = GETPOST('multicurrency_code') ?GETPOST('multicurrency_code') : (isset($object->fourn_multicurrency_code) ? $object->fourn_multicurrency_code : '');
|
$currencycodetouse = GETPOST('multicurrency_code') ? GETPOST('multicurrency_code') : (isset($object->fourn_multicurrency_code) ? $object->fourn_multicurrency_code : '');
|
||||||
if (empty($currencycodetouse) && $object->fourn_multicurrency_tx == 1) {
|
if (empty($currencycodetouse) && $object->fourn_multicurrency_tx == 1) {
|
||||||
$currencycodetouse = $conf->currency;
|
$currencycodetouse = $conf->currency;
|
||||||
}
|
}
|
||||||
@ -635,7 +635,7 @@ if ($id > 0 || $ref) {
|
|||||||
|
|
||||||
// Currency price qty min
|
// Currency price qty min
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMinCurrency").'</td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMinCurrency").'</td>';
|
||||||
$pricesupplierincurrencytouse = (GETPOST('multicurrency_price') ?GETPOST('multicurrency_price') : (isset($object->fourn_multicurrency_price) ? $object->fourn_multicurrency_price : ''));
|
$pricesupplierincurrencytouse = (GETPOST('multicurrency_price') ? GETPOST('multicurrency_price') : (isset($object->fourn_multicurrency_price) ? $object->fourn_multicurrency_price : ''));
|
||||||
print '<td><input class="flat" name="multicurrency_price" size="8" value="'.price($pricesupplierincurrencytouse).'">';
|
print '<td><input class="flat" name="multicurrency_price" size="8" value="'.price($pricesupplierincurrencytouse).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type') ?GETPOST('multicurrency_price_base_type') : 'HT'), "multicurrency_price_base_type"); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices
|
print $form->selectPriceBaseType((GETPOST('multicurrency_price_base_type') ?GETPOST('multicurrency_price_base_type') : 'HT'), "multicurrency_price_base_type"); // We keep 'HT' here, multicurrency_price_base_type is not yet supported for supplier prices
|
||||||
@ -651,43 +651,45 @@ if ($id > 0 || $ref) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$currencies = array();
|
$currencies = array();
|
||||||
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE entity = '.$conf->entity;
|
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE entity = '.((int) $conf->entity);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$currency = new MultiCurrency($db);
|
$currency = new MultiCurrency($db);
|
||||||
while ($obj = $db->fetch_object($resql)) {
|
while ($obj = $db->fetch_object($resql)) {
|
||||||
$currency->fetch($obj->rowid);
|
$currency->fetch($obj->rowid);
|
||||||
$currencies[$currency->code] = $currency->rate->rate;
|
$currencies[$currency->code] = ((float) $currency->rate->rate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$currencies = json_encode($currencies);
|
$currencies = json_encode($currencies);
|
||||||
|
|
||||||
print <<<END
|
print <<<END
|
||||||
|
<!-- javascript to autocalculate the minimum price -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function update_price_from_multicurrency() {
|
function update_price_from_multicurrency() {
|
||||||
var multicurrency_price = $('input[name="multicurrency_price"]').val();
|
console.log("update_price_from_multicurrency");
|
||||||
var multicurrency_tx = $('input[name="multicurrency_tx"]').val();
|
var multicurrency_price = price2numjs($('input[name="multicurrency_price"]').val());
|
||||||
$('input[name="price"]').val(multicurrency_price / multicurrency_tx);
|
var multicurrency_tx = price2numjs($('input[name="multicurrency_tx"]').val());
|
||||||
$('input[name="disabled_price"]').val(multicurrency_price / multicurrency_tx);
|
if (multicurrency_tx != 0) {
|
||||||
|
$('input[name="price"]').val(multicurrency_price / multicurrency_tx);
|
||||||
|
$('input[name="disabled_price"]').val(multicurrency_price / multicurrency_tx);
|
||||||
|
} else {
|
||||||
|
$('input[name="price"]').val('');
|
||||||
|
$('input[name="disabled_price"]').val('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
$('input[name="disabled_price"]').prop('disabled', true);
|
$('input[name="disabled_price"]').prop('disabled', true);
|
||||||
$('select[name="disabled_price_base_type"]').prop('disabled', true);
|
$('select[name="disabled_price_base_type"]').prop('disabled', true);
|
||||||
update_price_from_multicurrency();
|
update_price_from_multicurrency();
|
||||||
|
|
||||||
$('input[name="multicurrency_price"]').keyup(function () {
|
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').keyup(function () {
|
||||||
update_price_from_multicurrency();
|
|
||||||
}).change(function () {
|
|
||||||
update_price_from_multicurrency();
|
|
||||||
}).on('paste', function () {
|
|
||||||
update_price_from_multicurrency();
|
update_price_from_multicurrency();
|
||||||
});
|
});
|
||||||
|
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').change(function () {
|
||||||
$('input[name="multicurrency_tx"]').keyup(function () {
|
|
||||||
update_price_from_multicurrency();
|
update_price_from_multicurrency();
|
||||||
}).change(function () {
|
});
|
||||||
update_price_from_multicurrency();
|
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').on('paste', function () {
|
||||||
}).on('paste', function () {
|
|
||||||
update_price_from_multicurrency();
|
update_price_from_multicurrency();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -698,7 +700,9 @@ if ($id > 0 || $ref) {
|
|||||||
|
|
||||||
var currencies_array = $currencies;
|
var currencies_array = $currencies;
|
||||||
$('select[name="multicurrency_code"]').change(function () {
|
$('select[name="multicurrency_code"]').change(function () {
|
||||||
|
console.log("We change the currency");
|
||||||
$('input[name="multicurrency_tx"]').val(currencies_array[$(this).val()]);
|
$('input[name="multicurrency_tx"]').val(currencies_array[$(this).val()]);
|
||||||
|
update_price_from_multicurrency();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@ -712,7 +716,6 @@ END;
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Discount qty min
|
// Discount qty min
|
||||||
print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
|
print '<tr><td>'.$langs->trans("DiscountQtyMin").'</td>';
|
||||||
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), '', 2)) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %';
|
print '<td><input class="flat" name="remise_percent" size="4" value="'.(GETPOSTISSET('remise_percent') ? vatrate(price2num(GETPOST('remise_percent'), '', 2)) : (isset($object->fourn_remise_percent) ?vatrate($object->fourn_remise_percent) : '')).'"> %';
|
||||||
|
|||||||
@ -1525,7 +1525,7 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$clone_project->datec = $now;
|
$clone_project->date_c = $now;
|
||||||
|
|
||||||
if (!$clone_note) {
|
if (!$clone_note) {
|
||||||
$clone_project->note_private = '';
|
$clone_project->note_private = '';
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/public/eventorganization/attendee_registration.php
|
* \file htdocs/public/eventorganization/attendee_register.php
|
||||||
* \ingroup project
|
* \ingroup project
|
||||||
* \brief Example of form to subscribe to an event
|
* \brief Example of form to subscribe to an event
|
||||||
*
|
*
|
||||||
@ -251,10 +251,10 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$confattendee = new ConferenceOrBoothAttendee($db);
|
$confattendee = new ConferenceOrBoothAttendee($db);
|
||||||
|
|
||||||
if ($type == 'global') {
|
if ($type == 'global') {
|
||||||
$filter = array('t.fk_project'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
$filter = array('t.fk_project'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"');
|
||||||
}
|
}
|
||||||
if ($action == 'conf') {
|
if ($action == 'conf') {
|
||||||
$filter = array('t.fk_actioncomm'=>$id, 'customsql'=>'t.email="'.$email.'"');
|
$filter = array('t.fk_actioncomm'=>((int) $id), 'customsql'=>'t.email="'.$db->escape($email).'"');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is already an attendee into table eventorganization_conferenceorboothattendee for same event (or conference/booth)
|
// Check if there is already an attendee into table eventorganization_conferenceorboothattendee for same event (or conference/booth)
|
||||||
@ -279,16 +279,25 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
// At this point, we have an existing $confattendee. It may not be linked to a thirdparty.
|
// At this point, we have an existing $confattendee. It may not be linked to a thirdparty.
|
||||||
//var_dump($confattendee);
|
//var_dump($confattendee);
|
||||||
|
|
||||||
// If the attendee has already been paid
|
// If the registration has already been paid for this attendee
|
||||||
if (!empty($confattendee->date_subscription)) {
|
if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
|
||||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'master');
|
||||||
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
|
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
|
||||||
|
|
||||||
|
$mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorder", $email);
|
||||||
|
setEventMessages($mesg, null, 'mesgs');
|
||||||
|
|
||||||
|
$db->commit();
|
||||||
|
|
||||||
Header("Location: ".$redirection);
|
Header("Location: ".$redirection);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$resultfetchthirdparty = -1;
|
||||||
|
|
||||||
// Getting the thirdparty or creating it
|
// Getting the thirdparty or creating it
|
||||||
$thirdparty = new Societe($db);
|
$thirdparty = new Societe($db);
|
||||||
|
$contact = new Contact($db);
|
||||||
// Fetch using fk_soc if the attendee was already found
|
// Fetch using fk_soc if the attendee was already found
|
||||||
if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
|
if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
|
||||||
$resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
|
$resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
|
||||||
@ -298,10 +307,19 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
if (!empty($societe)) {
|
if (!empty($societe)) {
|
||||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email);
|
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email);
|
||||||
if ($resultfetchthirdparty <= 0) {
|
if ($resultfetchthirdparty <= 0) {
|
||||||
// Need to create a new one (not found or multiple with the same name/email)
|
// Try to find the thirdparty from the contact
|
||||||
$resultfetchthirdparty = 0;
|
$resultfetchcontact = $contact->fetch('', null, '', $email);
|
||||||
|
if ($resultfetchcontact <= 0 || $contact->fk_soc <= 0) {
|
||||||
|
// Need to create a new one (not found or multiple with the same name/email)
|
||||||
|
$resultfetchthirdparty = 0;
|
||||||
|
} else {
|
||||||
|
$thirdparty->fetch($contact->fk_soc);
|
||||||
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
|
$confattendee->update($user);
|
||||||
|
$resultfetchthirdparty = 1;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// We found an unique result with that name/email, so we set the fk_soc of attendee
|
// We found a unique result with that name/email, so we set the fk_soc of attendee
|
||||||
$confattendee->fk_soc = $thirdparty->id;
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
$confattendee->update($user);
|
$confattendee->update($user);
|
||||||
}
|
}
|
||||||
@ -310,6 +328,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$resultfetchthirdparty = 0;
|
$resultfetchthirdparty = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Need to create a thirdparty (put number>0 if we do not want to create a thirdparty for free-conferences)
|
||||||
$resultfetchthirdparty = 0;
|
$resultfetchthirdparty = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -359,6 +378,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs);
|
$thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs);
|
||||||
$thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs);
|
$thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs);
|
||||||
|
|
||||||
|
// Update attendee country to match country of thirdparty
|
||||||
$confattendee->fk_soc = $thirdparty->id;
|
$confattendee->fk_soc = $thirdparty->id;
|
||||||
$confattendee->update($user);
|
$confattendee->update($user);
|
||||||
}
|
}
|
||||||
@ -370,6 +390,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
// TODO Use default language of $thirdparty->default_lang to build $outputlang
|
// TODO Use default language of $thirdparty->default_lang to build $outputlang
|
||||||
|
|
||||||
|
// Get product to use for invoice
|
||||||
$productforinvoicerow = new Product($db);
|
$productforinvoicerow = new Product($db);
|
||||||
$productforinvoicerow->id = 0;
|
$productforinvoicerow->id = 0;
|
||||||
|
|
||||||
@ -378,6 +399,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create invoice
|
||||||
if ($resultprod < 0) {
|
if ($resultprod < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
$errmsg .= $productforinvoicerow->error;
|
$errmsg .= $productforinvoicerow->error;
|
||||||
@ -428,8 +450,10 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
// Registration was recorded and invoice was generated, so we send an email
|
// Registration was recorded and invoice was generated, but payment not yet done.
|
||||||
// TODO
|
// TODO
|
||||||
|
// Send an email to says registration shas been received and that we are waiting for the payment.
|
||||||
|
// Should send email template (EventOrganizationEmailRegistrationEvent) saved into conf EVENTORGANIZATION_TEMPLATE_EMAIL_REGISTRATION_EVENT.
|
||||||
|
|
||||||
// Now we redirect to the payment page
|
// Now we redirect to the payment page
|
||||||
$sourcetouse = 'organizedeventregistration';
|
$sourcetouse = 'organizedeventregistration';
|
||||||
@ -442,6 +466,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
|||||||
$redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
$redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Header("Location: ".$redirection);
|
Header("Location: ".$redirection);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
@ -585,13 +610,15 @@ if (!empty($conference->id) && $conference->status==ConferenceOrBooth::STATUS_CO
|
|||||||
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("Email") . '<FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n";
|
print '<tr><td>' . $langs->trans("Email") . '<font color="red">*</font></td><td><input type="text" name="email" maxlength="255" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('email')) . '"></td></tr>' . "\n";
|
||||||
// Company
|
// Company
|
||||||
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company");
|
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company");
|
||||||
if (!empty(floatval($project->price_registration))) {
|
if (!empty(floatval($project->price_registration))) {
|
||||||
print '<FONT COLOR="red">*</FONT>';
|
print '<font color="red">*</font>';
|
||||||
}
|
}
|
||||||
print ' </td><td><input type="text" name="societe" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n";
|
print ' </td><td>';
|
||||||
|
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||||
|
print '<input type="text" name="societe" class="minwidth200" value="' . dol_escape_htmltag(GETPOST('societe')) . '"></td></tr>' . "\n";
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n";
|
print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n";
|
||||||
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1) . '</textarea></td></tr>' . "\n";
|
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1) . '</textarea></td></tr>' . "\n";
|
||||||
@ -602,7 +629,8 @@ if (!empty($conference->id) && $conference->status==ConferenceOrBooth::STATUS_CO
|
|||||||
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1);
|
print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>' . $langs->trans('Country') . '<FONT COLOR="red">*</FONT></td><td>';
|
print '<tr><td>' . $langs->trans('Country') . '<font color="red">*</font></td><td>';
|
||||||
|
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)) {
|
||||||
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
||||||
@ -536,15 +536,16 @@ jQuery(document).ready(function () {
|
|||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
function initmorphy()
|
function initmorphy()
|
||||||
{
|
{
|
||||||
if (jQuery("#morphy").val()==\'phy\') {
|
console.log("Call initmorphy");
|
||||||
jQuery("#trcompany").hide();
|
if (jQuery("#morphy").val() == \'phy\') {
|
||||||
}
|
jQuery("#trcompany").hide();
|
||||||
if (jQuery("#morphy").val()==\'mor\') {
|
}
|
||||||
jQuery("#trcompany").show();
|
if (jQuery("#morphy").val() == \'mor\') {
|
||||||
}
|
jQuery("#trcompany").show();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
initmorphy();
|
initmorphy();
|
||||||
jQuery("#morphy").click(function() {
|
jQuery("#morphy").change(function() {
|
||||||
initmorphy();
|
initmorphy();
|
||||||
});
|
});
|
||||||
jQuery("#selectcountry_id").change(function() {
|
jQuery("#selectcountry_id").change(function() {
|
||||||
@ -592,21 +593,33 @@ if (empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY)) {
|
|||||||
print '<input type="hidden" id="morphy" name="morphy" value="'.$conf->global->MEMBER_NEWFORM_FORCEMORPHY.'">';
|
print '<input type="hidden" id="morphy" name="morphy" value="'.$conf->global->MEMBER_NEWFORM_FORCEMORPHY.'">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Civility
|
// Company
|
||||||
|
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td>';
|
||||||
|
print img_picto('', 'company', 'class="pictofixedwidth"');
|
||||||
|
print '<input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
||||||
|
// Title
|
||||||
print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans('UserTitle').'</td><td>';
|
||||||
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
|
print $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
|
||||||
// Lastname
|
// Lastname
|
||||||
print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="lastname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n";
|
print '<tr><td>'.$langs->trans("Lastname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="lastname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('lastname')).'"></td></tr>'."\n";
|
||||||
// Firstname
|
// Firstname
|
||||||
print '<tr><td>'.$langs->trans("Firstname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="firstname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n";
|
print '<tr><td>'.$langs->trans("Firstname").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="firstname" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('firstname')).'"></td></tr>'."\n";
|
||||||
|
// EMail
|
||||||
|
print '<tr><td>'.$langs->trans("Email").($conf->global->ADHERENT_MAIL_REQUIRED ? ' <span style="color:red;">*</span>' : '').'</td><td>';
|
||||||
|
//print img_picto('', 'email', 'class="pictofixedwidth"');
|
||||||
|
print '<input type="text" name="email" maxlength="255" class="minwidth200" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
|
||||||
|
// Login
|
||||||
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
||||||
|
print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" maxlength="50" class="minwidth100"value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n";
|
||||||
|
print '<tr><td>'.$langs->trans("Password").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass1" class="minwidth100" value="'.GETPOST("pass1", "nohtml").'"></td></tr>'."\n";
|
||||||
|
print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass2" class="minwidth100" value="'.GETPOST("pass2", "nohtml").'"></td></tr>'."\n";
|
||||||
|
}
|
||||||
// Gender
|
// Gender
|
||||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||||
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
|
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Company
|
|
||||||
print '<tr id="trcompany" class="trcompany"><td>'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('societe')).'"></td></tr>'."\n";
|
|
||||||
// Address
|
// Address
|
||||||
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n";
|
||||||
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
print '<textarea name="address" id="address" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n";
|
||||||
@ -618,7 +631,8 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Country
|
// Country
|
||||||
print '<tr><td>'.$langs->trans('Country').'</td><td>';
|
print '<tr><td>'.$langs->trans('Country').'</td><td>';
|
||||||
$country_id = GETPOST('country_id');
|
print img_picto('', 'country', 'class="pictofixedwidth"');
|
||||||
|
$country_id = GETPOST('country_id', 'int');
|
||||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||||
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
||||||
}
|
}
|
||||||
@ -644,14 +658,6 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
// EMail
|
|
||||||
print '<tr><td>'.$langs->trans("Email").($conf->global->ADHERENT_MAIL_REQUIRED ? ' <span style="color:red;">*</span>' : '').'</td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
|
|
||||||
// Login
|
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
|
||||||
print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" maxlength="50" class="minwidth100"value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n";
|
|
||||||
print '<tr><td>'.$langs->trans("Password").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass1" class="minwidth100" value="'.GETPOST("pass1").'"></td></tr>'."\n";
|
|
||||||
print '<tr><td>'.$langs->trans("PasswordAgain").' <FONT COLOR="red">*</FONT></td><td><input type="password" maxlength="128" name="pass2" class="minwidth100" value="'.GETPOST("pass2").'"></td></tr>'."\n";
|
|
||||||
}
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>';
|
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>';
|
||||||
print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0);
|
print $form->selectDate($birthday, 'birth', 0, 0, 1, "newmember", 1, 0);
|
||||||
@ -669,7 +675,8 @@ print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
|||||||
print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>';
|
print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="'.ROWS_3.'">'.dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1).'</textarea></td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
// Add specific fields used by Dolibarr foundation for example
|
// Add specific fields used by Dolibarr foundation for example
|
||||||
|
// TODO Move this into generic feature.
|
||||||
if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
|
if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
|
||||||
$arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+');
|
$arraybudget = array('50'=>'<= 100 000', '100'=>'<= 200 000', '200'=>'<= 500 000', '300'=>'<= 1 500 000', '600'=>'<= 3 000 000', '1000'=>'<= 5 000 000', '2000'=>'5 000 000+');
|
||||||
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
|
print '<tr id="trbudget" class="trcompany"><td>'.$langs->trans("TurnoverOrBudget").' <FONT COLOR="red">*</FONT></td><td>';
|
||||||
@ -712,6 +719,7 @@ if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
|
|||||||
</script>';
|
</script>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
|
if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
|
||||||
// $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount
|
// $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount
|
||||||
|
|
||||||
|
|||||||
@ -1834,7 +1834,8 @@ if ($source == 'organizedeventregistration') {
|
|||||||
// Debitor
|
// Debitor
|
||||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Attendee");
|
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Attendee");
|
||||||
print '</td><td class="CTableRow2"><b>';
|
print '</td><td class="CTableRow2"><b>';
|
||||||
print $thirdparty->name;
|
print $attendee->email;
|
||||||
|
print ($thirdparty->name ? ' ('.$thirdparty->name.')' : '');
|
||||||
print '</b>';
|
print '</b>';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -1445,6 +1445,7 @@ if ($ispaymentok) {
|
|||||||
|
|
||||||
$key = 'ONLINE_PAYMENT_MESSAGE_OK';
|
$key = 'ONLINE_PAYMENT_MESSAGE_OK';
|
||||||
if (!empty($conf->global->$key)) {
|
if (!empty($conf->global->$key)) {
|
||||||
|
print '<br>';
|
||||||
print $conf->global->$key;
|
print $conf->global->$key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -893,7 +893,7 @@ class RecruitmentCandidature extends CommonObject
|
|||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
$objectline = new RecruitmentCandidatureLine($this->db);
|
$objectline = new RecruitmentCandidatureLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_recruitmentcandidature = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_recruitmentcandidature = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
|
|||||||
@ -1759,7 +1759,7 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
$this->country_id = $obj->country_id;
|
$this->country_id = $obj->country_id;
|
||||||
$this->country_code = $obj->country_id ? $obj->country_code : '';
|
$this->country_code = $obj->country_id ? $obj->country_code : '';
|
||||||
$this->country = $obj->country_id ? ($langs->transnoentities('Country'.$obj->country_code) != 'Country'.$obj->country_code ? $langs->transnoentities('Country'.$obj->country_code) : $obj->country) : '';
|
$this->country = $obj->country_id ? (($langs->transnoentities('Country'.$obj->country_code) != 'Country'.$obj->country_code) ? $langs->transnoentities('Country'.$obj->country_code) : $obj->country) : '';
|
||||||
|
|
||||||
$this->state_id = $obj->state_id;
|
$this->state_id = $obj->state_id;
|
||||||
$this->state_code = $obj->state_code;
|
$this->state_code = $obj->state_code;
|
||||||
|
|||||||
@ -1166,22 +1166,22 @@ class Ticket extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Charge dans cache la liste des catégories de tickets (paramétrable dans dictionnaire)
|
* Load into a cache array, the list of ticket categories (setup done into dictionary)
|
||||||
*
|
*
|
||||||
* @return int Number of lines loaded, 0 if already loaded, <0 if KO
|
* @return int Number of lines loaded, 0 if already loaded, <0 if KO
|
||||||
*/
|
*/
|
||||||
public function loadCacheCategoriesTickets()
|
public function loadCacheCategoriesTickets()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if (!empty($this->cache_category_ticket) && count($this->cache_category_tickets)) {
|
if (!empty($this->cache_category_ticket) && count($this->cache_category_tickets)) {
|
||||||
|
// Cache already loaded
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// Cache deja charge
|
|
||||||
|
|
||||||
$sql = "SELECT rowid, code, label, use_default, pos, description, public, active, force_severity, fk_parent";
|
$sql = "SELECT rowid, code, label, use_default, pos, description, public, active, force_severity, fk_parent";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category";
|
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category";
|
||||||
$sql .= " WHERE active > 0";
|
$sql .= " WHERE active > 0 AND entity = ".((int) $conf->entity);
|
||||||
$sql .= " ORDER BY pos";
|
$sql .= " ORDER BY pos";
|
||||||
dol_syslog(get_class($this)."::load_cache_categories_tickets", LOG_DEBUG);
|
dol_syslog(get_class($this)."::load_cache_categories_tickets", LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
@ -1191,15 +1191,18 @@ class Ticket extends CommonObject
|
|||||||
while ($i < $num) {
|
while ($i < $num) {
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
$this->cache_category_tickets[$obj->rowid]['code'] = $obj->code;
|
$this->cache_category_tickets[$obj->rowid]['code'] = $obj->code;
|
||||||
// Si traduction existe, on l'utilise, sinon on prend le libelle par defaut
|
|
||||||
$label = ($langs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code) ? $langs->trans("TicketCategoryShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
|
|
||||||
$this->cache_category_tickets[$obj->rowid]['label'] = $label;
|
|
||||||
$this->cache_category_tickets[$obj->rowid]['use_default'] = $obj->use_default;
|
$this->cache_category_tickets[$obj->rowid]['use_default'] = $obj->use_default;
|
||||||
$this->cache_category_tickets[$obj->rowid]['pos'] = $obj->pos;
|
$this->cache_category_tickets[$obj->rowid]['pos'] = $obj->pos;
|
||||||
$this->cache_category_tickets[$obj->rowid]['public'] = $obj->public;
|
$this->cache_category_tickets[$obj->rowid]['public'] = $obj->public;
|
||||||
$this->cache_category_tickets[$obj->rowid]['active'] = $obj->active;
|
$this->cache_category_tickets[$obj->rowid]['active'] = $obj->active;
|
||||||
$this->cache_category_tickets[$obj->rowid]['force_severity'] = $obj->force_severity;
|
$this->cache_category_tickets[$obj->rowid]['force_severity'] = $obj->force_severity;
|
||||||
$this->cache_category_tickets[$obj->rowid]['fk_parent'] = $obj->fk_parent;
|
$this->cache_category_tickets[$obj->rowid]['fk_parent'] = $obj->fk_parent;
|
||||||
|
|
||||||
|
// If translation exists, we use it to store already translated string.
|
||||||
|
// Warning: You should not use this and recompute the translated string into caller code to get the value into expected language
|
||||||
|
$label = ($langs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code) ? $langs->trans("TicketCategoryShort".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
|
||||||
|
$this->cache_category_tickets[$obj->rowid]['label'] = $label;
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
return $num;
|
return $num;
|
||||||
|
|||||||
@ -455,8 +455,9 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sid) { // permet une recherche du user par son SID ActiveDirectory ou Samba
|
if ($sid) {
|
||||||
$sql .= " AND (u.ldap_sid = '".$this->db->escape($sid)."' OR u.login = '".$this->db->escape($login)."') LIMIT 1";
|
// permet une recherche du user par son SID ActiveDirectory ou Samba
|
||||||
|
$sql .= " AND (u.ldap_sid = '".$this->db->escape($sid)."' OR u.login = '".$this->db->escape($login)."')";
|
||||||
} elseif ($login) {
|
} elseif ($login) {
|
||||||
$sql .= " AND u.login = '".$this->db->escape($login)."'";
|
$sql .= " AND u.login = '".$this->db->escape($login)."'";
|
||||||
} elseif ($email) {
|
} elseif ($email) {
|
||||||
@ -466,6 +467,11 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
$sql .= " ORDER BY u.entity ASC"; // Avoid random result when there is 2 login in 2 different entities
|
$sql .= " ORDER BY u.entity ASC"; // Avoid random result when there is 2 login in 2 different entities
|
||||||
|
|
||||||
|
if ($sid) {
|
||||||
|
// permet une recherche du user par son SID ActiveDirectory ou Samba
|
||||||
|
$sql .= ' '.$this->db->plimit(1);
|
||||||
|
}
|
||||||
|
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|||||||
@ -927,17 +927,20 @@ class Workstation extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->lines = array();
|
$this->lines = array();
|
||||||
|
|
||||||
|
/*
|
||||||
$objectline = new WorkstationLine($this->db);
|
$objectline = new WorkstationLine($this->db);
|
||||||
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_workstation = '.$this->id));
|
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_workstation = '.((int) $this->id)));
|
||||||
|
|
||||||
if (is_numeric($result)) {
|
if (is_numeric($result)) {
|
||||||
$this->error = $this->error;
|
$this->error = $this->error;
|
||||||
$this->errors = $this->errors;
|
$this->errors = $this->errors;
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
|
||||||
$this->lines = $result;
|
|
||||||
return $this->lines;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->lines = $result;
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $this->lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user