Merge branch 'develop' of https://github.com/korabocintake/dolibarr into develop

This commit is contained in:
OPEN\s.takeuchi 2022-07-26 11:30:34 +09:00
commit e62c54c627
132 changed files with 884 additions and 576 deletions

View File

@ -674,7 +674,7 @@ if ($id) {
// Can an entry be erased or disabled ?
$iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default
$url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
$url = $_SERVER["PHP_SELF"].'?token='.newToken().($page ? '&page='.$page : '').'&sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '');
if ($param) {
$url .= '&'.$param;
}

View File

@ -197,7 +197,7 @@ $arrayfields = array(
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidationAndLock"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidationAndLock"), 'checked'=>1, 'enabled'=>!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")),
't.import_key'=>array('label'=>$langs->trans("ImportId"), 'checked'=>0, 'position'=>1100),
);
@ -769,16 +769,18 @@ if ($action == 'export_file') {
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
// If 0 or not set, we NOT check by default.
$checked = (isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE));
$form_question['notifiedvalidationdate'] = array(
'name' => 'notifiedvalidationdate',
'type' => 'checkbox',
'label' => $langs->trans('NotifiedValidationDate', $langs->transnoentitiesnoconv("MenuAccountancyClosure")),
'value' => $checked,
);
if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
// If 0 or not set, we NOT check by default.
$checked = (isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE));
$form_question['notifiedvalidationdate'] = array(
'name' => 'notifiedvalidationdate',
'type' => 'checkbox',
'label' => $langs->trans('NotifiedValidationDate', $langs->transnoentitiesnoconv("MenuAccountancyClosure")),
'value' => $checked,
);
$form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator');
$form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator');
}
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600);
}

View File

@ -166,7 +166,7 @@ $arrayfields = array(
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1),
't.date_validated'=>array('label'=>$langs->trans("DateValidation"), 'checked'=>1, 'enabled'=>!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")),
't.import_key'=>array('label'=>$langs->trans("ImportId"), 'checked'=>0, 'position'=>1100),
);

View File

@ -112,6 +112,7 @@ if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting-
}
}
/*
* View
*/
@ -178,20 +179,40 @@ for ($i = 1; $i <= 12; $i++) {
}
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
$sql = "SELECT COUNT(b.rowid) as detail,";
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
$j -= 12;
if (getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
// TODO Analyse is done by finding record not into a closed period
$sql = "SELECT COUNT(b.rowid) as detail,";
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
$j -= 12;
}
$sql .= " SUM(".$db->ifsql("MONTH(b.doc_date)=".$j, "1", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
}
$sql .= " SUM(".$db->ifsql("MONTH(b.doc_date)=".$j, "1", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
$sql .= " COUNT(b.rowid) as total";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b";
$sql .= " WHERE b.doc_date >= '".$db->idate($search_date_start)."'";
$sql .= " AND b.doc_date <= '".$db->idate($search_date_end)."'";
$sql .= " AND b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy
// Loop on each closed period
$sql .= " AND b.doc_date BETWEEN 0 AND 0";
} else {
// Analyse closed record using the unitary flag/date on each record
$sql = "SELECT COUNT(b.rowid) as detail,";
for ($i = 1; $i <= 12; $i++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
if ($j > 12) {
$j -= 12;
}
$sql .= " SUM(".$db->ifsql("MONTH(b.doc_date)=".$j, "1", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
}
$sql .= " COUNT(b.rowid) as total";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b";
$sql .= " WHERE b.doc_date >= '".$db->idate($search_date_start)."'";
$sql .= " AND b.doc_date <= '".$db->idate($search_date_end)."'";
$sql .= " AND b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy
$sql .= " AND date_validated IS NULL";
}
$sql .= " COUNT(b.rowid) as total";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b";
$sql .= " WHERE b.doc_date >= '".$db->idate($search_date_start)."'";
$sql .= " AND b.doc_date <= '".$db->idate($search_date_end)."'";
$sql .= " AND b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy
$sql .= " AND date_validated IS NULL";
dol_syslog('htdocs/accountancy/closure/index.php', LOG_DEBUG);
$resql = $db->query($sql);

View File

@ -328,7 +328,7 @@ if ($action == 'writebookkeeping') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
$account_label = $accountingaccount->label;
// get compte id and label

View File

@ -457,7 +457,7 @@ if ($action == 'writebookkeeping') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
$label_account = $accountingaccount->label;
$bookkeeping = new BookKeeping($db);

View File

@ -479,7 +479,7 @@ if ($action == 'writebookkeeping') {
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
$accountingaccount->fetch($k, null, true); // TODO Use a cache for label
$accountingaccount->fetch(null, $k, true); // TODO Use a cache for label
$label_account = $accountingaccount->label;
$bookkeeping = new BookKeeping($db);

View File

@ -236,7 +236,7 @@ if ($some_mandatory_steps_of_setup_were_not_done) {
print ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '<strong>' . $langs->transnoentitiesnoconv("MenuAccountancy") . '-' . $langs->transnoentitiesnoconv("Setup") . "-" . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . '</strong>');
print '</div>';
}
print '<div class="tabsAction tabsActionNoBottom">';
print '<div class="tabsAction tabsActionNoBottom centerimp">';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') {
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
}

View File

@ -178,14 +178,14 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td class="right">'.$langs->trans("Value").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print "</tr>\n";
// Force Type
$adht = new AdherentType($db);
print '<tr class="oddeven drag" id="trforcetype"><td>';
print $langs->trans("ForceMemberType");
print '</td><td class="right">';
print '</td><td>';
$listofval = array();
$listofval += $adht->liste_array(1);
$forcetype = empty($conf->global->MEMBER_NEWFORM_FORCETYPE) ? -1 : $conf->global->MEMBER_NEWFORM_FORCETYPE;
@ -197,7 +197,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
$morphys["mor"] = $langs->trans("Moral");
print '<tr class="oddeven drag" id="trforcenature"><td>';
print $langs->trans("ForceMemberNature");
print '</td><td class="right">';
print '</td><td>';
$forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY;
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
print "</td></tr>\n";
@ -205,21 +205,21 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
// Amount
print '<tr class="oddeven" id="tramount"><td>';
print $langs->trans("DefaultAmount");
print '</td><td class="right">';
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><td>';
print '<input type="text" class="right width50" 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
print '<tr class="oddeven" id="tredit"><td>';
print $langs->trans("CanEditAmount");
print '</td><td class="right">';
print '</td><td>';
print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
print "</td></tr>\n";
// Jump to an online payment page
print '<tr class="oddeven" id="trpayment"><td>';
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
print '</td><td class="right">';
print '</td><td>';
$listofval = array();
$listofval['-1'] = $langs->trans('No');
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';

View File

@ -1227,12 +1227,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
print '<tr><td class="fieldrequired">'.$langs->trans("Password").'</td><td><input type="password" name="pass" class="minwidth300" maxlength="50" value="'.dol_escape_htmltag(GETPOSTISSET("pass") ? GETPOST("pass", 'none', 2) : $object->pass).'"></td></tr>';
}
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1);
print "</td></tr>";
// Type
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
@ -1244,6 +1238,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
}
print "</td></tr>";
// Morphy
$morphys["phy"] = $langs->trans("Physical");
$morphys["mor"] = $langs->trans("Moral");
print '<tr><td><span class="fieldrequired">'.$langs->trans("MemberNature").'</span></td><td>';
print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1);
print "</td></tr>";
// Company
print '<tr><td id="tdcompany">'.$langs->trans("Company").'</td><td><input type="text" name="societe" class="minwidth300" maxlength="128" value="'.(GETPOSTISSET("societe") ? GETPOST("societe", 'alphanohtml', 2) : $object->company).'"></td></tr>';

View File

@ -598,7 +598,11 @@ while ($i < min($num, $limit)) {
if (!$i) {
$totalarray['pos'][$totalarray['nbfield']] = 'd.amount';
}
$totalarray['val']['d.amount'] += $obj->subscription;
if (empty($totalarray['val']['d.amount'])) {
$totalarray['val']['d.amount'] = $obj->subscription;
} else {
$totalarray['val']['d.amount'] += $obj->subscription;
}
}
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';

View File

