Merge branch 'develop' of https://github.com/korabocintake/dolibarr into develop
This commit is contained in:
commit
e62c54c627
@ -674,7 +674,7 @@ if ($id) {
|
|||||||
// Can an entry be erased or disabled ?
|
// Can an entry be erased or disabled ?
|
||||||
$iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default
|
$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) {
|
if ($param) {
|
||||||
$url .= '&'.$param;
|
$url .= '&'.$param;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -197,7 +197,7 @@ $arrayfields = array(
|
|||||||
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
|
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
|
||||||
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
|
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
|
||||||
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
|
'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),
|
't.import_key'=>array('label'=>$langs->trans("ImportId"), 'checked'=>0, 'position'=>1100),
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -769,6 +769,7 @@ if ($action == 'export_file') {
|
|||||||
|
|
||||||
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
|
$form_question['separator'] = array('name'=>'separator', 'type'=>'separator');
|
||||||
|
|
||||||
|
if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
|
||||||
// If 0 or not set, we NOT check by default.
|
// 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));
|
$checked = (isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE));
|
||||||
$form_question['notifiedvalidationdate'] = array(
|
$form_question['notifiedvalidationdate'] = array(
|
||||||
@ -779,6 +780,7 @@ if ($action == 'export_file') {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$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);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 300, 600);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,7 +166,7 @@ $arrayfields = array(
|
|||||||
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
|
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
|
||||||
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
|
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
|
||||||
't.date_export'=>array('label'=>$langs->trans("DateExport"), '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),
|
't.import_key'=>array('label'=>$langs->trans("ImportId"), 'checked'=>0, 'position'=>1100),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -112,6 +112,7 @@ if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting-
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -178,6 +179,25 @@ for ($i = 1; $i <= 12; $i++) {
|
|||||||
}
|
}
|
||||||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||||
|
|
||||||
|
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 .= " 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,";
|
$sql = "SELECT COUNT(b.rowid) as detail,";
|
||||||
for ($i = 1; $i <= 12; $i++) {
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||||
@ -192,6 +212,7 @@ $sql .= " WHERE b.doc_date >= '".$db->idate($search_date_start)."'";
|
|||||||
$sql .= " AND b.doc_date <= '".$db->idate($search_date_end)."'";
|
$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 b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy
|
||||||
$sql .= " AND date_validated IS NULL";
|
$sql .= " AND date_validated IS NULL";
|
||||||
|
}
|
||||||
|
|
||||||
dol_syslog('htdocs/accountancy/closure/index.php', LOG_DEBUG);
|
dol_syslog('htdocs/accountancy/closure/index.php', LOG_DEBUG);
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -328,7 +328,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($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;
|
$account_label = $accountingaccount->label;
|
||||||
|
|
||||||
// get compte id and label
|
// get compte id and label
|
||||||
|
|||||||
@ -457,7 +457,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($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;
|
$label_account = $accountingaccount->label;
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
|
|||||||
@ -479,7 +479,7 @@ if ($action == 'writebookkeeping') {
|
|||||||
|
|
||||||
foreach ($arrayofvat[$key] as $k => $mt) {
|
foreach ($arrayofvat[$key] as $k => $mt) {
|
||||||
if ($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;
|
$label_account = $accountingaccount->label;
|
||||||
|
|
||||||
$bookkeeping = new BookKeeping($db);
|
$bookkeeping = new BookKeeping($db);
|
||||||
|
|||||||
@ -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 ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '<strong>' . $langs->transnoentitiesnoconv("MenuAccountancy") . '-' . $langs->transnoentitiesnoconv("Setup") . "-" . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . '</strong>');
|
||||||
print '</div>';
|
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') {
|
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();" />';
|
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -178,14 +178,14 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
print '<td class="right">'.$langs->trans("Value").'</td>';
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Force Type
|
// Force Type
|
||||||
$adht = new AdherentType($db);
|
$adht = new AdherentType($db);
|
||||||
print '<tr class="oddeven drag" id="trforcetype"><td>';
|
print '<tr class="oddeven drag" id="trforcetype"><td>';
|
||||||
print $langs->trans("ForceMemberType");
|
print $langs->trans("ForceMemberType");
|
||||||
print '</td><td class="right">';
|
print '</td><td>';
|
||||||
$listofval = array();
|
$listofval = array();
|
||||||
$listofval += $adht->liste_array(1);
|
$listofval += $adht->liste_array(1);
|
||||||
$forcetype = empty($conf->global->MEMBER_NEWFORM_FORCETYPE) ? -1 : $conf->global->MEMBER_NEWFORM_FORCETYPE;
|
$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");
|
$morphys["mor"] = $langs->trans("Moral");
|
||||||
print '<tr class="oddeven drag" id="trforcenature"><td>';
|
print '<tr class="oddeven drag" id="trforcenature"><td>';
|
||||||
print $langs->trans("ForceMemberNature");
|
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;
|
$forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY;
|
||||||
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
|
print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
@ -205,21 +205,21 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||||||
// Amount
|
// Amount
|
||||||
print '<tr class="oddeven" id="tramount"><td>';
|
print '<tr class="oddeven" id="tramount"><td>';
|
||||||
print $langs->trans("DefaultAmount");
|
print $langs->trans("DefaultAmount");
|
||||||
print '</td><td class="right">';
|
print '</td><td>';
|
||||||
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 '<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";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Can edit
|
// Can edit
|
||||||
print '<tr class="oddeven" id="tredit"><td>';
|
print '<tr class="oddeven" id="tredit"><td>';
|
||||||
print $langs->trans("CanEditAmount");
|
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 $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Jump to an online payment page
|
// Jump to an online payment page
|
||||||
print '<tr class="oddeven" id="trpayment"><td>';
|
print '<tr class="oddeven" id="trpayment"><td>';
|
||||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||||
print '</td><td class="right">';
|
print '</td><td>';
|
||||||
$listofval = array();
|
$listofval = array();
|
||||||
$listofval['-1'] = $langs->trans('No');
|
$listofval['-1'] = $langs->trans('No');
|
||||||
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';
|
$listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')';
|
||||||
|
|||||||
@ -1227,12 +1227,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
|
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>';
|
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
|
// Type
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("Type").'</td><td>';
|
||||||
@ -1244,6 +1238,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||||||
}
|
}
|
||||||
print "</td></tr>";
|
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
|
// 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>';
|
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>';
|
||||||
|
|
||||||
|
|||||||
@ -598,8 +598,12 @@ while ($i < min($num, $limit)) {
|
|||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'd.amount';
|
$totalarray['pos'][$totalarray['nbfield']] = 'd.amount';
|
||||||
}
|
}
|
||||||
|
if (empty($totalarray['val']['d.amount'])) {
|
||||||
|
$totalarray['val']['d.amount'] = $obj->subscription;
|
||||||
|
} else {
|
||||||
$totalarray['val']['d.amount'] += $obj->subscription;
|
$totalarray['val']['d.amount'] += $obj->subscription;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
|
|||||||
@ -466,13 +466,13 @@ print '</form>';
|
|||||||
|
|
||||||
//Use draft Watermark
|
//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="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 '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -64,7 +64,7 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$help_url = '';
|
||||||
llxHeader('', $langs->trans("BOMsSetup"), $help_url);
|
llxHeader('', $langs->trans("BOMsSetup"), $help_url);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -625,13 +625,13 @@ print '</form>';
|
|||||||
|
|
||||||
//Use draft Watermark
|
//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="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 '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -220,7 +220,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
|||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
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 "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ if ($result) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Date last change
|
// Date last change
|
||||||
print '<td class="nowraponall">';
|
print '<td class="nowraponall center">';
|
||||||
print dol_print_date($db->jdate($obj->tms), 'dayhour');
|
print dol_print_date($db->jdate($obj->tms), 'dayhour');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -458,7 +458,7 @@ print '</td></tr>'."\n";
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td></tr>'."\n";
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|||||||
@ -206,7 +206,7 @@ class PrestaShopWebservice
|
|||||||
*/
|
*/
|
||||||
public function printDebug($title, $content)
|
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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -451,7 +451,7 @@ print "</td></tr>\n";
|
|||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
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 "</td></tr>\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -468,7 +468,7 @@ print '</td></tr>'."\n";
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td colspan="2">';
|
print '<tr class="oddeven"><td colspan="2">';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
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";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
if (!empty($conf->project->enabled)) {
|
if (!empty($conf->project->enabled)) {
|
||||||
|
|||||||
@ -761,7 +761,7 @@ print '<input type="hidden" name="action" value="set_FACTURE_DRAFT_WATERMARK" />
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -525,7 +525,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERM
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -551,7 +551,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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";
|
print '</td></tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ $type = 'myobject';
|
|||||||
|
|
||||||
$arrayofparameters = array(
|
$arrayofparameters = array(
|
||||||
'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1),
|
'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;
|
$error = 0;
|
||||||
|
|||||||
@ -870,7 +870,7 @@ if ($action == 'edit') {
|
|||||||
if (!empty($dnsinfo) && is_array($dnsinfo)) {
|
if (!empty($dnsinfo) && is_array($dnsinfo)) {
|
||||||
foreach ($dnsinfo as $info) {
|
foreach ($dnsinfo as $info) {
|
||||||
if (strpos($info['txt'], 'v=spf') !== false) {
|
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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
|
* 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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -505,7 +506,7 @@ if ($mode == 'feature') {
|
|||||||
$text .= '<br>';
|
$text .= '<br>';
|
||||||
|
|
||||||
$text .= '<br><strong>'.$langs->trans("AddHooks").':</strong> ';
|
$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;
|
$i = 0;
|
||||||
foreach ($objMod->module_parts['hooks'] as $key => $val) {
|
foreach ($objMod->module_parts['hooks'] as $key => $val) {
|
||||||
if ($key === 'entity') {
|
if ($key === 'entity') {
|
||||||
|
|||||||
@ -465,7 +465,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_MRP_MO_DRAFT_WATERMARK
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -693,7 +693,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_PROPALE_DRAFT_WATERMAR
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -467,7 +467,7 @@ print "</td></tr>\n";
|
|||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext).'<br>';
|
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 "</td></tr>\n";
|
||||||
*/
|
*/
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|||||||
@ -128,7 +128,7 @@ if (isset($max)) {
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ print '<td>'.$langs->trans("UMask").'</td><td class="right">';
|
|||||||
print $form->textwithpicto('', $langs->trans("UMaskExplanation"));
|
print $form->textwithpicto('', $langs->trans("UMaskExplanation"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -61,8 +61,13 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
} elseif ($action == 'updateform') {
|
} elseif ($action == 'updateform') {
|
||||||
|
$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);
|
$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);
|
$res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||||
|
}
|
||||||
if ($res1 && $res2) {
|
if ($res1 && $res2) {
|
||||||
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
|
||||||
}
|
}
|
||||||
@ -165,11 +170,11 @@ if (ini_get("session.gc_probability") == 0) {
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
/*
|
||||||
if (empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
if (empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
||||||
$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>'.$langs->trans("MAIN_APPLICATION_TITLE").'</td><td class="right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="nowrap">';
|
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 '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -492,7 +492,7 @@ print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAF
|
|||||||
print '<tr class="oddeven"><td>';
|
print '<tr class="oddeven"><td>';
|
||||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||||
print '</td><td>';
|
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 '</td><td class="right">';
|
||||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -295,7 +295,7 @@ print '</td></tr>';
|
|||||||
|
|
||||||
if (!empty($conf->loghandlers['mod_syslog_file']) && !empty($conf->cron->enabled)) {
|
if (!empty($conf->loghandlers['mod_syslog_file']) && !empty($conf->cron->enabled)) {
|
||||||
print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogFileNumberOfSaves").'</td>';
|
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>';
|
print ' (<a href="'.dol_buildpath('/cron/list.php', 1).'?search_label=CompressSyslogs&status=-1">'.$langs->trans('ConfigureCleaningCronjobToSetFrequencyOfSaves').'</a>)</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,14 @@ if (!$base) {
|
|||||||
print '<td class="right">Collation</td>';
|
print '<td class="right">Collation</td>';
|
||||||
print "</tr>\n";
|
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";
|
$sql = "SHOW TABLE STATUS";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -119,7 +127,8 @@ if (!$base) {
|
|||||||
print '<td>'.($i+1).'</td>';
|
print '<td>'.($i+1).'</td>';
|
||||||
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
|
print '<td><a href="dbtable.php?table='.$obj->Name.'">'.$obj->Name.'</a>';
|
||||||
$tablename = preg_replace('/^'.MAIN_DB_PREFIX.'/', 'llx_', $obj->Name);
|
$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";
|
$img = "info";
|
||||||
//print img_picto($langs->trans("ExternalModule"), $img);
|
//print img_picto($langs->trans("ExternalModule"), $img);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -183,7 +183,8 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// enable captcha by default
|
// 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)) {
|
if (!($res > 0)) {
|
||||||
$error++;
|
$error++;
|
||||||
$errors[] = $db->lasterror();
|
$errors[] = $db->lasterror();
|
||||||
|
|||||||
@ -1047,7 +1047,7 @@ if ($type == Categorie::TYPE_USER) {
|
|||||||
print '<input type="hidden" name="action" value="addintocategory">';
|
print '<input type="hidden" name="action" value="addintocategory">';
|
||||||
print '<table class="noborder centpercent">';
|
print '<table class="noborder centpercent">';
|
||||||
print '<tr class="liste_titre"><td>';
|
print '<tr class="liste_titre"><td>';
|
||||||
print $langs->trans("AddProjectIntoCategory").' ';
|
print $langs->trans("AddObjectIntoCategory").' ';
|
||||||
print $form->select_dolusers('', 'elemid');
|
print $form->select_dolusers('', 'elemid');
|
||||||
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
|
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -1903,13 +1903,22 @@ if ($id > 0) {
|
|||||||
} else {
|
} else {
|
||||||
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
|
print dol_get_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action');
|
||||||
|
|
||||||
|
$formconfirm = '';
|
||||||
|
|
||||||
// Clone event
|
// Clone event
|
||||||
if ($action == 'clone') {
|
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);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.GETPOST('id'), $langs->trans('ToClone'), $langs->trans('ConfirmCloneEvent', $object->label), 'confirm_clone', array(), 'yes', 1);
|
||||||
|
|
||||||
print $formconfirm;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 = '';
|
$linkback = '';
|
||||||
// Link to other agenda views
|
// Link to other agenda views
|
||||||
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
$linkback .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&restore_lastsearch_values=1">';
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string Name of table without prefix where object is stored
|
* @var string Name of table without prefix where object is stored
|
||||||
*/
|
*/
|
||||||
public $table_element = 'advtargetemailing';
|
public $table_element = 'mailing_advtarget';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
@ -159,7 +159,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
// Put here code to add control on parameters values
|
// Put here code to add control on parameters values
|
||||||
|
|
||||||
// Insert request
|
// Insert request
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."advtargetemailing(";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_advtarget(";
|
||||||
$sql .= "name,";
|
$sql .= "name,";
|
||||||
$sql .= "entity,";
|
$sql .= "entity,";
|
||||||
$sql .= "fk_element,";
|
$sql .= "fk_element,";
|
||||||
@ -188,7 +188,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
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
|
// Commit or rollback
|
||||||
@ -227,7 +227,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$sql .= " t.fk_user_mod,";
|
$sql .= " t.fk_user_mod,";
|
||||||
$sql .= " t.tms";
|
$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);
|
$sql .= " WHERE t.rowid = ".((int) $id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||||
@ -282,7 +282,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$sql .= " t.fk_user_mod,";
|
$sql .= " t.fk_user_mod,";
|
||||||
$sql .= " t.tms";
|
$sql .= " t.tms";
|
||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'";
|
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'";
|
||||||
} else {
|
} else {
|
||||||
@ -345,7 +345,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$sql .= " t.fk_user_mod,";
|
$sql .= " t.fk_user_mod,";
|
||||||
$sql .= " t.tms";
|
$sql .= " t.tms";
|
||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t";
|
||||||
if (!empty($id)) {
|
if (!empty($id)) {
|
||||||
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'";
|
$sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'";
|
||||||
} else {
|
} else {
|
||||||
@ -410,7 +410,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
// Put here code to add a control on parameters values
|
// Put here code to add a control on parameters values
|
||||||
|
|
||||||
// Update request
|
// 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 .= " name=".(isset($this->name) ? "'".$this->db->escape($this->name)."'" : "''").",";
|
||||||
$sql .= " entity=".$conf->entity.",";
|
$sql .= " entity=".$conf->entity.",";
|
||||||
@ -458,7 +458,7 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."advtargetemailing";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_advtarget";
|
||||||
$sql .= " WHERE rowid=".((int) $this->id);
|
$sql .= " WHERE rowid=".((int) $this->id);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||||
|
|||||||
@ -1217,7 +1217,7 @@ if ($resql) {
|
|||||||
if ($permissiontocancel) {
|
if ($permissiontocancel) {
|
||||||
$arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel");
|
$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");
|
$arrayofmassactions['createbills'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("CreateInvoiceForThisCustomer");
|
||||||
}
|
}
|
||||||
if ($permissiontoclose) {
|
if ($permissiontoclose) {
|
||||||
|
|||||||
@ -668,6 +668,8 @@ class Invoices extends DolibarrApi
|
|||||||
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
$result = $this->invoice->delete(DolibarrApiAccess::$user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
throw new RestException(500, 'Error when deleting invoice');
|
throw new RestException(500, 'Error when deleting invoice');
|
||||||
|
} elseif ($result == 0) {
|
||||||
|
throw new RestException(403, 'Invoice not erasable');
|
||||||
}
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2010-2018 Juanjo Menent <jmenent@2byte.es>
|
* 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
|
* 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
|
* 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 = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
||||||
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
$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 .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
$sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
|
||||||
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
$sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl";
|
||||||
@ -139,7 +140,7 @@ if ($search_bon) {
|
|||||||
}
|
}
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
if ($search_code) {
|
if ($search_code) {
|
||||||
$sql .= natural_search("s.code_fourn", $search_code);
|
$sql .= natural_search("s.code_fournisseur", $search_code);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($search_code) {
|
if ($search_code) {
|
||||||
@ -172,6 +173,9 @@ if ($result) {
|
|||||||
|
|
||||||
$param = "&statut=".urlencode($statut);
|
$param = "&statut=".urlencode($statut);
|
||||||
$param .= "&search_bon=".urlencode($search_bon);
|
$param .= "&search_bon=".urlencode($search_bon);
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$param .= '&type=bank-transfer';
|
||||||
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($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"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </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"><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"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
@ -214,8 +218,12 @@ if ($result) {
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
$columntitle = "WithdrawalsReceipts";
|
$columntitle = "WithdrawalsReceipts";
|
||||||
|
$columntitlethirdparty = "CustomerCode";
|
||||||
|
$columncodethirdparty = "s.code_client";
|
||||||
if ($type == 'bank-transfer') {
|
if ($type == 'bank-transfer') {
|
||||||
$columntitle = "BankTransferReceipts";
|
$columntitle = "BankTransferReceipts";
|
||||||
|
$columntitlethirdparty = "SupplierCode";
|
||||||
|
$columncodethirdparty = "s.code_fournisseur";
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
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("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $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("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("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("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
print_liste_field_titre('');
|
print_liste_field_titre('');
|
||||||
@ -256,9 +264,17 @@ if ($result) {
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">';
|
$link_to_bill = '/compta/facture/card.php?facid=';
|
||||||
print img_object($langs->trans("ShowBill"), "bill");
|
$link_title = 'Invoice';
|
||||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->facid.'">'.$obj->invoiceref."</a></td>\n";
|
$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 ' '.$obj->invoiceref."</td>\n";
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
@ -266,7 +282,15 @@ if ($result) {
|
|||||||
print $company->getNomUrl(1);
|
print $company->getNomUrl(1);
|
||||||
print "</td>\n";
|
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";
|
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||||
|
|
||||||
|
|||||||
@ -132,6 +132,9 @@ if ($result) {
|
|||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||||
$param .= '&contextpage='.urlencode($contextpage);
|
$param .= '&contextpage='.urlencode($contextpage);
|
||||||
}
|
}
|
||||||
|
if ($type == 'bank-transfer') {
|
||||||
|
$param .= '&type=bank-transfer';
|
||||||
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("CloseAContract"), $langs->trans("ConfirmCloseContract"), "confirm_close", '', 0, 1);
|
||||||
} elseif ($action == 'activate') {
|
} elseif ($action == 'activate') {
|
||||||
$formquestion = array(
|
$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' => '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);
|
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF']."?id=".$object->id, $langs->trans("ActivateAllOnContract"), $langs->trans("ConfirmActivateAllOnContract"), "confirm_activate", $formquestion, 'yes', 1, 280);
|
||||||
} elseif ($action == 'clone') {
|
} elseif ($action == 'clone') {
|
||||||
|
|||||||
@ -61,7 +61,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
continue; // The field was not submited to be saved
|
continue; // The field was not submited to be saved
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!GETPOSTISSET($key)) {
|
if (!GETPOSTISSET($key) && !preg_match('/^chkbxlst:/', $object->fields[$key]['type'])) {
|
||||||
continue; // The field was not submited to be saved
|
continue; // The field was not submited to be saved
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,6 +91,12 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
} elseif ($object->fields[$key]['type'] == 'reference') {
|
} elseif ($object->fields[$key]['type'] == 'reference') {
|
||||||
$tmparraykey = array_keys($object->param_list);
|
$tmparraykey = array_keys($object->param_list);
|
||||||
$value = $tmparraykey[GETPOST($key)].','.GETPOST($key.'2');
|
$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 {
|
} else {
|
||||||
if ($key == 'lang') {
|
if ($key == 'lang') {
|
||||||
$value = GETPOST($key, 'aZ09') ?GETPOST($key, 'aZ09') : "";
|
$value = GETPOST($key, 'aZ09') ?GETPOST($key, 'aZ09') : "";
|
||||||
@ -134,6 +140,8 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$result = $object->create($user);
|
$result = $object->create($user);
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
// Creation OK
|
// Creation OK
|
||||||
@ -141,14 +149,19 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
$categories = GETPOST('categories', 'array:int');
|
$categories = GETPOST('categories', 'array:int');
|
||||||
$object->setCategories($categories);
|
$object->setCategories($categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
|
$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
|
$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)) {
|
if (empty($noback)) {
|
||||||
header("Location: " . $urltogo);
|
header("Location: " . $urltogo);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$db->rollback();
|
||||||
|
|
||||||
$error++;
|
$error++;
|
||||||
// Creation KO
|
// Creation KO
|
||||||
if (!empty($object->errors)) {
|
if (!empty($object->errors)) {
|
||||||
@ -177,7 +190,7 @@ if ($action == 'update' && !empty($permissiontoadd)) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!GETPOSTISSET($key)) {
|
if (!GETPOSTISSET($key) && !preg_match('/^chkbxlst:/', $object->fields[$key]['type'])) {
|
||||||
continue; // The field was not submited to be saved
|
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);
|
$value = ((GETPOST($key, 'aZ09') == 'on' || GETPOST($key, 'aZ09') == '1') ? 1 : 0);
|
||||||
} elseif ($object->fields[$key]['type'] == 'reference') {
|
} elseif ($object->fields[$key]['type'] == 'reference') {
|
||||||
$value = array_keys($object->param_list)[GETPOST($key)].','.GETPOST($key.'2');
|
$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 {
|
} else {
|
||||||
if ($key == 'lang') {
|
if ($key == 'lang') {
|
||||||
$value = GETPOST($key, 'aZ09');
|
$value = GETPOST($key, 'aZ09');
|
||||||
|
|||||||
@ -895,7 +895,12 @@ abstract class CommonDocGenerator
|
|||||||
//Add value to store price with currency
|
//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']));
|
$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') {
|
} 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') {
|
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') {
|
||||||
$valArray = explode(',', $object->array_options['options_'.$key]);
|
$valArray = explode(',', $object->array_options['options_'.$key]);
|
||||||
$output = array();
|
$output = array();
|
||||||
@ -945,7 +950,11 @@ abstract class CommonDocGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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]));
|
$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 => ''));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6763,6 +6763,9 @@ abstract class CommonObject
|
|||||||
} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
|
} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
|
||||||
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
$param['options'] = array($reg[2].':'.$reg[3] => 'N');
|
||||||
$type = 'sellist';
|
$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)) {
|
} elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) {
|
||||||
$param['options'] = array();
|
$param['options'] = array();
|
||||||
$type = 'varchar';
|
$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' : '').'>';
|
$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)) {
|
} 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' : '').'>';
|
$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' : '').'>';
|
$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)) {
|
} 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
|
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 == '') {
|
if ((string) $keyb == '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strpos($valb, "|") !== false) list($valb, $parent) = explode('|', $valb);
|
if (strpos($valb, "|") !== false) {
|
||||||
|
list($valb, $parent) = explode('|', $valb);
|
||||||
|
}
|
||||||
$out .= '<option value="'.$keyb.'"';
|
$out .= '<option value="'.$keyb.'"';
|
||||||
$out .= (((string) $value == (string) $keyb) ? ' selected' : '');
|
$out .= (((string) $value == (string) $keyb) ? ' selected' : '');
|
||||||
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
|
||||||
@ -6941,6 +6946,8 @@ abstract class CommonObject
|
|||||||
// 2 : key fields name (if differ of rowid)
|
// 2 : key fields name (if differ of rowid)
|
||||||
// 3 : key field parent (for dependent lists)
|
// 3 : key field parent (for dependent lists)
|
||||||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
// 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');
|
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||||
|
|
||||||
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
|
||||||
@ -6955,6 +6962,14 @@ abstract class CommonObject
|
|||||||
$keyList .= ', '.$parentField;
|
$keyList .= ', '.$parentField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_categorie = false;
|
||||||
|
if (count($InfoFieldList) > 5) {
|
||||||
|
if ($InfoFieldList[0] == 'categorie') {
|
||||||
|
$filter_categorie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($filter_categorie === false) {
|
||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($fields_label)) {
|
if (is_array($fields_label)) {
|
||||||
$keyList .= ', ';
|
$keyList .= ', ';
|
||||||
@ -7062,6 +7077,16 @@ abstract class CommonObject
|
|||||||
} else {
|
} else {
|
||||||
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
|
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
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"> </option>';
|
||||||
|
foreach ($data as $data_key => $data_value) {
|
||||||
|
$out .= '<option value="' . $data_key . '"';
|
||||||
|
$out .= ($value == $data_key ? ' selected' : '');
|
||||||
|
$out .= '>' . $data_value . '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$out .= '</select>';
|
$out .= '</select>';
|
||||||
} elseif ($type == 'checkbox') {
|
} elseif ($type == 'checkbox') {
|
||||||
@ -7093,6 +7118,8 @@ abstract class CommonObject
|
|||||||
// 2 : key fields name (if differ of rowid)
|
// 2 : key fields name (if differ of rowid)
|
||||||
// 3 : key field parent (for dependent lists)
|
// 3 : key field parent (for dependent lists)
|
||||||
// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
|
// 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');
|
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
|
||||||
|
|
||||||
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
|
||||||
@ -7107,6 +7134,14 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_categorie = false;
|
||||||
|
if (count($InfoFieldList) > 5) {
|
||||||
|
if ($InfoFieldList[0] == 'categorie') {
|
||||||
|
$filter_categorie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($filter_categorie === false) {
|
||||||
$fields_label = explode('|', $InfoFieldList[1]);
|
$fields_label = explode('|', $InfoFieldList[1]);
|
||||||
if (is_array($fields_label)) {
|
if (is_array($fields_label)) {
|
||||||
$keyList .= ', ';
|
$keyList .= ', ';
|
||||||
@ -7212,10 +7247,15 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, $data, $value_arr, '', 0, '', 0, '100%');
|
$out = $form->multiselectarray($keyprefix . $key . $keysuffix, $data, $value_arr, '', 0, $morecss, 0, '100%');
|
||||||
} else {
|
} else {
|
||||||
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
|
print 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
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') {
|
} elseif ($type == 'link') {
|
||||||
$param_list = array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter[:Sortfield]]]'
|
$param_list = array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter[:Sortfield]]]'
|
||||||
@ -7375,6 +7415,9 @@ abstract class CommonObject
|
|||||||
} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
|
} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
|
||||||
$param['options'] = array($reg[1].':'.$reg[2] => 'N');
|
$param['options'] = array($reg[1].':'.$reg[2] => 'N');
|
||||||
$type = 'sellist';
|
$type = 'sellist';
|
||||||
|
} elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) {
|
||||||
|
$param['options'] = array($reg[1] => 'N');
|
||||||
|
$type = 'chkbxlst';
|
||||||
}
|
}
|
||||||
|
|
||||||
$langfile = empty($val['langfile']) ? '' : $val['langfile'];
|
$langfile = empty($val['langfile']) ? '' : $val['langfile'];
|
||||||
@ -7455,6 +7498,8 @@ abstract class CommonObject
|
|||||||
$value = dol_print_url($value, '_blank', 32, 1);
|
$value = dol_print_url($value, '_blank', 32, 1);
|
||||||
} elseif ($type == 'phone') {
|
} elseif ($type == 'phone') {
|
||||||
$value = dol_print_phone($value, '', 0, 0, '', ' ', 'phone');
|
$value = dol_print_phone($value, '', 0, 0, '', ' ', 'phone');
|
||||||
|
} elseif ($type == 'ip') {
|
||||||
|
$value = dol_print_ip($value, 0);
|
||||||
} elseif ($type == 'price') {
|
} elseif ($type == 'price') {
|
||||||
if (!is_null($value) && $value !== '') {
|
if (!is_null($value) && $value !== '') {
|
||||||
$value = price($value, 0, $langs, 0, 0, -1, $conf->currency);
|
$value = price($value, 0, $langs, 0, 0, -1, $conf->currency);
|
||||||
@ -7479,6 +7524,13 @@ abstract class CommonObject
|
|||||||
$keyList .= implode(', ', $fields_label);
|
$keyList .= implode(', ', $fields_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_categorie = false;
|
||||||
|
if (count($InfoFieldList) > 5) {
|
||||||
|
if ($InfoFieldList[0] == 'categorie') {
|
||||||
|
$filter_categorie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT ".$keyList;
|
$sql = "SELECT ".$keyList;
|
||||||
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
|
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
|
||||||
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
||||||
@ -7497,6 +7549,7 @@ abstract class CommonObject
|
|||||||
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
dol_syslog(get_class($this).':showOutputField:$type=sellist', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
if ($filter_categorie === false) {
|
||||||
$value = ''; // value was used, so now we reste it to use it to build final output
|
$value = ''; // value was used, so now we reste it to use it to build final output
|
||||||
$numrows = $this->db->num_rows($resql);
|
$numrows = $this->db->num_rows($resql);
|
||||||
if ($numrows) {
|
if ($numrows) {
|
||||||
@ -7529,6 +7582,19 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} 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 {
|
} else {
|
||||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||||
}
|
}
|
||||||
@ -7564,6 +7630,13 @@ abstract class CommonObject
|
|||||||
$keyList .= implode(', ', $fields_label);
|
$keyList .= implode(', ', $fields_label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_categorie = false;
|
||||||
|
if (count($InfoFieldList) > 5) {
|
||||||
|
if ($InfoFieldList[0] == 'categorie') {
|
||||||
|
$filter_categorie = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT ".$keyList;
|
$sql = "SELECT ".$keyList;
|
||||||
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
|
$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
|
||||||
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
if (strpos($InfoFieldList[4], 'extra') !== false) {
|
||||||
@ -7575,6 +7648,7 @@ abstract class CommonObject
|
|||||||
dol_syslog(get_class($this).':showOutputField:$type=chkbxlst', LOG_DEBUG);
|
dol_syslog(get_class($this).':showOutputField:$type=chkbxlst', LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
|
if ($filter_categorie === false) {
|
||||||
$value = ''; // value was used, so now we reste it to use it to build final output
|
$value = ''; // value was used, so now we reste it to use it to build final output
|
||||||
$toprint = array();
|
$toprint = array();
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
@ -7606,6 +7680,21 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} 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>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
|
||||||
} else {
|
} else {
|
||||||
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
|
||||||
|
|||||||
@ -4913,8 +4913,8 @@ class Form
|
|||||||
* @param string $title Title
|
* @param string $title Title
|
||||||
* @param string $question Question
|
* @param string $question Question
|
||||||
* @param string $action Action
|
* @param string $action Action
|
||||||
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>))
|
* @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'...
|
* '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 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 $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)
|
* @param int|string $height Force height of box (0 = auto)
|
||||||
|
|||||||
@ -165,9 +165,10 @@ class FormWebsite
|
|||||||
* @param int $useempty 1=Add an empty value in list
|
* @param int $useempty 1=Add an empty value in list
|
||||||
* @param string $moreattrib More attributes on HTML select tag
|
* @param string $moreattrib More attributes on HTML select tag
|
||||||
* @param int $addjscombo Add js combo
|
* @param int $addjscombo Add js combo
|
||||||
|
* @param string $morecss More css
|
||||||
* @return string HTML select component with list of type of containers
|
* @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;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
@ -190,7 +191,7 @@ class FormWebsite
|
|||||||
}
|
}
|
||||||
|
|
||||||
$out = '';
|
$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) {
|
if ($useempty == 1 || $useempty == 2) {
|
||||||
$out .= '<option value="-1"> </option>';
|
$out .= '<option value="-1"> </option>';
|
||||||
|
|||||||
@ -51,6 +51,12 @@ class RssParser
|
|||||||
|
|
||||||
private $current_namespace;
|
private $current_namespace;
|
||||||
|
|
||||||
|
private $initem;
|
||||||
|
private $intextinput;
|
||||||
|
private $incontent;
|
||||||
|
private $inimage;
|
||||||
|
private $inchannel;
|
||||||
|
|
||||||
// For parsing with xmlparser
|
// For parsing with xmlparser
|
||||||
public $stack = array(); // parser stack
|
public $stack = array(); // parser stack
|
||||||
private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
|
private $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
|
||||||
@ -254,7 +260,8 @@ class RssParser
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$xmlparser = xml_parser_create('');
|
try {
|
||||||
|
$xmlparser = xml_parser_create(null);
|
||||||
|
|
||||||
if (!is_resource($xmlparser) && !is_object($xmlparser)) {
|
if (!is_resource($xmlparser) && !is_object($xmlparser)) {
|
||||||
$this->error = "ErrorFailedToCreateParser";
|
$this->error = "ErrorFailedToCreateParser";
|
||||||
@ -265,10 +272,14 @@ class RssParser
|
|||||||
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
|
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element');
|
||||||
xml_set_character_data_handler($xmlparser, 'feed_cdata');
|
xml_set_character_data_handler($xmlparser, 'feed_cdata');
|
||||||
|
|
||||||
$status = xml_parse($xmlparser, $str);
|
$status = xml_parse($xmlparser, $str, false);
|
||||||
|
|
||||||
xml_parser_free($xmlparser);
|
xml_parser_free($xmlparser);
|
||||||
$rss = $this;
|
$rss = $this;
|
||||||
//var_dump($status.' '.$rss->_format);exit;
|
//var_dump($status.' '.$rss->_format);exit;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
$rss = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,7 +454,7 @@ class RssParser
|
|||||||
|
|
||||||
// Loop on each category
|
// Loop on each category
|
||||||
$itemCategory = array();
|
$itemCategory = array();
|
||||||
if (is_array($item->category)) {
|
if (!empty($item->category) && is_array($item->category)) {
|
||||||
foreach ($item->category as $cat) {
|
foreach ($item->category as $cat) {
|
||||||
$itemCategory[] = (string) $cat;
|
$itemCategory[] = (string) $cat;
|
||||||
}
|
}
|
||||||
@ -514,7 +525,7 @@ class RssParser
|
|||||||
* @param array $attrs Attributes of tags
|
* @param array $attrs Attributes of tags
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function feed_start_element($p, $element, &$attrs)
|
public function feed_start_element($p, $element, $attrs)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$el = $element = strtolower($element);
|
$el = $element = strtolower($element);
|
||||||
@ -681,9 +692,9 @@ class RssParser
|
|||||||
public function append_content($text)
|
public function append_content($text)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
if ($this->initem) {
|
if (!empty($this->initem)) {
|
||||||
$this->concat($this->current_item[$this->incontent], $text);
|
$this->concat($this->current_item[$this->incontent], $text);
|
||||||
} elseif ($this->inchannel) {
|
} elseif (!empty($this->inchannel)) {
|
||||||
$this->concat($this->channel[$this->incontent], $text);
|
$this->concat($this->channel[$this->incontent], $text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -700,24 +711,24 @@ class RssParser
|
|||||||
if (!$el) {
|
if (!$el) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($this->current_namespace) {
|
if (!empty($this->current_namespace)) {
|
||||||
if ($this->initem) {
|
if (!empty($this->initem)) {
|
||||||
$this->concat($this->current_item[$this->current_namespace][$el], $text);
|
$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);
|
$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);
|
$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);
|
$this->concat($this->image[$this->current_namespace][$el], $text);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($this->initem) {
|
if (!empty($this->initem)) {
|
||||||
$this->concat($this->current_item[$el], $text);
|
$this->concat($this->current_item[$el], $text);
|
||||||
} elseif ($this->intextinput) {
|
} elseif (!empty($this->intextinput)) {
|
||||||
$this->concat($this->textinput[$el], $text);
|
$this->concat($this->textinput[$el], $text);
|
||||||
} elseif ($this->inimage) {
|
} elseif (!empty($this->inimage)) {
|
||||||
$this->concat($this->image[$el], $text);
|
$this->concat($this->image[$el], $text);
|
||||||
} elseif ($this->inchannel) {
|
} elseif (!empty($this->inchannel)) {
|
||||||
$this->concat($this->channel[$el], $text);
|
$this->concat($this->channel[$el], $text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -904,7 +904,7 @@ class Translate
|
|||||||
* This function need module "numberwords" to be installed. If not it will return
|
* 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).
|
* 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 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)
|
* @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)
|
* @return string Label translated in UTF8 (but without entities)
|
||||||
* 10 if setDefaultLang was en_US => ten
|
* 10 if setDefaultLang was en_US => ten
|
||||||
|
|||||||
@ -952,7 +952,7 @@ class Utils
|
|||||||
|
|
||||||
dol_include_once('/core/lib/files.lib.php');
|
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)) {
|
if (empty($conf->global->SYSLOG_FILE)) {
|
||||||
$mainlogdir = DOL_DATA_ROOT;
|
$mainlogdir = DOL_DATA_ROOT;
|
||||||
|
|||||||
@ -471,7 +471,7 @@ class DoliDBMysqli extends DoliDB
|
|||||||
*/
|
*/
|
||||||
public function escape($stringtoencode)
|
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)
|
public function escapeunderscore($stringtoencode)
|
||||||
{
|
{
|
||||||
return str_replace('_', '\_', $stringtoencode);
|
return str_replace('_', '\_', (string) $stringtoencode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -231,33 +231,41 @@ print '
|
|||||||
);
|
);
|
||||||
|
|
||||||
jQuery(\'.clipboardCPValue, .clipboardCPButton, .clipboardCPValueToPrint\').click(function() {
|
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");
|
console.log("We click on a clipboardCPButton or clipboardCPValueToPrint class and we want to copy content of clipboardCPValue class");
|
||||||
|
|
||||||
if (window.getSelection) {
|
if (window.getSelection) {
|
||||||
range = document.createRange();
|
jqobj=$(this).parent().children(".clipboardCPValue");
|
||||||
|
console.log(jqobj.html());
|
||||||
/* 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);
|
|
||||||
|
|
||||||
selection = window.getSelection(); /* get the object used for selection */
|
selection = window.getSelection(); /* get the object used for selection */
|
||||||
selection.removeAllRanges(); /* clear current 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 */
|
selection.addRange(range); /* make the new selection with the value to copy */
|
||||||
}
|
|
||||||
|
|
||||||
/* copy selection into clipboard */
|
/* copy selection into clipboard */
|
||||||
var succeed;
|
var succeed;
|
||||||
try {
|
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\');
|
succeed = document.execCommand(\'copy\');
|
||||||
|
|
||||||
|
console.log("We set the style display back to inline-block");
|
||||||
|
jqobj.css("display", "inline-block");
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
succeed = false;
|
succeed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove the selection to avoid to see the hidden field to copy selected */
|
/* Remove the selection to avoid to see the hidden field to copy selected */
|
||||||
window.getSelection().removeAllRanges();
|
window.getSelection().removeAllRanges();
|
||||||
|
}
|
||||||
|
|
||||||
/* Show message */
|
/* 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 lastchild = this.parentNode.lastChild; /* .parentNode is clipboardCP and last child is clipboardCPText */
|
||||||
var tmp = lastchild.innerHTML
|
var tmp = lastchild.innerHTML
|
||||||
if (succeed) {
|
if (succeed) {
|
||||||
|
|||||||
@ -100,13 +100,22 @@ function dol_print_cron_urls()
|
|||||||
print '<div class="div-table-responsive-no-min">';
|
print '<div class="div-table-responsive-no-min">';
|
||||||
print $langs->trans("URLToLaunchCronJobs").':<br>';
|
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;
|
$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 '<div class="urllink">';
|
||||||
print ' '.$langs->trans("OrToLaunchASpecificJob").'<br>';
|
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';
|
$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 '</div>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
print ajax_autoselect("publicurlmember");
|
||||||
|
print ajax_autoselect("publicurlmemberall");
|
||||||
|
|
||||||
$logintouse = 'firstadmin';
|
$logintouse = 'firstadmin';
|
||||||
if ($user->admin) {
|
if ($user->admin) {
|
||||||
$logintouse = $user->login;
|
$logintouse = $user->login;
|
||||||
|
|||||||
@ -222,7 +222,7 @@ function ordersupplier_prepare_head(CommandeFournisseur $object)
|
|||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/info.php?id='.$object->id;
|
$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))) {
|
if (isModEnabled('agenda') && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) {
|
||||||
$head[$h][1] .= '/';
|
$head[$h][1] .= '/';
|
||||||
$head[$h][1] .= $langs->trans("Agenda");
|
$head[$h][1] .= $langs->trans("Agenda");
|
||||||
|
|||||||
@ -3948,7 +3948,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'off', 'on', 'order',
|
'off', 'on', 'order',
|
||||||
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce',
|
'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce',
|
||||||
'stock', 'resize', 'service', 'stats', 'trip',
|
'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',
|
'github', 'google', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp',
|
||||||
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies',
|
||||||
'generic', 'home', 'hrm', 'members', 'products', 'invoicing',
|
'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 $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 $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
|
* @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;
|
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);
|
dol_syslog("functions.lib::dol_mkdir: Directory '".$ccdir."' does not exists or is outside open_basedir PHP setting.", LOG_DEBUG);
|
||||||
|
|
||||||
umask(0);
|
umask(0);
|
||||||
$dirmaskdec = octdec($newmask);
|
$dirmaskdec = octdec((string) $newmask);
|
||||||
if (empty($newmask)) {
|
if (empty($newmask)) {
|
||||||
$dirmaskdec = empty($conf->global->MAIN_UMASK) ? octdec('0755') : octdec($conf->global->MAIN_UMASK);
|
$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['__ID__'] = '__ID__';
|
||||||
$substitutionarray['__REF__'] = '__REF__';
|
$substitutionarray['__REF__'] = '__REF__';
|
||||||
$substitutionarray['__NEWREF__'] = '__NEWREF__';
|
$substitutionarray['__NEWREF__'] = '__NEWREF__';
|
||||||
|
$substitutionarray['__LABEL__'] = '__LABEL__';
|
||||||
$substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__';
|
$substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__';
|
||||||
$substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__';
|
$substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__';
|
||||||
$substitutionarray['__NOTE_PUBLIC__'] = '__NOTE_PUBLIC__';
|
$substitutionarray['__NOTE_PUBLIC__'] = '__NOTE_PUBLIC__';
|
||||||
@ -7413,6 +7414,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__ID__'] = $object->id;
|
$substitutionarray['__ID__'] = $object->id;
|
||||||
$substitutionarray['__REF__'] = $object->ref;
|
$substitutionarray['__REF__'] = $object->ref;
|
||||||
$substitutionarray['__NEWREF__'] = $object->newref;
|
$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_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['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null);
|
||||||
$substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : 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) {
|
if ($mesgstring) {
|
||||||
$langs->load("errors");
|
|
||||||
$ret++;
|
$ret++;
|
||||||
$out .= $langs->trans($mesgstring);
|
$out .= $langs->trans($mesgstring);
|
||||||
}
|
}
|
||||||
@ -8612,7 +8613,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
|
|||||||
}
|
}
|
||||||
} elseif ($onlysimplestring == '2') {
|
} 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"
|
// 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) {
|
if ($returnvalue) {
|
||||||
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
|
return 'Bad string syntax to evaluate (found chars that are not chars for simplestring): '.$s;
|
||||||
} else {
|
} else {
|
||||||
@ -9021,7 +9022,6 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
|
|||||||
if ($values[0] != $type) {
|
if ($values[0] != $type) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//var_dump(verifCond($values[4]));
|
|
||||||
|
|
||||||
if (verifCond($values[4])) {
|
if (verifCond($values[4])) {
|
||||||
if ($values[3]) {
|
if ($values[3]) {
|
||||||
@ -11045,12 +11045,12 @@ function readfileLowMemory($fullpath_original_file_osencoded, $method = -1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a button to copy $valuetocopy in the clipboard.
|
* Create a button to copy $valuetocopy in the clipboard (for copy and paste feature).
|
||||||
* Code that handle the click is inside lib_foot.jsp.php.
|
* Code that handle the click is inside core/js/lib_foot.js.php.
|
||||||
*
|
*
|
||||||
* @param string $valuetocopy The value to print
|
* @param string $valuetocopy The value to print
|
||||||
* @param int $showonlyonhover Show the copy-paste button only on hover
|
* @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
|
* @return string The string to print for the button
|
||||||
*/
|
*/
|
||||||
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
|
function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $texttoshow = '')
|
||||||
@ -11062,8 +11062,10 @@ function showValueWithClipboardCPButton($valuetocopy, $showonlyonhover = 1, $tex
|
|||||||
$showonlyonhover = 0;
|
$showonlyonhover = 0;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
$tag = 'span'; // Using div does not work when using the js copy code.
|
$tag = 'span'; // Using div (like any style of type 'block') does not work when using the js copy code.
|
||||||
if ($texttoshow) {
|
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>';
|
$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 {
|
} 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>';
|
$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>';
|
||||||
|
|||||||
@ -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/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("/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
|
// 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"'));
|
$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"'));
|
||||||
|
|||||||
@ -78,7 +78,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->ASSET_ASSET_ADVANCED_MASK;
|
$mask = getDolGlobalString('ASSET_ASSET_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class mod_bom_advanced extends ModeleNumRefboms
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->BOM_ADVANCED_MASK;
|
$mask = getDolGlobalString('BOM_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -79,9 +79,9 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||||
|
|
||||||
$texte .= '</tr>';
|
$texte .= '</tr>';
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->HRM_EVALUATION_ADVANCED_MASK;
|
$mask = getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class doc_generic_member_odt extends ModelePDFMember
|
|||||||
// List of directories area
|
// List of directories area
|
||||||
$texte .= '<tr><td>';
|
$texte .= '<tr><td>';
|
||||||
$texttitle = $langs->trans("ListOfDirectories");
|
$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();
|
$listoffiles = array();
|
||||||
foreach ($listofdir as $key => $tmpdir) {
|
foreach ($listofdir as $key => $tmpdir) {
|
||||||
$tmpdir = trim($tmpdir);
|
$tmpdir = trim($tmpdir);
|
||||||
@ -151,7 +151,7 @@ class doc_generic_member_odt extends ModelePDFMember
|
|||||||
$texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
|
$texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
|
||||||
$texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
$texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||||
$texte .= '<textarea class="flat" cols="60" name="value1">';
|
$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 .= '</textarea>';
|
||||||
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
|
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||||
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';
|
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';
|
||||||
|
|||||||
@ -93,7 +93,8 @@ class modIncoterm extends DolibarrModules
|
|||||||
'tabfieldvalue'=>array("code,libelle"), // List of fields (list of fields to edit a record)
|
'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)
|
'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')
|
'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
|
$this->boxes = array(); // List of boxes
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class mod_mo_advanced extends ModeleNumRefMos
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->MRP_MO_ADVANCED_MASK;
|
$mask = getDolGlobalString('MRP_MO_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -67,7 +67,11 @@ class PrintingDriver
|
|||||||
$list = array();
|
$list = array();
|
||||||
|
|
||||||
$listoffiles = array();
|
$listoffiles = array();
|
||||||
|
if (!empty($conf->modules_parts['printing'])) {
|
||||||
$dirmodels = array_merge(array('/core/modules/printing/'), (array) $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) {
|
foreach ($dirmodels as $dir) {
|
||||||
$tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0);
|
$tmpfiles = dol_dir_list(dol_buildpath($dir, 0), 'all', 0, '\.modules.php', '', 'name', SORT_ASC, 0);
|
||||||
if (!empty($tmpfiles)) {
|
if (!empty($tmpfiles)) {
|
||||||
|
|||||||
@ -116,8 +116,8 @@ class printing_printgcp extends PrintingDriver
|
|||||||
'type'=>'info',
|
'type'=>'info',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$this->google_id = $conf->global->OAUTH_GOOGLE_ID;
|
$this->google_id = getDolGlobalString('OAUTH_GOOGLE_ID');
|
||||||
$this->google_secret = $conf->global->OAUTH_GOOGLE_SECRET;
|
$this->google_secret = getDolGlobalString('OAUTH_GOOGLE_SECRET');
|
||||||
// Token storage
|
// Token storage
|
||||||
$storage = new DoliStorage($this->db, $this->conf);
|
$storage = new DoliStorage($this->db, $this->conf);
|
||||||
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);
|
//$storage->clearToken($this->OAUTH_SERVICENAME_GOOGLE);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
// We get cursor rule
|
// 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 = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : '';
|
$mask = getDolGlobalString('LOT_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
// We get cursor rule
|
// 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 = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : '';
|
$mask = getDolGlobalString('SN_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK;
|
$mask = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK;
|
$mask = getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $langs->load("modulebuilder");
|
|||||||
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE admin_extrafields_view.tpl.php -->
|
||||||
<?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>';
|
print '<br>';
|
||||||
|
|
||||||
// Load $extrafields->attributes
|
// Load $extrafields->attributes
|
||||||
|
|||||||
@ -263,7 +263,7 @@ if (empty($reshook)) {
|
|||||||
if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer))
|
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))) {
|
|| (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer) && empty($user->rights->expensereport->writeall_advance))) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors');
|
setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) {
|
||||||
|
|||||||
@ -482,7 +482,7 @@ if ($resql) {
|
|||||||
if ($canedit) {
|
if ($canedit) {
|
||||||
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
print '<a href="'.DOL_URL_ROOT.'/expensereport/card.php?action=create&fk_user_author='.$fuser->id.'" class="butAction">'.$langs->trans("AddTrip").'</a>';
|
||||||
} else {
|
} 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>';
|
print '</div>';
|
||||||
|
|||||||
@ -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
|
// This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set
|
||||||
$result = $this->addline(
|
$result = $this->addline(
|
||||||
@ -1454,7 +1454,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$line->date_start,
|
$line->date_start,
|
||||||
$line->date_end,
|
$line->date_end,
|
||||||
$line->array_options,
|
$line->array_options,
|
||||||
$line->fk_unit
|
$line->fk_unit,
|
||||||
|
$line->special_code
|
||||||
);
|
);
|
||||||
if ($result < 0) {
|
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
|
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 string $origin 'order', ...
|
||||||
* @param int $origin_id Id of origin object
|
* @param int $origin_id Id of origin object
|
||||||
* @param int $rang Rank
|
* @param int $rang Rank
|
||||||
|
* @param int $special_code Special code
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @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;
|
global $langs, $mysoc, $conf;
|
||||||
|
|
||||||
@ -1871,7 +1873,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
// Predefine quantity according to packaging
|
// Predefine quantity according to packaging
|
||||||
if (!empty($conf->global->PRODUCT_USE_SUPPLIER_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));
|
$prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid));
|
||||||
|
|
||||||
if ($qty < $prod->packaging) {
|
if ($qty < $prod->packaging) {
|
||||||
@ -1880,11 +1882,11 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
if (!empty($prod->packaging) && ($qty % $prod->packaging) > 0) {
|
if (!empty($prod->packaging) && ($qty % $prod->packaging) > 0) {
|
||||||
$coeff = intval($qty / $prod->packaging) + 1;
|
$coeff = intval($qty / $prod->packaging) + 1;
|
||||||
$qty = $prod->packaging * $coeff;
|
$qty = $prod->packaging * $coeff;
|
||||||
}
|
|
||||||
}
|
|
||||||
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
|
setEventMessage($langs->trans('QtyRecalculatedWithPackaging'), 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
if (!empty($conf->multicurrency->enabled) && $pu_ht_devise > 0) {
|
||||||
$pu = 0;
|
$pu = 0;
|
||||||
@ -1957,7 +1959,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$this->line->total_localtax2 = $total_localtax2;
|
$this->line->total_localtax2 = $total_localtax2;
|
||||||
$this->line->total_ttc = $total_ttc;
|
$this->line->total_ttc = $total_ttc;
|
||||||
$this->line->product_type = $type;
|
$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 = $origin;
|
||||||
$this->line->origin_id = $origin_id;
|
$this->line->origin_id = $origin_id;
|
||||||
$this->line->fk_unit = $fk_unit;
|
$this->line->fk_unit = $fk_unit;
|
||||||
|
|||||||
@ -2074,7 +2074,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) {
|
if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) {
|
||||||
// Check quantity is enough
|
// Check quantity is enough
|
||||||
dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier);
|
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) {
|
if ($prod->fetch($fk_product) > 0) {
|
||||||
$product_type = $prod->type;
|
$product_type = $prod->type;
|
||||||
$label = $prod->label;
|
$label = $prod->label;
|
||||||
|
|||||||
@ -555,13 +555,15 @@ if (empty($reshook)) {
|
|||||||
$ref_supplier = $productsupplier->ref_supplier;
|
$ref_supplier = $productsupplier->ref_supplier;
|
||||||
|
|
||||||
// Get vat rate
|
// Get vat rate
|
||||||
|
$tva_npr = 0;
|
||||||
if (!GETPOSTISSET('tva_tx')) { // If vat rate not provided from the form (the form has the priority)
|
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_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'));
|
$tva_npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, GETPOST('idprodfournprice', 'alpha'));
|
||||||
}
|
|
||||||
if (empty($tva_tx)) {
|
if (empty($tva_tx)) {
|
||||||
$tva_npr = 0;
|
$tva_npr = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr);
|
$localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty, $tva_npr);
|
||||||
$localtax2_tx = get_localtax($tva_tx, 2, $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,
|
$localtax1_tx,
|
||||||
$localtax2_tx,
|
$localtax2_tx,
|
||||||
$idprod,
|
$idprod,
|
||||||
0, // We already have the $idprod always defined
|
$productsupplier->product_fourn_price_id,
|
||||||
$ref_supplier,
|
$ref_supplier,
|
||||||
$remise_percent,
|
$remise_percent,
|
||||||
$price_base_type,
|
$price_base_type,
|
||||||
@ -667,10 +669,10 @@ if (empty($reshook)) {
|
|||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang = '';
|
$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');
|
$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;
|
$newlang = $object->thirdparty->default_lang;
|
||||||
}
|
}
|
||||||
if (!empty($newlang)) {
|
if (!empty($newlang)) {
|
||||||
@ -2681,7 +2683,7 @@ if ($action == 'create') {
|
|||||||
$delallowed = $usercancreate;
|
$delallowed = $usercancreate;
|
||||||
$modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->COMMANDE_SUPPLIER_ADDON_PDF));
|
$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;
|
$somethingshown = $formfile->numoffiles;
|
||||||
|
|
||||||
// Show links to link elements
|
// Show links to link elements
|
||||||
|
|||||||
@ -923,7 +923,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
|
|||||||
$errors[] = $langs->trans('ErrorEndDateCP');
|
$errors[] = $langs->trans('ErrorEndDateCP');
|
||||||
break;
|
break;
|
||||||
case 'SQL_Create':
|
case 'SQL_Create':
|
||||||
$errors[] = $langs->trans('ErrorSQLCreateCP').' <b>'.htmlentities($_GET['msg']).'</b>';
|
$errors[] = $langs->trans('ErrorSQLCreateCP');
|
||||||
break;
|
break;
|
||||||
case 'CantCreate':
|
case 'CantCreate':
|
||||||
$errors[] = $langs->trans('CantCreateCP');
|
$errors[] = $langs->trans('CantCreateCP');
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class Skill extends CommonObject
|
|||||||
const STATUS_DRAFT = 0;
|
const STATUS_DRAFT = 0;
|
||||||
const STATUS_VALIDATED = 1;
|
const STATUS_VALIDATED = 1;
|
||||||
const STATUS_CANCELED = 9;
|
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')
|
* '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;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
$MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL;
|
$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;
|
$error = 0;
|
||||||
|
|
||||||
|
|||||||
@ -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
|
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
|
||||||
|
$noback = 1;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||||
|
|
||||||
// action update on Skilldet
|
// action update on Skilldet
|
||||||
|
$skilldetArray = GETPOST("descriptionline", "array:alphanohtml");
|
||||||
$skilldetArray = GETPOST("descriptionline", "array");
|
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (is_array($skilldetArray) && count($skilldetArray) > 0) {
|
if (is_array($skilldetArray) && count($skilldetArray) > 0) {
|
||||||
|
|||||||
@ -141,14 +141,18 @@ class DoliStorage implements TokenStorageInterface
|
|||||||
dol_syslog("hasAccessToken service=".$service);
|
dol_syslog("hasAccessToken service=".$service);
|
||||||
|
|
||||||
$sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token";
|
$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').")";
|
$sql .= " AND entity IN (".getEntity('oauth_token').")";
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (! $resql) {
|
if (! $resql) {
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
$result = $this->db->fetch_array($resql);
|
$result = $this->db->fetch_array($resql);
|
||||||
|
if ($result) {
|
||||||
$token = unserialize($result['token']);
|
$token = unserialize($result['token']);
|
||||||
|
} else {
|
||||||
|
$token = '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->tokens[$service] = $token;
|
$this->tokens[$service] = $token;
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
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,'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,'12','Commerçant (EI)');
|
||||||
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'13','Artisan (EI)');
|
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'13','Artisan (EI)');
|
||||||
|
|||||||
@ -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 ADD COLUMN packaging varchar(64) DEFAULT NULL;
|
||||||
ALTER TABLE llx_product_fournisseur_price MODIFY 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;
|
ALTER TABLE llx_projet ADD COLUMN fk_opp_status_end integer DEFAULT NULL;
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
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 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
|
-- For v14
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
ALTER TABLE llx_product_fournisseur_price ADD COLUMN packaging real DEFAULT NULL;
|
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;
|
-- 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 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;
|
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL;
|
||||||
|
|
||||||
|
|||||||
@ -137,6 +137,10 @@ ALTER TABLE llx_bank ADD COLUMN amount_main_currency double(24,8) NULL;
|
|||||||
|
|
||||||
-- v16
|
-- 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_id integer DEFAULT NULL;
|
||||||
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;
|
ALTER TABLE llx_projet_task_time ADD COLUMN intervention_line_id integer DEFAULT NULL;
|
||||||
|
|
||||||
|
|||||||
@ -55,3 +55,9 @@ ALTER TABLE llx_facture_fourn ADD COLUMN close_missing_amount double(24, 8) afte
|
|||||||
|
|
||||||
-- 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_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);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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');
|
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;
|
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;
|
--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);
|
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;
|
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;
|
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;
|
--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);
|
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;
|
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;
|
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;
|
--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);
|
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;
|
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;
|
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;
|
--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);
|
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);
|
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);
|
-- 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);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -29,6 +29,7 @@ CREATE TABLE llx_inventory
|
|||||||
fk_user_valid integer, -- valideur de la fiche
|
fk_user_valid integer, -- valideur de la fiche
|
||||||
fk_warehouse integer DEFAULT NULL,
|
fk_warehouse integer DEFAULT NULL,
|
||||||
fk_product integer DEFAULT NULL,
|
fk_product integer DEFAULT NULL,
|
||||||
|
categories_product varchar(255) DEFAULT NULL, -- product categories id separated by comma
|
||||||
status integer DEFAULT 0,
|
status integer DEFAULT 0,
|
||||||
title varchar(255) NOT NULL,
|
title varchar(255) NOT NULL,
|
||||||
date_inventory datetime DEFAULT NULL,
|
date_inventory datetime DEFAULT NULL,
|
||||||
|
|||||||
@ -40,6 +40,7 @@ CREATE TABLE llx_ticket
|
|||||||
date_close datetime,
|
date_close datetime,
|
||||||
notify_tiers_at_create tinyint,
|
notify_tiers_at_create tinyint,
|
||||||
email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID
|
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,
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
import_key varchar(14)
|
import_key varchar(14)
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -79,7 +79,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$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"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <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';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
// We get cursor rule
|
// We get cursor rule
|
||||||
$mask = $conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK;
|
$mask = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK');
|
||||||
|
|
||||||
if (!$mask) {
|
if (!$mask) {
|
||||||
$this->error = 'NotConfigured';
|
$this->error = 'NotConfigured';
|
||||||
|
|||||||
@ -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
|
DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account
|
||||||
|
|
||||||
Closure=Annual closure
|
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
|
OverviewOfMovementsNotValidated=Overview of movements not validated and locked
|
||||||
AllMovementsWereRecordedAsValidated=All movements were recorded as validated and locked
|
AllMovementsWereRecordedAsValidated=All movements were recorded as validated and locked
|
||||||
NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated and locked
|
NotAllMovementsCouldBeRecordedAsValidated=Not all movements could be recorded as validated and locked
|
||||||
|
|||||||
@ -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
|
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
|
NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration
|
||||||
MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to disallow any upload)
|
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
|
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
|
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
|
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.
|
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>.
|
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>.
|
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
|
ClickToShowDescription=Click to show description
|
||||||
DependsOn=This module needs the module(s)
|
DependsOn=This module needs the module(s)
|
||||||
RequiredBy=This module is required by module(s)
|
RequiredBy=This module is required by module(s)
|
||||||
|
|||||||
@ -100,3 +100,4 @@ ActionCommCategoriesArea=Event Categories
|
|||||||
WebsitePagesCategoriesArea=Page-Container Categories
|
WebsitePagesCategoriesArea=Page-Container Categories
|
||||||
KnowledgemanagementsCategoriesArea=KM article Categories
|
KnowledgemanagementsCategoriesArea=KM article Categories
|
||||||
UseOrOperatorForCategories=Use 'OR' operator for categories
|
UseOrOperatorForCategories=Use 'OR' operator for categories
|
||||||
|
AddObjectIntoCategory=Add object into category
|
||||||
|
|||||||
@ -89,3 +89,4 @@ SkillsExtraFields=Attributs supplémentaires (Compétences)
|
|||||||
JobsExtraFields=Attributs supplémentaires (Emplois)
|
JobsExtraFields=Attributs supplémentaires (Emplois)
|
||||||
EvaluationsExtraFields=Attributs supplémentaires (Evaluations)
|
EvaluationsExtraFields=Attributs supplémentaires (Evaluations)
|
||||||
NeedBusinessTravels=Need business travels
|
NeedBusinessTravels=Need business travels
|
||||||
|
NoDescription=No description
|
||||||
@ -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.
|
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
|
Loaded=Loaded
|
||||||
FunctionTest=Function test
|
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
|
||||||
@ -345,7 +345,7 @@ KiloBytes=Kilobytes
|
|||||||
MegaBytes=Megabytes
|
MegaBytes=Megabytes
|
||||||
GigaBytes=Gigabytes
|
GigaBytes=Gigabytes
|
||||||
TeraBytes=Terabytes
|
TeraBytes=Terabytes
|
||||||
UserAuthor=Ceated by
|
UserAuthor=Created by
|
||||||
UserModif=Updated by
|
UserModif=Updated by
|
||||||
b=b.
|
b=b.
|
||||||
Kb=Kb
|
Kb=Kb
|
||||||
@ -712,6 +712,7 @@ FeatureDisabled=Feature disabled
|
|||||||
MoveBox=Move widget
|
MoveBox=Move widget
|
||||||
Offered=Offered
|
Offered=Offered
|
||||||
NotEnoughPermissions=You don't have permission for this action
|
NotEnoughPermissions=You don't have permission for this action
|
||||||
|
UserNotInHierachy=This action is reserved to the supervisors of this user
|
||||||
SessionName=Session name
|
SessionName=Session name
|
||||||
Method=Method
|
Method=Method
|
||||||
Receive=Receive
|
Receive=Receive
|
||||||
|
|||||||
@ -427,3 +427,4 @@ RealValuation=Real Valuation
|
|||||||
ConfirmEditExtrafield = Select the extrafield you want modify
|
ConfirmEditExtrafield = Select the extrafield you want modify
|
||||||
ConfirmEditExtrafieldQuestion = Are you sure you want to modify this extrafield?
|
ConfirmEditExtrafieldQuestion = Are you sure you want to modify this extrafield?
|
||||||
ModifyValueExtrafields = Modify value of an extrafield
|
ModifyValueExtrafields = Modify value of an extrafield
|
||||||
|
OrProductsWithCategories=Or products with tags/categories
|
||||||
|
|||||||
@ -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
|
TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries
|
||||||
TicketParamModule=Module variable setup
|
TicketParamModule=Module variable setup
|
||||||
TicketParamMail=Email setup
|
TicketParamMail=Email setup
|
||||||
TicketEmailNotificationFrom=Sender e-mail for ticket answers
|
TicketEmailNotificationFrom=Sender e-mail for notification on answers
|
||||||
TicketEmailNotificationFromHelp=Sender e-mail for ticket answers sent from Dolibarr
|
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
|
TicketEmailNotificationTo=Notify ticket creation to this e-mail address
|
||||||
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation
|
TicketEmailNotificationToHelp=If present, this e-mail address will be notified of a ticket creation
|
||||||
TicketNewEmailBodyLabel=Text message sent after creating a ticket
|
TicketNewEmailBodyLabel=Text message sent after creating a ticket
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user