Merge branch 'develop' into develop#1
This commit is contained in:
commit
fdcd523c55
@ -479,7 +479,7 @@ class AccountancyExport
|
||||
/**
|
||||
* Export format : CIEL (Format XIMPORT)
|
||||
* 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/
|
||||
* In sage software | Use menu : "Exchange" > "Importing entries..."
|
||||
@ -507,7 +507,7 @@ class AccountancyExport
|
||||
|
||||
$Tab = array();
|
||||
$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_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
|
||||
$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['montant'] = str_pad(price2fec(abs($data->debit - $data->credit)), 13, ' ', STR_PAD_LEFT);
|
||||
$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['end'] = 'O2003';
|
||||
$Tab['end'] = 'O2003'; // 0 = EUR | 2003 = Format Ciel
|
||||
|
||||
$Tab['end_line'] = $end_line;
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ if ($action == 'setMEMBER_ENABLE_PUBLIC') {
|
||||
|
||||
if ($action == 'update') {
|
||||
$public = GETPOST('MEMBER_ENABLE_PUBLIC');
|
||||
$amount = GETPOST('MEMBER_NEWFORM_AMOUNT');
|
||||
$amount = price2num(GETPOST('MEMBER_NEWFORM_AMOUNT'), 'MT', 2);
|
||||
$editamount = GETPOST('MEMBER_NEWFORM_EDITAMOUNT');
|
||||
$payonline = GETPOST('MEMBER_NEWFORM_PAYONLINE');
|
||||
$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 $langs->trans("DefaultAmount");
|
||||
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";
|
||||
|
||||
// Can edit
|
||||
|
||||
@ -660,7 +660,7 @@ if (empty($reshook)) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage = null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||
@ -731,7 +731,7 @@ if (empty($reshook)) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage = null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
||||
@ -802,7 +802,7 @@ if (empty($reshook)) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage = null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_EXCLUSION;
|
||||
@ -1509,7 +1509,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
$outputlangs->loadLangs(array("main", "members", "companies", "install", "other"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage = null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||
|
||||
@ -213,7 +213,7 @@ if ($action == 'edit') {
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
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) {
|
||||
if ($val['enabled']==1) {
|
||||
@ -264,7 +264,7 @@ if ($action == 'edit') {
|
||||
} elseif (preg_match('/thirdparty_type/', $val['type'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
$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') {
|
||||
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)) {
|
||||
@ -305,7 +305,7 @@ if ($action == 'edit') {
|
||||
} else {
|
||||
if (!empty($arrayofparameters)) {
|
||||
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) {
|
||||
if ($val['enabled']==1) {
|
||||
@ -362,7 +362,7 @@ if ($action == 'edit') {
|
||||
$product = new Product($db);
|
||||
$resprod = $product->fetch($conf->global->{$constname});
|
||||
if ($resprod > 0) {
|
||||
print $product->ref;
|
||||
print $product->getNomUrl(1);
|
||||
} elseif ($resprod < 0) {
|
||||
setEventMessages(null, $object->errors, "errors");
|
||||
}
|
||||
|
||||
@ -252,9 +252,8 @@ if ($resql) {
|
||||
print '<tr class="liste_titre">';
|
||||
print "<td>".$langs->trans("RSS")." ".($i + 1)."</td>";
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button buttongen" name="modify" value="'.$langs->trans("Modify").'">';
|
||||
print " ";
|
||||
print '<input type="submit" class="button buttongen" name="delete" value="'.$langs->trans("Delete").'">';
|
||||
print '<input type="submit" class="button buttongen button-save" name="modify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button buttongen button-cancel" name="delete" value="'.$langs->trans("Delete").'">';
|
||||
print '<input type="hidden" name="norss" value="'.$idrss.'">';
|
||||
print '</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -47,6 +47,8 @@ if (!$user->admin) {
|
||||
|
||||
// Constant and translation of the module description
|
||||
$modules = array(
|
||||
'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
|
||||
'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
|
||||
'SOCIETE' => 'FCKeditorForCompany',
|
||||
'PRODUCTDESC' => 'FCKeditorForProduct',
|
||||
'DETAILS' => 'FCKeditorForProductDetails',
|
||||
@ -54,11 +56,11 @@ $modules = array(
|
||||
'MAILING' => 'FCKeditorForMailing',
|
||||
'MAIL' => 'FCKeditorForMail',
|
||||
'TICKET' => 'FCKeditorForTicket',
|
||||
'NOTE_PUBLIC' => 'FCKeditorForNotePublic',
|
||||
'NOTE_PRIVATE' => 'FCKeditorForNotePrivate',
|
||||
);
|
||||
// Conditions for the option to be offered
|
||||
$conditions = array(
|
||||
'NOTE_PUBLIC' => 1,
|
||||
'NOTE_PRIVATE' => 1,
|
||||
'SOCIETE' => 1,
|
||||
'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)),
|
||||
@ -66,11 +68,11 @@ $conditions = array(
|
||||
'MAILING' => !empty($conf->mailing->enabled),
|
||||
'MAIL' => (!empty($conf->facture->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled)),
|
||||
'TICKET' => !empty($conf->ticket->enabled),
|
||||
'NOTE_PUBLIC' => 1,
|
||||
'NOTE_PRIVATE' => 1,
|
||||
);
|
||||
// Picto
|
||||
$picto = array(
|
||||
'NOTE_PUBLIC' => 'generic',
|
||||
'NOTE_PRIVATE' => 'generic',
|
||||
'SOCIETE' => 'generic',
|
||||
'PRODUCTDESC' => 'product',
|
||||
'DETAILS' => 'product',
|
||||
@ -78,8 +80,6 @@ $picto = array(
|
||||
'MAILING' => 'email',
|
||||
'MAIL' => 'email',
|
||||
'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'));
|
||||
}
|
||||
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)) {
|
||||
$elementList['partnership_send'] = img_picto('', 'partnership', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToPartnership'));
|
||||
@ -935,7 +935,7 @@ if ($resql) {
|
||||
print '<td class="center">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button buttongen" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button buttongen button-save" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
|
||||
print '<input type="submit" class="button buttongen button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
@ -1071,8 +1071,8 @@ if ($resql) {
|
||||
if ($showfield) {
|
||||
print '<!-- '.$fieldlist[$field].' -->';
|
||||
print '<td class="'.$class.'"';
|
||||
if ($value == 'topic') {
|
||||
print ' title="'.$valuetoshow.'"';
|
||||
if (in_array($value, array('code', 'label', 'topic'))) {
|
||||
print ' title="'.dol_escape_htmltag($valuetoshow).'"';
|
||||
}
|
||||
print '>';
|
||||
print $valuetoshow;
|
||||
|
||||
@ -101,6 +101,10 @@ if ($action == 'setMAIN_ENABLE_OVERWRITE_TRANSLATION') {
|
||||
}
|
||||
|
||||
if ($action == 'update') {
|
||||
if ($transkey == '') {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Key")), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
if ($transvalue == '') {
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NewTranslationStringToShow")), null, 'errors');
|
||||
$error++;
|
||||
@ -108,7 +112,7 @@ if ($action == 'update') {
|
||||
if (!$error) {
|
||||
$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);
|
||||
if ($result > 0) {
|
||||
$db->commit();
|
||||
@ -324,7 +328,13 @@ if ($mode == 'overwrite') {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
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
|
||||
print '<td class="small">';
|
||||
|
||||
@ -946,7 +946,7 @@ class BOM extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -889,7 +889,7 @@ if ($resql) {
|
||||
print '</td>';
|
||||
}*/
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" name="save" class="button buttongen marginbottomonly" value="'.$langs->trans("Add").'"><br>';
|
||||
print '<input type="submit" name="save" class="button buttongen marginbottomonly button-add" value="'.$langs->trans("Add").'"><br>';
|
||||
print '<input type="submit" name="cancel" class="button buttongen marginbottomonly button-cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -4673,7 +4673,7 @@ if ($action == 'create') {
|
||||
print '<input type="hidden" name="revenuestamp" id="revenuestamp_val" value="'.price2num($object->revenuestamp).'">';
|
||||
print $formother->select_revenue_stamp('', 'revenuestamp_type', $mysoc->country_code);
|
||||
print ' → <span id="revenuestamp_span"></span>';
|
||||
print ' <input type="submit" class="button buttongen" value="'.$langs->trans('Modify').'">';
|
||||
print ' <input type="submit" class="button buttongen button-save" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
print " <script>
|
||||
$(document).ready(function(){
|
||||
|
||||
@ -74,12 +74,22 @@ $search_montant_vat = GETPOST('search_montant_vat');
|
||||
$search_montant_ttc = GETPOST('search_montant_ttc');
|
||||
$search_payment_mode = GETPOST('search_payment_mode');
|
||||
$search_payment_term = GETPOST('search_payment_term');
|
||||
$search_day = GETPOST('search_day', 'int');
|
||||
$search_year = GETPOST('search_year', 'int');
|
||||
$search_month = GETPOST('search_month', 'int');
|
||||
$search_day_date_when = GETPOST('search_day_date_when', 'int');
|
||||
$search_year_date_when = GETPOST('search_year_date_when', 'int');
|
||||
$search_month_date_when = GETPOST('search_month_date_when', 'int');
|
||||
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
|
||||
$search_date_startyear = GETPOST('search_date_startyear', 'int');
|
||||
$search_date_endday = GETPOST('search_date_endday', 'int');
|
||||
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
|
||||
$search_date_endyear = GETPOST('search_date_endyear', 'int');
|
||||
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
|
||||
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
|
||||
$search_date_when_startday = GETPOST('search_date_when_startday', 'int');
|
||||
$search_date_when_startmonth = GETPOST('search_date_when_startmonth', 'int');
|
||||
$search_date_when_startyear = GETPOST('search_date_when_startyear', 'int');
|
||||
$search_date_when_endday = GETPOST('search_date_when_endday', 'int');
|
||||
$search_date_when_endmonth = GETPOST('search_date_when_endmonth', 'int');
|
||||
$search_date_when_endyear = GETPOST('search_date_when_endyear', 'int');
|
||||
$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver
|
||||
$search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear);
|
||||
$search_recurring = GETPOST('search_recurring', 'int');
|
||||
$search_frequency = GETPOST('search_frequency', 'alpha');
|
||||
$search_unit_frequency = GETPOST('search_unit_frequency', 'alpha');
|
||||
@ -206,12 +216,22 @@ if (empty($reshook)) {
|
||||
$search_montant_ttc = '';
|
||||
$search_payment_mode = '';
|
||||
$search_payment_term = '';
|
||||
$search_day = '';
|
||||
$search_year = '';
|
||||
$search_month = '';
|
||||
$search_day_date_when = '';
|
||||
$search_year_date_when = '';
|
||||
$search_month_date_when = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startyear = '';
|
||||
$search_date_endday = '';
|
||||
$search_date_endmonth = '';
|
||||
$search_date_endyear = '';
|
||||
$search_date_start = '';
|
||||
$search_date_end = '';
|
||||
$search_date_when_startday = '';
|
||||
$search_date_when_startmonth = '';
|
||||
$search_date_when_startyear = '';
|
||||
$search_date_when_endday = '';
|
||||
$search_date_when_endmonth = '';
|
||||
$search_date_when_endyear = '';
|
||||
$search_date_when_start = '';
|
||||
$search_date_when_end = '';
|
||||
$search_recurring = '';
|
||||
$search_frequency = '';
|
||||
$search_unit_frequency = '';
|
||||
@ -326,8 +346,18 @@ if ($search_status != '' && $search_status >= -1) {
|
||||
$sql .= ' AND suspended = 1';
|
||||
}
|
||||
}
|
||||
$sql .= dolSqlDateFilter('f.date_last_gen', $search_day, $search_month, $search_year);
|
||||
$sql .= dolSqlDateFilter('f.date_when', $search_day_date_when, $search_month_date_when, $search_year_date_when);
|
||||
if ($search_date_start) {
|
||||
$sql .= " AND f.date_last_gen >= '".$db->idate($search_date_start)."'";
|
||||
}
|
||||
if ($search_date_end) {
|
||||
$sql .= " AND f.date_last_gen <= '".$db->idate($search_date_end)."'";
|
||||
}
|
||||
if ($search_date_when_start) {
|
||||
$sql .= " AND f.date_when >= '".$db->idate($search_date_when_start)."'";
|
||||
}
|
||||
if ($search_date_when_end) {
|
||||
$sql .= " AND f.date_when <= '".$db->idate($search_date_when_end)."'";
|
||||
}
|
||||
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
|
||||
@ -357,23 +387,41 @@ if ($resql) {
|
||||
if ($socid > 0) {
|
||||
$param .= '&socid='.urlencode($socid);
|
||||
}
|
||||
if ($search_day) {
|
||||
$param .= '&search_day='.urlencode($search_day);
|
||||
if ($search_date_startday) {
|
||||
$param .= '&search_date_startday='.urlencode($search_date_startday);
|
||||
}
|
||||
if ($search_month) {
|
||||
$param .= '&search_month='.urlencode($search_month);
|
||||
if ($search_date_startmonth) {
|
||||
$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
|
||||
}
|
||||
if ($search_year) {
|
||||
$param .= '&search_year='.urlencode($search_year);
|
||||
if ($search_date_startyear) {
|
||||
$param .= '&search_date_startyear='.urlencode($search_date_startyear);
|
||||
}
|
||||
if ($search_day_date_when) {
|
||||
$param .= '&search_day_date_when='.urlencode($search_day_date_when);
|
||||
if ($search_date_endday) {
|
||||
$param .= '&search_date_endday='.urlencode($search_date_endday);
|
||||
}
|
||||
if ($search_month_date_when) {
|
||||
$param .= '&search_month_date_when='.urlencode($search_month_date_when);
|
||||
if ($search_date_endmonth) {
|
||||
$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
|
||||
}
|
||||
if ($search_year_date_when) {
|
||||
$param .= '&search_year_date_when='.urlencode($search_year_date_when);
|
||||
if ($search_date_endyear) {
|
||||
$param .= '&search_date_endyear='.urlencode($search_date_endyear);
|
||||
}
|
||||
if ($search_date_when_startday) {
|
||||
$param .= '&search_date_when_startday='.urlencode($search_date_when_startday);
|
||||
}
|
||||
if ($search_date_when_startmonth) {
|
||||
$param .= '&search_date_when_startmonth='.urlencode($search_date_when_startmonth);
|
||||
}
|
||||
if ($search_date_when_startyear) {
|
||||
$param .= '&search_date_when_startyear='.urlencode($search_date_when_startyear);
|
||||
}
|
||||
if ($search_date_when_endday) {
|
||||
$param .= '&search_date_when_endday='.urlencode($search_date_when_endday);
|
||||
}
|
||||
if ($search_date_when_endmonth) {
|
||||
$param .= '&search_date_when_endmonth='.urlencode($search_date_when_endmonth);
|
||||
}
|
||||
if ($search_date_when_endyear) {
|
||||
$param .= '&search_date_when_endyear='.urlencode($search_date_when_endyear);
|
||||
}
|
||||
if ($search_ref) {
|
||||
$param .= '&search_ref='.urlencode($search_ref);
|
||||
@ -453,7 +501,7 @@ if ($resql) {
|
||||
print '<input class="flat maxwidth100" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Thirpdarty
|
||||
// Thirdparty
|
||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||
print '<td class="liste_titre left"><input class="flat" type="text" size="8" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||
}
|
||||
@ -489,19 +537,19 @@ if ($resql) {
|
||||
}
|
||||
if (!empty($arrayfields['recurring']['checked'])) {
|
||||
// Recurring or not
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print $form->selectyesno('search_recurring', $search_recurring, 1, false, 1);
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['f.frequency']['checked'])) {
|
||||
// Recurring or not
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input class="flat" type="text" size="1" name="search_frequency" value="'.dol_escape_htmltag($search_frequency).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (!empty($arrayfields['f.unit_frequency']['checked'])) {
|
||||
// Frequency unit
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
print '<input class="flat" type="text" size="1" name="search_unit_frequency" value="'.dol_escape_htmltag($search_unit_frequency).'">';
|
||||
print '</td>';
|
||||
}
|
||||
@ -512,22 +560,24 @@ if ($resql) {
|
||||
}
|
||||
// Date invoice
|
||||
if (!empty($arrayfields['f.date_last_gen']['checked'])) {
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle width25" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year ? $search_year : -1, 'search_year', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle');
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Date next generation
|
||||
if (!empty($arrayfields['f.date_when']['checked'])) {
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) {
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day_date_when" value="'.$search_day_date_when.'">';
|
||||
}
|
||||
print '<input class="flat valignmiddle width25" type="text" size="1" maxlength="2" name="search_month_date_when" value="'.$search_month_date_when.'">';
|
||||
$formother->select_year($search_year_date_when ? $search_year_date_when : -1, 'search_year_date_when', 1, 20, 5, 0, 0, '', 'widthauto valignmiddle');
|
||||
print '<td class="liste_titre center">';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_when_start ? $search_date_when_start : -1, 'search_date_when_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $form->selectDate($search_date_when_end ? $search_date_when_end : -1, 'search_date_when_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
@ -559,7 +609,7 @@ if ($resql) {
|
||||
}
|
||||
// Status
|
||||
if (!empty($arrayfields['status']['checked'])) {
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print '<td class="liste_titre center">';
|
||||
$liststatus = array(
|
||||
0=>$langs->trans("Draft"),
|
||||
1=>$langs->trans("Active"),
|
||||
|
||||
@ -321,6 +321,12 @@ if ($search_company) {
|
||||
if ($search_amount != '') {
|
||||
$param .= '&search_amount='.urlencode($search_amount);
|
||||
}
|
||||
if ($search_paymenttype) {
|
||||
$param .= '&search_paymenttype='.urlencode($search_paymenttype);
|
||||
}
|
||||
if ($search_account) {
|
||||
$param .= '&search_account='.urlencode($search_account);
|
||||
}
|
||||
if ($search_payment_num) {
|
||||
$param .= '&search_payment_num='.urlencode($search_payment_num);
|
||||
}
|
||||
|
||||
120
htdocs/core/ajax/fetchKnowledgeRecord.php
Normal file
120
htdocs/core/ajax/fetchKnowledgeRecord.php
Normal file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file /htdocs/core/ajax/fetchKnowledgeRecord.php
|
||||
* \brief File to make Ajax action on Knowledge Management
|
||||
*/
|
||||
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', '1'); // Disables token renewal
|
||||
}
|
||||
if (!defined('NOREQUIREHTML')) {
|
||||
define('NOREQUIREHTML', '1');
|
||||
}
|
||||
if (!defined('NOREQUIREAJAX')) {
|
||||
define('NOREQUIREAJAX', '1');
|
||||
}
|
||||
if (!defined('NOREQUIRESOC')) {
|
||||
define('NOREQUIRESOC', '1');
|
||||
}
|
||||
if (!defined('NOCSRFCHECK')) {
|
||||
define('NOCSRFCHECK', '1');
|
||||
}
|
||||
// Do not check anti CSRF attack test
|
||||
if (!defined('NOREQUIREMENU')) {
|
||||
define('NOREQUIREMENU', '1');
|
||||
}
|
||||
// If there is no need to load and show top and left menu
|
||||
if (!defined("NOLOGIN")) {
|
||||
define("NOLOGIN", '1');
|
||||
}
|
||||
if (!defined('NOIPCHECK')) {
|
||||
define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
|
||||
}
|
||||
if (!defined('NOBROWSERNOTIF')) {
|
||||
define('NOBROWSERNOTIF', '1');
|
||||
}
|
||||
include '../../main.inc.php';
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$idticketgroup = GETPOST('idticketgroup', 'aZ09');
|
||||
$idticketgroup = GETPOST('idticketgroup', 'aZ09');
|
||||
$lang = GETPOST('lang', 'aZ09');
|
||||
$popupurl = GETPOST('popupurl', 'bool');
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// None
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
if ($action == "getKnowledgeRecord") {
|
||||
$response = '';
|
||||
$sql = "SELECT kr.rowid, kr.ref, kr.question, kr.answer,l.url,ctc.code";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."links as l";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."knowledgemanagement_knowledgerecord as kr ON kr.rowid = l.objectid";
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctc ON ctc.rowid = kr.fk_c_ticket_category";
|
||||
$sql .= " WHERE ctc.code = '".$db->escape($idticketgroup)."'";
|
||||
$sql .= " AND ctc.active = 1 AND ctc.public = 1 AND (kr.lang = '".$db->escape($lang)."' OR kr.lang = 0)";
|
||||
$sql .= " AND kr.status = 1";
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$response = array();
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($popupurl == "false") {
|
||||
$url = "<a href=\"".$obj->url. "\" target=\"_blank\">".$obj->url."</a></li>";
|
||||
$response[] = array('title'=>$obj->question,'ref'=>$obj->url,'answer'=>$obj->answer,'url'=>$url);
|
||||
} else {
|
||||
$name = $obj->ref;
|
||||
$buttonstring = $obj->url;
|
||||
$url = $obj->url;
|
||||
$urltoprint = '<a class="button_'.$name.'" style="cursor:pointer">'.$buttonstring.'</a>';
|
||||
$urltoprint .= '<!-- Add js code to open dialog popup on dialog -->';
|
||||
$urltoprint .= '<script language="javascript">
|
||||
jQuery(document).ready(function () {
|
||||
jQuery(".button_'.$name.'").click(function () {
|
||||
console.log("Open popup with jQuery(...).dialog() on URL '.dol_escape_js($url).'")
|
||||
var $dialog = $(\'<div></div>\').html(\'<iframe class="iframedialog" style="border: 0px;" src="'.$url.'" width="100%" height="98%"></iframe>\')
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
modal: true,
|
||||
height: (window.innerHeight - 150),
|
||||
width: \'80%\',
|
||||
title: "'.dol_escape_js($label).'"
|
||||
});
|
||||
$dialog.dialog(\'open\');
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
$response[] = array('title'=>$obj->question,'ref'=>$obj->url,'answer'=>$obj->answer,'url'=>$urltoprint);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
$response =json_encode($response);
|
||||
echo $response;
|
||||
}
|
||||
@ -122,7 +122,7 @@ class box_task extends ModeleBoxes
|
||||
$boxcontent .= '<input type="hidden" name="token" value="'.newToken().'">'."\n";
|
||||
$selectArray = array('all' => $langs->trans("NoFilter"), 'im_task_contact' => $langs->trans("WhichIamLinkedTo"), 'im_project_contact' => $langs->trans("WhichIamLinkedToProject"));
|
||||
$boxcontent .= $form->selectArray($cookie_name, $selectArray, $filterValue);
|
||||
$boxcontent .= '<button type="submit" class="button buttongen">'.$langs->trans("Refresh").'</button>';
|
||||
$boxcontent .= '<button type="submit" class="button buttongen button-save">'.$langs->trans("Refresh").'</button>';
|
||||
$boxcontent .= '</form>'."\n";
|
||||
$boxcontent .= '</div>'."\n";
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
|
||||
@ -447,6 +447,9 @@ abstract class CommonDocGenerator
|
||||
|
||||
$array_key.'_bank_iban'=>$bank_account->iban,
|
||||
$array_key.'_bank_bic'=>$bank_account->bic,
|
||||
$array_key.'_bank_label'=>$bank_account->label,
|
||||
$array_key.'_bank_number'=>$bank_account->number,
|
||||
$array_key.'_bank_proprio'=>$bank_account->proprio,
|
||||
|
||||
$array_key.'_total_ht_locale'=>price($object->total_ht, 0, $outputlangs),
|
||||
$array_key.'_total_vat_locale'=>(!empty($object->total_vat) ?price($object->total_vat, 0, $outputlangs) : price($object->total_tva, 0, $outputlangs)),
|
||||
|
||||
@ -3845,8 +3845,14 @@ abstract class CommonObject
|
||||
$classfile = 'conferenceorbooth';
|
||||
$classname = 'ConferenceOrBooth';
|
||||
$module = 'eventorganization';
|
||||
} elseif ($objecttype == 'mo') {
|
||||
$classpath = 'mrp/class';
|
||||
$classfile = 'mo';
|
||||
$classname = 'Mo';
|
||||
$module = 'mrp';
|
||||
}
|
||||
|
||||
|
||||
// Here $module, $classfile and $classname are set
|
||||
if ($conf->$module->enabled && (($element != $this->element) || $alsosametype)) {
|
||||
if ($loadalsoobjects) {
|
||||
|
||||
@ -7009,7 +7009,7 @@ class Form
|
||||
$tmparray = explode('@', $objecttmp->ismultientitymanaged);
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX.$tmparray[1]." as parenttable ON parenttable.rowid = t.".$tmparray[0];
|
||||
}
|
||||
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') {
|
||||
if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') {
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
@ -7037,7 +7037,7 @@ class Form
|
||||
$sql .= " AND t.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
}
|
||||
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') {
|
||||
if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') {
|
||||
if (!$user->rights->societe->client->voir && !$user->socid) {
|
||||
$sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
|
||||
}
|
||||
@ -7891,12 +7891,16 @@ class Form
|
||||
$tplpath = 'eventorganization';
|
||||
} elseif ($objecttype == 'conferenceorboothattendee') {
|
||||
$tplpath = 'eventorganization';
|
||||
} elseif ($objecttype == 'mo') {
|
||||
$tplpath = 'mrp';
|
||||
if (empty($conf->mrp->enabled)) {
|
||||
continue; // Do not show if module disabled
|
||||
}
|
||||
}
|
||||
|
||||
global $linkedObjectBlock;
|
||||
$linkedObjectBlock = $objects;
|
||||
|
||||
|
||||
// Output template part (modules that overwrite templates must declare this into descriptor)
|
||||
$dirtpls = array_merge($conf->modules_parts['tpl'], array('/'.$tplpath.'/tpl'));
|
||||
foreach ($dirtpls as $reldir) {
|
||||
@ -7982,7 +7986,8 @@ class Form
|
||||
'supplier_proposal'=>array('enabled'=>$conf->supplier_proposal->enabled, 'perms'=>1, 'label'=>'LinkToSupplierProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, '' as ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('supplier_proposal').')'),
|
||||
'order_supplier'=>array('enabled'=>$conf->supplier_order->enabled, 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande_fournisseur').')'),
|
||||
'invoice_supplier'=>array('enabled'=>$conf->supplier_invoice->enabled, 'perms'=>1, 'label'=>'LinkToSupplierInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('facture_fourn').')'),
|
||||
'ticket'=>array('enabled'=>$conf->ticket->enabled, 'perms'=>1, 'label'=>'LinkToTicket', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.track_id, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."ticket as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('ticket').')')
|
||||
'ticket'=>array('enabled'=>$conf->ticket->enabled, 'perms'=>1, 'label'=>'LinkToTicket', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.track_id, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."ticket as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('ticket').')'),
|
||||
'mo'=>array('enabled'=>$conf->mrp->enabled, 'perms'=>1, 'label'=>'LinkToMO', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.rowid, '0' as total_ht FROM ".MAIN_DB_PREFIX."societe as s INNER JOIN ".MAIN_DB_PREFIX."mrp_mo as t ON t.fk_soc = s.rowid WHERE t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('mo').')')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -781,7 +781,7 @@ class FormCompany extends Form
|
||||
|
||||
$out .= '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||
if ($showempty) {
|
||||
$out .= '<option value="0"></option>';
|
||||
$out .= '<option value="0"> </option>';
|
||||
}
|
||||
foreach ($lesTypes as $key => $value) {
|
||||
$out .= '<option value="'.$key.'"';
|
||||
@ -998,16 +998,16 @@ class FormCompany extends Form
|
||||
/**
|
||||
* Return a HTML select for thirdparty type
|
||||
*
|
||||
* @param int $selected selected value
|
||||
* @param string $htmlname HTML select name
|
||||
* @param string $htmlidname HTML select id
|
||||
* @param string $typeinput HTML output
|
||||
* @param string $morecss More css
|
||||
* @return string HTML string
|
||||
* @param int $selected Selected value
|
||||
* @param string $htmlname HTML select name
|
||||
* @param string $htmlidname HTML select id
|
||||
* @param string $typeinput HTML output
|
||||
* @param string $morecss More css
|
||||
* @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;
|
||||
if (!empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) {
|
||||
return '' ;
|
||||
@ -1015,8 +1015,14 @@ class FormCompany extends Form
|
||||
|
||||
$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
|
||||
if ($typeinput == 'form') {
|
||||
if ($selected == '' || $selected == '-1') {
|
||||
$out .= '<option value="-1"> </option>';
|
||||
if ($allowempty || ($selected == '' || $selected == '-1')) {
|
||||
$out .= '<option value="-1">';
|
||||
if (is_numeric($allowempty)) {
|
||||
$out .= ' ';
|
||||
} else {
|
||||
$out .= $langs->trans($allowempty);
|
||||
}
|
||||
$out .= '</option>';
|
||||
}
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
||||
$out .= '<option value="2"'.($selected == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
|
||||
|
||||
@ -243,6 +243,65 @@ class FormTicket
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->knowledgemanagement->enabled) {
|
||||
// KM Articles
|
||||
print '<tr id="KWwithajax"></tr>';
|
||||
print '<!-- Script to manage change of ticket group -->
|
||||
<script>
|
||||
jQuery(document).ready(function() {
|
||||
function groupticketchange(){
|
||||
console.log("We called groupticketchange, so we try to load list KM linked to event");
|
||||
$("#KWwithajax").html("");
|
||||
idgroupticket = $("#selectcategory_code").val();
|
||||
|
||||
console.log("We have selected id="+idgroupticket);
|
||||
|
||||
if (idgroupticket != "") {
|
||||
$.ajax({ url: \''.DOL_URL_ROOT.'/core/ajax/fetchKnowledgeRecord.php\',
|
||||
data: { action: \'getKnowledgeRecord\', idticketgroup: idgroupticket, token: \''.newToken().'\', lang:\''.$langs->defaultlang.'\', popupurl:false},
|
||||
type: \'GET\',
|
||||
success: function(response) {
|
||||
var urllist = \'\';
|
||||
console.log("We received response "+response);
|
||||
response = JSON.parse(response)
|
||||
for (key in response) {
|
||||
console.log(response[key])
|
||||
urllist += "<li>" + response[key].title + ": " +response[key].url+"</li>";
|
||||
}
|
||||
if (urllist != "") {
|
||||
console.log(urllist)
|
||||
$("#KWwithajax").html(\'<td>'.$langs->trans("KMFoundForTicketGroup").'</td><td><ul style="list-style:none;padding-left: 0;">\'+urllist+\'</ul></td>\');
|
||||
$("#KWwithajax").show();
|
||||
}
|
||||
},
|
||||
error : function(output) {
|
||||
console.log("error");
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
$("#selectcategory_code").bind("change",function() { groupticketchange(); });
|
||||
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
||||
var trackChange = function(element) {
|
||||
var observer = new MutationObserver(function(mutations, observer) {
|
||||
if (mutations[0].attributeName == "value") {
|
||||
$(element).trigger("change");
|
||||
}
|
||||
});
|
||||
observer.observe(element, {
|
||||
attributes: true
|
||||
});
|
||||
}
|
||||
|
||||
trackChange($("#selectcategory_code")[0]);
|
||||
|
||||
if ($("#selectcategory_code").val() != "") {
|
||||
groupticketchange();
|
||||
}
|
||||
});
|
||||
</script>'."\n";
|
||||
}
|
||||
|
||||
// MESSAGE
|
||||
$msg = GETPOSTISSET('message') ? GETPOST('message', 'restricthtml') : '';
|
||||
print '<tr><td><label for="message"><span class="fieldrequired">'.$langs->trans("Message").'</span></label></td><td>';
|
||||
@ -589,23 +648,29 @@ class FormTicket
|
||||
/**
|
||||
* Return html list of ticket anaytic codes
|
||||
*
|
||||
* @param string $selected Id categorie pre-selectionnée
|
||||
* @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 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 $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @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 string $selected Id categorie pre-selectionnée
|
||||
* @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 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 $noadmininfo 0=Add admin info, 1=Disable admin info
|
||||
* @param int $maxlength Max length of label
|
||||
* @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 Translate $outputlangs Output lnaguage
|
||||
* @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);
|
||||
|
||||
if (empty($outputlangs)) {
|
||||
$outputlangs = $langs;
|
||||
}
|
||||
$outputlangs->load("ticket");
|
||||
|
||||
$ticketstat = new Ticket($this->db);
|
||||
$ticketstat->loadCacheCategoriesTickets();
|
||||
|
||||
@ -629,6 +694,13 @@ class FormTicket
|
||||
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) {
|
||||
print '<option value="'.$id.'"';
|
||||
}
|
||||
@ -657,7 +729,7 @@ class FormTicket
|
||||
print '>';
|
||||
|
||||
if ($format == 0) {
|
||||
$value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
|
||||
$value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
|
||||
}
|
||||
|
||||
if ($format == 1) {
|
||||
@ -665,7 +737,7 @@ class FormTicket
|
||||
}
|
||||
|
||||
if ($format == 2) {
|
||||
$value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
|
||||
$value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
|
||||
}
|
||||
|
||||
if ($format == 3) {
|
||||
@ -691,15 +763,16 @@ class FormTicket
|
||||
$stringtoprint .= '<select id ="'.$htmlname.'" class="maxwidth500 minwidth400" child_id="0">';
|
||||
$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 .= " 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') {
|
||||
$sql .= " AND ctc.public = 1";
|
||||
}
|
||||
$sql .= " AND ctc.fk_parent = 0";
|
||||
$sql .= $this->db->order('ctc.pos', 'ASC');
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num_rows_level0 = $this->db->num_rows($resql);
|
||||
@ -707,23 +780,31 @@ class FormTicket
|
||||
while ($i < $num_rows_level0) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
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;
|
||||
$groupvalue = $obj->code;
|
||||
$grouplabel = $obj->label;
|
||||
$grouplabel = $label;
|
||||
|
||||
$isparent = $obj->isparent;
|
||||
$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>';
|
||||
if ($isparent == 'NOTPARENT') {
|
||||
$arraycodenotparent[] = $groupvalue;
|
||||
}
|
||||
$arrayidused[]=$grouprowid;
|
||||
$arrayidused[] = $grouprowid;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
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).'">';
|
||||
} else {
|
||||
$stringtoprint .= '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'_select" class="maxwidth500 minwidth400">';
|
||||
@ -737,11 +818,11 @@ class FormTicket
|
||||
$stringtoprint .= '<select id ="'.$htmlname.'_child_'.$levelid.'" class="maxwidth500 minwidth400 groupticketchild" child_id="'.$levelid.'">';
|
||||
$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 .= " 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 .= " WHERE ctc.active = 1";
|
||||
$sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
|
||||
if ($filtertype == 'public=1') {
|
||||
$sql .= " AND ctc.public = 1";
|
||||
}
|
||||
@ -755,6 +836,7 @@ class FormTicket
|
||||
} else {
|
||||
}
|
||||
$sql .= $this->db->order('ctc.pos', 'ASC');
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num_rows = $this->db->num_rows($resql);
|
||||
@ -763,9 +845,16 @@ class FormTicket
|
||||
while ($i < $num_rows) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
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;
|
||||
$groupvalue = $obj->code;
|
||||
$grouplabel = $obj->label;
|
||||
$grouplabel = $label;
|
||||
$isparent = $obj->isparent;
|
||||
$fatherid = $obj->fk_parent;
|
||||
$arrayidused[] = $grouprowid;
|
||||
|
||||
@ -486,6 +486,11 @@ class Ldap
|
||||
// For better compatibility with Samba4 AD
|
||||
if ($this->serverType == "activedirectory") {
|
||||
unset($info['cn']); // To avoid error : Operation not allowed on RDN (Code 67)
|
||||
|
||||
// To avoid error : LDAP Error: 53 (Unwilling to perform)
|
||||
if (isset($info['unicodePwd'])) {
|
||||
$info['unicodePwd'] = mb_convert_encoding("\"".$info['unicodePwd']."\"", "UTF-16LE", "UTF-8");
|
||||
}
|
||||
}
|
||||
$result = @ldap_modify($this->connection, $dn, $info);
|
||||
|
||||
|
||||
@ -349,7 +349,7 @@ foreach ($arrayoftype as $key => $val) {
|
||||
}
|
||||
print $form->selectarray('objecttype', $newarrayoftype, $objecttype, 0, 0, 0, '', 1, 0, 0, '', 'minwidth200', 1);
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<input type="submit" class="button buttongen" name="changeobjecttype" value="'.$langs->trans("Refresh").'">';
|
||||
print '<input type="submit" class="button buttongen button-save" name="changeobjecttype" value="'.$langs->trans("Refresh").'">';
|
||||
} else {
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
jQuery(document).ready(function() {
|
||||
@ -456,7 +456,7 @@ if ($mode == 'graph') {
|
||||
print '</div>';
|
||||
}
|
||||
print '<div class="divadvancedsearchfield">';
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("Refresh").'">';
|
||||
print '<input type="submit" class="button buttongen button-save" value="'.$langs->trans("Refresh").'">';
|
||||
print '</div>';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
|
||||
@ -1135,7 +1135,7 @@ function price2numjs(amount) {
|
||||
var res = Math.round10(amount, - rounding);
|
||||
// Other solution is
|
||||
// var res = dolroundjs(amount, rounding)
|
||||
console.log("res="+res)
|
||||
console.log("price2numjs text="+amount+" return="+res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@ -31,16 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Project $project Object related to tabs
|
||||
* @param string $moreparam More param on url
|
||||
* @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;
|
||||
|
||||
$h = 0;
|
||||
$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][2] = 'project';
|
||||
$h++;
|
||||
@ -56,7 +57,7 @@ function project_prepare_head(Project $project)
|
||||
$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.
|
||||
}
|
||||
$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");
|
||||
if ($nbContacts > 0) {
|
||||
$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));
|
||||
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");
|
||||
if ($nbTasks > 0) {
|
||||
$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");
|
||||
if ($nbTimeSpent > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">...</span>';
|
||||
|
||||
@ -69,12 +69,12 @@ class modFckeditor extends DolibarrModules
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$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[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[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[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[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[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[6] = array("FCKEDITOR_SKIN", "string", "moono-lisa", "Skin by default for fckeditor");
|
||||
|
||||
// Boxes
|
||||
|
||||
@ -184,7 +184,7 @@ if ($action == 'presend') {
|
||||
$listeuser = array();
|
||||
$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) {
|
||||
foreach ($fuserdest->users as $uuserdest) {
|
||||
$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);
|
||||
|
||||
$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);
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
@ -749,7 +749,7 @@ class ConferenceOrBooth extends ActionComm
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -103,7 +103,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
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"),
|
||||
'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_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,),
|
||||
@ -197,8 +197,10 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
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.')';
|
||||
}
|
||||
if ($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE!=='') {
|
||||
$this->fields['fk_soc']['type'] .= ' AND client='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
|
||||
if (isset($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
|
||||
@ -390,7 +392,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit limit
|
||||
* @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)
|
||||
* @return array|int int <0 if KO, array of pages if OK
|
||||
*/
|
||||
@ -416,9 +418,9 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
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'))) {
|
||||
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
||||
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||
} elseif ($key == 'customsql') {
|
||||
$sqlwhere[] = $value;
|
||||
} elseif (strpos($value, '%') === false) {
|
||||
@ -949,7 +951,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -152,7 +152,7 @@ if (!$permissiontoread) accessforbidden();
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (preg_match('/^set/', $action) && $projectid > 0) {
|
||||
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);
|
||||
@ -447,7 +447,7 @@ if ($projectid > 0) {
|
||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||
//print '</span>';
|
||||
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');
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
|
||||
@ -382,7 +382,7 @@ if (!empty($withproject)) {
|
||||
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
|
||||
//print '</span>';
|
||||
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);
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
@ -496,7 +496,15 @@ if (($id || $ref) && $action == 'edit') {
|
||||
|
||||
// Part to show record
|
||||
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);
|
||||
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
|
||||
// ------------------------------------------------------------
|
||||
$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>';
|
||||
|
||||
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="fichehalfleft">';
|
||||
|
||||
@ -36,6 +36,7 @@ if ($conf->categorie->enabled) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
}
|
||||
|
||||
global $dolibarr_main_url_root;
|
||||
|
||||
// for other modules
|
||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||
@ -158,6 +159,24 @@ if (!$permissiontoread) accessforbidden();
|
||||
* 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')) {
|
||||
$action = 'list';
|
||||
$massaction = '';
|
||||
@ -541,7 +560,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
||||
//print '</span>';
|
||||
print '</td><td>';
|
||||
$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);
|
||||
//print '<div class="urllink">';
|
||||
//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 '</span>';
|
||||
print '</td><td>';
|
||||
$link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
|
||||
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
|
||||
$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, 'md5');
|
||||
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
|
||||
//print '<div class="urllink">';
|
||||
//print '<input type="text" value="'.$linkregister.'" id="linkregister" class="quatrevingtpercent paddingrightonly">';
|
||||
|
||||
@ -196,7 +196,7 @@ function conferenceorboothattendeePrepareHead($object)
|
||||
$h = 0;
|
||||
$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][2] = 'card';
|
||||
$h++;
|
||||
|
||||
@ -1458,8 +1458,8 @@ class Expedition extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// delete batch expedition line
|
||||
if (!$error && $conf->productbatch->enabled) {
|
||||
// delete batch expedition line (we try deletion even if module not enabled in case of the module were enabled and disabled previously)
|
||||
if (!$error) {
|
||||
if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) {
|
||||
$error++; $this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
|
||||
@ -631,6 +631,12 @@ if ($resql) {
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// End date
|
||||
if (!empty($arrayfields['cp.date_valid']['checked'])) {
|
||||
print '<td class="liste_titre center nowraponall">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||
// Fields from hook
|
||||
@ -691,6 +697,9 @@ if ($resql) {
|
||||
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 ');
|
||||
}
|
||||
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
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
// Hook fields
|
||||
@ -820,6 +829,18 @@ if ($resql) {
|
||||
$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
|
||||
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,'(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,'(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
|
||||
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
|
||||
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, '(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, '(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, '(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, '(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, '(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, '(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);
|
||||
|
||||
-- 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');
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
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);
|
||||
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, 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, 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);
|
||||
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, 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);
|
||||
-- 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)__,<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);
|
||||
|
||||
ALTER TABLE llx_projet ADD COLUMN accept_conference_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);
|
||||
|
||||
|
||||
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
|
||||
|
||||
ALTER TABLE llx_holiday ADD COLUMN date_approve DATETIME DEFAULT NULL;
|
||||
@ -82,7 +91,6 @@ ALTER TABLE llx_mrp_mo ADD COLUMN mrptype integer DEFAULT 0;
|
||||
|
||||
DELETE FROM llx_menu WHERE type = 'top' AND module = 'cashdesk' AND mainmenu = 'cashdesk';
|
||||
|
||||
|
||||
INSERT INTO llx_c_action_trigger (code, label, description, elementtype, rang) values ('MEMBER_EXCLUDE', 'Member excluded', 'Executed when a member is excluded', 'member', 27);
|
||||
|
||||
CREATE TABLE llx_categorie_knowledgemanagement
|
||||
@ -98,3 +106,6 @@ ALTER TABLE llx_categorie_knowledgemanagement ADD INDEX idx_categorie_knowledgem
|
||||
|
||||
ALTER TABLE llx_categorie_knowledgemanagement ADD CONSTRAINT fk_categorie_knowledgemanagement_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_knowledgemanagement ADD CONSTRAINT fk_categorie_knowledgemanagement_knowledgemanagement_rowid FOREIGN KEY (fk_knowledgemanagement) REFERENCES llx_knowledgemanagement (rowid);
|
||||
|
||||
ALTER TABLE llx_product_lot ADD COLUMN barcode varchar(180) DEFAULT NULL;
|
||||
ALTER TABLE llx_product_lot ADD COLUMN fk_barcode_type integer DEFAULT NULL;
|
||||
|
||||
@ -25,8 +25,10 @@ CREATE TABLE llx_product_lot (
|
||||
eatby date DEFAULT NULL, -- Eatby date
|
||||
sellby date DEFAULT NULL, -- Sellby date
|
||||
eol_date datetime NULL,
|
||||
manufacturing_date datetime NULL,
|
||||
scrapping_date datetime NULL,
|
||||
manufacturing_date datetime NULL, -- date when first manufacturing of this lot has started
|
||||
scrapping_date datetime NULL, -- date when we decided to scrap all products of this lot
|
||||
barcode varchar(180) DEFAULT NULL, -- barcode
|
||||
fk_barcode_type integer DEFAULT NULL, -- barcode type
|
||||
datec datetime,
|
||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
fk_user_creat integer,
|
||||
|
||||
@ -910,7 +910,7 @@ class KnowledgeRecord extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -1706,8 +1706,10 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts
|
||||
##### FCKeditor #####
|
||||
AdvancedEditor=Advanced editor
|
||||
ActivateFCKeditor=Activate advanced editor for:
|
||||
FCKeditorForCompany=WYSIWIG creation/edition of elements description and note (except products/services)
|
||||
FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note
|
||||
FCKeditorForNotePublic=WYSIWIG creation/edition of the field public notes of elements
|
||||
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>
|
||||
FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing)
|
||||
FCKeditorForUserSignature=WYSIWIG creation/edition of user signature
|
||||
|
||||
@ -192,7 +192,7 @@ VATReport=Sales tax report
|
||||
VATReportByPeriods=Sales tax report by period
|
||||
VATReportByMonth=Sales tax report by month
|
||||
VATReportByRates=Sales tax report by rate
|
||||
VATReportByThirdParties=Sales tax report by third partie
|
||||
VATReportByThirdParties=Sales tax report by third party
|
||||
VATReportByCustomers=Sales tax report by customer
|
||||
VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid
|
||||
VATReportByQuartersInInputOutputMode=Report by Sales tax rate of the tax collected and paid
|
||||
|
||||
@ -32,14 +32,9 @@ PaymentEvent=Payment of event
|
||||
# Admin page
|
||||
#
|
||||
NewRegistration=Registration
|
||||
<<<<<<< HEAD
|
||||
EventOrganizationSetup = Event Organization setup
|
||||
Settings = Settings
|
||||
=======
|
||||
EventOrganizationSetup=Event Organization setup
|
||||
EventOrganization=Event organization
|
||||
Settings=Settings
|
||||
>>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git
|
||||
EventOrganizationSetupPage = Event Organization setup page
|
||||
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
|
||||
@ -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_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_AFT_SUBS_BOOTH = Template of email to send after a subscription 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_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 registration to an event has been paid.
|
||||
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_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
|
||||
ConferenceOrBoothTab = Conference Or Booth
|
||||
AmountPaid = Amount paid
|
||||
DateOfRegistration = Date of subscription
|
||||
DateOfRegistration = Date of registration
|
||||
ConferenceOrBoothAttendee = Conference Or Booth Attendee
|
||||
|
||||
#
|
||||
@ -72,8 +67,8 @@ YourOrganizationEventConfRequestWasReceived = Your request for conference was re
|
||||
YourOrganizationEventBoothRequestWasReceived = Your request for booth was received
|
||||
EventOrganizationEmailAskConf = Request for conference
|
||||
EventOrganizationEmailAskBooth = Request for booth
|
||||
EventOrganizationEmailSubsBooth = Subscription for booth
|
||||
EventOrganizationEmailSubsEvent = Subscription for an event
|
||||
EventOrganizationEmailBoothPayment = Payment of your booth
|
||||
EventOrganizationEmailRegistrationPayment = Registration for an event
|
||||
EventOrganizationMassEmailAttendees = Communication to attendees
|
||||
EventOrganizationMassEmailSpeakers = Communication to speakers
|
||||
|
||||
@ -134,6 +129,14 @@ ConferenceIsNotConfirmed=Registration not available, conference is not confirmed
|
||||
DateMustBeBeforeThan=%s must be before %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
|
||||
#
|
||||
@ -145,17 +148,10 @@ VoteOk = Your vote has been accepted.
|
||||
AlreadyVoted = You have already voted for this event.
|
||||
VoteError = An error has occurred during the vote, please try again.
|
||||
|
||||
#
|
||||
# SubscriptionOk page
|
||||
#
|
||||
SubscriptionOk = Your subscription has been validated
|
||||
#
|
||||
# Subscription validation mail
|
||||
#
|
||||
SubscriptionOk = Your registration has been validated
|
||||
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
|
||||
#
|
||||
# Payment page
|
||||
#
|
||||
Attendee = Attendee
|
||||
PaymentConferenceAttendee = Conference attendee payment
|
||||
PaymentBoothLocation = Booth location payment
|
||||
|
||||
RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email <b>%s</b>
|
||||
|
||||
@ -804,6 +804,7 @@ LinkToSupplierInvoice=Link to vendor invoice
|
||||
LinkToContract=Link to contract
|
||||
LinkToIntervention=Link to intervention
|
||||
LinkToTicket=Link to ticket
|
||||
LinkToMo=Link to Mo
|
||||
CreateDraft=Create draft
|
||||
SetToDraft=Back to draft
|
||||
ClickToEdit=Click to edit
|
||||
@ -1153,4 +1154,4 @@ ConfirmMassLeaveApprovalQuestion=Are you sure you want to approve the %s selecte
|
||||
ConfirmMassLeaveApproval=Mass leave approval confirmation
|
||||
RecordAproved=Record approved
|
||||
RecordsApproved=%s Record(s) approved
|
||||
Properties=Properties
|
||||
Properties=Properties
|
||||
|
||||
@ -22,7 +22,7 @@ ProductService=Product or Service
|
||||
AllProducts=All products and services
|
||||
ChooseProduct/Service=Choose product or service
|
||||
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
|
||||
UseDiscountAsProduct=As a product
|
||||
UseDiscountAsService=As a service
|
||||
|
||||
@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
|
||||
TicketSeverityShortHIGH=High
|
||||
TicketSeverityShortBLOCKING=Critical, Blocking
|
||||
|
||||
TicketCategoryShortOTHER=Other
|
||||
|
||||
ErrorBadEmailAddress=Field '%s' incorrect
|
||||
MenuTicketMyAssign=My tickets
|
||||
MenuTicketMyAssignNonClosed=My open tickets
|
||||
@ -318,4 +320,5 @@ BoxNoTicketLastXDays=No new tickets the last %s days
|
||||
BoxNumberOfTicketByDay=Number of new tickets by day
|
||||
BoxNewTicketVSClose=Number of today's new tickets versus today's closed tickets
|
||||
TicketCreatedToday=Ticket created today
|
||||
TicketClosedToday=Ticket closed today
|
||||
TicketClosedToday=Ticket closed today
|
||||
KMFoundForTicketGroup=We found topics and FAQs that may answers your question, thanks to check them before submitting the ticket
|
||||
|
||||
@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
|
||||
TicketSeverityShortHIGH=Élevé
|
||||
TicketSeverityShortBLOCKING=Critique, bloquant
|
||||
|
||||
TicketCategoryShortOTHER=Autre
|
||||
|
||||
ErrorBadEmailAddress=Champ '%s' incorrect
|
||||
MenuTicketMyAssign=Mes tickets
|
||||
MenuTicketMyAssignNonClosed=Mes tickets ouverts
|
||||
@ -319,3 +321,4 @@ BoxNumberOfTicketByDay=Nombre de nouveaux tickets par jour
|
||||
BoxNewTicketVSClose=Nombre de nouveaux tickets aujourd’hui par rapport aux tickets fermés aujourd’hui
|
||||
TicketCreatedToday=Ticket créé aujourd'hui
|
||||
TicketClosedToday=Ticket fermé aujourd'hui
|
||||
KMFoundForTicketGroup=Nous avons trouvé des sujets et des FAQ susceptibles de répondre à votre question, merci de les vérifier avant de soumettre le ticket
|
||||
|
||||
@ -208,7 +208,7 @@ $methods = array(
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
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 '<td>'.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").'</td>';
|
||||
print '<td class="left">';
|
||||
@ -224,13 +224,13 @@ print '</form>';
|
||||
// INTERNAL CONTACT TYPE USED AS COMMERCIAL AGENT
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
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 '<td>'.$langs->trans("AgentContactType").'</td>';
|
||||
print '<td class="left">';
|
||||
$formcompany = new FormCompany($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 '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
|
||||
@ -960,7 +960,7 @@ class MyObject extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -1206,7 +1206,7 @@ class Mo extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -199,7 +199,7 @@ $form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
$title = $langs->trans('Mo')." - ".$langs->trans("Card");
|
||||
$title = $langs->trans('ManufacturingOrder')." - ".$langs->trans("Card");
|
||||
|
||||
llxHeader('', $title, '');
|
||||
|
||||
|
||||
@ -756,7 +756,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<td></td>';
|
||||
// Warehouse
|
||||
print '<td>';
|
||||
print '<input type="submit" class="button buttongen" name="addconsumelinebutton" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button buttongen button-add" name="addconsumelinebutton" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
// Lot - serial
|
||||
if ($conf->productbatch->enabled) {
|
||||
@ -1025,7 +1025,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print '<td></td>';
|
||||
// Warehouse
|
||||
print '<td>';
|
||||
print '<input type="submit" class="button buttongen" name="addproducelinebutton" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button buttongen button-add" name="addproducelinebutton" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
// Lot - serial
|
||||
if ($conf->productbatch->enabled) {
|
||||
|
||||
82
htdocs/mrp/tpl/linkedobjectblock.tpl.php
Normal file
82
htdocs/mrp/tpl/linkedobjectblock.tpl.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2013-2020 Charlene BENKE <charlie@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit;
|
||||
}
|
||||
|
||||
print "<!-- BEGIN PHP TEMPLATE -->\n";
|
||||
|
||||
global $user, $db;
|
||||
global $noMoreLinkedObjectBlockAfter;
|
||||
|
||||
$langs = $GLOBALS['langs'];
|
||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("bom");
|
||||
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
$ilink++;
|
||||
$product_static = new Product($db);
|
||||
$trclass = 'oddeven';
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) {
|
||||
$trclass .= ' liste_sub_total';
|
||||
}
|
||||
echo '<tr class="'.$trclass.'" >';
|
||||
echo '<td class="linkedcol-element" >'.$langs->trans("ManufacturingOrder");
|
||||
if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
|
||||
print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&action=selectlines" data-element="'.$objectlink->element.'" data-id="'.$objectlink->id.'" > <i class="fa fa-indent"></i> </a';
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td class="linkedcol-name nowraponall" >'.$objectlink->getNomUrl(1).'</td>';
|
||||
|
||||
echo '<td class="linkedcol-ref" align="center">';
|
||||
$result = $product_static->fetch($objectlink->fk_product);
|
||||
if ($result < 0) {
|
||||
setEventMessage($product_static->error, 'errors');
|
||||
} elseif ($result > 0) {
|
||||
$product_static->getNomUrl(1);
|
||||
}
|
||||
print '</td>';
|
||||
echo '<td class="linkedcol-date" align="center">'.dol_print_date($objectlink->date_creation, 'day').'</td>';
|
||||
echo '<td class="linkedcol-amount right">';
|
||||
if ($user->rights->commande->lire) {
|
||||
$total = $total + $objectlink->total_ht;
|
||||
echo price($objectlink->total_ht);
|
||||
}
|
||||
echo '</td>';
|
||||
echo '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
|
||||
echo '<td class="linkedcol-action right">';
|
||||
// For now, shipments must stay linked to order, so link is not deletable
|
||||
if ($object->element != 'shipping') {
|
||||
echo '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>';
|
||||
}
|
||||
echo '</td>';
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
echo "<!-- END PHP TEMPLATE -->\n";
|
||||
@ -1157,7 +1157,7 @@ class Partnership extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -201,7 +201,7 @@ if ($reshook < 0) {
|
||||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/product/list.php';
|
||||
$backurlforlist = DOL_URL_ROOT.'/product/list.php?type='.$type;
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
|
||||
@ -623,7 +623,7 @@ if ($id > 0 || $ref) {
|
||||
// Currency
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Currency").'</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) {
|
||||
$currencycodetouse = $conf->currency;
|
||||
}
|
||||
@ -635,7 +635,7 @@ if ($id > 0 || $ref) {
|
||||
|
||||
// Currency price qty min
|
||||
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 ' ';
|
||||
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>';
|
||||
|
||||
$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);
|
||||
if ($resql) {
|
||||
$currency = new MultiCurrency($db);
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
$currency->fetch($obj->rowid);
|
||||
$currencies[$currency->code] = $currency->rate->rate;
|
||||
$currencies[$currency->code] = ((float) $currency->rate->rate);
|
||||
}
|
||||
}
|
||||
$currencies = json_encode($currencies);
|
||||
|
||||
print <<<END
|
||||
<!-- javascript to autocalculate the minimum price -->
|
||||
<script type="text/javascript">
|
||||
function update_price_from_multicurrency() {
|
||||
var multicurrency_price = $('input[name="multicurrency_price"]').val();
|
||||
var multicurrency_tx = $('input[name="multicurrency_tx"]').val();
|
||||
$('input[name="price"]').val(multicurrency_price / multicurrency_tx);
|
||||
$('input[name="disabled_price"]').val(multicurrency_price / multicurrency_tx);
|
||||
console.log("update_price_from_multicurrency");
|
||||
var multicurrency_price = price2numjs($('input[name="multicurrency_price"]').val());
|
||||
var multicurrency_tx = price2numjs($('input[name="multicurrency_tx"]').val());
|
||||
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 () {
|
||||
$('input[name="disabled_price"]').prop('disabled', true);
|
||||
$('select[name="disabled_price_base_type"]').prop('disabled', true);
|
||||
update_price_from_multicurrency();
|
||||
|
||||
$('input[name="multicurrency_price"]').keyup(function () {
|
||||
update_price_from_multicurrency();
|
||||
}).change(function () {
|
||||
update_price_from_multicurrency();
|
||||
}).on('paste', function () {
|
||||
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').keyup(function () {
|
||||
update_price_from_multicurrency();
|
||||
});
|
||||
|
||||
$('input[name="multicurrency_tx"]').keyup(function () {
|
||||
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').change(function () {
|
||||
update_price_from_multicurrency();
|
||||
}).change(function () {
|
||||
update_price_from_multicurrency();
|
||||
}).on('paste', function () {
|
||||
});
|
||||
$('input[name="multicurrency_price"], input[name="multicurrency_tx"]').on('paste', function () {
|
||||
update_price_from_multicurrency();
|
||||
});
|
||||
|
||||
@ -698,7 +700,9 @@ if ($id > 0 || $ref) {
|
||||
|
||||
var currencies_array = $currencies;
|
||||
$('select[name="multicurrency_code"]').change(function () {
|
||||
console.log("We change the currency");
|
||||
$('input[name="multicurrency_tx"]').val(currencies_array[$(this).val()]);
|
||||
update_price_from_multicurrency();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -712,7 +716,6 @@ END;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// Discount qty min
|
||||
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) : '')).'"> %';
|
||||
|
||||
@ -104,6 +104,29 @@ if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
if (empty($reshook)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/product/stock/list.php';
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = DOL_URL_ROOT.'/product/stock/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($cancel) {
|
||||
if (!empty($backtopageforcancel)) {
|
||||
header("Location: ".$backtopageforcancel);
|
||||
exit;
|
||||
} elseif (!empty($backtopage)) {
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
|
||||
// Ajout entrepot
|
||||
if ($action == 'add' && $user->rights->stock->creer) {
|
||||
$object->ref = (string) GETPOST("ref", "alpha");
|
||||
|
||||
@ -1525,7 +1525,7 @@ class Project extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$clone_project->datec = $now;
|
||||
$clone_project->date_c = $now;
|
||||
|
||||
if (!$clone_note) {
|
||||
$clone_project->note_private = '';
|
||||
|
||||
@ -1387,7 +1387,8 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) {
|
||||
}
|
||||
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" name="save" class="button buttongen marginleftonly margintoponlyshort marginbottomonlyshort" value="'.$langs->trans("Add").'">';
|
||||
$form->buttonsSaveCancel();
|
||||
print '<input type="submit" name="save" class="button buttongen marginleftonly margintoponlyshort marginbottomonlyshort button-add" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" name="cancel" class="button buttongen marginleftonly margintoponlyshort marginbottomonlyshort button-cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/public/eventorganization/attendee_registration.php
|
||||
* \file htdocs/public/eventorganization/attendee_register.php
|
||||
* \ingroup project
|
||||
* \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);
|
||||
|
||||
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') {
|
||||
$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)
|
||||
@ -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.
|
||||
//var_dump($confattendee);
|
||||
|
||||
// If the attendee has already been paid
|
||||
if (!empty($confattendee->date_subscription)) {
|
||||
$securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
|
||||
// If the registration has already been paid for this attendee
|
||||
if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
|
||||
$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);
|
||||
|
||||
$mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorder", $email);
|
||||
setEventMessages($mesg, null, 'mesgs');
|
||||
|
||||
$db->commit();
|
||||
|
||||
Header("Location: ".$redirection);
|
||||
exit;
|
||||
}
|
||||
|
||||
$resultfetchthirdparty = -1;
|
||||
|
||||
// Getting the thirdparty or creating it
|
||||
$thirdparty = new Societe($db);
|
||||
$contact = new Contact($db);
|
||||
// Fetch using fk_soc if the attendee was already found
|
||||
if (!empty($confattendee->fk_soc) && $confattendee->fk_soc > 0) {
|
||||
$resultfetchthirdparty = $thirdparty->fetch($confattendee->fk_soc);
|
||||
@ -298,10 +307,19 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
||||
if (!empty($societe)) {
|
||||
$resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email);
|
||||
if ($resultfetchthirdparty <= 0) {
|
||||
// Need to create a new one (not found or multiple with the same name/email)
|
||||
$resultfetchthirdparty = 0;
|
||||
// Try to find the thirdparty from the contact
|
||||
$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 {
|
||||
// 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->update($user);
|
||||
}
|
||||
@ -310,6 +328,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
||||
$resultfetchthirdparty = 0;
|
||||
}
|
||||
} else {
|
||||
// Need to create a thirdparty (put number>0 if we do not want to create a thirdparty for free-conferences)
|
||||
$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 = getCountry($thirdparty->country_code, 0, $db, $langs);
|
||||
|
||||
// Update attendee country to match country of thirdparty
|
||||
$confattendee->fk_soc = $thirdparty->id;
|
||||
$confattendee->update($user);
|
||||
}
|
||||
@ -370,6 +390,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
||||
$outputlangs = $langs;
|
||||
// TODO Use default language of $thirdparty->default_lang to build $outputlang
|
||||
|
||||
// Get product to use for invoice
|
||||
$productforinvoicerow = new Product($db);
|
||||
$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);
|
||||
}
|
||||
|
||||
// Create invoice
|
||||
if ($resultprod < 0) {
|
||||
$error++;
|
||||
$errmsg .= $productforinvoicerow->error;
|
||||
@ -428,8 +450,10 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
||||
if (!$error) {
|
||||
$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
|
||||
// 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
|
||||
$sourcetouse = 'organizedeventregistration';
|
||||
@ -442,6 +466,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
|
||||
$redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
|
||||
}
|
||||
}
|
||||
|
||||
Header("Location: ".$redirection);
|
||||
exit;
|
||||
} 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";
|
||||
|
||||
// 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
|
||||
print '<tr id="trcompany" class="trcompany"><td>' . $langs->trans("Company");
|
||||
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
|
||||
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";
|
||||
@ -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 '</td></tr>';
|
||||
// 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');
|
||||
if (!$country_id && !empty($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE)) {
|
||||
$country_id = getCountry($conf->global->MEMBER_NEWFORM_FORCECOUNTRYCODE, 2, $db, $langs);
|
||||
@ -536,15 +536,16 @@ jQuery(document).ready(function () {
|
||||
jQuery(document).ready(function () {
|
||||
function initmorphy()
|
||||
{
|
||||
if (jQuery("#morphy").val()==\'phy\') {
|
||||
jQuery("#trcompany").hide();
|
||||
}
|
||||
if (jQuery("#morphy").val()==\'mor\') {
|
||||
jQuery("#trcompany").show();
|
||||
}
|
||||
console.log("Call initmorphy");
|
||||
if (jQuery("#morphy").val() == \'phy\') {
|
||||
jQuery("#trcompany").hide();
|
||||
}
|
||||
if (jQuery("#morphy").val() == \'mor\') {
|
||||
jQuery("#trcompany").show();
|
||||
}
|
||||
};
|
||||
initmorphy();
|
||||
jQuery("#morphy").click(function() {
|
||||
jQuery("#morphy").change(function() {
|
||||
initmorphy();
|
||||
});
|
||||
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.'">';
|
||||
}
|
||||
|
||||
// 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 $formcompany->select_civility(GETPOST('civility_id'), 'civility_id').'</td></tr>'."\n";
|
||||
// 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";
|
||||
// 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";
|
||||
// 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
|
||||
print '<tr><td>'.$langs->trans("Gender").'</td>';
|
||||
print '<td>';
|
||||
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"));
|
||||
print $form->selectarray('gender', $arraygender, GETPOST('gender') ?GETPOST('gender') : $object->gender, 1);
|
||||
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
|
||||
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";
|
||||
@ -618,7 +631,8 @@ print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'se
|
||||
print '</td></tr>';
|
||||
// Country
|
||||
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)) {
|
||||
$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>';
|
||||
}
|
||||
// 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
|
||||
print '<tr id="trbirth" class="trbirth"><td>'.$langs->trans("DateOfBirth").'</td><td>';
|
||||
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 '</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)) {
|
||||
$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>';
|
||||
@ -712,6 +719,7 @@ if (!empty($conf->global->MEMBER_NEWFORM_DOLIBARRTURNOVER)) {
|
||||
</script>';
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
if (!empty($conf->global->MEMBER_NEWFORM_AMOUNT) || !empty($conf->global->MEMBER_NEWFORM_PAYONLINE)) {
|
||||
// $conf->global->MEMBER_NEWFORM_SHOWAMOUNT is an amount
|
||||
|
||||
|
||||
@ -1834,7 +1834,8 @@ if ($source == 'organizedeventregistration') {
|
||||
// Debitor
|
||||
print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Attendee");
|
||||
print '</td><td class="CTableRow2"><b>';
|
||||
print $thirdparty->name;
|
||||
print $attendee->email;
|
||||
print ($thirdparty->name ? ' ('.$thirdparty->name.')' : '');
|
||||
print '</b>';
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
|
||||
@ -1445,6 +1445,7 @@ if ($ispaymentok) {
|
||||
|
||||
$key = 'ONLINE_PAYMENT_MESSAGE_OK';
|
||||
if (!empty($conf->global->$key)) {
|
||||
print '<br>';
|
||||
print $conf->global->$key;
|
||||
}
|
||||
|
||||
|
||||
@ -893,7 +893,7 @@ class RecruitmentCandidature extends CommonObject
|
||||
$this->lines = array();
|
||||
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
|
||||
@ -1759,7 +1759,7 @@ class Societe extends CommonObject
|
||||
|
||||
$this->country_id = $obj->country_id;
|
||||
$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_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
|
||||
*/
|
||||
public function loadCacheCategoriesTickets()
|
||||
{
|
||||
global $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
if (!empty($this->cache_category_ticket) && count($this->cache_category_tickets)) {
|
||||
// Cache already loaded
|
||||
return 0;
|
||||
}
|
||||
// Cache deja charge
|
||||
|
||||
$sql = "SELECT rowid, code, label, use_default, pos, description, public, active, force_severity, fk_parent";
|
||||
$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";
|
||||
dol_syslog(get_class($this)."::load_cache_categories_tickets", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@ -1191,15 +1191,18 @@ class Ticket extends CommonObject
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$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]['pos'] = $obj->pos;
|
||||
$this->cache_category_tickets[$obj->rowid]['public'] = $obj->public;
|
||||
$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]['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++;
|
||||
}
|
||||
return $num;
|
||||
|
||||
@ -1972,7 +1972,7 @@ if ($action == 'create' || $action == 'adduserldap') {
|
||||
print $form->select_dolgroups('', 'group', 1, $exclude, 0, '', '', $object->entity);
|
||||
print ' ';
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'" />';
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("Add").'" />';
|
||||
print '<input type="submit" class="button buttongen button-add" value="'.$langs->trans("Add").'" />';
|
||||
}
|
||||
print '</th></tr>'."\n";
|
||||
|
||||
|
||||
@ -455,8 +455,9 @@ class User extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if ($sid) { // 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)."') LIMIT 1";
|
||||
if ($sid) {
|
||||
// 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) {
|
||||
$sql .= " AND u.login = '".$this->db->escape($login)."'";
|
||||
} 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
|
||||
|
||||
if ($sid) {
|
||||
// permet une recherche du user par son SID ActiveDirectory ou Samba
|
||||
$sql .= ' '.$this->db->plimit(1);
|
||||
}
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
@ -418,7 +418,7 @@ if ($action == 'create') {
|
||||
print $form->select_dolusers('', 'user', 1, $exclude, 0, '', '', $object->entity, 0, 0, '', 0, '', 'maxwidth300');
|
||||
print ' ';
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button buttongen button-add" value="'.$langs->trans("Add").'">';
|
||||
print '</td></tr>'."\n";
|
||||
print '</table></form>'."\n";
|
||||
print '<br>';
|
||||
|
||||
@ -927,17 +927,20 @@ class Workstation extends CommonObject
|
||||
{
|
||||
$this->lines = array();
|
||||
|
||||
/*
|
||||
$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)) {
|
||||
$this->error = $this->error;
|
||||
$this->errors = $this->errors;
|
||||
return $result;
|
||||
} else {
|
||||
$this->lines = $result;
|
||||
return $this->lines;
|
||||
}
|
||||
|
||||
$this->lines = $result;
|
||||
*/
|
||||
|
||||
return $this->lines;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user