@ -466,13 +466,13 @@ print '</form>';
//Use draft Watermark
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print "<input type=\"hidden\" name=\"action\" value=\"set_BOM_DRAFT_WATERMARK\">";
print '<input type="hidden" name="action" value="set_BOM_DRAFT_WATERMARK">';
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.$conf->global->BOM_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('BOM_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -64,7 +64,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
* View
*/
$help_url = '';
llxHeader('', $langs->trans("BOMsSetup"), $help_url);

View File

@ -625,13 +625,13 @@ print '</form>';
//Use draft Watermark
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print "<input type=\"hidden\" name=\"action\" value=\"set_COMMANDE_DRAFT_WATERMARK\">";
print '<input type="hidden" name="action" value="set_COMMANDE_DRAFT_WATERMARK">';
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.getDolGlobalString('COMMANDE_DRAFT_WATERMARK').'">';
print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('COMMANDE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -220,7 +220,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity) {
print '<td class="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
}
print '<input type="submit" class="button button-add" name="add" value="'.$langs->trans("Add").'">';
print '<input type="submit" class="button button-add small" name="add" value="'.$langs->trans("Add").'">';
print "</td>\n";
print '</tr>';
@ -273,7 +273,7 @@ if ($result) {
print '</td>';
// Date last change
print '<td class="nowraponall">';
print '<td class="nowraponall center">';
print dol_print_date($db->jdate($obj->tms), 'dayhour');
print '</td>';

View File

@ -458,7 +458,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.$conf->global->CONTRACT_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="CONTRACT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('CONTRACT_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n";
print '<tr class="oddeven">';

View File

@ -206,7 +206,7 @@ class PrestaShopWebservice
*/
public function printDebug($title, $content)
{
echo '<div style="display:table;background:#CCC;font-size:8pt;padding:7px"><h6 style="font-size:9pt;margin:0">'.$title.'</h6><pre>'.htmlentities($content).'</pre></div>';
echo '<div style="display:table;background:#CCC;font-size:8pt;padding:7px"><h6 style="font-size:9pt;margin:0">'.dol_escape_htmltag($title).'</h6><pre>'.dol_escape_htmltag($content).'</pre></div>';
}
/**

View File

@ -451,7 +451,7 @@ print "</td></tr>\n";
print '<tr><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '<input class="flat minwidth200" type="text" name="SHIPPING_DRAFT_WATERMARK" value="'.getDolGlobalString('SHIPPING_DRAFT_WATERMARK').'">';
print '<input class="flat minwidth200" type="text" name="SHIPPING_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SHIPPING_DRAFT_WATERMARK')).'">';
print "</td></tr>\n";
print '</table>';

View File

@ -468,7 +468,7 @@ print '</td></tr>'."\n";
print '<tr class="oddeven"><td colspan="2">';
print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.$conf->global->EXPENSEREPORT_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n";
if (!empty($conf->project->enabled)) {

View File

@ -761,7 +761,7 @@ print '<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td>';
print '<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.'" />';
print '<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('FACTURE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
print "</td></tr>\n";

View File

@ -525,7 +525,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERM
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('FICHINTER_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -551,7 +551,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.$conf->global->HOLIDAY_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('HOLIDAY_DRAFT_WATERMARK')).'">';
print '</td></tr>'."\n";
}

View File

@ -57,7 +57,7 @@ $type = 'myobject';
$arrayofparameters = array(
'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1),
'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'textarea','enabled'=>1),
'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'varchar','enabled'=>1),
);
$error = 0;

View File

@ -870,7 +870,7 @@ if ($action == 'edit') {
if (!empty($dnsinfo) && is_array($dnsinfo)) {
foreach ($dnsinfo as $info) {
if (strpos($info['txt'], 'v=spf') !== false) {
$text .= ($text ? '<br><br>' : '').$langs->trans("ActualMailSPFRecordFound", $info['txt']);
$text .= ($text ? '<br><br>' : '').$langs->trans("ActualMailSPFRecordFound", $companyemail, $info['txt']);
}
}
}

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2022 Charlene Benke <charlene@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
@ -505,7 +506,7 @@ if ($mode == 'feature') {
$text .= '<br>';
$text .= '<br><strong>'.$langs->trans("AddHooks").':</strong> ';
if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) {
if (isset($objMod->module_parts) && isset($objMod->module_parts['hooks']) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) {
$i = 0;
foreach ($objMod->module_parts['hooks'] as $key => $val) {
if ($key === 'entity') {

View File

@ -465,7 +465,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_MRP_MO_DRAFT_WATERMARK
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="MRP_MO_DRAFT_WATERMARK" value="'.$conf->global->MRP_MO_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="MRP_MO_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('MRP_MO_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -693,7 +693,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMAR
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.$conf->global->PROPALE_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('PROPALE_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -467,7 +467,7 @@ print "</td></tr>\n";
print '<tr><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext).'<br>';
print '<input class="flat minwidth200" type="text" name="RECEPTION_DRAFT_WATERMARK" value="'.$conf->global->RECEPTION_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="RECEPTION_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('RECEPTION_DRAFT_WATERMARK')).'">';
print "</td></tr>\n";
*/
print '</table>';

View File

@ -128,7 +128,7 @@ if (isset($max)) {
}
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_UPLOAD_DOC" type="text" size="6" value="'.htmlentities($conf->global->MAIN_UPLOAD_DOC).'"> '.$langs->trans("Kb");
print '<input class="flat" name="MAIN_UPLOAD_DOC" type="text" size="6" value="'.dol_escape_htmltag($conf->global->MAIN_UPLOAD_DOC).'"> '.$langs->trans("Kb");
print '</td>';
print '</tr>';
@ -138,7 +138,7 @@ print '<td>'.$langs->trans("UMask").'</td><td class="right">';
print $form->textwithpicto('', $langs->trans("UMaskExplanation"));
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_UMASK" type="text" size="6" value="'.htmlentities($conf->global->MAIN_UMASK).'">';
print '<input class="flat" name="MAIN_UMASK" type="text" size="6" value="'.dol_escape_htmltag($conf->global->MAIN_UMASK).'">';
print '</td>';
print '</tr>';

View File

@ -61,8 +61,13 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
dol_print_error($db);
}
} elseif ($action == 'updateform') {
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
$res1 = 1; $res2 = 1;
if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) {
$res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
}
if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) {
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
}
if ($res1 && $res2) {
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
}
@ -165,11 +170,11 @@ if (ini_get("session.gc_probability") == 0) {
}
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
print '<input class="flat right width50" name="MAIN_SESSION_TIMEOUT" type="text" value="'.dol_escape_htmltag($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
print '</td>';
print '</tr>';
/*
if (empty($conf->global->MAIN_APPLICATION_TITLE)) {
$conf->global->MAIN_APPLICATION_TITLE = "";
}
@ -177,9 +182,10 @@ print '<tr class="oddeven">';
print '<td>'.$langs->trans("MAIN_APPLICATION_TITLE").'</td><td class="right">';
print '</td>';
print '<td class="nowrap">';
print '<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).'"> ';
print '<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.dol_escape_htmltag($conf->global->MAIN_APPLICATION_TITLE).'"> ';
print '</td>';
print '</tr>';
*/
print '</table>';

View File

@ -492,7 +492,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAF
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.$conf->global->SUPPLIER_PROPOSAL_DRAFT_WATERMARK.'">';
print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";

View File

@ -295,7 +295,7 @@ print '</td></tr>';
if (!empty($conf->loghandlers['mod_syslog_file']) && !empty($conf->cron->enabled)) {
print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogFileNumberOfSaves").'</td>';
print '<td colspan="2"><input type="number" name="file_saves" placeholder="14" min="0" step="1" value="'.$conf->global->SYSLOG_FILE_SAVES.'" />';
print '<td colspan="2"><input type="number" name="file_saves" placeholder="14" min="0" step="1" value="'.getDolGlobalString('SYSLOG_FILE_SAVES').'" />';
print ' (<a href="'.dol_buildpath('/cron/list.php', 1).'?search_label=CompressSyslogs&status=-1">'.$langs->trans('ConfigureCleaningCronjobToSetFrequencyOfSaves').'</a>)</td></tr>';
}

View File

@ -106,6 +106,14 @@ if (!$base) {
print '<td class="right">Collation</td>';
print "</tr>\n";
$arrayoffilesrich = dol_dir_list(DOL_DOCUMENT_ROOT.'/install/mysql/tables/', 'files', 0, '\.sql$');
$arrayoffiles = array();
foreach ($arrayoffilesrich as $value) {
//print $shortsqlfilename.' ';
$shortsqlfilename = preg_replace('/\-[a-z]+\./', '.', $value['name']);
$arrayoffiles[] = $shortsqlfilename;
}
$sql = "SHOW TABLE STATUS";
$resql = $db->query($sql);
@ -119,7 +127,8 @@ if (!$base) {
print '<td>'.($i+1).'</td>';
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
if (dol_is_file(DOL_DOCUMENT_ROOT.'/install/mysql/tables/'.$tablename.'.sql')) {
if (in_array($tablename.'.sql', $arrayoffiles)) {
$img = "info";
//print img_picto($langs->trans("ExternalModule"), $img);
} else {

View File

@ -183,7 +183,8 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') {
}
// enable captcha by default
$res = dolibarr_set_const($db, 'MAIN_SECURITY_ENABLECAPTCHA', 1, 'chaine', 0, '', $conf->entity);
// TODO Add a visible option in this setup page for this
$res = dolibarr_set_const($db, 'MAIN_SECURITY_ENABLECAPTCHA_TICKET', 1, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
$errors[] = $db->lasterror();

View File

@ -1047,7 +1047,7 @@ if ($type == Categorie::TYPE_USER) {
print '<input type="hidden" name="action" value="addintocategory">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
print $langs->trans("AddProjectIntoCategory").' &nbsp;';
print $langs->trans("AddObjectIntoCategory").' &nbsp;';
print $form->select_dolusers('', 'elemid');
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
print '</tr>';

View File

@ -1903,13 +1903,22 @@ if ($id > 0) {
} else {
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
$formconfirm = '';
// Clone event
if ($action == 'clone') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', $formquestion, 'yes', 1);
print $formconfirm;
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', array(), 'yes', 1);
}
// Call Hook formConfirm
$parameters = array();
$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $formconfirm.=$hookmanager->resPrint;
elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint;
// Print form confirm
print $formconfirm;
$linkback = '';
// Link to other agenda views
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';

View File

@ -41,7 +41,7 @@ class AdvanceTargetingMailing extends CommonObject
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'advtargetemailing';
public $table_element = 'mailing_advtarget';
/**
* @var int ID
@ -159,7 +159,7 @@ class AdvanceTargetingMailing extends CommonObject
// Put here code to add control on parameters values
// Insert request
$sql = "INSERT INTO ".MAIN_DB_PREFIX."advtargetemailing(";
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_advtarget(";
$sql .= "name,";
$sql .= "entity,";
$sql .= "fk_element,";
@ -188,7 +188,7 @@ class AdvanceTargetingMailing extends CommonObject
}
if (!$error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."advtargetemailing");
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."mailing_advtarget");
}
// Commit or rollback
@ -227,7 +227,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,";
$sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
$sql .= " WHERE t.rowid = ".((int) $id);
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
@ -282,7 +282,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,";
$sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
if (!empty($id)) {
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'";
} else {
@ -345,7 +345,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " t.fk_user_mod,";
$sql .= " t.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
if (!empty($id)) {
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'";
} else {
@ -410,7 +410,7 @@ class AdvanceTargetingMailing extends CommonObject
// Put here code to add a control on parameters values
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."advtargetemailing SET";
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_advtarget SET";
$sql .= " name=".(isset($this->name) ? "'".$this->db->escape($this->name)."'" : "''").",";
$sql .= " entity=".$conf->entity.",";
@ -458,7 +458,7 @@ class AdvanceTargetingMailing extends CommonObject
$this->db->begin();
if (!$error) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."advtargetemailing";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_advtarget";
$sql .= " WHERE rowid=".((int) $this->id);
dol_syslog(get_class($this)."::delete sql=".$sql);

View File

@ -1217,7 +1217,7 @@ if ($resql) {
if ($permissiontocancel) {
$arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel");
}
if ($user->rights->facture->creer) {
if (!empty($conf->invoice->enabled) && $user->rights->facture->creer) {
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer");
}
if ($permissiontoclose) {

View File

@ -668,6 +668,8 @@ class Invoices extends DolibarrApi
$result = $this->invoice->delete(DolibarrApiAccess::$user);
if ($result < 0) {
throw new RestException(500, 'Error when deleting invoice');
} elseif ($result == 0) {
throw new RestException(403, 'Invoice not erasable');
}
return array(

View File

@ -1,8 +1,9 @@
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* 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
@ -108,7 +109,7 @@ llxHeader('', $langs->trans("WithdrawalsLines"));
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email";
$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.email";
$sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
@ -139,7 +140,7 @@ if ($search_bon) {
}
if ($type == 'bank-transfer') {
if ($search_code) {
$sql .= natural_search("s.code_fourn", $search_code);
$sql .= natural_search("s.code_fournisseur", $search_code);
}
} else {
if ($search_code) {
@ -172,6 +173,9 @@ if ($result) {
$param = "&amp;statut=".urlencode($statut);
$param .= "&amp;search_bon=".urlencode($search_bon);
if ($type == 'bank-transfer') {
$param .= '&amp;type=bank-transfer';
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit);
}
@ -204,7 +208,7 @@ if ($result) {
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre maxwidthsearch">';
@ -214,8 +218,12 @@ if ($result) {
print '</tr>';
$columntitle = "WithdrawalsReceipts";
$columntitlethirdparty = "CustomerCode";
$columncodethirdparty = "s.code_client";
if ($type == 'bank-transfer') {
$columntitle = "BankTransferReceipts";
$columntitlethirdparty = "SupplierCode";
$columncodethirdparty = "s.code_fournisseur";
}
print '<tr class="liste_titre">';
@ -223,7 +231,7 @@ if ($result) {
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre('');
@ -256,9 +264,17 @@ if ($result) {
print '</a></td>';
print '<td>';
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">';
print img_object($langs->trans("ShowBill"), "bill");
print '&nbsp;<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">'.$obj->invoiceref."</a></td>\n";
$link_to_bill = '/compta/facture/card.php?facid=';
$link_title = 'Invoice';
$link_picto = 'bill';
if ($type == 'bank-transfer') {
$link_to_bill = '/fourn/facture/card.php?facid=';
$link_title = 'SupplierInvoice';
$link_picto = 'supplier_invoice';
}
print '<a href="'.DOL_URL_ROOT.$link_to_bill.$obj->facid.'">';
print img_object($langs->trans($link_title), $link_picto);
print '&nbsp;'.$obj->invoiceref."</td>\n";
print '</a>';
print '</td>';
@ -266,7 +282,15 @@ if ($result) {
print $company->getNomUrl(1);
print "</td>\n";
print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
print '<td class="center">';
$link_to_tab = '/comm/card.php?socid=';
$link_code = $obj->code_client;
if ($type == 'bank-transfer') {
$link_to_tab = '/fourn/card.php?socid=';
$link_code = $obj->code_fournisseur;
}
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";

View File

@ -132,6 +132,9 @@ if ($result) {
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
$param .= '&contextpage='.urlencode($contextpage);
}
if ($type == 'bank-transfer') {
$param .= '&amp;type=bank-transfer';
}
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.urlencode($limit);
}

View File

@ -1263,9 +1263,9 @@ if ($action == 'create') {
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("CloseAContract"), $langs->trans("ConfirmCloseContract"), "confirm_close", '', 0, 1);
} elseif ($action == 'activate') {
$formquestion = array(
array('type' => 'date', 'name' => 'd_start', 'label' => $langs->trans("DateServiceActivate"), /*'value' => $form->selectDate('', '', $usehm, $usehm, '', "active", 1, 0),*/ /*'socid', '(s.client=1 OR s.client=2 OR s.client=3)'*/),
array('type' => 'date', 'name' => 'd_start', 'label' => $langs->trans("DateServiceActivate"), 'value' => dol_now()),
array('type' => 'date', 'name' => 'd_end', 'label' => $langs->trans("DateEndPlanned"), /*'value' => $form->selectDate('', "end", $usehm, $usehm, '', "active", 1, 0),*/ '', ''),
array('type' => 'text', 'name' => 'comment', 'label' => $langs->trans("Comment"), 'value' => '', '', '', 'class' => 'minwidth300')
array('type' => 'text', 'name' => 'comment', 'label' => $langs->trans("Comment"), 'value' => '', '', '', 'class' => 'minwidth300', 'moreattr'=>'autofocus')
);
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("ActivateAllOnContract"), $langs->trans("ConfirmActivateAllOnContract"), "confirm_activate", $formquestion, 'yes', 1, 280);
} elseif ($action == 'clone') {

View File

@ -61,7 +61,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
continue; // The field was not submited to be saved
}
} else {
if (!GETPOSTISSET($key)) {
if (!GETPOSTISSET($key) && !preg_match('/^chkbxlst:/', $object->fields[$key]['type'])) {
continue; // The field was not submited to be saved
}
}
@ -91,6 +91,12 @@ if ($action == 'add' && !empty($permissiontoadd)) {
} elseif ($object->fields[$key]['type'] == 'reference') {
$tmparraykey = array_keys($object->param_list);
$value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2');
} elseif (preg_match('/^chkbxlst:(.*)/', $object->fields[$key]['type'])) {
$value = '';
$values_arr = GETPOST($key, 'array');
if (!empty($values_arr)) {
$value = implode(',', $values_arr);
}
} else {
if ($key == 'lang') {
$value = GETPOST($key, 'aZ09') ?GETPOST($key, 'aZ09') : "";
@ -134,6 +140,8 @@ if ($action == 'add' && !empty($permissiontoadd)) {
}
if (!$error) {
$db->begin();
$result = $object->create($user);
if ($result > 0) {
// Creation OK
@ -141,14 +149,19 @@ if ($action == 'add' && !empty($permissiontoadd)) {
$categories = GETPOST('categories', 'array:int');
$object->setCategories($categories);
}
$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
$db->commit();
if (empty($noback)) {
header("Location: " . $urltogo);
exit;
}
} else {
$db->rollback();
$error++;
// Creation KO
if (!empty($object->errors)) {
@ -177,7 +190,7 @@ if ($action == 'update' && !empty($permissiontoadd)) {
continue;
}
} else {
if (!GETPOSTISSET($key)) {
if (!GETPOSTISSET($key) && !preg_match('/^chkbxlst:/', $object->fields[$key]['type'])) {
continue; // The field was not submited to be saved
}
}
@ -215,6 +228,12 @@ if ($action == 'update' && !empty($permissiontoadd)) {
$value = ((GETPOST($key, 'aZ09') == 'on' || GETPOST($key, 'aZ09') == '1') ? 1 : 0);
} elseif ($object->fields[$key]['type'] == 'reference') {
$value = array_keys($object->param_list)[GETPOST($key)].','.GETPOST($key.'2');
} elseif (preg_match('/^chkbxlst:/', $object->fields[$key]['type'])) {
$value = '';
$values_arr = GETPOST($key, 'array');
if (!empty($values_arr)) {
$value = implode(',', $values_arr);
}
} else {
if ($key == 'lang') {
$value = GETPOST($key, 'aZ09');

View File

@ -895,7 +895,12 @@ abstract class CommonDocGenerator
//Add value to store price with currency
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency']));
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') {
$object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]];
$valueofselectkey = $object->array_options['options_'.$key];
if (array_key_exists($valueofselectkey, $extrafields->attributes[$object->table_element]['param'][$key]['options'])) {
$object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$valueofselectkey];
} else {
$object->array_options['options_'.$key] = '';
}
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') {
$valArray = explode(',', $object->array_options['options_'.$key]);
$output = array();
@ -945,7 +950,11 @@ abstract class CommonDocGenerator
}
}
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
if (array_key_exists('option_'.$key, $object->array_options)) {
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
} else {
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => ''));
}
}
}

View File

@ -6763,6 +6763,9 @@ abstract class CommonObject
} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
$type = 'sellist';
} elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[1] => 'N');
$type = 'chkbxlst';
} elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) {
$param['options'] = array();
$type = 'varchar';
@ -6865,7 +6868,7 @@ abstract class CommonObject
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'"'.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
} elseif (preg_match('/varchar/', $type)) {
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'"'.($size > 0 ? ' maxlength="'.$size.'"' : '').' value="'.dol_escape_htmltag($value).'"'.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
} elseif (in_array($type, array('mail', 'phone', 'url'))) {
} elseif (in_array($type, array('mail', 'phone', 'url', 'ip'))) {
$out = '<input type="text" class="flat '.$morecss.'" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').($autofocusoncreate ? ' autofocus' : '').'>';
} elseif (preg_match('/^text/', $type)) {
if (!preg_match('/search_/', $keyprefix)) { // If keyprefix is search_ or search_options_, we must just use a simple text field
@ -6916,7 +6919,9 @@ abstract class CommonObject
if ((string) $keyb == '') {
continue;
}
if (strpos($valb, "|") !== false) list($valb, $parent) = explode('|', $valb);
if (strpos($valb, "|") !== false) {
list($valb, $parent) = explode('|', $valb);
}
$out .= '<option value="'.$keyb.'"';
$out .= (((string) $value == (string) $keyb) ? ' selected' : '');
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
@ -6941,6 +6946,8 @@ abstract class CommonObject
// 2 : key fields name (if differ of rowid)
// 3 : key field parent (for dependent lists)
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
// 5 : id category type
// 6 : ids categories list separated by comma for category root
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
@ -6955,112 +6962,130 @@ abstract class CommonObject
$keyList .= ', '.$parentField;
}
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label)) {
$keyList .= ', ';
$keyList .= implode(', ', $fields_label);
$filter_categorie = false;
if (count($InfoFieldList) > 5) {
if ($InfoFieldList[0] == 'categorie') {
$filter_categorie = true;
}
}
$sqlwhere = '';
$sql = "SELECT ".$keyList;
$sql .= " FROM ".$this->db->prefix().$InfoFieldList[0];
if (!empty($InfoFieldList[4])) {
// can use SELECT request
if (strpos($InfoFieldList[4], '$SEL$') !== false) {
$InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]);
if ($filter_categorie === false) {
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label)) {
$keyList .= ', ';
$keyList .= implode(', ', $fields_label);
}
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) {
$InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]);
} else {
$InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]);
}
//We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= " as main, ".$this->db->prefix().$InfoFieldList[0]."_extrafields as extra";
$sqlwhere .= " WHERE extra.fk_object=main.".$InfoFieldList[2]." AND ".$InfoFieldList[4];
} else {
$sqlwhere .= " WHERE ".$InfoFieldList[4];
}
} else {
$sqlwhere .= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0], array('tablewithentity'))) {
$sqlwhere .= " AND entity = ".((int) $conf->entity);
}
$sql .= $sqlwhere;
//print $sql;
$sql .= ' ORDER BY '.implode(', ', $fields_label);
dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$out .= '<option value="0">&nbsp;</option>';
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num) {
$labeltoshow = '';
$obj = $this->db->fetch_object($resql);
// Several field into label (eq table:code|libelle:rowid)
$notrans = false;
$fields_label = explode('|', $InfoFieldList[1]);
if (count($fields_label) > 1) {
$notrans = true;
foreach ($fields_label as $field_toshow) {
$labeltoshow .= $obj->$field_toshow.' ';
}
} else {
$labeltoshow = $obj->{$InfoFieldList[1]};
$sqlwhere = '';
$sql = "SELECT " . $keyList;
$sql .= " FROM " . $this->db->prefix() . $InfoFieldList[0];
if (!empty($InfoFieldList[4])) {
// can use SELECT request
if (strpos($InfoFieldList[4], '$SEL$') !== false) {
$InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]);
}
$labeltoshow = dol_trunc($labeltoshow, 45);
if ($value == $obj->rowid) {
foreach ($fields_label as $field_toshow) {
$translabel = $langs->trans($obj->$field_toshow);
if ($translabel != $obj->$field_toshow) {
$labeltoshow = dol_trunc($translabel).' ';
} else {
$labeltoshow = dol_trunc($obj->$field_toshow).' ';
}
}
$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) {
$InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]);
} else {
if (!$notrans) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
if ($translabel != $obj->{$InfoFieldList[1]}) {
$labeltoshow = dol_trunc($translabel, 18);
} else {
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]});
$InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]);
}
//We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= " as main, " . $this->db->prefix() . $InfoFieldList[0] . "_extrafields as extra";
$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4];
} else {
$sqlwhere .= " WHERE " . $InfoFieldList[4];
}
} else {
$sqlwhere .= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0], array('tablewithentity'))) {
$sqlwhere .= " AND entity = " . ((int) $conf->entity);
}
$sql .= $sqlwhere;
//print $sql;
$sql .= ' ORDER BY ' . implode(', ', $fields_label);
dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$out .= '<option value="0">&nbsp;</option>';
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num) {
$labeltoshow = '';
$obj = $this->db->fetch_object($resql);
// Several field into label (eq table:code|libelle:rowid)
$notrans = false;
$fields_label = explode('|', $InfoFieldList[1]);
if (count($fields_label) > 1) {
$notrans = true;
foreach ($fields_label as $field_toshow) {
$labeltoshow .= $obj->$field_toshow . ' ';
}
} else {
$labeltoshow = $obj->{$InfoFieldList[1]};
}
if (empty($labeltoshow)) {
$labeltoshow = '(not defined)';
}
$labeltoshow = dol_trunc($labeltoshow, 45);
if ($value == $obj->rowid) {
$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
foreach ($fields_label as $field_toshow) {
$translabel = $langs->trans($obj->$field_toshow);
if ($translabel != $obj->$field_toshow) {
$labeltoshow = dol_trunc($translabel) . ' ';
} else {
$labeltoshow = dol_trunc($obj->$field_toshow) . ' ';
}
}
$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
} else {
if (!$notrans) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
if ($translabel != $obj->{$InfoFieldList[1]}) {
$labeltoshow = dol_trunc($translabel, 18);
} else {
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]});
}
}
if (empty($labeltoshow)) {
$labeltoshow = '(not defined)';
}
if ($value == $obj->rowid) {
$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
}
if (!empty($InfoFieldList[3]) && $parentField) {
$parent = $parentName . ':' . $obj->{$parentField};
$isDependList = 1;
}
$out .= '<option value="' . $obj->rowid . '"';
$out .= ($value == $obj->rowid ? ' selected' : '');
$out .= (!empty($parent) ? ' parent="' . $parent . '"' : '');
$out .= '>' . $labeltoshow . '</option>';
}
if (!empty($InfoFieldList[3]) && $parentField) {
$parent = $parentName.':'.$obj->{$parentField};
$isDependList = 1;
}
$out .= '<option value="'.$obj->rowid.'"';
$out .= ($value == $obj->rowid ? ' selected' : '');
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
$out .= '>'.$labeltoshow.'</option>';
$i++;
}
$i++;
$this->db->free($resql);
} else {
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
}
$this->db->free($resql);
} else {
print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$data = $form->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1);
$out .= '<option value="0">&nbsp;</option>';
foreach ($data as $data_key => $data_value) {
$out .= '<option value="' . $data_key . '"';
$out .= ($value == $data_key ? ' selected' : '');
$out .= '>' . $data_value . '</option>';
}
}
}
$out .= '</select>';
@ -7093,6 +7118,8 @@ abstract class CommonObject
// 2 : key fields name (if differ of rowid)
// 3 : key field parent (for dependent lists)
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
// 5 : id category type
// 6 : ids categories list separated by comma for category root
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
@ -7107,114 +7134,127 @@ abstract class CommonObject
}
}
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label)) {
$keyList .= ', ';
$keyList .= implode(', ', $fields_label);
$filter_categorie = false;
if (count($InfoFieldList) > 5) {
if ($InfoFieldList[0] == 'categorie') {
$filter_categorie = true;
}
}
$sqlwhere = '';
$sql = "SELECT ".$keyList;
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
if (!empty($InfoFieldList[4])) {
// can use SELECT request
if (strpos($InfoFieldList[4], '$SEL$') !== false) {
$InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]);
if ($filter_categorie === false) {
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label)) {
$keyList .= ', ';
$keyList .= implode(', ', $fields_label);
}
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) {
$InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]);
} else {
$InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]);
}
// We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= ' as main, '.$this->db->prefix().$InfoFieldList[0].'_extrafields as extra';
$sqlwhere .= " WHERE extra.fk_object=main.".$InfoFieldList[2]." AND ".$InfoFieldList[4];
} else {
$sqlwhere .= " WHERE ".$InfoFieldList[4];
}
} else {
$sqlwhere .= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0], array('tablewithentity'))) {
$sqlwhere .= " AND entity = ".((int) $conf->entity);
}
// $sql.=preg_replace('/^ AND /','',$sqlwhere);
// print $sql;
$sql .= $sqlwhere;
dol_syslog(get_class($this).'::showInputField type=chkbxlst', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
$data = array();
while ($i < $num) {
$labeltoshow = '';
$obj = $this->db->fetch_object($resql);
$notrans = false;
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
if (count($fields_label) > 1) {
$notrans = true;
foreach ($fields_label as $field_toshow) {
$labeltoshow .= $obj->$field_toshow.' ';
}
} else {
$labeltoshow = $obj->{$InfoFieldList[1]};
$sqlwhere = '';
$sql = "SELECT " . $keyList;
$sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0];
if (!empty($InfoFieldList[4])) {
// can use SELECT request
if (strpos($InfoFieldList[4], '$SEL$') !== false) {
$InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]);
}
$labeltoshow = dol_trunc($labeltoshow, 45);
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
foreach ($fields_label as $field_toshow) {
$translabel = $langs->trans($obj->$field_toshow);
if ($translabel != $obj->$field_toshow) {
$labeltoshow = dol_trunc($translabel, 18).' ';
} else {
$labeltoshow = dol_trunc($obj->$field_toshow, 18).' ';
}
}
$data[$obj->rowid] = $labeltoshow;
// current object id can be use into filter
if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) {
$InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]);
} else {
if (!$notrans) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
if ($translabel != $obj->{$InfoFieldList[1]}) {
$labeltoshow = dol_trunc($translabel, 18);
} else {
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
$InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]);
}
// We have to join on extrafield table
if (strpos($InfoFieldList[4], 'extra') !== false) {
$sql .= ' as main, ' . $this->db->prefix() . $InfoFieldList[0] . '_extrafields as extra';
$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4];
} else {
$sqlwhere .= " WHERE " . $InfoFieldList[4];
}
} else {
$sqlwhere .= ' WHERE 1=1';
}
// Some tables may have field, some other not. For the moment we disable it.
if (in_array($InfoFieldList[0], array('tablewithentity'))) {
$sqlwhere .= " AND entity = " . ((int) $conf->entity);
}
// $sql.=preg_replace('/^ AND /','',$sqlwhere);
// print $sql;
$sql .= $sqlwhere;
dol_syslog(get_class($this) . '::showInputField type=chkbxlst', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
$i = 0;
$data = array();
while ($i < $num) {
$labeltoshow = '';
$obj = $this->db->fetch_object($resql);
$notrans = false;
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
if (count($fields_label) > 1) {
$notrans = true;
foreach ($fields_label as $field_toshow) {
$labeltoshow .= $obj->$field_toshow . ' ';
}
} else {
$labeltoshow = $obj->{$InfoFieldList[1]};
}
if (empty($labeltoshow)) {
$labeltoshow = '(not defined)';
}
$labeltoshow = dol_trunc($labeltoshow, 45);
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
foreach ($fields_label as $field_toshow) {
$translabel = $langs->trans($obj->$field_toshow);
if ($translabel != $obj->$field_toshow) {
$labeltoshow = dol_trunc($translabel, 18) . ' ';
} else {
$labeltoshow = dol_trunc($obj->$field_toshow, 18) . ' ';
}
}
$data[$obj->rowid] = $labeltoshow;
} else {
if (!$notrans) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
if ($translabel != $obj->{$InfoFieldList[1]}) {
$labeltoshow = dol_trunc($translabel, 18);
} else {
$labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18);
}
}
if (empty($labeltoshow)) {
$labeltoshow = '(not defined)';
}
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
$data[$obj->rowid] = $labeltoshow;
}
if (!empty($InfoFieldList[3]) && $parentField) {
$parent = $parentName . ':' . $obj->{$parentField};
$isDependList = 1;
}
$data[$obj->rowid] = $labeltoshow;
}
if (!empty($InfoFieldList[3]) && $parentField) {
$parent = $parentName.':'.$obj->{$parentField};
$isDependList = 1;
}
$data[$obj->rowid] = $labeltoshow;
$i++;
}
$this->db->free($resql);
$i++;
$out = $form->multiselectarray($keyprefix . $key . $keysuffix, $data, $value_arr, '', 0, $morecss, 0, '100%');
} else {
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
}
$this->db->free($resql);
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%');
} else {
print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
$data = $form->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1);
$out = $form->multiselectarray($keyprefix . $key . $keysuffix, $data, $value_arr, '', 0, $morecss, 0, '100%');
}
}
} elseif ($type == 'link') {
@ -7375,6 +7415,9 @@ abstract class CommonObject
} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[1].':'.$reg[2] => 'N');
$type = 'sellist';
} elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[1] => 'N');
$type = 'chkbxlst';
}
$langfile = empty($val['langfile']) ? '' : $val['langfile'];
@ -7455,6 +7498,8 @@ abstract class CommonObject
$value = dol_print_url($value, '_blank', 32, 1);
} elseif ($type == 'phone') {
$value = dol_print_phone($value, '', 0, 0, '', '&nbsp;', 'phone');
} elseif ($type == 'ip') {
$value = dol_print_ip($value, 0);
} elseif ($type == 'price') {
if (!is_null($value) && $value !== '') {
$value = price($value, 0, $langs, 0, 0, -1, $conf->currency);
@ -7479,6 +7524,13 @@ abstract class CommonObject
$keyList .= implode(', ', $fields_label);
}
$filter_categorie = false;
if (count($InfoFieldList) > 5) {
if ($InfoFieldList[0] == 'categorie') {
$filter_categorie = true;
}
}
$sql = "SELECT ".$keyList;
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
if (strpos($InfoFieldList[4], 'extra') !== false) {
@ -7497,37 +7549,51 @@ abstract class CommonObject
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$value = ''; // value was used, so now we reste it to use it to build final output
$numrows = $this->db->num_rows($resql);
if ($numrows) {
$obj = $this->db->fetch_object($resql);
if ($filter_categorie === false) {
$value = ''; // value was used, so now we reste it to use it to build final output
$numrows = $this->db->num_rows($resql);
if ($numrows) {
$obj = $this->db->fetch_object($resql);
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label) && count($fields_label) > 1) {
foreach ($fields_label as $field_toshow) {
$translabel = '';
if (!empty($obj->$field_toshow)) {
$translabel = $langs->trans($obj->$field_toshow);
if (is_array($fields_label) && count($fields_label) > 1) {
foreach ($fields_label as $field_toshow) {
$translabel = '';
if (!empty($obj->$field_toshow)) {
$translabel = $langs->trans($obj->$field_toshow);
}
if ($translabel != $field_toshow) {
$value .= dol_trunc($translabel, 18) . ' ';
} else {
$value .= $obj->$field_toshow . ' ';
}
}
if ($translabel != $field_toshow) {
$value .= dol_trunc($translabel, 18).' ';
} else {
$value .= $obj->$field_toshow.' ';
}
}
} else {
$translabel = '';
if (!empty($obj->{$InfoFieldList[1]})) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
}
if ($translabel != $obj->{$InfoFieldList[1]}) {
$value = dol_trunc($translabel, 18);
} else {
$value = $obj->{$InfoFieldList[1]};
$translabel = '';
if (!empty($obj->{$InfoFieldList[1]})) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
}
if ($translabel != $obj->{$InfoFieldList[1]}) {
$value = dol_trunc($translabel, 18);
} else {
$value = $obj->{$InfoFieldList[1]};
}
}
}
} else {
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$toprint = array();
$obj = $this->db->fetch_object($resql);
$c = new Categorie($this->db);
$c->fetch($obj->rowid);
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
foreach ($ways as $way) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #aaa"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
}
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
}
} else {
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
@ -7564,6 +7630,13 @@ abstract class CommonObject
$keyList .= implode(', ', $fields_label);
}
$filter_categorie = false;
if (count($InfoFieldList) > 5) {
if ($InfoFieldList[0] == 'categorie') {
$filter_categorie = true;
}
}
$sql = "SELECT ".$keyList;
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
if (strpos($InfoFieldList[4], 'extra') !== false) {
@ -7575,33 +7648,49 @@ abstract class CommonObject
dol_syslog(get_class($this).':showOutputField:$type=chkbxlst', LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$value = ''; // value was used, so now we reste it to use it to build final output
$toprint = array();
while ($obj = $this->db->fetch_object($resql)) {
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
if (is_array($fields_label) && count($fields_label) > 1) {
foreach ($fields_label as $field_toshow) {
$translabel = '';
if (!empty($obj->$field_toshow)) {
$translabel = $langs->trans($obj->$field_toshow);
if ($filter_categorie === false) {
$value = ''; // value was used, so now we reste it to use it to build final output
$toprint = array();
while ($obj = $this->db->fetch_object($resql)) {
// Several field into label (eq table:code|libelle:rowid)
$fields_label = explode('|', $InfoFieldList[1]);
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
if (is_array($fields_label) && count($fields_label) > 1) {
foreach ($fields_label as $field_toshow) {
$translabel = '';
if (!empty($obj->$field_toshow)) {
$translabel = $langs->trans($obj->$field_toshow);
}
if ($translabel != $field_toshow) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . dol_trunc($translabel, 18) . '</li>';
} else {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $obj->$field_toshow . '</li>';
}
}
if ($translabel != $field_toshow) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.dol_trunc($translabel, 18).'</li>';
} else {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.$obj->$field_toshow.'</li>';
}
}
} else {
$translabel = '';
if (!empty($obj->{$InfoFieldList[1]})) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
}
if ($translabel != $obj->{$InfoFieldList[1]}) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.dol_trunc($translabel, 18).'</li>';
} else {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">'.$obj->{$InfoFieldList[1]}.'</li>';
$translabel = '';
if (!empty($obj->{$InfoFieldList[1]})) {
$translabel = $langs->trans($obj->{$InfoFieldList[1]});
}
if ($translabel != $obj->{$InfoFieldList[1]}) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . dol_trunc($translabel, 18) . '</li>';
} else {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb">' . $obj->{$InfoFieldList[1]} . '</li>';
}
}
}
}
} else {
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$toprint = array();
while ($obj = $this->db->fetch_object($resql)) {
if (is_array($value_arr) && in_array($obj->rowid, $value_arr)) {
$c = new Categorie($this->db);
$c->fetch($obj->rowid);
$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
foreach ($ways as $way) {
$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #aaa"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
}
}
}

View File

@ -4913,8 +4913,8 @@ class Form
* @param string $title Title
* @param string $question Question
* @param string $action Action
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>))
* type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', 'other' or 'onecolumn'...
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...'))
* 'type' can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'select', 'multiselect', 'morecss', 'other' or 'onecolumn'...
* @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0'
* @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
* @param int|string $height Force height of box (0 = auto)

View File

@ -165,9 +165,10 @@ class FormWebsite
* @param int $useempty 1=Add an empty value in list
* @param string $moreattrib More attributes on HTML select tag
* @param int $addjscombo Add js combo
* @param string $morecss More css
* @return string HTML select component with list of type of containers
*/
public function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '', $addjscombo = 0)
public function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '', $addjscombo = 0, $morecss = 'minwidth200')
{
global $langs, $conf, $user;
@ -190,7 +191,7 @@ class FormWebsite
}
$out = '';
$out .= '<select id="select'.$htmlname.'" class="flat selectTypeOfContainer minwidth200" name="'.$htmlname.'"'.($moreattrib ? ' '.$moreattrib : '').'>';
$out .= '<select id="select'.$htmlname.'" class="selectSampleOfContainer'.($morecss? ' '.$morecss : '').'" name="'.$htmlname.'"'.($moreattrib ? ' '.$moreattrib : '').'>';
if ($useempty == 1 || $useempty == 2) {
$out .= '<option value="-1">&nbsp;</option>';

View File

@ -51,6 +51,12 @@ class RssParser
private $current_namespace;
private $initem;
private $intextinput;
private $incontent;
private $inimage;
private $inchannel;
// For parsing with xmlparser
public $stack = array(); // parser stack
private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
@ -254,21 +260,26 @@ class RssParser
return -1;
}
$xmlparser = xml_parser_create('');
try {
$xmlparser = xml_parser_create(null);
if (!is_resource($xmlparser) && !is_object($xmlparser)) {
$this->error = "ErrorFailedToCreateParser";
return -1;
if (!is_resource($xmlparser) && !is_object($xmlparser)) {
$this->error = "ErrorFailedToCreateParser";
return -1;
}
xml_set_object($xmlparser, $this);
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
xml_set_character_data_handler($xmlparser, 'feed_cdata');
$status = xml_parse($xmlparser, $str, false);
xml_parser_free($xmlparser);
$rss = $this;
//var_dump($status.' '.$rss->_format);exit;
} catch (Exception $e) {
$rss = null;
}
xml_set_object($xmlparser, $this);
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
xml_set_character_data_handler($xmlparser, 'feed_cdata');
$status = xml_parse($xmlparser, $str);
xml_parser_free($xmlparser);
$rss = $this;
//var_dump($status.' '.$rss->_format);exit;
}
}
@ -443,7 +454,7 @@ class RssParser
// Loop on each category
$itemCategory = array();
if (is_array($item->category)) {
if (!empty($item->category) && is_array($item->category)) {
foreach ($item->category as $cat) {
$itemCategory[] = (string) $cat;
}
@ -514,7 +525,7 @@ class RssParser
* @param array $attrs Attributes of tags
* @return void
*/
public function feed_start_element($p, $element, &$attrs)
public function feed_start_element($p, $element, $attrs)
{
// phpcs:enable
$el = $element = strtolower($element);
@ -681,9 +692,9 @@ class RssParser
public function append_content($text)
{
// phpcs:enable
if ($this->initem) {
if (!empty($this->initem)) {
$this->concat($this->current_item[$this->incontent], $text);
} elseif ($this->inchannel) {
} elseif (!empty($this->inchannel)) {
$this->concat($this->channel[$this->incontent], $text);
}
}
@ -700,24 +711,24 @@ class RssParser
if (!$el) {
return;
}
if ($this->current_namespace) {
if ($this->initem) {
if (!empty($this->current_namespace)) {
if (!empty($this->initem)) {
$this->concat($this->current_item[$this->current_namespace][$el], $text);
} elseif ($this->inchannel) {
} elseif (!empty($this->inchannel)) {
$this->concat($this->channel[$this->current_namespace][$el], $text);
} elseif ($this->intextinput) {
} elseif (!empty($this->intextinput)) {
$this->concat($this->textinput[$this->current_namespace][$el], $text);
} elseif ($this->inimage) {
} elseif (!empty($this->inimage)) {
$this->concat($this->image[$this->current_namespace][$el], $text);
}
} else {
if ($this->initem) {
if (!empty($this->initem)) {
$this->concat($this->current_item[$el], $text);
} elseif ($this->intextinput) {
} elseif (!empty($this->intextinput)) {
$this->concat($this->textinput[$el], $text);
} elseif ($this->inimage) {
} elseif (!empty($this->inimage)) {
$this->concat($this->image[$el], $text);
} elseif ($this->inchannel) {
} elseif (!empty($this->inchannel)) {
$this->concat($this->channel[$el], $text);
}
}

View File

@ -904,11 +904,11 @@ class Translate
* This function need module "numberwords" to be installed. If not it will return
* same number (this module is not provided by default as it use non GPL source code).
*
* @param int $number Number to encode in full text
* @param string $isamount ''=it's just a number, '1'=It's an amount (default currency), 'currencycode'=It's an amount (foreign currency)
* @return string Label translated in UTF8 (but without entities)
* 10 if setDefaultLang was en_US => ten
* 123 if setDefaultLang was fr_FR => cent vingt trois
* @param int|string $number Number to encode in full text
* @param string $isamount ''=it's just a number, '1'=It's an amount (default currency), 'currencycode'=It's an amount (foreign currency)
* @return string Label translated in UTF8 (but without entities)
* 10 if setDefaultLang was en_US => ten
* 123 if setDefaultLang was fr_FR => cent vingt trois
*/
public function getLabelFromNumber($number, $isamount = '')
{

View File

@ -952,7 +952,7 @@ class Utils
dol_include_once('/core/lib/files.lib.php');
$nbSaves = empty($conf->global->SYSLOG_FILE_SAVES) ? 10 : intval($conf->global->SYSLOG_FILE_SAVES);
$nbSaves = intval(getDolGlobalString('SYSLOG_FILE_SAVES', 10));
if (empty($conf->global->SYSLOG_FILE)) {
$mainlogdir = DOL_DATA_ROOT;

View File

@ -471,7 +471,7 @@ class DoliDBMysqli extends DoliDB
*/
public function escape($stringtoencode)
{
return $this->db->real_escape_string($stringtoencode);
return $this->db->real_escape_string((string) $stringtoencode);
}
/**
@ -482,7 +482,7 @@ class DoliDBMysqli extends DoliDB
*/
public function escapeunderscore($stringtoencode)
{
return str_replace('_', '\_', $stringtoencode);
return str_replace('_', '\_', (string) $stringtoencode);
}
/**

View File

@ -231,33 +231,41 @@ print '
);
jQuery(\'.clipboardCPValue, .clipboardCPButton, .clipboardCPValueToPrint\').click(function() {
/* console.log(this.parentNode); */
console.log("We click on a clipboardCPButton or clipboardCPValueToPrint class and we want to copy content of clipboardCPValue class");
if (window.getSelection) {
range = document.createRange();
/* We select value to print using the parent. */
/* We should use the class clipboardCPValue but it may have several element with copy/paste so class to select is not enough */
range.selectNodeContents(this.parentNode.firstChild);
jqobj=$(this).parent().children(".clipboardCPValue");
console.log(jqobj.html());
selection = window.getSelection(); /* get the object used for selection */
selection.removeAllRanges(); /* clear current selection */
/* We select the value to print using the parentNode.firstChild */
/* We should use the class clipboardCPValue but it may have several element with copy/paste so class to select is not enough */
range = document.createRange();
range.selectNodeContents(this.parentNode.firstChild);
selection.addRange(range); /* make the new selection with the value to copy */
/* copy selection into clipboard */
var succeed;
try {
console.log("We set the style display to unset for the span so the copy will work");
jqobj.css("display", "unset"); /* Because copy does not work on "block" object */
succeed = document.execCommand(\'copy\');
console.log("We set the style display back to inline-block");
jqobj.css("display", "inline-block");
} catch(e) {
succeed = false;
}
/* Remove the selection to avoid to see the hidden field to copy selected */
window.getSelection().removeAllRanges();
}
/* copy selection into clipboard */
var succeed;
try {
succeed = document.execCommand(\'copy\');
} catch(e) {
succeed = false;
}
/* Remove the selection to avoid to see the hidden field to copy selected */
window.getSelection().removeAllRanges();
/* Show message */
/* TODO Show message into a top left corner or center of screen */
var lastchild = this.parentNode.lastChild; /* .parentNode is clipboardCP and last child is clipboardCPText */
var tmp = lastchild.innerHTML
if (succeed) {

View File

@ -100,13 +100,22 @@ function dol_print_cron_urls()
print '<div class="div-table-responsive-no-min">';
print $langs->trans("URLToLaunchCronJobs").':<br>';
$url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login;
print img_picto('', 'globe').' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.$url."</a><br>\n";
print ' '.$langs->trans("OrToLaunchASpecificJob").'<br>';
print '<div class="urllink">';
print '<input type="text" id="publicurlmember" class="quatrevingtpercentminusx" value="'.$url.'">';
print ' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe')."</a>\n";
print '</div>';
print '<br> '.$langs->trans("OrToLaunchASpecificJob").'<br>';
$url = $urlwithroot.'/public/cron/cron_run_jobs_by_url.php?'.(empty($conf->global->CRON_KEY) ? '' : 'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
print img_picto('', 'globe').' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.$url."</a><br>\n";
print '<div class="urllink">';
print '<input type="text" id="publicurlmemberall" class="quatrevingtpercentminusx" value="'.$url.'">';
print ' <a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe')."</a>\n";
print '</div>';
print '</div>';
print '<br>';
print ajax_autoselect("publicurlmember");
print ajax_autoselect("publicurlmemberall");
$logintouse = 'firstadmin';
if ($user->admin) {
$logintouse = $user->login;

View File

@ -222,7 +222,7 @@ function ordersupplier_prepare_head(CommandeFournisseur $object)
$h++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/info.php?id='.$object->id;
$head[$h][1] .= $langs->trans("Events");
$head[$h][1] = $langs->trans("Events");
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
$head[$h][1] .= '/';
$head[$h][1] .= $langs->trans("Agenda");

View File

@ -3948,7 +3948,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'off', 'on', 'order',
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce',
'stock', 'resize', 'service', 'stats', 'trip',
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench',
'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'user-tie', 'vcard', 'wrench',
'github', 'google', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
@ -6583,10 +6583,10 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = '
*
* @param string $dir Directory to create (Separator must be '/'. Example: '/mydir/mysubdir')
* @param string $dataroot Data root directory (To avoid having the data root in the loop. Using this will also lost the warning on first dir PHP has no permission when open_basedir is used)
* @param string|null $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444'
* @param string $newmask Mask for new file (Defaults to $conf->global->MAIN_UMASK or 0755 if unavailable). Example: '0444'
* @return int < 0 if KO, 0 = already exists, > 0 if OK
*/
function dol_mkdir($dir, $dataroot = '', $newmask = null)
function dol_mkdir($dir, $dataroot = '', $newmask = '')
{
global $conf;
@ -6627,7 +6627,7 @@ function dol_mkdir($dir, $dataroot = '', $newmask = null)
dol_syslog("functions.lib::dol_mkdir: Directory '".$ccdir."' does not exists or is outside open_basedir PHP setting.", LOG_DEBUG);
umask(0);
$dirmaskdec = octdec($newmask);
$dirmaskdec = octdec((string) $newmask);
if (empty($newmask)) {
$dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK);
}
@ -7319,6 +7319,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__ID__'] = '__ID__';
$substitutionarray['__REF__'] = '__REF__';
$substitutionarray['__NEWREF__'] = '__NEWREF__';
$substitutionarray['__LABEL__'] = '__LABEL__';
$substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__';
$substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__';
$substitutionarray['__NOTE_PUBLIC__'] = '__NOTE_PUBLIC__';
@ -7413,6 +7414,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__ID__'] = $object->id;
$substitutionarray['__REF__'] = $object->ref;
$substitutionarray['__NEWREF__'] = $object->newref;
$substitutionarray['__LABEL__'] = (isset($object->label) ? $object->label : (isset($object->title) ? $object->title : null));
$substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null));
$substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
$substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null);
@ -8215,7 +8217,6 @@ function get_htmloutput_mesg($mesgstring = '', $mesgarray = '', $style = 'ok', $
}
}
if ($mesgstring) {
$langs->load("errors");
$ret++;
$out .= $langs->trans($mesgstring);
}
@ -8612,7 +8613,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
}
} elseif ($onlysimplestring == '2') {
// We must accept: (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref : "Parent project not found"
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/;[]', '/').']/i', $s)) {
if (preg_match('/[^a-z0-9\s'.preg_quote('^$_+-.*>&|=!?():"\',/@;[]', '/').']/i', $s)) {
if ($returnvalue) {
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
} else {
@ -9021,7 +9022,6 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
if ($values[0] != $type) {
continue;
}
//var_dump(verifCond($values[4]));
if (verifCond($values[4])) {
if ($values[3]) {
@ -11045,12 +11045,12 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
}
/**
* Create a button to copy $valuetocopy in the clipboard.
* Code that handle the click is inside lib_foot.jsp.php.
* Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
* Code that handle the click is inside core/js/lib_foot.js.php.
*
* @param string $valuetocopy The value to print
* @param int $showonlyonhover Show the copy-paste button only on hover
* @param string $texttoshow Replace the value to show with this text
* @param string $texttoshow Replace the value to show with this text. Use 'none' to show no text (only the copy-paste picto)
* @return string The string to print for the button
*/
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
@ -11062,8 +11062,10 @@ function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $tex
$showonlyonhover = 0;
}*/
$tag = 'span'; // Using div does not work when using the js copy code.
if ($texttoshow) {
$tag = 'span'; // Using div (like any style of type 'block') does not work when using the js copy code.
if ($texttoshow === 'none') {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint"></span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
} elseif ($texttoshow) {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue hidewithsize">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPValueToPrint">'.dol_escape_htmltag($texttoshow, 1, 1).'</span><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';
} else {
$result = '<span class="clipboardCP'.($showonlyonhover ? ' clipboardCPShowOnHover' : '').'"><'.$tag.' class="clipboardCPValue">'.dol_escape_htmltag($valuetocopy, 1, 1).'</'.$tag.'><span class="clipboardCPButton far fa-clipboard opacitymedium paddingleft paddingright"></span><span class="clipboardCPText"></span></span>';

View File

@ -2240,7 +2240,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu =
$newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer);
$newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire);
$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"'));
$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"'));
// Skills
$newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"'));

View File

@ -78,7 +78,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskAsset" value="'.$conf->global->ASSET_ASSET_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskAsset" value="'.getDolGlobalString('ASSET_ASSET_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -131,7 +131,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->ASSET_ASSET_ADVANCED_MASK;
$mask = getDolGlobalString('ASSET_ASSET_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -79,7 +79,7 @@ class mod_bom_advanced extends ModeleNumRefboms
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskBom" value="'.$conf->global->BOM_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskBom" value="'.getDolGlobalString('BOM_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -128,7 +128,7 @@ class mod_bom_advanced extends ModeleNumRefboms
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->BOM_ADVANCED_MASK;
$mask = getDolGlobalString('BOM_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -79,9 +79,9 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskEvaluation" value="'.$conf->global->HRM_EVALUATION_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskEvaluation" value="'.getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Modify").'" name="Button"></td>';
$texte .= '</tr>';
@ -132,7 +132,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->HRM_EVALUATION_ADVANCED_MASK;
$mask = getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -125,7 +125,7 @@ class doc_generic_member_odt extends ModelePDFMember
// List of directories area
$texte .= '<tr><td>';
$texttitle = $langs->trans("ListOfDirectories");
$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MEMBER_ADDON_PDF_ODT_PATH)));
$listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH'))));
$listoffiles = array();
foreach ($listofdir as $key => $tmpdir) {
$tmpdir = trim($tmpdir);
@ -151,7 +151,7 @@ class doc_generic_member_odt extends ModelePDFMember
$texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
$texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte .= '<textarea class="flat" cols="60" name="value1">';
$texte .= $conf->global->MEMBER_ADDON_PDF_ODT_PATH;
$texte .= getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH');
$texte .= '</textarea>';
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';

View File

@ -93,7 +93,8 @@ class modIncoterm extends DolibarrModules
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
'tabfieldinsert'=>array("code,libelle"), // List of fields (list of fields for insert)
'tabrowid'=>array("rowid"), // Name of columns with primary key (try to always name it 'rowid')
'tabcond'=>array($conf->incoterm->enabled)
'tabcond'=>array($conf->incoterm->enabled),
'tabhelp' => array(array())
);
$this->boxes = array(); // List of boxes

View File

@ -80,7 +80,7 @@ class mod_mo_advanced extends ModeleNumRefMos
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskMo" value="'.$conf->global->MRP_MO_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskMo" value="'.getDolGlobalString('MRP_MO_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -129,7 +129,7 @@ class mod_mo_advanced extends ModeleNumRefMos
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->MRP_MO_ADVANCED_MASK;
$mask = getDolGlobalString('MRP_MO_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -67,7 +67,11 @@ class PrintingDriver
$list = array();
$listoffiles = array();
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
if (!empty($conf->modules_parts['printing'])) {
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $conf->modules_parts['printing']);
} else {
$dirmodels = array('/core/modules/printing/');
}
foreach ($dirmodels as $dir) {
$tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0);
if (!empty($tmpfiles)) {

View File

@ -116,8 +116,8 @@ class printing_printgcp extends PrintingDriver
'type'=>'info',
);
} else {
$this->google_id = $conf->global->OAUTH_GOOGLE_ID;
$this->google_secret = $conf->global->OAUTH_GOOGLE_SECRET;
$this->google_id = getDolGlobalString('OAUTH_GOOGLE_ID');
$this->google_secret = getDolGlobalString('OAUTH_GOOGLE_SECRET');
// Token storage
$storage = new DoliStorage($this->db, $this->conf);
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);

View File

@ -66,7 +66,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
$form = new Form($db);
// We get cursor rule
$mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : '';
$mask = getDolGlobalString('LOT_ADVANCED_MASK');
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -142,7 +142,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : '';
$mask = getDolGlobalString('LOT_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -66,7 +66,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
$form = new Form($db);
// We get cursor rule
$mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : '';
$mask = getDolGlobalString('SN_ADVANCED_MASK');
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@ -142,7 +142,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : '';
$mask = getDolGlobalString('SN_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -80,7 +80,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskStockTransfer" value="'.$conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskStockTransfer" value="'.getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
@ -133,7 +133,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK;
$mask = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -80,7 +80,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.$conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskWorkstation" value="'.getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -133,7 +133,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK;
$mask = getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -38,7 +38,7 @@ $langs->load("modulebuilder");
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
<?php
print '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes", $textobject).'</span><br>'."\n";
print '<span class="opacitymedium">'.$langs->trans("DefineHereComplementaryAttributes", empty($textobject) ? '': $textobject).'</span><br>'."\n";
print '<br>';
// Load $extrafields->attributes

View File

@ -263,7 +263,7 @@ if (empty($reshook)) {
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
$error++;
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
}
if (!$error) {
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {

View File

@ -482,7 +482,7 @@ if ($resql) {
if ($canedit) {
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
} else {
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermission").'">'.$langs->trans("AddTrip").'</a>';
print '<a href="#" class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("AddTrip").'</a>';
}
print '</div>';

View File

@ -1432,7 +1432,7 @@ class CommandeFournisseur extends CommonOrder
}
$this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
//$this->special_code = $line->special_code; // TODO : remove this in 9.0 and add special_code param to addline()
// This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
$result = $this->addline(
@ -1454,7 +1454,8 @@ class CommandeFournisseur extends CommonOrder
$line->date_start,
$line->date_end,
$line->array_options,
$line->fk_unit
$line->fk_unit,
$line->special_code
);
if ($result < 0) {
dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error
@ -1745,9 +1746,10 @@ class CommandeFournisseur extends CommonOrder
* @param string $origin 'order', ...
* @param int $origin_id Id of origin object
* @param int $rang Rank
* @param int $special_code Special code
* @return int <=0 if KO, >0 if OK
*/
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1)
public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0)
{
global $langs, $mysoc, $conf;
@ -1871,7 +1873,7 @@ class CommandeFournisseur extends CommonOrder
// Predefine quantity according to packaging
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) {
$prod = new Product($this->db, $fk_product);
$prod = new Product($this->db);
$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid));
if ($qty < $prod->packaging) {
@ -1880,9 +1882,9 @@ class CommandeFournisseur extends CommonOrder
if (!empty($prod->packaging) && ($qty % $prod->packaging) > 0) {
$coeff = intval($qty / $prod->packaging) + 1;
$qty = $prod->packaging * $coeff;
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
}
}
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
}
}
@ -1957,7 +1959,7 @@ class CommandeFournisseur extends CommonOrder
$this->line->total_localtax2 = $total_localtax2;
$this->line->total_ttc = $total_ttc;
$this->line->product_type = $type;
$this->line->special_code = $this->special_code;
$this->line->special_code = $special_code;
$this->line->origin = $origin;
$this->line->origin_id = $origin_id;
$this->line->fk_unit = $fk_unit;

View File

@ -2074,7 +2074,7 @@ class FactureFournisseur extends CommonInvoice
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) {
// Check quantity is enough
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
$prod = new Product($this->db, $fk_product);
$prod = new Product($this->db);
if ($prod->fetch($fk_product) > 0) {
$product_type = $prod->type;
$label = $prod->label;

View File

@ -555,13 +555,15 @@ if (empty($reshook)) {
$ref_supplier = $productsupplier->ref_supplier;
// Get vat rate
$tva_npr = 0;
if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority)
$tva_tx = get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha'));
$tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha'));
if (empty($tva_tx)) {
$tva_npr = 0;
}
}
if (empty($tva_tx)) {
$tva_npr = 0;
}
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty, $tva_npr);
@ -597,7 +599,7 @@ if (empty($reshook)) {
$localtax1_tx,
$localtax2_tx,
$idprod,
0, // We already have the $idprod always defined
$productsupplier->product_fourn_price_id,
$ref_supplier,
$remise_percent,
$price_base_type,
@ -667,10 +669,10 @@ if (empty($reshook)) {
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
if (!empty($conf->global->MAIN_MULTILANGS) && empty($newlang)) {
$newlang = $object->thirdparty->default_lang;
}
if (!empty($newlang)) {
@ -2681,7 +2683,7 @@ if ($action == 'create') {
$delallowed = $usercancreate;
$modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF));
print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang);
print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang, '', $object);
$somethingshown = $formfile->numoffiles;
// Show links to link elements

View File

@ -923,7 +923,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
$errors[] = $langs->trans('ErrorEndDateCP');
break;
case 'SQL_Create':
$errors[] = $langs->trans('ErrorSQLCreateCP').' <b>'.htmlentities($_GET['msg']).'</b>';
$errors[] = $langs->trans('ErrorSQLCreateCP');
break;
case 'CantCreate':
$errors[] = $langs->trans('CantCreateCP');

View File

@ -76,7 +76,7 @@ class Skill extends CommonObject
const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;
const STATUS_CANCELED = 9;
const DEFAULT_MAX_RANK_PER_SKILL = 5;
const DEFAULT_MAX_RANK_PER_SKILL = 3;
/**
* 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
@ -251,7 +251,7 @@ class Skill extends CommonObject
global $conf, $user, $langs;
$MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL;
$defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : 'no Description';
$defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : $langs->trans("NoDescription");
$error = 0;

View File

@ -123,11 +123,11 @@ if (empty($reshook)) {
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php';
$noback = 1;
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
// action update on Skilldet
$skilldetArray = GETPOST("descriptionline", "array");
$skilldetArray = GETPOST("descriptionline", "array:alphanohtml");
if (!$error) {
if (is_array($skilldetArray) && count($skilldetArray) > 0) {

View File

@ -141,14 +141,18 @@ class DoliStorage implements TokenStorageInterface
dol_syslog("hasAccessToken service=".$service);
$sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token";
$sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'";
$sql .= " WHERE service = '".$this->db->escape($service.(empty($this->keyforprovider) ? '' : '-'.$this->keyforprovider))."'";
$sql .= " AND entity IN (".getEntity('oauth_token').")";
$resql = $this->db->query($sql);
if (! $resql) {
dol_print_error($this->db);
}
$result = $this->db->fetch_array($resql);
$token = unserialize($result['token']);
if ($result) {
$token = unserialize($result['token']);
} else {
$token = '';
}
$this->tokens[$service] = $token;

View File

@ -109,7 +109,7 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '228', 'VO
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (2, '229', 'VS0 - Vennootschap met sociaal oogmerk');
-- France: Extrait de http://www.insee.fr/fr/nom_def_met/nomenclatures/cj/cjniveau2.htm
-- France: Extrait de https://www.insee.fr/fr/information/2028129
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'11','Artisan Commerçant (EI)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'12','Commerçant (EI)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'13','Artisan (EI)');

View File

@ -568,6 +568,7 @@ INSERT INTO llx_c_socialnetworks (entity, code, label, url, icon, active) VALUES
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging varchar(64) DEFAULT NULL;
ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging varchar(64) DEFAULT NULL;
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT;
ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL;

View File

@ -85,7 +85,9 @@ UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'c
DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', 'amarok', 'cameleo');
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;
ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
-- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real;
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT;
-- For v14

View File

@ -38,6 +38,7 @@
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;
-- VMYSQL4.3 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL;
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price MODIFY COLUMN packaging real DEFAULT NULL USING packaging::real;
-- VPGSQL8.2 ALTER TABLE llx_product_fournisseur_price ALTER COLUMN packaging DROP DEFAULT;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL;

View File

@ -137,6 +137,10 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
-- v16
DROP TABLE llx_payment_salary_extrafields;
DROP TABLE llx_asset_model_extrafields;
DROP TABLE llx_asset_type_extrafields;
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_id integer DEFAULT NULL;
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;

View File

@ -53,5 +53,11 @@ ALTER TABLE llx_facture ADD COLUMN close_missing_amount double(24, 8) after clos
ALTER TABLE llx_facture_fourn ADD COLUMN close_missing_amount double(24, 8) after close_code;
-- Allow users to make subscriptions of any amount during membership subscription
-- Allow users to make subscriptions of any amount during membership subscription
ALTER TABLE llx_adherent_type ADD COLUMN caneditamount integer DEFAULT 0 AFTER amount;
ALTER TABLE llx_inventory ADD COLUMN categories_product VARCHAR(255) DEFAULT NULL AFTER fk_product;
ALTER TABLE llx_ticket ADD COLUMN ip varchar(250);

View File

@ -270,7 +270,7 @@ update llx_product set barcode = null where barcode in ('', '-1', '0');
update llx_societe set barcode = null where barcode in ('', '-1', '0');
-- Sequence to removed duplicated values of llx_links. Use several times if you still have duplicate.
-- Sequence to removed duplicated values of llx_links. Run several times if you still have duplicate.
drop table tmp_links_double;
--select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2;
create table tmp_links_double as (select objectid, label, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_links where label is not null group by objectid, label having count(rowid) >= 2);
@ -279,7 +279,7 @@ delete from llx_links where (rowid, label) in (select max_rowid, label from tmp_
drop table tmp_links_double;
-- Sequence to removed duplicated values of barcode in llx_product. Use several times if you still have duplicate.
-- Sequence to removed duplicated values of barcode in llx_product. Run several times if you still have duplicate.
drop table tmp_product_double;
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2;
create table tmp_product_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_product where barcode is not null group by barcode having count(rowid) >= 2);
@ -288,7 +288,7 @@ update llx_product set barcode = null where (rowid, barcode) in (select max_rowi
drop table tmp_product_double;
-- Sequence to removed duplicated values of barcode in llx_societe. Use several times if you still have duplicate.
-- Sequence to removed duplicated values of barcode in llx_societe. Run several times if you still have duplicate.
drop table tmp_societe_double;
--select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2;
create table tmp_societe_double as (select barcode, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_societe where barcode is not null group by barcode having count(rowid) >= 2);
@ -297,7 +297,7 @@ update llx_societe set barcode = null where (rowid, barcode) in (select max_rowi
drop table tmp_societe_double;
-- Sequence to removed duplicated values of llx_accounting_account. Use several times if you still have duplicate.
-- Sequence to removed duplicated values of llx_accounting_account. Run several times if you still have duplicate.
drop table tmp_accounting_account_double;
--select account_number, fk_pcg_version, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_accounting_account where label is not null group by account_number, fk_pcg_version having count(rowid) >= 2;
create table tmp_accounting_account_double as (select account_number, fk_pcg_version, max(rowid) as max_rowid, count(rowid) as count_rowid from llx_accounting_account where label is not null group by account_number, fk_pcg_version having count(rowid) >= 2);
@ -415,6 +415,11 @@ ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account;
ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version);
UPDATE llx_facturedet SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
UPDATE llx_facture_fourn_det SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
UPDATE llx_expensereport_det SET fk_code_ventilation = 0 WHERE fk_code_ventilation > 0 AND fk_code_ventilation NOT IN (select rowid FROM llx_accounting_account);
-- VMYSQL4.1 update llx_projet_task_time set task_datehour = task_date where task_datehour < task_date or task_datehour > DATE_ADD(task_date, interval 1 day);

View File

@ -28,8 +28,9 @@ CREATE TABLE llx_inventory
fk_user_modif integer, -- user making last change
fk_user_valid integer, -- valideur de la fiche
fk_warehouse integer DEFAULT NULL,
fk_product integer DEFAULT NULL,
status integer DEFAULT 0,
fk_product integer DEFAULT NULL,
categories_product varchar(255) DEFAULT NULL, -- product categories id separated by comma
status integer DEFAULT 0,
title varchar(255) NOT NULL,
date_inventory datetime DEFAULT NULL,
date_validation datetime DEFAULT NULL,

View File

@ -40,6 +40,7 @@ CREATE TABLE llx_ticket
date_close datetime,
notify_tiers_at_create tinyint,
email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID
ip varchar(250),
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
import_key varchar(14)
)ENGINE=innodb;

View File

@ -79,7 +79,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
// Parametrage du prefix
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskKnowledgeRecord" value="'.$conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskKnowledgeRecord" value="'.getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
@ -132,7 +132,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
// We get cursor rule
$mask = $conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK;
$mask = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK');
if (!$mask) {
$this->error = 'NotConfigured';

View File

@ -280,7 +280,7 @@ DescVentilExpenseReportMore=If you setup accounting account on type of expense r
DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account
Closure=Annual closure
DescClosure=Consult here the number of movements by month who are not yet validated & locked
DescClosure=Consult here the number of movements by month not yet validated & locked
OverviewOfMovementsNotValidated=Overview of movements not validated and locked
AllMovementsWereRecordedAsValidated=All movements were recorded as validated and locked
NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated and locked

View File

@ -109,7 +109,7 @@ NextValueForReplacements=Next value (replacements)
MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to <b>%s</b> %s, irrespective of the value of this parameter
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to disallow any upload)
UseCaptchaCode=Use graphical code (CAPTCHA) on login page
UseCaptchaCode=Use graphical code (CAPTCHA) on login page and some public pages
AntiVirusCommand=Full path to antivirus command
AntiVirusCommandExample=Example for ClamAv Daemon (require clamav-daemon): /usr/bin/clamdscan<br>Example for ClamWin (very very slow): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe
AntiVirusParam= More parameters on command line
@ -504,7 +504,7 @@ WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to se
WarningPHPMailD=Also, it is therefore recommended to change the sending method of e-mails to the value "SMTP". If you really want to keep the default "PHP" method to send emails, just ignore this warning, or remove it by setting the MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP constant to 1 in Home - Setup - Other.
WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: <strong>%s</strong>.
WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: <strong>%s</strong>.
ActualMailSPFRecordFound=Actual SPF record found : %s
ActualMailSPFRecordFound=Actual SPF record found (for email %s) : %s
ClickToShowDescription=Click to show description
DependsOn=This module needs the module(s)
RequiredBy=This module is required by module(s)

View File

@ -100,3 +100,4 @@ ActionCommCategoriesArea=Event Categories
WebsitePagesCategoriesArea=Page-Container Categories
KnowledgemanagementsCategoriesArea=KM article Categories
UseOrOperatorForCategories=Use 'OR' operator for categories
AddObjectIntoCategory=Add object into category

View File

@ -88,4 +88,5 @@ DeleteSkill = Skill removed
SkillsExtraFields=Attributs supplémentaires (Compétences)
JobsExtraFields=Attributs supplémentaires (Emplois)
EvaluationsExtraFields=Attributs supplémentaires (Evaluations)
NeedBusinessTravels=Need business travels
NeedBusinessTravels=Need business travels
NoDescription=No description

View File

@ -213,3 +213,5 @@ ClickHereToGoToApp=Click here to go to your application
ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory.
Loaded=Loaded
FunctionTest=Function test
NodoUpgradeAfterDB=No action requested by external modules after upgrade of database
NodoUpgradeAfterFiles=No action requested by external modules after upgrade of files or directories

View File

@ -345,7 +345,7 @@ KiloBytes=Kilobytes
MegaBytes=Megabytes
GigaBytes=Gigabytes
TeraBytes=Terabytes
UserAuthor=Ceated by
UserAuthor=Created by
UserModif=Updated by
b=b.
Kb=Kb
@ -712,6 +712,7 @@ FeatureDisabled=Feature disabled
MoveBox=Move widget
Offered=Offered
NotEnoughPermissions=You don't have permission for this action
UserNotInHierachy=This action is reserved to the supervisors of this user
SessionName=Session name
Method=Method
Receive=Receive

View File

@ -427,3 +427,4 @@ RealValuation=Real Valuation
ConfirmEditExtrafield = Select the extrafield you want modify
ConfirmEditExtrafieldQuestion = Are you sure you want to modify this extrafield?
ModifyValueExtrafields = Modify value of an extrafield
OrProductsWithCategories=Or products with tags/categories

View File

@ -90,8 +90,8 @@ TicketPublicAccess=A public interface requiring no identification is available a
TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries
TicketParamModule=Module variable setup
TicketParamMail=Email setup
TicketEmailNotificationFrom=Sender e-mail for ticket answers
TicketEmailNotificationFromHelp=Sender e-mail for ticket answers sent from Dolibarr
TicketEmailNotificationFrom=Sender e-mail for notification on answers
TicketEmailNotificationFromHelp=Sender e-mail to use to send the notification email when an answer is provided inside the backoffice. For example noreply@example.com
TicketEmailNotificationTo=Notify ticket creation to this e-mail address
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation
TicketNewEmailBodyLabel=Text message sent after creating a ticket

Some files were not shown because too many files have changed in this diff Show More