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

This commit is contained in:
Maxime Kohlhaas 2021-06-27 08:34:11 +02:00
commit d86caa39e4
2075 changed files with 29785 additions and 21102 deletions

View File

@ -44,16 +44,20 @@ jobs:
#allow_failures:
#- php: nightly
include:
- if: type = push
- stage: PHP 5.6-7.4
if: type = push
php: '5.6'
env: DB=postgresql
- if: type = pull_request OR type = push
- stage: PHP 5.6-7.4
if: type = pull_request OR type = push
php: '7.4'
env: DB=mysql
- if: type = push AND branch = develop
- stage: PHP Dev
if: type = push AND branch = develop
php: nightly
env: DB=mysql
- if: type = push AND branch = 14.0
- stage: PHP Dev
if: type = push AND branch = 14.0
php: nightly
env: DB=mysql
@ -412,10 +416,11 @@ script:
- |
echo "Enabling new modules"
# Enable modules not enabled into original dump
cd htdocs/install
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE > $TRAVIS_BUILD_DIR/enablemodule.log
set -e
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_PRODUCTBATCH,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_STRIPE,MAIN_MODULE_EXPENSEREPORT > $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KNOWLEDGEMANAGEMENT,MAIN_MODULE_EVENTORGANIZATION,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log
echo $?
cd -
set +e

View File

@ -64,7 +64,7 @@ NEW: VAT payment request and VAT payment are now 2 different steps in workflow o
NEW: VAT report - Optimisation & collapse by rate
NEW: When a doc file is shared, link is visible from the main page of doc.
NEW: #16378 more E-Mail Contact substitution Values for better salutation
NEW: option to keep the "Automatically create a total payment" checkbox empty on the tax creation page
NEW: option to keep the "Automatically create the payment" checkbox empty on the tax creation page
Accountancy
NEW: Accountancy - Add FEC import
@ -225,6 +225,7 @@ Following changes may create regressions for some external modules, but were nec
* If your database is MySQL or MariaDB, you need at least version 5.1
* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules
* removed deprecated subtituion key __REFCLIENT__ (replaced with __REF_CLIENT__)
* Removed constant MAIN_COUNTRIES_IN_EEC. You can now set if country is in Europe or not from the dictionary of countries.
***** ChangeLog for 13.0.3 compared to 13.0.2 *****
@ -284,7 +285,6 @@ FIX: test must be === and not ==
FIX: test on link type
FIX: type link extrafield case for advanced target emailing
FIX: Write right on document
>>>>>>> branch '13.0' of git@github.com:Dolibarr/dolibarr.git
***** ChangeLog for 13.0.2 compared to 13.0.1 *****

View File

@ -103,7 +103,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlr, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {

View File

@ -656,19 +656,19 @@ class AdherentType extends CommonObject
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen length max label
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @param int $maxlen length max label
* @param int $notooltip 1=Disable tooltip
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $langs;
$result = '';
$label = '';
$label = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("MemberType").'</u>';
$label .= ' '.$this->getLibStatut(4);
$label .= '<br>'.$langs->trans("Label").': '.$this->label;
@ -676,7 +676,22 @@ class AdherentType extends CommonObject
$label .= '<br>'.$langs->trans("SubscriptionRequired").': '.yn($this->subscription);
}
$linkstart = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id).'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$option = '';
$url = DOL_URL_ROOT.'/adherents/type.php?rowid='.((int) $this->id);
if ($option != 'nolink') {
// Add param to save lastsearch_values or not
$add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) {
$add_save_lastsearch_values = 1;
}
if ($add_save_lastsearch_values) {
$url .= '&save_lastsearch_values=1';
}
}
$linkstart = '<a href="'.$url.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
$linkend = '</a>';
$result .= $linkstart;

View File

@ -363,13 +363,13 @@ if ($search_type > 0) {
$sql .= " AND t.rowid=".((int) $search_type);
}
if ($search_filter == 'withoutsubscription') {
$sql .= " AND (datefin IS NULL OR t.subscription = 0)";
$sql .= " AND (datefin IS NULL OR t.subscription = '0')";
}
if ($search_filter == 'uptodate') {
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = 0)";
$sql .= " AND (datefin >= '".$db->idate($now)."' OR t.subscription = '0')";
}
if ($search_filter == 'outofdate') {
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)";
$sql .= " AND (datefin < '".$db->idate($now)."' AND t.subscription = '1')";
}
if ($search_status != '') {
// Peut valoir un nombre ou liste de nombre separes par virgules

View File

@ -482,13 +482,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<input type="hidden" name="id" value="'.$object->id.'">';
// Filters
print '<div class="div-table-responsive">';
print '<table class="border centpercent tableforfield">';
print '<tr class="liste_titre">';
print '<div class="div-table-responsive-no-min">';
print '<table id="tablelineoffilters" class="noborder margintable noshadow">';
print '<tr class="liste_titre nodrag nodrop">';
print '<td>'.$form->textwithpicto($langs->trans("Filters"), $langs->trans("EmailCollectorFilterDesc")).'</td><td></td><td></td>';
print '</tr>';
// Add filter
print '<tr class="oddeven">';
print '<tr class="oddeven nodrag nodrop">';
print '<td>';
$arrayoftypes = array(
'from'=>array('label'=>'MailFrom', 'data-placeholder'=>$langs->trans('SearchString')),
@ -518,7 +518,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
'isnotanswer'=>array('label'=>'IsNotAnAnswer', 'data-noparam'=>1),
'isanswer'=>array('label'=>'IsAnAnswer', 'data-noparam'=>1)
);
print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth500', 1, '', 2);
print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth300', 1, '', 2);
print "\n";
print '<script>';
@ -542,7 +542,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</td><td>';
print '<input type="text" name="rulevalue" id="rulevalue">';
print '</td>';
print '<td class="right"><input type="submit" name="addfilter" id="addfilter" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '<td class="right"><input type="submit" name="addfilter" id="addfilter" class="flat button small" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
// List filters
foreach ($object->filters as $rulefilter) {
@ -568,12 +568,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Operations
print '<div class="div-table-responsive">';
print '<table id="tablelines" class="noborder noshadow tableforfield">';
print '<tr class="liste_titre">';
print '<table id="tablelines" class="noborder margintable noshadow">';
print '<tr class="liste_titre nodrag nodrop">';
print '<td>'.$form->textwithpicto($langs->trans("EmailcollectorOperations"), $langs->trans("EmailcollectorOperationsDesc")).'</td><td></td><td></td><td></td>';
print '</tr>';
// Add operation
print '<tr class="oddeven">';
print '<tr class="oddeven nodrag nodrop">';
print '<td>';
$arrayoftypes = array(
'loadthirdparty'=>$langs->trans('LoadThirdPartyFromName', $langs->transnoentities("ThirdPartyName")),
@ -609,7 +609,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$htmltext = $langs->transnoentitiesnoconv("OperationParamDesc");
print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt');
print '</td>';
print '<td class="right"><input type="submit" name="addoperation" id="addoperation" class="flat button" value="'.$langs->trans("Add").'"></td>';
print '<td class="right"><input type="submit" name="addoperation" id="addoperation" class="flat button small" value="'.$langs->trans("Add").'"></td>';
print '</tr>';
// List operations
$nboflines = count($object->actions);
@ -630,12 +630,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $form->textwithpicto('', $langs->transnoentitiesnoconv('EmailCollectorLoadThirdPartyHelp'));
}
print '</td>';
print '<td class="wordbreak">';
print '<td class="wordbreak minwidth300">';
if ($action == 'editoperation' && $ruleaction['id'] == $operationid) {
print '<input type="text" class="quatrevingtquinzepercent" name="operationparam2" value="'.$ruleaction['actionparam'].'"><br>';
print '<input type="hidden" name="rowidoperation2" value="'.$ruleaction['id'].'"><br>';
print '<input type="submit" class="button button-save" name="saveoperation2" value="'.$langs->trans("Save").'">';
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
print '<input type="hidden" name="rowidoperation2" value="'.$ruleaction['id'].'">';
print '<input type="submit" class="button small button-save" name="saveoperation2" value="'.$langs->trans("Save").'">';
print '<input type="submit" class="button small button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
} else {
print $ruleaction['actionparam'];
}

View File

@ -86,13 +86,14 @@ print '<td class="center" width="20">&nbsp;</td>';
print '<td class="center" width="100"></td>'."\n";
print '</tr>';
// Example with a yes / no select
/* No more need for this, you can set that a profile is public when saving it.
print '<tr class="oddeven">';
print '<td>'.$langs->trans("EXPORTS_SHARE_MODELS").'</td>';
print '<td class="center" width="20">&nbsp;</td>';
print '<td class="center" width="100">';
print ajax_constantonoff('EXPORTS_SHARE_MODELS');
print '</td></tr>';
*/
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ExportCsvSeparator").'</td>';

View File

@ -175,6 +175,7 @@ $elementList = array();
// We save list of template email Dolibarr can manage. This list can found by a grep into code on "->param['models']"
$elementList = array();
// Add all and none after the sort
$elementList['all'] = '-- '.dol_escape_htmltag($langs->trans("All")).' --';
$elementList['none'] = '-- '.dol_escape_htmltag($langs->trans("None")).' --';
$elementList['user'] = img_picto('', 'user', 'class="paddingright"').dol_escape_htmltag($langs->trans('MailToUser'));
@ -824,7 +825,7 @@ if ($resql) {
print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
} elseif ($value == 'type_template') {
print '<td class="liste_titre center">';
print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1, '', 0, 1);
print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'minwidth150', 1, '', 0, 1);
print '</td>';
} elseif (!in_array($value, array('content', 'content_lines'))) {
print '<td class="liste_titre"></td>';
@ -1229,7 +1230,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
print '<input type="hidden" name="type_template" value="'.$obj->{$value}.'">';
print $obj->{$value};
} else {
print $form->selectarray('type_template', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth200', 1, '', 0, 1);
print $form->selectarray('type_template', $elementList, (!empty($obj->{$value}) ? $obj->{$value}:''), 1, 0, 0, '', 0, 0, 0, '', 'minwidth150', 1, '', 0, 1);
}
print '</td>';
} elseif ($context == 'add' && in_array($value, array('topic', 'joinfiles', 'content', 'content_lines'))) {

View File

@ -29,7 +29,7 @@
* \brief Page to activate/disable all modules
*/
if (!defined('CSRFCHECK_WITH_TOKEN')) {
if (!defined('CSRFCHECK_WITH_TOKEN') && (empty($_GET['action']) || $_GET['action'] != 'reset')) { // We do not force security to disable modules so we can do it if problem
define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
}

View File

@ -153,7 +153,7 @@ print '<input type="hidden" name="token" value="'.newToken().'">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td class="titlefieldcreate">'.$langs->trans("Parameter").'</td>';
print '<td class="titlefieldmiddle">'.$langs->trans("Parameter").'</td>';
print '<td>'.$langs->trans("Value").'</td>';
print "</tr>";

View File

@ -180,10 +180,10 @@ if (!$defaultsyslogfacility) {
if (!$defaultsyslogfile) {
$defaultsyslogfile = 'dolibarr.log';
}
if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) {
$optionmc = '';
if (!empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $user->entity) {
print '<div class="error">'.$langs->trans("ContactSuperAdminForChange").'</div>';
$option = 'disabled';
$optionmc = 'disabled';
}
@ -199,7 +199,7 @@ print '<input type="hidden" name="action" value="set">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Type").'</td><td>'.$langs->trans("Value").'</td>';
print '<td class="right" colspan="2"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
print '<td class="right" colspan="2"><input type="submit" class="button" '.$optionmc.' value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
foreach ($syslogModules as $moduleName) {
@ -279,11 +279,11 @@ print '<input type="hidden" name="action" value="setlevel">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
print '<td class="right"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
print '<td class="right"><input type="submit" class="button" '.$optionmc.' value="'.$langs->trans("Modify").'"></td>';
print "</tr>\n";
print '<tr class="oddeven"><td width="140">'.$langs->trans("SyslogLevel").'</td>';
print '<td colspan="2"><select class="flat" name="level" '.$option.'>';
print '<td colspan="2"><select class="flat" name="level" '.$optionmc.'>';
print '<option value="'.LOG_EMERG.'" '.($conf->global->SYSLOG_LEVEL == LOG_EMERG ? 'SELECTED' : '').'>LOG_EMERG ('.LOG_EMERG.')</option>';
print '<option value="'.LOG_ALERT.'" '.($conf->global->SYSLOG_LEVEL == LOG_ALERT ? 'SELECTED' : '').'>LOG_ALERT ('.LOG_ALERT.')</option>';
print '<option value="'.LOG_CRIT.'" '.($conf->global->SYSLOG_LEVEL == LOG_CRIT ? 'SELECTED' : '').'>LOG_CRIT ('.LOG_CRIT.')</option>';

View File

@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir) {
// Defaut
print '<td class="center">';
if ($conf->global->USER_ADDON_PDF == $name) {
if (getDolGlobalString('USER_ADDON_PDF_ODT') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&amp;token='.newToken().'&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@ -93,27 +93,24 @@ foreach ($object->fields as $key => $val) {
}
}
// Definition of fields for list
// Definition of array of fields for columns
$arrayfields = array();
foreach ($object->fields as $key => $val) {
// If $val['visible']==0, then we never show the field
if (!empty($val['visible'])) {
$arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']);
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
);
}
}
// Extra fields
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
if (!empty($extrafields->attributes[$object->table_element]['list'][$key])) {
$arrayfields["ef.".$key] = array(
'label'=>$extrafields->attributes[$object->table_element]['label'][$key],
'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1),
'position'=>$extrafields->attributes[$object->table_element]['pos'][$key],
'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key])
);
}
}
}
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -155,7 +152,7 @@ if (empty($reshook)) {
foreach ($object->fields as $key => $val) {
$search[$key] = '';
}
$toselect = '';
$toselect = array();
$search_array_options = array();
}
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
@ -279,11 +276,8 @@ $form = new Form($db);
$now = dol_now();
$help_url = 'EN:Module_BOM';
$title = $langs->trans('ListOfBOMs');
llxHeader('', $title, $help_url);
// Build and execute select
// --------------------------------------------------------------------
@ -345,7 +339,9 @@ foreach($object->fields as $key => $val)
}
// Add fields from extrafields
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : '');
}
}
// Add where from hooks
$parameters=array();
@ -395,7 +391,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
// Output page
// --------------------------------------------------------------------
// llxHeader('', $title, $help_url);
llxHeader('', $title, $help_url);
$arrayofselected = is_array($toselect) ? $toselect : array();
@ -508,9 +504,9 @@ foreach ($object->fields as $key => $val) {
if (!empty($arrayfields['t.'.$key]['checked'])) {
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth150', 1);
} elseif (strpos($val['type'], 'integer:') === 0) {
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1);
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1);
} elseif (!preg_match('/^(date|timestamp)/', $val['type'])) {
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
}

View File

@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
//require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
//require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
/**
* Class for BOM
*/
@ -786,7 +787,7 @@ class BOM extends CommonObject
$label .= '<br>';
$label .= '<b>'.$langs->trans('Ref').':</b> '.$this->ref;
$url = dol_buildpath('/bom/bom_card.php', 1).'?id='.$this->id;
$url = DOL_URL_ROOT.'/bom/bom_card.php?id='.$this->id;
if ($option != 'nolink') {
// Add param to save lastsearch_values or not

View File

@ -382,6 +382,7 @@ class ActionComm extends CommonObject
*/
const EVENT_FINISHED = 100;
/**
* Constructor
*
@ -752,7 +753,7 @@ class ActionComm extends CommonObject
$sql .= " a.durationp,"; // deprecated
$sql .= " a.datec,";
$sql .= " a.tms as datem,";
$sql .= " a.code, a.label, a.note,";
$sql .= " a.code, a.label, a.note as note_private,";
$sql .= " a.fk_soc,";
$sql .= " a.fk_project,";
$sql .= " a.fk_user_author, a.fk_user_mod,";
@ -811,8 +812,8 @@ class ActionComm extends CommonObject
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
$this->note = $obj->note; // deprecated
$this->note_private = $obj->note;
$this->note = $obj->note_private; // deprecated
$this->note_private = $obj->note_private;
$this->percentage = $obj->percentage;
$this->authorid = $obj->fk_user_author;
@ -1822,7 +1823,7 @@ class ActionComm extends CommonObject
$sql .= " a.datep2,"; // End
$sql .= " a.durationp,"; // deprecated
$sql .= " a.datec, a.tms as datem,";
$sql .= " a.label, a.code, a.note, a.fk_action as type_id,";
$sql .= " a.label, a.code, a.note as note_private, a.fk_action as type_id,";
$sql .= " a.fk_soc,";
$sql .= " a.fk_user_author, a.fk_user_mod,";
$sql .= " a.fk_user_action,";
@ -1950,7 +1951,7 @@ class ActionComm extends CommonObject
$duration = ($datestart && $dateend) ? ($dateend - $datestart) : 0;
$event['summary'] = $obj->label.($obj->socname ? " (".$obj->socname.")" : "");
$event['desc'] = $obj->note;
$event['desc'] = $obj->note_private;
$event['startdate'] = $datestart;
$event['enddate'] = $dateend; // Not required with type 'journal'
$event['duration'] = $duration; // Not required with type 'journal'

View File

@ -363,9 +363,9 @@ if ($action == 'show_day') {
//print dol_print_date($firstdaytoshow,'dayhour').' '.dol_print_date($lastdaytoshow,'dayhour');
/*$title = $langs->trans("DoneAndToDoActions");
if ($status == 'done') $title = $langs->trans("DoneActions");
if ($status == 'todo') $title = $langs->trans("ToDoActions");
*/
if ($status == 'done') $title = $langs->trans("DoneActions");
if ($status == 'todo') $title = $langs->trans("ToDoActions");
*/
$param = '';
if ($actioncode || GETPOSTISSET('search_actioncode')) {
@ -454,13 +454,13 @@ $param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : '');
/*$tabactive = '';
if ($action == 'show_month') $tabactive = 'cardmonth';
if ($action == 'show_week') $tabactive = 'cardweek';
if ($action == 'show_day') $tabactive = 'cardday';
if ($action == 'show_list') $tabactive = 'cardlist';
if ($action == 'show_pertuser') $tabactive = 'cardperuser';
if ($action == 'show_pertype') $tabactive = 'cardpertype';
*/
if ($action == 'show_month') $tabactive = 'cardmonth';
if ($action == 'show_week') $tabactive = 'cardweek';
if ($action == 'show_day') $tabactive = 'cardday';
if ($action == 'show_list') $tabactive = 'cardlist';
if ($action == 'show_pertuser') $tabactive = 'cardperuser';
if ($action == 'show_pertype') $tabactive = 'cardpertype';
*/
$paramnoaction = preg_replace('/action=[a-z_]+/', '', $param);
$paramnoactionodate = preg_replace('/action=[a-z_]+/', '', $paramnodate);
@ -502,14 +502,12 @@ $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="p
//$viewmode .= '</span>';
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewDay").'</span></a>';
$viewmode .= '<a class="btnTitle reposition marginrightonly" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
$viewmode .= '<a class="btnTitle reposition" href="'.DOL_URL_ROOT.'/comm/action/peruser.php?action=show_peruser&year='.dol_print_date($object->datep, '%Y').'&month='.dol_print_date($object->datep, '%m').'&day='.dol_print_date($object->datep, '%d').$paramnoactionodate.'">';
//$viewmode .= '<span class="fa paddingleft imgforviewmode valignmiddle btnTitle-icon">';
$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"');
//$viewmode .= '</span>';
$viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsmartphone">'.$langs->trans("ViewPerUser").'</span></a>';
$viewmode .= '<span class="marginrightonly"></span>';
// Add more views from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
@ -519,6 +517,8 @@ if (empty($reshook)) {
$viewmode = $hookmanager->resPrint;
}
$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools
$newcardbutton = '';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) {
@ -925,13 +925,13 @@ if ($showbirthday) {
$eventarray[$daykey][] = $event;
/*$loop = true;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
do {
$eventarray[$daykey][] = $event;
$daykey += 60 * 60 * 24;
if ($daykey > $event->date_end_in_calendar) $loop = false;
} while ($loop);
*/
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee);
do {
$eventarray[$daykey][] = $event;
$daykey += 60 * 60 * 24;
if ($daykey > $event->date_end_in_calendar) $loop = false;
} while ($loop);
*/
$i++;
}
} else {
@ -1543,13 +1543,13 @@ if (empty($action) || $action == 'show_month') { // View by month
echo " </td>\n";
/*
echo ' <div class="tagtr">';
echo ' <div class="tagtd width100"></div>';
echo ' <div class="tagtd center">';
echo show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, -1);
echo ' </div>'."\n";
echo " </div>\n";
*/
echo ' <div class="tagtr">';
echo ' <div class="tagtd width100"></div>';
echo ' <div class="tagtd center">';
echo show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, -1);
echo ' </div>'."\n";
echo " </div>\n";
*/
echo '</table>';
print '</div>';
@ -1793,7 +1793,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
} else {
if ($user->rights->agenda->allactions->create ||
(($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create)) {
$cssclass .= " movable cursormove";
$cssclass .= " movable cursormove";
} else {
$cssclass .= " unmovable";
}

View File

@ -391,7 +391,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // N
$sql .= $hookmanager->resPrint;
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_extrafields as ef ON (a.id = ef.fk_object) ";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_extrafields as ef ON (a.id = ef.fk_object)";
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
}
@ -578,8 +578,8 @@ if ($resql) {
//print dol_get_fiche_end();
// Add link to show birthdays
$link = '';
/*
$link = '';
if (empty($conf->use_javascript_ajax))
{
$newparam=$param; // newparam is for birthday links
@ -841,7 +841,7 @@ if ($resql) {
// Ref
if (!empty($arrayfields['a.id']['checked'])) {
print '<td>';
print '<td class="nowraponall">';
print $actionstatic->getNomUrl(1, -1);
print '</td>';
}

View File

@ -540,6 +540,7 @@ if ($object->id > 0) {
print "</td>";
print '</tr>';
}
// Warehouse
if (!empty($conf->stock->enabled) && !empty($conf->global->SOCIETE_ASK_FOR_WAREHOUSE)) {
$langs->load('stocks');
@ -552,11 +553,15 @@ if ($object->id > 0) {
if ($action == 'editwarehouse') {
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'fk_warehouse', 1);
} else {
if ($object->fk_warehouse > 0) {
print img_picto('', 'stock', 'class="paddingrightonly"');
}
$formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_warehouse, 'none');
}
print '</td>';
print '</tr>';
}
// Preferred shipping Method
if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD)) {
print '<tr><td class="nowrap">';

View File

@ -15,6 +15,7 @@
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2021 Anthony Berton <anthony.berton@bb2a.fr>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -216,15 +217,15 @@ $arrayfields = array(
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
$permissiontoread = $user->rights->propal->lire;
$permissiontoadd = $user->rights->propal->write;
$permissiontoadd = $user->rights->propal->creer;
$permissiontodelete = $user->rights->propal->supprimer;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
$permissiontovalidate = $user->rights->propale->propal_advance->validate;
$permissiontoclose = $user->rights->propale->propal_advance->close;
$permissiontosendbymail = $user->rights->propale->propal_advance->send;
} else {
$permissiontovalidate = $user->rights->propal->write;
$permissiontoclose = $user->rights->propal->write;
$permissiontovalidate = $user->rights->propal->creer;
$permissiontoclose = $user->rights->propal->creer;
}
@ -465,13 +466,13 @@ $sql .= " typent.code as typent_code,";
$sql .= " ava.rowid as availability,";
$sql .= " country.code as country_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
$sql .= ' p.rowid, p.entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.rowid, p.entity as propal_entity, p.note_private, p.total_ht, p.total_tva, p.total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut as status, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,';
$sql .= ' p.fk_multicurrency, p.multicurrency_code, p.multicurrency_tx, p.multicurrency_total_ht, p.multicurrency_total_tva, p.multicurrency_total_ttc,';
$sql .= ' p.datec as date_creation, p.tms as date_update, p.date_cloture as date_cloture,';
$sql .= ' p.note_public, p.note_private,';
$sql .= ' p.fk_cond_reglement,p.fk_mode_reglement,p.fk_shipping_method,p.fk_input_reason,';
$sql .= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,";
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
$sql .= ' u.login, u.lastname, u.firstname, u.email, u.statut, u.entity as user_entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender';
if (!$user->rights->societe->client->voir && !$socid) {
$sql .= ", sc.fk_soc, sc.fk_user";
}
@ -1321,6 +1322,11 @@ if ($resql) {
$now = dol_now();
$i = 0;
$totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array();
$totalarray['val']['p.total_ht'] = 0;
$totalarray['val']['p.total_tva'] = 0;
$totalarray['val']['p.total_ttc'] = 0;
$typenArray = null;
while ($i < min($num, $limit)) {
@ -1396,7 +1402,7 @@ if ($resql) {
// Other picto tool
print '<td width="16" class="nobordernopadding right">';
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref);
$filedir = $conf->propal->multidir_output[$obj->propal_entity].'/'.dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
print '</td></tr></table>';
@ -1705,7 +1711,7 @@ if ($resql) {
$userstatic->firstname = $obj->firstname;
$userstatic->email = $obj->email;
$userstatic->statut = $obj->statut;
$userstatic->entity = $obj->entity;
$userstatic->entity = $obj->user_entity;
$userstatic->photo = $obj->photo;
$userstatic->office_phone = $obj->office_phone;
$userstatic->office_fax = $obj->office_fax;

View File

@ -547,7 +547,11 @@ print dol_get_fiche_head($head, 'AccountancyFiles');
print '<form name="searchfiles" action="?action=searchfiles" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<span class="opacitymedium">'.$langs->trans("ExportAccountingSourceDocHelp", $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Journals")).'</span><br>';
print '<span class="opacitymedium">'.$langs->trans("ExportAccountingSourceDocHelp");
if (!empty($conf->accounting->enabled)) {
print ' '.$langs->trans("ExportAccountingSourceDocHelp2", $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Journals"));
}
print '</span><br>';
print '<br>';
print $langs->trans("ReportPeriod").': ';

View File

@ -120,12 +120,19 @@ foreach ($object->fields as $key => $val) {
}
}
// Definition of fields for list
// Definition of array of fields for columns
$arrayfields = array();
foreach ($object->fields as $key => $val) {
// If $val['visible']==0, then we never show the field
if (!empty($val['visible'])) {
$arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>$val['enabled'], 'position'=>$val['position']);
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=>$val['help']
);
}
}
// Extra fields
@ -134,6 +141,10 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
$object->fields = dol_sort_array($object->fields, 'position');
$arrayfields = dol_sort_array($arrayfields, 'position');
$permissiontoread = ($user->rights->cashdesk->run || $user->rights->takepos->run);
$permissiontoadd = ($user->rights->cashdesk->run || $user->rights->takepos->run);
$permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run);
// Security check
if ($user->socid > 0) { // Protection if external user
//$socid = $user->socid;
@ -186,9 +197,6 @@ if (empty($reshook)) {
// Mass actions
$objectclass = 'CashControl';
$objectlabel = 'CashControl';
$permissiontoread = ($user->rights->cashdesk->run || $user->rights->takepos->run);
$permissiontodelete = ($user->rights->cashdesk->run || $user->rights->takepos->run);
//$uploaddir = '';
//include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
@ -215,7 +223,7 @@ $sql .= $object->getFieldList('t');
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : '');
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key.', ' : '');
}
}
// Add fields from hooks
@ -224,7 +232,7 @@ $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $obje
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
$sql = preg_replace('/,\s*$/', '', $sql);
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
}
// Add table from hooks
@ -242,7 +250,7 @@ foreach ($search as $key => $val) {
continue;
}
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0)) {
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
if ($search[$key] == '-1' || $search[$key] === '0') {
$search[$key] = '';
}
@ -268,6 +276,7 @@ foreach ($search as $key => $val) {
if ($search_all) {
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
}
//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear);
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
// Add where from hooks
@ -382,7 +391,9 @@ $arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
);
//if ($user->rights->monmodule->delete) $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
//if ($permissiontodelete) {
// $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
//}
if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) {
$arrayofmassactions = array();
}
@ -450,24 +461,24 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
foreach ($object->fields as $key => $val) {
$cssforfield = (empty($val['css']) ? '' : $val['css']);
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('timestamp'))) {
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') {
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
$cssforfield .= ($cssforfield ? ' ' : '').'right';
}
if (!empty($arrayfields['t.'.$key]['checked'])) {
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:')=== 0)) {
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1);
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1);
} elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">';
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
print '<div class="nowrap">';
print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
@ -505,7 +516,7 @@ foreach ($object->fields as $key => $val) {
$cssforfield .= ($cssforfield ? ' ' : '').'center';
} elseif (in_array($val['type'], array('timestamp'))) {
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') {
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
$cssforfield .= ($cssforfield ? ' ' : '').'right';
}
if (!empty($arrayfields['t.'.$key]['checked'])) {
@ -519,13 +530,13 @@ $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
print '</tr>'."\n";
// Detect if we need a fetch on each output line
$needToFetchEachLine = 0;
if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
if (preg_match('/\$object/', $val)) {
$needToFetchEachLine++; // There is at least one compute field that use $object
@ -538,6 +549,7 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co
// --------------------------------------------------------------------
$i = 0;
$totalarray = array();
$totalarray['nbfield'] = 0;
while ($i < ($limit ? min($num, $limit) : $num)) {
$obj = $db->fetch_object($resql);
if (empty($obj)) {
@ -563,14 +575,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
}
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status'))) {
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) {
$cssforfield .= ($cssforfield ? ' ' : '').'right';
}
//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
if (!empty($arrayfields['t.'.$key]['checked'])) {
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>';
if ($key == 'status') {
print $object->getLibStatut(5);
} elseif ($key == 'rowid') {
print $object->showOutputField($val, $key, $object->id, '');
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}
@ -605,14 +620,14 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
if (in_array($object->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
print '</tr>';
print '</tr>'."\n";
$i++;
}

View File

@ -80,7 +80,7 @@ class CashControl extends CommonObject
* Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor.
*/
public $fields = array(
'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>10),
'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>10),
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>15),
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>18),
'posmodule' =>array('type'=>'varchar(30)', 'label'=>'Module', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>19),
@ -96,7 +96,7 @@ class CashControl extends CommonObject
'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>502),
'tms' =>array('type'=>'timestamp', 'label'=>'Tms', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>505),
'fk_user_creat' =>array('type'=>'integer:User', 'label'=>'userCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>600),
'fk_user_creat' =>array('type'=>'integer:User', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>600),
'fk_user_valid' =>array('type'=>'integer:User', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>602),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'Import key', 'enabled'=>1, 'visible'=>0, 'position'=>700),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validated')),
@ -414,7 +414,7 @@ class CashControl extends CommonObject
$newref = ($this->ref ? $this->ref : $this->id);
$label = '<u>'.$langs->trans("CashFence").'</u>';
$label = '<u>'.$langs->trans("CashControl").'</u>';
$label .= '<br>';
$label .= '<b>'.$langs->trans('Ref').':</b> '.($this->ref ? $this->ref : $this->id);

View File

@ -177,7 +177,7 @@ if ($resql) {
$invoicetmp = new Facture($db);
print "<div style='text-align: right'><h2>";
print $langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").' : <span class="amount">'.price($object->opening).'</span>';
print $langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").' : <div class="inline-block amount width100">'.price($object->opening).'</div>';
print "</h2></div>";
print '<div class="div-table-responsive">';
@ -200,6 +200,9 @@ if ($resql) {
$totalqty = 0;
$totalvat = 0;
$totalvatperrate = array();
$totallocaltax1 = 0;
$totallocaltax2 = 0;
$cachebankaccount = array();
$cacheinvoiceid = array();
$transactionspertype = array();
@ -226,6 +229,14 @@ if ($resql) {
foreach ($invoicetmp->lines as $line) {
$totalqty += $line->qty;
$totalvat += $line->total_tva;
if ($line->tva_tx) {
if (empty($totalvatperrate[$line->tva_tx])) {
$totalvatperrate[$line->tva_tx] = 0;
}
$totalvatperrate[$line->tva_tx] += $line->total_tva;
}
$totallocaltax1 += $line->total_localtax1;
$totallocaltax2 += $line->total_localtax2;
}
}
@ -348,35 +359,49 @@ if ($resql) {
print '<div style="text-align: right">';
print '<h2>';
print $langs->trans("Cash").' '.($transactionspertype['CASH'] ? '('.$transactionspertype['CASH'].')' : '').': <span class="amount">'.price($cash).'</span>';
print $langs->trans("Cash").($transactionspertype['CASH'] ? ' ('.$transactionspertype['CASH'].')' : '').' : <div class="inline-block amount width100">'.price($cash).'</div>';
if ($object->status == $object::STATUS_VALIDATED && $cash != $object->cash) {
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($object->cash).'</span>';
print ' <> <div class="inline-block amountremaintopay fontsizeunset">'.$langs->trans("Declared").': '.price($object->cash).'</div>';
}
print "<br>";
//print '<br>';
print $langs->trans("PaymentTypeCHQ").' '.($transactionspertype['CHQ'] ? '('.$transactionspertype['CHQ'].')' : '').': <span class="amount">'.price($cheque).'</span>';
print $langs->trans("PaymentTypeCHQ").($transactionspertype['CHQ'] ? ' ('.$transactionspertype['CHQ'].')' : '').' : <div class="inline-block amount width100">'.price($cheque).'</div>';
if ($object->status == $object::STATUS_VALIDATED && $cheque != $object->cheque) {
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($object->cheque).'</span>';
print ' <> <div class="inline-block amountremaintopay fontsizeunset">'.$langs->trans("Declared").' : '.price($object->cheque).'</div>';
}
print "<br>";
//print '<br>';
print $langs->trans("PaymentTypeCB").' '.($transactionspertype['CB'] ? '('.$transactionspertype['CB'].')' : '').': <span class="amount">'.price($bank).'</span>';
print $langs->trans("PaymentTypeCB").($transactionspertype['CB'] ? ' ('.$transactionspertype['CB'].')' : '').' : <div class="inline-block amount width100">'.price($bank).'</div>';
if ($object->status == $object::STATUS_VALIDATED && $bank != $object->card) {
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($object->card).'</span>';
print ' <> <div class="inline-block amountremaintopay fontsizeunset">'.$langs->trans("Declared").': '.price($object->card).'</div>';
}
print "<br>";
// print '<br>';
if ($other) {
print ''.$langs->trans("Other").' '.($transactionspertype['OTHER'] ? '('.$transactionspertype['OTHER'].')' : '').': <span class="amount">'.price($other)."</span>";
print ''.$langs->trans("Other").($transactionspertype['OTHER'] ? ' ('.$transactionspertype['OTHER'].')' : '').' : <div class="inline-block amount width100">'.price($other)."</div>";
print '<br>';
}
print $langs->trans("Total").' ('.$totalqty.' '.$langs->trans("Articles").') : <span class="amount">'.price($cash + $cheque + $bank + $other).'</span>';
print '<br>'.$langs->trans("TotalVAT").' : <span class="amount">'.price($totalvat).'</span>';
// TODO Add total localtaxes.
print $langs->trans("Total").' ('.$totalqty.' '.$langs->trans("Articles").') : <div class="inline-block amount width100">'.price($cash + $cheque + $bank + $other).'</div>';
print '<br>'.$langs->trans("TotalVAT").' : <div class="inline-block amount width100">'.price($totalvat).'</div>';
if ($mysoc->useLocalTax(1)) {
print '<br>'.$langs->trans("TotalLT1").' : <div class="inline-block amount width100">'.price($totallocaltax1).'</div>';
}
if ($mysoc->useLocalTax(1)) {
print '<br>'.$langs->trans("TotalLT2").' : <div class="inline-block amount width100">'.price($totallocaltax2).'</div>';
}
if (!empty($totalvatperrate) && is_array($totalvatperrate)) {
print '<br><br><div class="small inline-block">'.$langs->trans("VATRate").'</div>';
foreach ($totalvatperrate as $keyrate => $valuerate) {
print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, 1).' : <div class="inline-block amount width100">'.price($valuerate).'</div></div>';
}
}
print '</h2>';
print '</div>';

View File

@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load translation files required by the page
$langs->loadLangs(array('bills', 'compta', 'admin', 'other', 'products', 'banks'));
$langs->loadLangs(array('bills', 'companies', 'compta', 'admin', 'other', 'products', 'banks'));
$action = GETPOST('action', 'alpha');
$massaction = GETPOST('massaction', 'alpha');
@ -193,11 +193,11 @@ if (empty($reshook)) {
$action = "create";
$error++;
}
if ($nb_gen_max === '') {
/*if ($nb_gen_max === '') {
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("MaxPeriodNumber")), null, 'errors');
$action = "create";
$error++;
}
}*/
}
if (!$error) {
@ -964,7 +964,7 @@ if ($action == 'create') {
// Title
print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Title").'</td><td>';
print '<input class="flat quatrevingtpercent" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("titre", 'alphanohtml')).'">';
print '<input class="flat quatrevingtpercent" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'">';
print '</td></tr>';
// Third party

View File

@ -193,7 +193,7 @@ if (empty($reshook)) {
exit();
} else {
$langs->load("errors");
setEventMessages($object->error, $object->errors, 'errors');
setEventMessages($objectutil->error, $objectutil->errors, 'errors');
$action = '';
}
} elseif ($action == 'reopen' && $usercanreopen) {
@ -3061,7 +3061,7 @@ if ($action == 'create') {
} else {
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td>';
print '<td colspan="2">';
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300');
print img_picto('', 'company').$form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300 widthcentpercentminusxx maxwidth500');
// Option to reload page to retrieve customer informations.
if (empty($conf->global->RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED)) {
print '<script type="text/javascript">
@ -3782,7 +3782,6 @@ if ($action == 'create') {
// Button "Create Draft"
print '<div class="center">';
print '<input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
print '</div>';

View File

@ -772,10 +772,10 @@ class FactureRec extends CommonInvoice
$main = MAIN_DB_PREFIX.'facturedet_rec';
$ef = $main."_extrafields";
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM ".$main." WHERE fk_facture = ".((int) $rowid);
dol_syslog($sqlef);
$sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM ".$main." WHERE fk_facture = ".((int) $rowid).")";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".((int) $rowid);
dol_syslog($sql);
if ($this->db->query($sqlef) && $this->db->query($sql)) {
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".((int) $rowid);
dol_syslog($sql);

View File

@ -1235,14 +1235,20 @@ class Facture extends CommonInvoice
$result = $object->create($user);
if ($result < 0) {
$error++;
$this->error = $object->error;
$this->errors = $object->errors;
} else {
// copy internal contacts
if ($object->copy_linked_contact($this, 'internal') < 0) {
$error++;
$this->error = $object->error;
$this->errors = $object->errors;
} elseif ($this->socid == $object->socid) {
// copy external contacts if same company
if ($object->copy_linked_contact($this, 'external') < 0) {
$error++;
$this->error = $object->error;
$this->errors = $object->errors;
}
}
}

View File

@ -565,7 +565,7 @@ if ($resql) {
1=>$langs->trans("Active"),
-1=>$langs->trans("Disabled"),
);
print $form->selectarray('search_status', $liststatus, $search_status, -2);
print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100');
print '</td>';
}
// Action column

View File

@ -372,9 +372,9 @@ foreach ($data as $val) {
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$oldyear.'</a></td>';
print '<td class="right">0</td>';
print '<td class="right"></td>';
print '<td class="right">0</td>';
print '<td class="right amount">0</td>';
print '<td class="right"></td>';
print '<td class="right">0</td>';
print '<td class="right amount">0</td>';
print '<td class="right"></td>';
print '</tr>';
}

View File

@ -84,8 +84,15 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
echo '<strike>'.price($objectlink->total_ht).'</strike>';
}
}
print '</td>';
print '<td class="linkedcol-statut right">';
if (method_exists($objectlink, 'getSommePaiement')) {
print $objectlink->getLibStatut(3, $objectlink->getSommePaiement());
} else {
print $objectlink->getLibStatut(3);
}
print '</td>';
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
print '<td class="linkedcol-action right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
print "</tr>\n";
}

View File

@ -59,7 +59,7 @@ llxHeader('', $langs->trans("CustomersStandingOrdersArea"));
if (prelevement_check_config() < 0) {
$langs->load("errors");
setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors');
setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("PaymentByDirectDebit")), null, 'errors');
}
print load_fiche_titre($langs->trans("CustomersStandingOrdersArea"));

View File

@ -495,14 +495,14 @@ if ($user->rights->societe->client->voir || $socid) {
$langs->load("commercial");
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('ThirdPartiesOfSaleRepresentative');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$formother->select_salesrepresentatives($search_sale, 'search_sale', $user, 0, $tmptitle, 'widthcentpercentminusx maxwidth300');
$moreforfilter .= '</div>';
}
// If the user can view other users
if ($user->rights->user->user->lire) {
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('LinkedToSpecificUsers');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'widthcentpercentminusx maxwidth300');
$moreforfilter .= '</div>';
}
// If the user can view categories of products
@ -511,7 +511,7 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($use
$moreforfilter .= '<div class="divsearchfield">';
$tmptitle = $langs->trans('IncludingProductWithTag');
$cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, null, 'parent', null, null, 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1);
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'widthcentpercentminusx maxwidth300', 1);
$moreforfilter .= '</div>';
}

View File

@ -236,6 +236,9 @@ class box_funnel_of_prospection extends ModeleBoxes
$dolgraph->SetDataColor(array_values($colorseriesstat));
$dolgraph->setBorderColor(array_values($bordercolorseries));
$dolgraph->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px1->SetWidth(320);
}
$dolgraph->setShowPercent(1);
$dolgraph->setMirrorGraphValues(true);
$dolgraph->setBorderWidth(2);

View File

@ -165,6 +165,9 @@ class box_graph_nb_tickets_type extends ModeleBoxes
}
$px1->SetData($data);
$px1->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px1->SetWidth(320);
}
$px1->SetType(array('pie'));
$px1->SetLegend($legend);
$px1->SetMaxValue($px1->GetCeilMaxValue());

View File

@ -137,6 +137,9 @@ class box_graph_new_vs_close_ticket extends ModeleBoxes
$px1->SetDataColor(array_values($colorseries));
$px1->SetData($data);
$px1->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px1->SetWidth(320);
}
$px1->SetType(array('pie'));
$px1->SetMaxValue($px1->GetCeilMaxValue());
$px1->SetShading(3);

View File

@ -192,6 +192,9 @@ class box_graph_product_distribution extends ModeleBoxes
}
$px2->SetLegend($legend);
$px2->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px2->SetWidth(320);
}
$px2->setShowPointValue($showpointvalue);
$px2->setShowPercent(0);
$px2->SetMaxValue($px2->GetCeilMaxValue());
@ -252,6 +255,9 @@ class box_graph_product_distribution extends ModeleBoxes
}
$px3->SetLegend($legend);
$px3->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px3->SetWidth(320);
}
$px3->setShowPointValue($showpointvalue);
$px3->setShowPercent(0);
$px3->SetMaxValue($px3->GetCeilMaxValue());
@ -313,6 +319,9 @@ class box_graph_product_distribution extends ModeleBoxes
}
$px1->SetLegend($legend);
$px1->setShowLegend(2);
if (!empty($conf->dol_optimize_smallscreen)) {
$px1->SetWidth(320);
}
$px1->setShowPointValue($showpointvalue);
$px1->setShowPercent(0);
$px1->SetMaxValue($px1->GetCeilMaxValue());
@ -408,7 +417,7 @@ class box_graph_product_distribution extends ModeleBoxes
$stringtoshow .= '</div></div>';
}
$this->info_box_contents[0][0] = array(
'tr'=>'class="oddeven nohover"',
'tr' => 'class="oddeven nohover"',
'td' => 'class="nohover center"',
'textnoformat'=>$stringtoshow,
);

View File

@ -176,7 +176,6 @@ class box_graph_ticket_by_severity extends ModeleBoxes
}
$px1->SetData($data);
//$px1->setShowLegend(2);
$px1->setShowLegend(0);
$px1->SetType(array('bars'));
$px1->SetLegend($legend);

View File

@ -145,7 +145,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Subject
$this->info_box_contents[$i][$r] = array(
'td' => 'class="nowrap"',
'td' => 'class="nowrap tdoverflowmax150"',
'text' => $objp->subject, // Some event have no ref
'url' => DOL_URL_ROOT."/ticket/card.php?track_id=".$objp->track_id,
);
@ -153,7 +153,7 @@ class box_last_modified_ticket extends ModeleBoxes
// Customer
$this->info_box_contents[$i][$r] = array(
'td' => 'class="tdoverflowmax150 maxwidth300onsmartphone"',
'td' => 'class="tdoverflowmax150"',
'text' => $link,
'asis' => 1,
);

View File

@ -229,7 +229,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
$out .= '>';
if (!empty($conf->use_javascript_ajax)) {
//$out.= '<table summary="" class="nobordernopadding" width="100%"><tr><td class="tdoverflowmax150 maxwidth150onsmartphone">';
$out .= '<div class="tdoverflowmax250 maxwidth150onsmartphone float">';
$out .= '<div class="tdoverflowmax400 maxwidth250onsmartphone float">';
}
if (!empty($head['text'])) {
$s = dol_trunc($head['text'], isset($head['limit']) ? $head['limit'] : $MAXLENGTHBOX);

View File

@ -1095,7 +1095,7 @@ abstract class CommonObject
$this->db->rollback();
return -2;
} else {
$this->error = $this->db->error();
$this->error = $this->db->lasterror();
$this->db->rollback();
return -1;
}
@ -1119,7 +1119,6 @@ abstract class CommonObject
$contacts = $objFrom->liste_contact(-1, $source);
foreach ($contacts as $contact) {
if ($this->add_contact($contact['id'], $contact['fk_c_type_contact'], $contact['source']) < 0) {
$this->error = $this->db->lasterror();
return -1;
}
}
@ -5760,8 +5759,10 @@ abstract class CommonObject
$table_element = 'categories'; // For compatibility
}
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$table_element."_extrafields WHERE fk_object = ".$this->id;
dol_syslog(get_class($this)."::deleteExtraFields delete", LOG_DEBUG);
$sql_del = "DELETE FROM ".MAIN_DB_PREFIX.$table_element."_extrafields WHERE fk_object = ".$this->id;
$resql = $this->db->query($sql_del);
if (!$resql) {
$this->error = $this->db->lasterror();
@ -5835,7 +5836,8 @@ abstract class CommonObject
$mandatorypb = true;
}
if ($mandatorypb) {
dol_syslog("Mandatory extra field ".$key." is empty");
$langs->load("errors");
dol_syslog("Mandatory field '".$key."' is empty during create and set to required into definition of extrafields");
$this->errors[] = $langs->trans('ErrorFieldRequired', $attributeLabel);
return -1;
}
@ -6201,7 +6203,8 @@ abstract class CommonObject
$mandatorypb = true;
}
if ($mandatorypb) {
dol_syslog("Mandatory extra field options_".$key." is empty");
$langs->load("errors");
dol_syslog("Mandatory field 'options_".$key."' is empty during update and set to required into definition of extrafields");
$this->errors[] = $langs->trans('ErrorFieldRequired', $attributeLabel);
return -1;
}
@ -8380,12 +8383,14 @@ abstract class CommonObject
if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && is_null($this->fields[$key]['default'])) {
$error++;
$langs->load("errors");
dol_syslog("Mandatory field '".$key."' is empty and required into ->fields definition of class");
$this->errors[] = $langs->trans("ErrorFieldRequired", $this->fields[$key]['label']);
}
// If value is null and there is a default value for field
if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && !is_null($this->fields[$key]['default'])) {
$values[$key] = $this->fields[$key]['default'];
$values[$key] = $this->quote($this->fields[$key]['default'], $this->fields[$key]);
}
// If field is an implicit foreign key field
@ -8425,7 +8430,7 @@ abstract class CommonObject
// If we have a field ref with a default value of (PROV)
if (!$error) {
if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') {
if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && key_exists('default', $this->fields['ref']) && $this->fields['ref']['default'] == '(PROV)') {
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".((int) $this->id);
$resqlupdate = $this->db->query($sql);
@ -8463,7 +8468,7 @@ abstract class CommonObject
$result = $line->create($user, 1);
if ($result < 0) {
$this->error = $this->db->lasterror();
$this->error = $line->error;
$this->db->rollback();
return -1;
}
@ -8494,8 +8499,8 @@ abstract class CommonObject
/**
* Load object in memory from the database
*
* @param int $id Id object
* @param string $ref Ref
* @param int $id Id object
* @param string $ref Ref
* @param string $morewhere More SQL filters (' AND ...')
* @return int <0 if KO, 0 if not found, >0 if OK
*/
@ -8537,6 +8542,7 @@ abstract class CommonObject
// Retrieve all extrafield
// fetch optionals attributes and labels
$this->fetch_optionals();
dol_syslog("aaa=".$this->id);
return $this->id;
} else {
@ -8804,8 +8810,8 @@ abstract class CommonObject
if (!$error) {
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE rowid='.((int) $this->id);
$res = $this->db->query($sql);
if ($res === false) {
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = $this->db->lasterror();
}

File diff suppressed because it is too large Load Diff

View File

@ -7791,8 +7791,13 @@ class Form
$i++;
}
print '</table>';
print '<div class="center"><input type="submit" class="button valignmiddle" value="'.$langs->trans('ToLink').'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
print '<div class="center">';
print '<input type="submit" class="button valignmiddle marginleftonly marginrightonly" value="'.$langs->trans('ToLink').'">';
if (empty($conf->use_javascript_ajax)) {
print '<input type="submit" class="button button-cancel marginleftonly marginrightonly" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
} else {
print '<input type="submit"; onclick="javascript:jQuery(\'#'.$key.'list\').toggle(); return false;" class="button button-cancel marginleftonly marginrightonly" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
}
print '</form>';
$this->db->free($resqllist);
} else {
@ -7833,7 +7838,7 @@ class Form
<script>
jQuery(document).ready(function() {
jQuery(".linkto").click(function() {
console.log("We choose to show/hide link for rel="+jQuery(this).attr(\'rel\'));
console.log("We choose to show/hide links for rel="+jQuery(this).attr(\'rel\')+" so #"+jQuery(this).attr(\'rel\')+"list");
jQuery("#"+jQuery(this).attr(\'rel\')+"list").toggle();
});
});

View File

@ -213,7 +213,7 @@ class FormBarCode
$out .= '<tr><td>';
$out .= $this->selectBarcodeType($selected, $htmlname, 1);
$out .= '</td>';
$out .= '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
$out .= '<td class="left"><input type="submit" class="button smallpaddingimp" value="'.$langs->trans("Modify").'">';
$out .= '</td></tr></table></form>';
}
return $out;

View File

@ -316,6 +316,7 @@ class FormFile
if ($nooutput) {
return $out;
} else {
print $out;
return 1;
}
}
@ -846,7 +847,7 @@ class FormFile
}
// Show file name with link to download
$out .= '<td class="minwidth200">';
$out .= '<td class="minwidth200 tdoverflowmax300">';
$out .= '<a class="documentdownload paddingright" href="'.$documenturl.'?modulepart='.$modulepart.'&amp;file='.urlencode($relativepath).($param ? '&'.$param : '').'"';
$mime = dol_mimetype($relativepath, '', 0);
@ -869,7 +870,7 @@ class FormFile
$out .= '<td class="nowrap right">'.dol_print_date($date, 'dayhour', 'tzuser').'</td>';
// Show share link
$out .= '<td class="nowrap">';
$out .= '<td class="nowraponall">';
if (!empty($file['share'])) {
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
@ -889,7 +890,7 @@ class FormFile
$fulllink = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : '');
$out .= img_picto($langs->trans("FileSharedViaALink"), 'globe').' ';
$out .= '<input type="text" class="quatrevingtpercent width75" id="downloadlink'.$file['rowid'].'" name="downloadexternallink" title="'.dol_escape_htmltag($langs->trans("FileSharedViaALink")).'" value="'.dol_escape_htmltag($fulllink).'">';
$out .= '<input type="text" class="quatrevingtpercentminusx width75" id="downloadlink'.$file['rowid'].'" name="downloadexternallink" title="'.dol_escape_htmltag($langs->trans("FileSharedViaALink")).'" value="'.dol_escape_htmltag($fulllink).'">';
$out .= ajax_autoselect('downloadlink'.$file['rowid']);
} else {
//print '<span class="opacitymedium">'.$langs->trans("FileNotShared").'</span>';

View File

@ -110,7 +110,7 @@ class FormOther
* @param string $htmlname Nom de la zone select
* @param string $type Type des modeles recherches
* @param int $useempty Show an empty value in list
* @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on)
* @param int $fk_user User we want templates
* @return void
*/
public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null)
@ -121,8 +121,8 @@ class FormOther
$sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
$sql .= " WHERE type = '".$this->db->escape($type)."'";
if (!empty($fk_user)) {
$sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
if (empty($conf->global->EXPORTS_SHARE_MODELS)) { // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner.
$sql .= " AND fk_user IN (0, ".((int) $fk_user).")";
}
$sql .= " ORDER BY label";
$result = $this->db->query($sql);
@ -132,6 +132,8 @@ class FormOther
print '<option value="-1">&nbsp;</option>';
}
$tmpuser = new User($this->db);
$num = $this->db->num_rows($result);
$i = 0;
while ($i < $num) {
@ -140,8 +142,7 @@ class FormOther
$label = $obj->label;
if ($obj->fk_user == 0) {
$label .= ' <span class="opacitymedium">('.$langs->trans("Everybody").')</span>';
} elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
$tmpuser = new User($this->db);
} elseif ($obj->fk_user > 0) {
$tmpuser->fetch($obj->fk_user);
$label .= ' <span class="opacitymedium">('.$tmpuser->getFullName($langs).')</span>';
}
@ -171,7 +172,7 @@ class FormOther
* @param string $htmlname Nom de la zone select
* @param string $type Type des modeles recherches
* @param int $useempty Affiche valeur vide dans liste
* @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on)
* @param int $fk_user User that has created the template
* @return void
*/
public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null)
@ -182,10 +183,10 @@ class FormOther
$sql = "SELECT rowid, label, fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."import_model";
$sql .= " WHERE type = '".$this->db->escape($type)."'";
if (!empty($fk_user)) {
$sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model
if (empty($conf->global->EXPORTS_SHARE_MODELS)) { // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner.
$sql .= " AND fk_user IN (0, ".((int) $fk_user).")";
}
$sql .= " ORDER BY rowid";
$sql .= " ORDER BY label";
$result = $this->db->query($sql);
if ($result) {
print '<select class="flat minwidth200" name="'.$htmlname.'" id="'.$htmlname.'">';
@ -193,6 +194,8 @@ class FormOther
print '<option value="-1">&nbsp;</option>';
}
$tmpuser = new User($this->db);
$num = $this->db->num_rows($result);
$i = 0;
while ($i < $num) {
@ -201,8 +204,7 @@ class FormOther
$label = $obj->label;
if ($obj->fk_user == 0) {
$label .= ' <span class="opacitymedium">('.$langs->trans("Everybody").')</span>';
} elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) {
$tmpuser = new User($this->db);
} elseif ($obj->fk_user > 0) {
$tmpuser->fetch($obj->fk_user);
$label .= ' <span class="opacitymedium">('.$tmpuser->getFullName($langs).')</span>';
}

View File

@ -204,7 +204,7 @@ class Translate
dol_print_error('', get_class($this)."::Load ErrorWrongParameters");
return -1;
}
if ($this->defaultlang == 'none_NONE') {
if ($this->defaultlang === 'none_NONE') {
return 0; // Special language code to not translate keys
}

View File

@ -211,7 +211,7 @@ class DoliDBPgsql extends DoliDB
$line = preg_replace('/tinyint/i', 'smallint', $line);
// nuke unsigned
$line = preg_replace('/(int\w+|smallint)\s+unsigned/i', '\\1', $line);
$line = preg_replace('/(int\w+|smallint|bigint)\s+unsigned/i', '\\1', $line);
// blob -> text
$line = preg_replace('/\w*blob/i', 'text', $line);
@ -757,6 +757,7 @@ class DoliDBPgsql extends DoliDB
$errorlabel = pg_last_error($this->db);
$errorcode = '';
$reg = array();
if (preg_match('/: *([0-9P]+):/', $errorlabel, $reg)) {
$errorcode = $reg[1];
if (isset($errorcode_map[$errorcode])) {

View File

@ -36,6 +36,7 @@ if ($resql) { // This can fail when class is used on old database (during mig
case 'boolean':
$typeFilter = "Boolean";
break;
case 'checkbox':
case 'select':
if (!empty($conf->global->EXPORT_LABEL_FOR_SELECT)) {
$tmpparam = unserialize($obj->param); // $tmpparam may be array with 'options' = array(key1=>val1, key2=>val2 ...)

View File

@ -71,8 +71,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
if ($canedit) {
print '<div class="divsearchfield">';
// Type
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;" title="'.$langs->trans("Type").'"></span>';
print '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;" title="'.$langs->trans("ActionType").'"></span>';
$multiselect = 0;
if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) { // We use an option here because it adds bugs when used on agenda page "peruser" and "list"
$multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE));
@ -80,14 +81,16 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500');
print '</div>';
// Assigned to
// Assigned to user
print '<div class="divsearchfield">';
print img_picto($langs->trans("ActionsToDoBy"), 'user', 'class="fawidth30 inline-block"');
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500 widthcentpercentminusxx');
print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'minwidth150 maxwidth500 widthcentpercentminusxx');
print '</div>';
// Assigned to user group
print '<div class="divsearchfield">';
print img_picto($langs->trans("ToUserOfGroup"), 'object_group', 'class="fawidth30 inline-block"');
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500');
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'minwidth100 maxwidth500 widthcentpercentminusxx');
print '</div>';
if ($conf->resource->enabled) {

View File

@ -715,10 +715,7 @@ function getCountriesInEEC()
global $conf, $db;
$country_code_in_EEC = array();
if (!empty($conf->global->MAIN_COUNTRIES_IN_EEC)) {
// For example MAIN_COUNTRIES_IN_EEC = 'AT,BE,BG,CY,CZ,DE,DK,EE,ES,FI,FR,GB,GR,HR,NL,HU,IE,IM,IT,LT,LU,LV,MC,MT,PL,PT,RO,SE,SK,SI,UK'
$country_code_in_EEC = explode(',', $conf->global->MAIN_COUNTRIES_IN_EEC);
} elseif (!empty($conf->cache['country_code_in_EEC'])) {
if (!empty($conf->cache['country_code_in_EEC'])) {
// Use of cache to reduce number of database requests
$country_code_in_EEC = $conf->cache['country_code_in_EEC'];
} else {

View File

@ -1739,10 +1739,10 @@ function dol_get_fiche_end($notab = 0)
* @param int $shownav Show Condition (navigation is shown if value is 1)
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field). Use 'none' for no prev/next search.
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
* @param string $morehtmlref More html to show after ref
* @param string $morehtmlref More html to show after the ref (see $morehtmlleft for before)
* @param string $moreparam More param to add in nav link url.
* @param int $nodbprefix Do not include DB prefix to forge table name
* @param string $morehtmlleft More html code to show before ref
* @param string $morehtmlleft More html code to show before the ref (see $morehtmlref for after)
* @param string $morehtmlstatus More html code to show under navigation arrows
* @param int $onlybanner Put this to 1, if the card will contains only a banner (this add css 'arearefnobottom' on div)
* @param string $morehtmlright More html code to show before navigation arrows
@ -2826,7 +2826,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli
} elseif (dol_strlen($phone) == 11) {
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 2).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2);
} elseif (dol_strlen($phone) == 12) {
$newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2);
$newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2);
}
} elseif (strtoupper($countrycode) == "CA") {
if (dol_strlen($phone) == 10) {
@ -5672,16 +5672,16 @@ function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisi
}
/**
* Return vat rate of a product in a particular selling country or default country vat if product is unknown
* Function called by get_default_tva
* Return vat rate of a product in a particular country, or default country vat if product is unknown.
* Function called by get_default_tva().
*
* @param int $idprod Id of product or 0 if not a predefined product
* @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @param Societe $thirdpartytouse Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @param int $idprodfournprice Id product_fournisseur_price (for "supplier" proposal/order/invoice)
* @return float|string Vat rate to use with format 5.0 or '5.0 (XXX)'
* @see get_product_localtax_for_country()
*/
function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice = 0)
function get_product_vat_for_country($idprod, $thirdpartytouse, $idprodfournprice = 0)
{
global $db, $conf, $mysoc;
@ -5695,7 +5695,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
$product = new Product($db);
$result = $product->fetch($idprod);
if ($mysoc->country_code == $thirdparty_seller->country_code) { // If selling country is ours
if ($mysoc->country_code == $thirdpartytouse->country_code) { // If country to consider is ours
if ($idprodfournprice > 0) { // We want vat for product for a "supplier" object
$product->get_buyprice($idprodfournprice, 0, 0, 0);
$ret = $product->vatrate_supplier;
@ -5710,8 +5710,8 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
}
$found = 1;
} else {
// TODO Read default product vat according to countrycode and product. Vat for couple countrycode/product is a feature not implemeted yet.
// May be usefull/required if hidden option SERVICE_ARE_ECOMMERCE_200238EC is on
// TODO Read default product vat according to product and another countrycode.
// Vat for couple anothercountrycode/product is data that is not managed and store yet, so we will fallback on next rule.
}
}
@ -5720,7 +5720,7 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
// If vat of product for the country not found or not defined, we return the first higher vat of country.
$sql = "SELECT t.taux as vat_rate, t.code as default_vat_code";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($thirdparty_seller->country_code)."'";
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($thirdpartytouse->country_code)."'";
$sql .= " ORDER BY t.taux DESC, t.code ASC, t.recuperableonly ASC";
$sql .= $db->plimit(1);
@ -5747,15 +5747,15 @@ function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournpr
}
/**
* Return localtax vat rate of a product in a particular selling country or default country vat if product is unknown
* Return localtax vat rate of a product in a particular country or default country vat if product is unknown
*
* @param int $idprod Id of product
* @param int $local 1 for localtax1, 2 for localtax 2
* @param Societe $thirdparty_seller Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @param Societe $thirdpartytouse Thirdparty with a ->country_code defined (FR, US, IT, ...)
* @return int <0 if KO, Vat rate if OK
* @see get_product_vat_for_country()
*/
function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
function get_product_localtax_for_country($idprod, $local, $thirdpartytouse)
{
global $db, $mysoc;
@ -5771,14 +5771,15 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
$product = new Product($db);
$result = $product->fetch($idprod);
if ($mysoc->country_code == $thirdparty_seller->country_code) { // If selling country is ours
if ($mysoc->country_code == $thirdpartytouse->country_code) { // If selling country is ours
/* Not defined yet, so we don't use this
if ($local==1) $ret=$product->localtax1_tx;
elseif ($local==2) $ret=$product->localtax2_tx;
$found=1;
*/
} else {
// TODO Read default product vat according to countrycode and product
// TODO Read default product vat according to product and another countrycode.
// Vat for couple anothercountrycode/product is data that is not managed and store yet, so we will fallback on next rule.
}
}
@ -5786,7 +5787,7 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
// If vat of product for the country not found or not defined, we return higher vat of country.
$sql = "SELECT taux as vat_rate, localtax1, localtax2";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c";
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($thirdparty_seller->country_code)."'";
$sql .= " WHERE t.active=1 AND t.fk_pays = c.rowid AND c.code='".$db->escape($thirdpartytouse->country_code)."'";
$sql .= " ORDER BY t.taux DESC, t.recuperableonly ASC";
$sql .= $db->plimit(1);
@ -5811,12 +5812,12 @@ function get_product_localtax_for_country($idprod, $local, $thirdparty_seller)
/**
* Function that return vat rate of a product line (according to seller, buyer and product vat rate)
* Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* Si le (pays vendeur = pays acheteur) alors TVA par defaut=TVA du produit vendu. Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et (bien vendu = moyen de transports neuf comme auto, bateau, avion) alors TVA par defaut=0 (La TVA doit etre paye par acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = particulier ou entreprise sans num TVA intra) alors TVA par defaut=TVA du produit vendu. Fin de regle
* Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = entreprise avec num TVA) intra alors TVA par defaut=0. Fin de regle
* Sinon TVA proposee par defaut=0. Fin de regle.
* VATRULE 1: Si vendeur non assujeti a TVA, TVA par defaut=0. Fin de regle.
* VATRULE 2: Si le (pays vendeur = pays acheteur) alors TVA par defaut=TVA du produit vendu. Fin de regle.
* VATRULE 3: Si (vendeur et acheteur dans Communaute europeenne) et (bien vendu = moyen de transports neuf comme auto, bateau, avion) alors TVA par defaut=0 (La TVA doit etre paye par acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
* VATRULE 4: Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
* VATRULE 5: Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = entreprise) alors TVA par defaut=0. Fin de regle
* VATRULE 6: Sinon TVA proposee par defaut=0. Fin de regle.
*
* @param Societe $thirdparty_seller Objet societe vendeuse
* @param Societe $thirdparty_buyer Objet societe acheteuse
@ -5845,9 +5846,19 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
// If services are eServices according to EU Council Directive 2002/38/EC (http://ec.europa.eu/taxation_customs/taxation/vat/traders/e-commerce/article_1610_en.htm)
// we use the buyer VAT.
if (!empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) {
if ($seller_in_cee && $buyer_in_cee && !$thirdparty_buyer->isACompany()) {
//print 'VATRULE 0';
return get_product_vat_for_country($idprod, $thirdparty_buyer, $idprodfournprice);
if ($seller_in_cee && $buyer_in_cee) {
$isacompany = $thirdparty_buyer->isACompany();
if ($isacompany && !empty($conf->global->MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
if (!isValidVATID($thirdparty_buyer)) {
$isacompany = 0;
}
}
if (!$isacompany) {
//print 'VATRULE 0';
return get_product_vat_for_country($idprod, $thirdparty_buyer, $idprodfournprice);
}
}
}
@ -5867,36 +5878,41 @@ function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer,
}
// Si (vendeur et acheteur dans Communaute europeenne) et (bien vendu = moyen de transports neuf comme auto, bateau, avion) alors TVA par defaut=0 (La TVA doit etre paye par l'acheteur au centre d'impots de son pays et non au vendeur). Fin de regle.
// Not supported
// 'VATRULE 3' - Not supported
// Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = entreprise) alors TVA par defaut=0. Fin de regle
// Si (vendeur et acheteur dans Communaute europeenne) et (acheteur = particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
if (($seller_in_cee && $buyer_in_cee)) {
$isacompany = $thirdparty_buyer->isACompany();
if ($isacompany) {
if (!empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
if (!isValidVATID($thirdparty_buyer)) {
//print 'VATRULE 6';
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
}
if ($isacompany && !empty($conf->global->MAIN_USE_VAT_COMPANIES_IN_EEC_WITH_INVALID_VAT_ID_ARE_INDIVIDUAL)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
if (!isValidVATID($thirdparty_buyer)) {
$isacompany = 0;
}
//print 'VATRULE 3';
return 0;
} else {
}
if (!$isacompany) {
//print 'VATRULE 4';
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
} else {
//print 'VATRULE 5';
return 0;
}
}
// Si (vendeur en France et acheteur hors Communaute europeenne et acheteur particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
if (!empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC) && empty($buyer_in_cee) && !$thirdparty_buyer->isACompany()) {
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
// Si (vendeur dans Communaute europeene et acheteur hors Communaute europeenne et acheteur particulier) alors TVA par defaut=TVA du produit vendu. Fin de regle
// I don't see any use case that need this rule.
if (!empty($conf->global->MAIN_USE_VAT_OF_PRODUCT_FOR_INDIVIDUAL_CUSTOMER_OUT_OF_EEC) && empty($buyer_in_cee)) {
$isacompany = $thirdparty_buyer->isACompany();
if (!$isacompany) {
return get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice);
//print 'VATRULE extra';
}
}
// Sinon la TVA proposee par defaut=0. Fin de regle.
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
//print 'VATRULE 5';
//print 'VATRULE 6';
return 0;
}
@ -6857,6 +6873,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray['__DIRECTDOWNLOAD_URL_PROPOSAL__'] = 'Direct download url of a proposal';
$substitutionarray['__DIRECTDOWNLOAD_URL_ORDER__'] = 'Direct download url of an order';
$substitutionarray['__DIRECTDOWNLOAD_URL_INVOICE__'] = 'Direct download url of an invoice';
$substitutionarray['__DIRECTDOWNLOAD_URL_CONTRACT__'] = 'Direct download url of a contract';
$substitutionarray['__DIRECTDOWNLOAD_URL_SUPPLIER_PROPOSAL__'] = 'Direct download url of a supplier proposal';
if (!empty($conf->expedition->enabled) && (!is_object($object) || $object->element == 'shipping')) {
$substitutionarray['__SHIPPINGTRACKNUM__'] = 'Shipping tracking number';

View File

@ -681,7 +681,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
// Title of task
if (count($arrayfields) > 0 && !empty($arrayfields['t.label']['checked'])) {
print "<td>";
print '<td>';
if ($showlineingray) {
print '<i>';
}

View File

@ -163,7 +163,7 @@ function showDirectPublicLink($object)
$out .= img_picto('', 'object_globe.png').' <span class="opacitymedium">'.$langs->trans("TicketPublicAccess").'</span><br>';
if ($url) {
$out .= '<div class="urllink">';
$out .= '<input type="text" id="directpubliclink" class="quatrevingtpercent" value="'.$url.'">';
$out .= '<input type="text" id="directpubliclink" class="quatrevingtpercentminusx" value="'.$url.'">';
$out .= '<a href="'.$url.'" target="_blank" rel="noopener">'.img_picto('', 'object_globe.png', 'class="paddingleft"').'</a>';
$out .= '</div>';
$out .= ajax_autoselect("directpubliclink", 0);
@ -601,15 +601,15 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no
$out .= '<tr class="liste_titre">';
//$out.='<td class="liste_titre">';
$out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n";
//$out.='</td>';
$out .= '<th class="liste_titre"><strong class="hideonsmartphone">'.$langs->trans("Search").' : </strong></th>';
if ($donetodo) {
$out .= '<th class="liste_titre"></th>';
}
$out .= '<th class="liste_titre">'.$langs->trans("Type").' ';
$out .= '<th class="liste_titre">';
$out .= '<span class="fas fa-square inline-block fawidth30" style=" color: #ddd;" title="'.$langs->trans("ActionType").'"></span>';
//$out .= img_picto($langs->trans("Type"), 'type');
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, 0, 1, 'minwidth200imp');
$out .= '</th>';
$out .= '<th class="liste_titre maxwidth100onsmartphone">';

View File

@ -382,6 +382,31 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
'submenus' => array(),
);
// Tickets and knwoledge base
$tmpentry = array(
'enabled'=>(!empty($conf->ticket->enabled) || !empty($conf->knwoledgemanagement->enabled)),
'perms'=>(!empty($user->rights->ticket->read) || !empty($user->rights->knwoledgemanagement->read)),
'module'=>'ticket|knwoledgemanagement'
);
$menu_arr[] = array(
'name' => 'Ticket',
'link' => '/ticket/index.php?mainmenu=ticket&amp;leftmenu=',
'title' => "Tickets",
'level' => 0,
'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal),
'target' => $atarget,
'mainmenu' => "ticket",
'leftmenu' => '',
'position' => 88,
'id' => $id,
'idsel' => 'ticket',
'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "ticket") ? 'class="tmenusel"' : 'class="tmenu"',
'prefix' => img_picto('', 'ticket', 'class="fa-fw paddingright"'),
'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "ticket") ? 0 : 1),
'loadLangs' => array("other"),
'submenus' => array(),
);
// Tools
$tmpentry = array(
'enabled'=>1,

View File

@ -193,7 +193,7 @@ class modCommande extends DolibarrModules
$this->export_label[$r] = 'CustomersOrdersAndOrdersLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r] = array(array("commande", "commande", "export"));
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'd.nom'=>'State', 'co.label'=>'Country',
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 'ps.nom'=>'ParentCompany', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'd.nom'=>'State', 'co.label'=>'Country',
'co.code'=>"CountryCode", 's.phone'=>'Phone', 's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 'c.rowid'=>"Id",
'c.ref'=>"Ref", 'c.ref_client'=>"RefCustomer", 'c.fk_soc'=>"IdCompany", 'c.date_creation'=>"DateCreation", 'c.date_commande'=>"OrderDate",
'c.date_livraison'=>"DateDeliveryPlanned", 'c.amount_ht'=>"Amount", 'c.remise_percent'=>"GlobalDiscount", 'c.total_ht'=>"TotalHT",
@ -219,7 +219,7 @@ class modCommande extends DolibarrModules
// 'p.rowid'=>'List:product:ref','p.ref'=>'Text','p.label'=>'Text'
//);
$this->export_TypeFields_array[$r] = array(
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.label'=>'List:c_country:label:label', 'co.code'=>'Text', 's.phone'=>'Text',
's.nom'=>'Text', 'ps.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.label'=>'List:c_country:label:label', 'co.code'=>'Text', 's.phone'=>'Text',
's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.date_creation'=>"Date",
'c.date_commande'=>"Date", 'c.date_livraison'=>"Date", 'c.amount_ht'=>"Numeric", 'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric",
'c.total_ttc'=>"Numeric", 'c.facture'=>"Boolean", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date', 'pj.ref'=>'Text',
@ -227,7 +227,7 @@ class modCommande extends DolibarrModules
'cd.total_ttc'=>"Numeric", 'p.rowid'=>'List:product:ref::product', 'p.ref'=>'Text', 'p.label'=>'Text', 'd.nom'=>'Text'
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'd.nom'=>'company', 'co.label'=>'company',
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'd.nom'=>'company', 'co.label'=>'company',
'co.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.siret'=>'company', 'c.rowid'=>"order",
'c.ref'=>"order", 'c.ref_client'=>"order", 'c.fk_soc'=>"order", 'c.date_creation'=>"order", 'c.date_commande'=>"order", 'c.amount_ht'=>"order",
'c.remise_percent'=>"order", 'c.total_ht'=>"order", 'c.total_ttc'=>"order", 'c.facture'=>"order", 'c.fk_statut'=>"order", 'c.note'=>"order",
@ -254,10 +254,11 @@ class modCommande extends DolibarrModules
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as ps ON ps.rowid = s.parent';
if (empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
}
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,';
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'commande as c';

View File

@ -268,7 +268,7 @@ class modEventOrganization extends DolibarrModules
'fk_menu'=>'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'List',
'url'=>'/projet/list.php?search_usage_event_organization=1&mainmenu=project&contextpage=organizedevents',
'url'=>'/projet/list.php?search_usage_event_organization=1&search_status=99&mainmenu=project&contextpage=organizedevents',
'langs'=>'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->eventorganization->enabled', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.

View File

@ -185,8 +185,9 @@ class modExpenseReport extends DolibarrModules
'd.total_ht'=>"TotalHT", 'd.total_tva'=>'TotalVAT', 'd.total_ttc'=>'TotalTTC',
'd.fk_statut'=>'Status', 'd.paid'=>'Paid',
'd.note_private'=>'NotePrivate', 'd.note_public'=>'NotePublic', 'd.detail_cancel'=>'MOTIF_CANCEL', 'd.detail_refuse'=>'MOTIF_REFUS',
'u.lastname'=>'Lastname', 'u.firstname'=>'Firstname', 'u.login'=>"Login", 'ed.rowid'=>'LineId', 'tf.code'=>'Type', 'ed.date'=>'Date', 'ed.tva_tx'=>'VATRate',
'ed.rowid'=>'LineId', 'tf.code'=>'Type', 'ed.date'=>'Date', 'ed.tva_tx'=>'VATRate',
'ed.total_ht'=>'TotalHT', 'ed.total_tva'=>'TotalVAT', 'ed.total_ttc'=>'TotalTTC', 'ed.comments'=>'Comment', 'p.rowid'=>'ProjectId', 'p.ref'=>'Ref',
'u.lastname'=>'Lastname', 'u.firstname'=>'Firstname', 'u.login'=>"Login",
'user_rib.iban_prefix' => 'IBAN', 'user_rib.bic' => 'BIC', 'user_rib.code_banque' => 'BankCode', 'user_rib.bank' => 'BankName', 'user_rib.proprio' => 'BankAccountOwner',
'user_rib.owner_address' => 'BankAccountOwnerAddress'
);
@ -195,15 +196,17 @@ class modExpenseReport extends DolibarrModules
'd.total_ht'=>"Numeric", 'd.total_tva'=>'Numeric', 'd.total_ttc'=>'Numeric',
'd.fk_statut'=>"Numeric", 'd.paid'=>'Numeric',
'd.note_private'=>'Text', 'd.note_public'=>'Text', 'd.detail_cancel'=>'Text', 'd.detail_refuse'=>'Text',
'u.lastname'=>'Text', 'u.firstname'=>'Text', 'u.login'=>"Text", 'ed.rowid'=>'Numeric', 'tf.code'=>'Code', 'ed.date'=>'Date', 'ed.tva_tx'=>'Numeric',
'ed.rowid'=>'Numeric', 'tf.code'=>'Code', 'ed.date'=>'Date', 'ed.tva_tx'=>'Numeric',
'ed.total_ht'=>'Numeric', 'ed.total_tva'=>'Numeric', 'ed.total_ttc'=>'Numeric', 'ed.comments'=>'Text', 'p.rowid'=>'Numeric', 'p.ref'=>'Text',
'u.lastname'=>'Text', 'u.firstname'=>'Text', 'u.login'=>"Text",
'user_rib.iban_prefix' => 'Text', 'user_rib.bic' => 'Text', 'user_rib.code_banque' => 'Text', 'user_rib.bank' => 'Text', 'user_rib.proprio' => 'Text',
'user_rib.owner_address' => 'Text'
);
$this->export_entities_array[$r] = array(
'u.lastname'=>'user', 'u.firstname'=>'user', 'u.login'=>'user', 'ed.rowid'=>'expensereport_line', 'ed.date'=>'expensereport_line',
'ed.rowid'=>'expensereport_line', 'ed.date'=>'expensereport_line',
'ed.tva_tx'=>'expensereport_line', 'ed.total_ht'=>'expensereport_line', 'ed.total_tva'=>'expensereport_line', 'ed.total_ttc'=>'expensereport_line',
'ed.comments'=>'expensereport_line', 'tf.code'=>'expensereport_line', 'p.project_ref'=>'expensereport_line', 'p.rowid'=>'project', 'p.ref'=>'project',
'u.lastname'=>'user', 'u.firstname'=>'user', 'u.login'=>'user',
'user_rib.iban_prefix' => 'user', 'user_rib.bic' => 'user', 'user_rib.code_banque' => 'user', 'user_rib.bank' => 'user', 'user_rib.proprio' => 'user',
'user_rib.owner_address' => 'user'
@ -215,12 +218,15 @@ class modExpenseReport extends DolibarrModules
$keyforelement = 'expensereport';
$keyforaliasextra = 'extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect = 'user'; $keyforelement = 'user'; $keyforaliasextra = 'extrau';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'expensereport as d';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expensereport_extrafields as extra on d.rowid = extra.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user_rib as user_rib ON user_rib.fk_user = d.fk_user_author,';
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'user as u,';
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'user as u';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user_extrafields as extrau ON u.rowid = extrau.fk_object,';
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'expensereport_det as ed LEFT JOIN '.MAIN_DB_PREFIX.'c_type_fees as tf ON ed.fk_c_type_fees = tf.id';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as p ON ed.fk_projet = p.rowid';
$this->export_sql_end[$r] .= ' WHERE ed.fk_expensereport = d.rowid AND d.fk_user_author = u.rowid';

View File

@ -242,7 +242,7 @@ class modFacture extends DolibarrModules
$this->export_icon[$r] = 'invoice';
$this->export_permission[$r] = array(array("facture", "facture", "export", "other"));
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State',
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 'ps.nom' => 'ParentCompany', 's.code_client'=>'CustomerCode', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 'cd.nom'=>'State',
's.phone'=>'Phone',
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4',
's.code_compta'=>'CustomerAccountancyCode',
@ -271,7 +271,7 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]['f.pos_source'] = 'POSTerminal';
}
$this->export_TypeFields_array[$r] = array(
's.rowid'=>'Numeric', 's.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
's.rowid'=>'Numeric', 's.nom'=>'Text', 'ps.nom'=>'Text', 's.code_client'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 'cd.nom'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text',
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text',
'f.rowid'=>'Numeric', 'f.ref'=>"Text", 'f.ref_client'=>'Text', 'f.type'=>"Numeric", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>"Date",
'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.localtax1'=>'Numeric', 'f.localtax2'=>'Numeric', 'f.paye'=>"Boolean", 'f.fk_statut'=>'Numeric', 'f.close_code'=>'Text', 'f.close_note'=>'Text',
@ -287,7 +287,7 @@ class modFacture extends DolibarrModules
$this->export_TypeFields_array[$r]['f.pos_source'] = 'Text';
}
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 's.code_client'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 'cd.nom'=>'company', 's.phone'=>'company',
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.code_client'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 'cd.nom'=>'company', 's.phone'=>'company',
's.siren'=>'company', 's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company',
's.tva_intra'=>'company', 'pj.ref'=>'project', 'pj.title'=>'project', 'fd.rowid'=>'invoice_line', 'fd.label'=>"invoice_line", 'fd.description'=>"invoice_line",
'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line",
@ -309,8 +309,14 @@ class modFacture extends DolibarrModules
$keyforelement = 'product';
$keyforaliasextra = 'extra3';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect = 'societe';
$keyforelement = 'company';
$keyforaliasextra = 'extra4';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as ps ON ps.rowid = s.parent';
if (empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
}

View File

@ -288,7 +288,7 @@ class modFournisseur extends DolibarrModules
$this->export_icon[$r] = 'bill';
$this->export_permission[$r] = array(array("fournisseur", "facture", "export"));
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 'ps.nom'=>'ParentCompany', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6',
's.code_compta'=>'CustomerAccountancyCode', 's.code_compta_fournisseur'=>'SupplierAccountancyCode', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"InvoiceId", 'f.ref'=>"InvoiceRef", 'f.ref_supplier'=>"RefSupplier", 'f.datec'=>"InvoiceDateCreation", 'f.datef'=>"DateInvoice", 'f.date_lim_reglement'=>'DateMaxPayment',
@ -312,14 +312,14 @@ class modFournisseur extends DolibarrModules
// 'fd.tva'=>"Numeric",'fd.product_type'=>'Numeric','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'
//);
$this->export_TypeFields_array[$r] = array(
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text',
's.nom'=>'Text', 'ps.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'c.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text',
's.code_compta'=>'Text', 's.code_compta_fournisseur'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text", 'f.datec'=>"Date", 'f.datef'=>"Date", 'f.date_lim_reglement'=>'Date',
'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric", 'f.paye'=>"Boolean", 'f.fk_statut'=>'Status', 'f.note_public'=>"Text", 'fd.description'=>"Text", 'fd.tva_tx'=>"Text",
'fd.qty'=>"Numeric", 'fd.total_ht'=>"Numeric", 'fd.total_ttc'=>"Numeric", 'fd.tva'=>"Numeric", 'fd.product_type'=>'Numeric', 'fd.fk_product'=>'List:product:label',
'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text'
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.siret'=>'company',
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.siret'=>'company',
's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company', 's.code_compta'=>'company', 's.code_compta_fournisseur'=>'company', 's.tva_intra'=>'company', 'f.rowid'=>"invoice",
'f.ref'=>"invoice", 'f.ref_supplier'=>"invoice", 'f.datec'=>"invoice", 'f.datef'=>"invoice", 'f.date_lim_reglement'=>'invoice', 'f.total_ht'=>"invoice", 'f.total_ttc'=>"invoice", 'f.total_tva'=>"invoice",
'f.paye'=>"invoice", 'f.fk_statut'=>'invoice', 'f.note_public'=>"invoice", 'fd.rowid'=>'invoice_line', 'fd.description'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", 'fd.qty'=>"invoice_line",
@ -406,6 +406,7 @@ class modFournisseur extends DolibarrModules
// End add extra fields line
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as ps ON ps.rowid = s.parent';
if (is_object($user) && empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
}
@ -526,7 +527,7 @@ class modFournisseur extends DolibarrModules
$this->export_icon[$r] = 'order';
$this->export_permission[$r] = array(array("fournisseur", "commande", "export"));
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 'ps.nom'=>'ParentCompany', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'c.code'=>'CountryCode', 's.phone'=>'Phone',
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 's.idprof5'=>'ProfId5', 's.idprof6'=>'ProfId6', 's.tva_intra'=>'VATIntra',
'f.rowid'=>"OrderId", 'f.ref'=>"Ref", 'f.ref_supplier'=>"RefSupplier", 'f.date_creation'=>"DateCreation", 'f.date_commande'=>"OrderDate", 'f.date_livraison'=>"DateDeliveryPlanned",
'f.total_ht'=>"TotalHT", 'f.total_ttc'=>"TotalTTC", 'f.total_tva'=>"TotalVAT", 'f.fk_statut'=>'Status', 'f.date_approve'=>'DateApprove', 'f.date_approve2'=>'DateApprove2',
@ -547,7 +548,7 @@ class modFournisseur extends DolibarrModules
unset($this->export_fields_array['ua2.login']);
}
$this->export_TypeFields_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'Text', 's.address'=>'Text', 's.cp'=>'Text', 's.ville'=>'Text', 'c.code'=>'Text', 's.tel'=>'Text', 's.siren'=>'Text',
's.rowid'=>"company", 's.nom'=>'Text', 'ps.nom'=>'Text', 's.address'=>'Text', 's.cp'=>'Text', 's.ville'=>'Text', 'c.code'=>'Text', 's.tel'=>'Text', 's.siren'=>'Text',
's.siret'=>'Text', 's.ape'=>'Text', 's.idprof4'=>'Text', 's.idprof5'=>'Text', 's.idprof6'=>'Text', 's.tva_intra'=>'Text', 'f.ref'=>"Text", 'f.ref_supplier'=>"Text",
'f.date_creation'=>"Date", 'f.date_commande'=>"Date", 'f.date_livraison'=>"Date", 'f.total_ht'=>"Numeric", 'f.total_ttc'=>"Numeric", 'f.total_tva'=>"Numeric",
'f.fk_statut'=>'Status', 'f.date_approve'=>'Date', 'f.date_approve2'=>'Date', 'f.note_public'=>"Text", 'f.note_private'=>"Text", 'fd.description'=>"Text",
@ -555,7 +556,7 @@ class modFournisseur extends DolibarrModules
'fd.product_type'=>'Numeric', 'fd.ref'=>'Text', 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', 'project.ref'=>'Text', 'project.title'=>'Text'
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company',
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'c.code'=>'company', 's.phone'=>'company', 's.siren'=>'company',
's.siret'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company', 's.tva_intra'=>'company', 'ua1.login'=>'user',
'ua2.login'=>'user', 'fd.rowid'=>'order_line', 'fd.description'=>"order_line", 'fd.tva_tx'=>"order_line", 'fd.qty'=>"order_line", 'fd.remise_percent'=>"order_line",
'fd.total_ht'=>"order_line", 'fd.total_ttc'=>"order_line", 'fd.total_tva'=>"order_line", 'fd.product_type'=>'order_line', 'fd.ref'=>'order_line', 'fd.fk_product'=>'product',
@ -643,6 +644,7 @@ class modFournisseur extends DolibarrModules
// End add extra fields line
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as ps ON ps.rowid = s.parent';
if (is_object($user) && empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
}

View File

@ -204,14 +204,18 @@ class modHoliday extends DolibarrModules
$this->export_permission[$r] = array(array("holiday", "readall"));
$this->export_fields_array[$r] = array(
'd.rowid'=>"LeaveId", 'd.fk_type'=>'TypeOfLeaveId', 't.code'=>'TypeOfLeaveCode', 't.label'=>'TypeOfLeaveLabel', 'd.fk_user'=>'UserID',
'u.lastname'=>'Lastname', 'u.firstname'=>'Firstname', 'u.login'=>"Login", 'd.date_debut'=>'DateStart', 'd.date_fin'=>'DateEnd', 'd.halfday'=>'HalfDay', 'none.num_open_days'=>'NbUseDaysCP',
'd.date_valid'=>'DateApprove', 'd.fk_validator'=>"UserForApprovalID", 'ua.lastname'=>"UserForApprovalLastname", 'ua.firstname'=>"UserForApprovalFirstname",
'd.date_debut'=>'DateStart', 'd.date_fin'=>'DateEnd', 'd.halfday'=>'HalfDay', 'none.num_open_days'=>'NbUseDaysCP',
'd.date_valid'=>'DateApprove', 'd.fk_validator'=>"UserForApprovalID",
'u.lastname'=>'Lastname', 'u.firstname'=>'Firstname', 'u.login'=>"Login",
'ua.lastname'=>"UserForApprovalLastname", 'ua.firstname'=>"UserForApprovalFirstname",
'ua.login'=>"UserForApprovalLogin", 'd.description'=>'Description', 'd.statut'=>'Status'
);
$this->export_TypeFields_array[$r] = array(
'd.rowid'=>"Numeric", 't.code'=>'Text', 't.label'=>'Text', 'd.fk_user'=>'Numeric',
'u.lastname'=>'Text', 'u.firstname'=>'Text', 'u.login'=>"Text", 'd.date_debut'=>'Date', 'd.date_fin'=>'Date', 'none.num_open_days'=>'NumericCompute',
'd.date_valid'=>'Date', 'd.fk_validator'=>"Numeric", 'ua.lastname'=>"Text", 'ua.firstname'=>"Text",
'd.date_debut'=>'Date', 'd.date_fin'=>'Date', 'none.num_open_days'=>'NumericCompute',
'd.date_valid'=>'Date', 'd.fk_validator'=>"Numeric",
'u.lastname'=>'Text', 'u.firstname'=>'Text', 'u.login'=>"Text",
'ua.lastname'=>"Text", 'ua.firstname'=>"Text",
'ua.login'=>"Text", 'd.description'=>'Text', 'd.statut'=>'Numeric'
);
$this->export_entities_array[$r] = array(
@ -225,6 +229,8 @@ class modHoliday extends DolibarrModules
$keyforelement = 'holiday';
$keyforaliasextra = 'extra';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect = 'user'; $keyforelement = 'user'; $keyforaliasextra = 'extrau';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'holiday as d';
@ -232,6 +238,7 @@ class modHoliday extends DolibarrModules
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_holiday_types as t ON t.rowid = d.fk_type';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua ON ua.rowid = d.fk_validator,';
$this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'user as u';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user_extrafields as extrau ON u.rowid = extrau.fk_object';
$this->export_sql_end[$r] .= ' WHERE d.fk_user = u.rowid';
$this->export_sql_end[$r] .= ' AND d.entity IN ('.getEntity('holiday').')';

View File

@ -261,17 +261,17 @@ class modKnowledgeManagement extends DolibarrModules
// Add here entries to declare new permissions
/* BEGIN MODULEBUILDER PERMISSIONS */
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Read objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Read articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Create/Update objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Create/Update articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
$this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used)
$this->rights[$r][1] = 'Delete objects of Knowledge Management'; // Permission label
$this->rights[$r][1] = 'Delete articles'; // Permission label
$this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2)
$r++;
@ -282,6 +282,7 @@ class modKnowledgeManagement extends DolibarrModules
$r = 0;
// Add here entries to declare new menus
/* BEGIN MODULEBUILDER TOPMENU */
/*
$this->menu[$r++] = array(
'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'top', // This is a Top menu entry
@ -297,60 +298,17 @@ class modKnowledgeManagement extends DolibarrModules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
/* END MODULEBUILDER TOPMENU */
/* BEGIN MODULEBUILDER LEFTMENU KNOWLEDGERECORD
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Top menu entry
'titre'=>'KnowledgeRecord',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgerecord',
'url'=>'/knowledgemanagement/knowledgemanagementindex.php',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->read', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgerecord', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'List_KnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgemanagement_knowledgerecord_list',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->read', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$this->menu[$r++]=array(
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgerecord', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Left menu entry
'titre'=>'New_KnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'leftmenu'=>'knowledgemanagement_knowledgerecord_new',
'url'=>'/knowledgemanagement/knowledgerecord_card.php?action=create',
'langs'=>'knowledgemanagement@knowledgemanagement', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position'=>1000+$r,
'enabled'=>'$conf->knowledgemanagement->enabled', // Define condition to show or hide menu entry. Use '$conf->knowledgemanagement->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
'perms'=>'$user->rights->knowledgemanagement->knowledgerecord->write', // Use 'perms'=>'$user->rights->knowledgemanagement->level1->level2' if you want your menu with a permission rules
'target'=>'',
'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
*/
/* END MODULEBUILDER TOPMENU */
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement',
'fk_menu'=>'fk_mainmenu=ticket',
// This is a Left menu entry
'type'=>'left',
'titre'=>'MenuKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_knowledgerecord',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -366,11 +324,11 @@ class modKnowledgeManagement extends DolibarrModules
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgemanagement_knowledgerecord',
'fk_menu'=>'fk_mainmenu=ticket,fk_leftmenu=knowledgemanagement_knowledgerecord',
// This is a Left menu entry
'type'=>'left',
'titre'=>'ListKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_list',
'url'=>'/knowledgemanagement/knowledgerecord_list.php',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -386,11 +344,11 @@ class modKnowledgeManagement extends DolibarrModules
);
$this->menu[$r++]=array(
// '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'fk_menu'=>'fk_mainmenu=knowledgemanagement,fk_leftmenu=knowledgemanagement_knowledgerecord',
'fk_menu'=>'fk_mainmenu=ticket,fk_leftmenu=knowledgemanagement_knowledgerecord',
// This is a Left menu entry
'type'=>'left',
'titre'=>'NewKnowledgeRecord',
'mainmenu'=>'knowledgemanagement',
'mainmenu'=>'ticket',
'leftmenu'=>'knowledgemanagement_new',
'url'=>'/knowledgemanagement/knowledgerecord_card.php?action=create',
// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
@ -406,6 +364,7 @@ class modKnowledgeManagement extends DolibarrModules
);
/* END MODULEBUILDER LEFTMENU KNOWLEDGERECORD */
// Exports profiles provided by this module
$r = 1;
/* BEGIN MODULEBUILDER EXPORT KNOWLEDGERECORD */

View File

@ -189,7 +189,7 @@ class modPropale extends DolibarrModules
$this->export_label[$r] = 'ProposalsAndProposalsLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r] = array(array("propale", "export"));
$this->export_fields_array[$r] = array(
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'co.code'=>'CountryCode', 's.phone'=>'Phone',
's.rowid'=>"IdCompany", 's.nom'=>'CompanyName', 'ps.nom'=>'ParentCompany', 's.address'=>'Address', 's.zip'=>'Zip', 's.town'=>'Town', 'co.code'=>'CountryCode', 's.phone'=>'Phone',
's.siren'=>'ProfId1', 's.siret'=>'ProfId2', 's.ape'=>'ProfId3', 's.idprof4'=>'ProfId4', 'c.rowid'=>"Id", 'c.ref'=>"Ref", 'c.ref_client'=>"RefCustomer",
'c.fk_soc'=>"IdCompany", 'c.datec'=>"DateCreation", 'c.datep'=>"DatePropal", 'c.fin_validite'=>"DateEndPropal", 'c.remise_percent'=>"GlobalDiscount",
'c.total_ht'=>"TotalHT", 'c.total_ttc'=>"TotalTTC", 'c.fk_statut'=>'Status', 'c.note_public'=>"Note", 'c.date_livraison'=>'DeliveryDate',
@ -213,14 +213,14 @@ class modPropale extends DolibarrModules
// 'cd.total_tva'=>"Numeric",'cd.total_ttc'=>"Numeric",'p.rowid'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'
//);
$this->export_TypeFields_array[$r] = array(
's.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text',
's.nom'=>'Text', 'ps.nom'=>'Text', 's.address'=>'Text', 's.zip'=>'Text', 's.town'=>'Text', 'co.code'=>'Text', 's.phone'=>'Text', 's.siren'=>'Text', 's.siret'=>'Text',
's.ape'=>'Text', 's.idprof4'=>'Text', 'c.ref'=>"Text", 'c.ref_client'=>"Text", 'c.datec'=>"Date", 'c.datep'=>"Date", 'c.fin_validite'=>"Date",
'c.remise_percent'=>"Numeric", 'c.total_ht'=>"Numeric", 'c.total_ttc'=>"Numeric", 'c.fk_statut'=>'Status', 'c.note_public'=>"Text", 'c.date_livraison'=>'Date',
'pj.ref'=>'Text', 'cd.description'=>"Text", 'cd.product_type'=>'Boolean', 'cd.tva_tx'=>"Numeric", 'cd.qty'=>"Numeric", 'cd.total_ht'=>"Numeric",
'cd.total_tva'=>"Numeric", 'cd.total_ttc'=>"Numeric", 'p.ref'=>'Text', 'p.label'=>'Text'
);
$this->export_entities_array[$r] = array(
's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company',
's.rowid'=>"company", 's.nom'=>'company', 'ps.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'co.code'=>'company', 's.phone'=>'company',
's.siren'=>'company', 's.ape'=>'company', 's.idprof4'=>'company', 's.siret'=>'company', 'c.rowid'=>"propal", 'c.ref'=>"propal", 'c.ref_client'=>"propal",
'c.fk_soc'=>"propal", 'c.datec'=>"propal", 'c.datep'=>"propal", 'c.fin_validite'=>"propal", 'c.remise_percent'=>"propal", 'c.total_ht'=>"propal",
'c.total_ttc'=>"propal", 'c.fk_statut'=>"propal", 'c.note_public'=>"propal", 'c.date_livraison'=>"propal", 'pj.ref'=>'project', 'cd.rowid'=>'propal_line',
@ -241,14 +241,14 @@ class modPropale extends DolibarrModules
$keyforaliasextra = 'extra3';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$keyforselect = 'societe';
$keyforelement = 'societe';
$keyforelement = 'company';
$keyforaliasextra = 'extra4';
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
$this->export_sql_start[$r] = 'SELECT DISTINCT ';
$this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s ';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object';
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as ps ON ps.rowid = s.parent';
if (empty($user->rights->societe->client->voir)) {
$this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
}

View File

@ -200,7 +200,7 @@ class modTicket extends DolibarrModules
$this->menus = array(); // List of menus to add
$r = 0;
$this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu
/*$this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu
'type' => 'top', // This is a Top menu entry
'titre' => 'Ticket',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
@ -209,11 +209,11 @@ class modTicket extends DolibarrModules
'url' => '/ticket/index.php',
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
'position' => 88,
'enabled' => '$conf->ticket->enabled', // Define condition to show or hide menu entry. Use '$conf->ticket->enabled' if entry must be visible if module is enabled.
'enabled' => '$conf->ticket->enabled',
'perms' => '$user->rights->ticket->read', // Use 'perms'=>'$user->rights->ticket->level1->level2' if you want your menu with a permission rules
'target' => '',
'user' => 2); // 0=Menu for internal users, 1=external users, 2=both
$r++;
$r++;*/
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
'type' => 'left',

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -120,7 +120,7 @@ class doc_generic_user_odt extends ModelePDFUser
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
$texte .= '<input type="hidden" name="param1" value="USER_ADDON_PDF_ODT_PATH">';
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
if (!empty($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT)) {
$texte .= '<input type="hidden" name="param2" value="USER_ADDON_PDF_ODT_DEFAULT">';
$texte .= '<input type="hidden" name="param3" value="USER_ADDON_PDF_ODT_TOBILL">';
$texte .= '<input type="hidden" name="param4" value="USER_ADDON_PDF_ODT_CLOSED">';
@ -166,7 +166,7 @@ class doc_generic_user_odt extends ModelePDFUser
if (count($listofdir)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
if (!empty($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT)) {
// Model for creation
$list = ModelePDFUser::liste_modeles($this->db);
$texte .= '<table width="50%;">';

View File

@ -16,7 +16,7 @@ if (isset($totalarray['pos'])) {
print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
} else {
if ($i == 1) {
if ($num < $limit) {
if (is_null($limit) || $num < $limit) {
print '<td>'.$langs->trans("Total").'</td>';
} else {
print '<td>';

View File

@ -432,15 +432,15 @@ if ($nolinesbefore) {
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select>
<?php } ?>
<!-- For free product -->
<input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 maxwidth150 right" value="<?php echo (GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>">
<input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 right" value="<?php echo (GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>">
</td>
<?php
if (!empty($conf->global->DISPLAY_MARGIN_RATES)) {
echo '<td class="nobottom nowrap margininfos right"><input class="flat right" type="text" size="2" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate hideonsmartphone">%</span></td>';
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate hideonsmartphone">%</span></td>';
$coldisplay++;
}
if (!empty($conf->global->DISPLAY_MARK_RATES)) {
echo '<td class="nobottom nowrap margininfos right"><input class="flat right" type="text" size="2" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate hideonsmartphone">%</span></td>';
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right" type="text" size="2" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate hideonsmartphone">%</span></td>';
$coldisplay++;
}
}

View File

@ -193,8 +193,9 @@ class EmailCollector extends CommonObject
*/
public $datelastresult;
public $codelastresult;
public $lastresult;
public $datelastok;
// END MODULEBUILDER PROPERTIES
public $filters;
@ -274,7 +275,7 @@ class EmailCollector extends CommonObject
}
}
if (is_array($this->filters) && count($this->filters)) {
if (is_array($this->actions) && count($this->actions)) {
$emailcollectoroperation = new EmailCollectorAction($this->db);
foreach ($this->actions as $operation) {
@ -653,6 +654,9 @@ class EmailCollector extends CommonObject
*/
public function initAsSpecimen()
{
$this->host = 'localhost';
$this->login = 'alogin';
$this->initAsSpecimenCommon();
}

View File

@ -54,11 +54,12 @@ class Export
public $array_export_examplevalues = array(); // array with examples for fields
public $array_export_help = array(); // array with tooltip help for fields
// To store export modules
// To store export templates
public $hexa; // List of fields in the export profile
public $hexafiltervalue; // List of search criteria in the export profile
public $datatoexport;
public $model_name; // Name of export profile
public $fk_user;
public $sqlusedforexport;
@ -720,8 +721,6 @@ class Export
$this->db->begin();
$filter = '';
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'export_model (';
$sql .= 'label,';
$sql .= 'type,';
@ -732,11 +731,10 @@ class Export
$sql .= "'".$this->db->escape($this->model_name)."',";
$sql .= " '".$this->db->escape($this->datatoexport)."',";
$sql .= " '".$this->db->escape($this->hexa)."',";
$sql .= ' '.($user->id > 0 ? $user->id : 'null').",";
$sql .= ' '.(isset($this->fk_user) ? (int) $this->fk_user : 'null').",";
$sql .= " '".$this->db->escape($this->hexafiltervalue)."'";
$sql .= ")";
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$this->db->commit();

View File

@ -335,6 +335,7 @@ if ($action == 'add_export_model') {
$objexport->datatoexport = $datatoexport;
$objexport->hexa = $hexa;
$objexport->hexafiltervalue = $hexafiltervalue;
$objexport->fk_user = (GETPOST('visibility', 'aZ09') == 'all' ? 0 : $user->id);
$result = $objexport->create($user);
if ($result >= 0) {
@ -516,11 +517,7 @@ if ($step == 2 && $datatoexport) {
print '<input type="hidden" name="datatoexport" value="'.$datatoexport.'">';
print '<div class="valignmiddle marginbottomonly">';
print '<span class="opacitymedium">'.$langs->trans("SelectExportFields").'</span> ';
if (empty($conf->global->EXPORTS_SHARE_MODELS)) {
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
} else {
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1);
}
$htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id);
print ' ';
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</div>';
@ -1007,20 +1004,28 @@ if ($step == 4 && $datatoexport) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ExportModelName").'</td>';
print '<td>&nbsp;</td>';
print '<td>'.$langs->trans("Visibility").'</td>';
print '<td></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td><input name="export_name" size="32" value=""></td><td class="right">';
print '<td><input name="export_name" value=""></td>';
print '<td>';
$arrayvisibility = array('private'=>$langs->trans("Private"), 'all'=>$langs->trans("Everybody"));
print $form->selectarray('visibility', $arrayvisibility, 'private');
print '</td>';
print '<td class="right">';
print '<input type="submit" class="button reposition button-save" value="'.$langs->trans("Save").'">';
print '</td></tr>';
$tmpuser = new User($db);
// List of existing export profils
$sql = "SELECT rowid, label";
$sql = "SELECT rowid, label, fk_user, entity";
$sql .= " FROM ".MAIN_DB_PREFIX."export_model";
$sql .= " WHERE type = '".$db->escape($datatoexport)."'";
if (empty($conf->global->EXPORTS_SHARE_MODELS)) {
$sql .= " AND fk_user=".$user->id;
if (empty($conf->global->EXPORTS_SHARE_MODELS)) { // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner.
$sql .= " AND fk_user IN (0, ".((int) $user->id).")";
}
$sql .= " ORDER BY rowid";
$resql = $db->query($sql);
@ -1029,9 +1034,19 @@ if ($step == 4 && $datatoexport) {
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
print '<tr class="oddeven"><td>';
print $obj->label;
print '</td><td class="right">';
print '</td>';
print '<td>';
if (empty($obj->fk_user)) {
print $langs->trans("Everybody");
} else {
$tmpuser->fetch($obj->fk_user);
print $tmpuser->getNomUrl(1);
}
print '</td>';
print '<td class="right">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?step='.$step.'&datatoexport='.$datatoexport.'&action=deleteprof&token='.newToken().'&id='.$obj->rowid.'">';
print img_delete();
print '</a>';

View File

@ -6,6 +6,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -225,7 +226,7 @@ if (!empty($conf->projet->enabled)) {
$sql .= ", pr.rowid as projet_id, pr.ref as projet_ref, pr.title as projet_title";
}
if (!empty($conf->contrat->enabled)) {
$sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_supplier, c.ref_supplier as contrat_ref_supplier";
$sql .= ", c.rowid as contrat_id, c.ref as contrat_ref, c.ref_customer as contrat_ref_customer, c.ref_supplier as contrat_ref_supplier";
}
// Add fields from extrafields
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
@ -573,6 +574,8 @@ if ($resql) {
$i = 0;
$totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array();
$totalarray['val']['fd.duree'] = 0;
while ($i < min($num, $limit)) {
$obj = $db->fetch_object($resql);

View File

@ -64,8 +64,14 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
echo '<strike>'.price($objectlink->total_ht).'</strike>';
}
} ?></td>
<td class="right"><?php echo $objectlink->getLibStatut(3); ?></td>
<td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key; ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
<td class="right"><?php
if (method_exists($objectlink, 'getSommePaiement')) {
echo $objectlink->getLibStatut(3, $objectlink->getSommePaiement());
} else {
echo $objectlink->getLibStatut(3);
}
?></td>
<td class="right"><a class="reposition" href="<?php echo $_SERVER["PHP_SELF"].'?id='.urlencode($object->id).'&action=dellink&dellinkid='.urlencode($key); ?>"><?php echo img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink'); ?></a></td>
</tr>
<?php
}

View File

@ -381,9 +381,9 @@ if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitme
$staticrecruitmentjobposition->label = $objp->label;
print '<tr class="oddeven">';
print '<td class="nowrap">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
print '<td class="nowraponall">'.$staticrecruitmentcandidature->getNomUrl(1, '').'</td>';
print '<td class="tdoverflowmax150">'.$staticrecruitmentcandidature->getFullName($langs).'</td>';
print '<td class="nowrap">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
print '<td class="nowraponall">'.$staticrecruitmentjobposition->getNomUrl(1).'</td>';
print '<td class="right nowrap">'.dol_print_date($db->jdate($objp->tms), 'day').'</td>';
print '<td class="right nowrap" width="16">';
print $staticrecruitmentcandidature->getLibStatut(3);

View File

@ -55,6 +55,12 @@ class Import
*/
public $errors = array();
// To store import templates
public $hexa; // List of fields in the export profile
public $datatoimport;
public $model_name; // Name of export profile
public $fk_user;
/**
* Constructor
@ -266,11 +272,18 @@ class Import
$this->db->begin();
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'import_model (';
$sql .= 'fk_user, label, type, field';
$sql .= 'fk_user,';
$sql .= ' label,';
$sql .= ' type,';
$sql .= ' field';
$sql .= ')';
$sql .= " VALUES (".($user->id > 0 ? $user->id : 0).", '".$this->db->escape($this->model_name)."', '".$this->db->escape($this->datatoimport)."', '".$this->db->escape($this->hexa)."')";
$sql .= " VALUES (";
$sql .= (isset($this->fk_user) ? (int) $this->fk_user : 'null').",";
$sql .= " '".$this->db->escape($this->model_name)."',";
$sql .= " '".$this->db->escape($this->datatoimport)."',";
$sql .= " '".$this->db->escape($this->hexa)."'";
$sql .= ")";
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$this->db->commit();

View File

@ -226,6 +226,7 @@ if ($action == 'add_import_model') {
$objimport->model_name = $import_name;
$objimport->datatoimport = $datatoimport;
$objimport->hexa = $hexa;
$objimport->fk_user = (GETPOST('visibility', 'aZ09') == 'all' ? 0 : $user->id);
$result = $objimport->create($user);
if ($result >= 0) {
@ -461,7 +462,7 @@ if ($step == 2 && $datatoimport) {
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border tableforfield">';
print '<table class="border tableforfield centpercent">';
// Module
print '<tr><td class="titlefield">'.$langs->trans("Module").'</td>';
@ -474,7 +475,7 @@ if ($step == 2 && $datatoimport) {
print $titleofmodule;
print '</td></tr>';
// Lot de donnees a importer
// Dataset to import
print '<tr><td>'.$langs->trans("DatasetToImport").'</td>';
print '<td>';
$entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]);
@ -518,7 +519,9 @@ if ($step == 2 && $datatoimport) {
$text = $objmodelimport->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).'</td>';
print '<td style="text-align:center">';
print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>';
print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample");
print '</a>';
print ' <span class="opacitymedium hideonsmartphone">('.$langs->trans("StarAreMandatory").')</span>';
print '</td>';
// Action button
print '<td style="text-align:right">';
@ -601,11 +604,13 @@ if ($step == 3 && $datatoimport) {
// Source file format
print '<tr><td class="titlefield">'.$langs->trans("SourceFileFormat").'</td>';
print '<td>';
print '<td class="nowraponall">';
$text = $objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
print '</td><td style="text-align:right" class="nowrap">';
print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample").'</a>';
print img_picto('', 'download', 'class="paddingright opacitymedium"').'<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank">'.$langs->trans("DownloadEmptyExample");
print '</a>';
print ' <span class="opacitymedium hideonsmartphone">('.$langs->trans("StarAreMandatory").')</span>';
print '</td></tr>';
print '</table>';
@ -640,18 +645,13 @@ if ($step == 3 && $datatoimport) {
print $s;
print '</span><br><br>';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent" width="100%" cellpadding="4">';
$filetoimport = '';
//print '<tr class="liste_titre"><td colspan="6">'.$langs->trans("FileWithDataToImport").'</td></tr>';
// Input file name box
print '<tr class="oddeven nohover"><td colspan="6">';
print '<div class="marginbottomonly">';
print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; ';
$out = (empty($conf->global->MAIN_UPLOAD_DOC) ? ' disabled' : '');
print '<input type="submit" class="button" value="'.$langs->trans("AddFile").'"'.$out.' name="sendit">';
print '<input type="submit" class="button small" value="'.$langs->trans("AddFile").'"'.$out.' name="sendit">';
$out = '';
if (!empty($conf->global->MAIN_UPLOAD_DOC)) {
$max = $conf->global->MAIN_UPLOAD_DOC; // In Kb
@ -704,8 +704,10 @@ if ($step == 3 && $datatoimport) {
$out .= ' ('.$langs->trans("UploadDisabled").')';
}
print $out;
print '</td>';
print "</tr>\n";
print '</div>';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table class="noborder centpercent" width="100%" cellpadding="4">';
// Search available imports
$filearray = dol_dir_list($conf->import->dir_temp, 'files', 0, '', '', 'name', SORT_DESC);
@ -968,7 +970,7 @@ if ($step == 4 && $datatoimport) {
$s = str_replace('{s1}', img_picto('', 'grip_title', '', false, 0, 0, '', '', 0), $s);
print $s;
print '</span> ';
$htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1);
$htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1, $user->id);
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
print '</div>';
print '</form>';
@ -1050,8 +1052,8 @@ if ($step == 4 && $datatoimport) {
$entityicon = $entitytoicon[$entity] ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ...
$entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ...
print '<td class="nowrap" style="font-weight: normal">=>'.img_object('', $entityicon).' '.$langs->trans($entitylang).'</td>';
print '<td style="font-weight: normal">';
print '<td class="nowraponall" style="font-weight: normal">=>'.img_object('', $entityicon).' '.$langs->trans($entitylang).'</td>';
print '<td class="nowraponall" style="font-weight: normal">';
$newlabel = preg_replace('/\*$/', '', $label);
$text = $langs->trans($newlabel);
$more = '';
@ -1066,7 +1068,7 @@ if ($step == 4 && $datatoimport) {
print $text;
print '</td>';
// Info field
print '<td style="font-weight:normal; text-align:right">';
print '<td class="nowraponall" style="font-weight:normal; text-align:right">';
$filecolumn = $array_match_database_to_file[$code];
// Source field info
$htmltext = '<b><u>'.$langs->trans("FieldSource").'</u></b><br>';
@ -1125,7 +1127,6 @@ if ($step == 4 && $datatoimport) {
print '</td>';
print '</tr>';
$save_select .= $bit;
}
print '</table>';
@ -1246,31 +1247,55 @@ if ($step == 4 && $datatoimport) {
print '<input type="hidden" value="'.dol_escape_htmltag($separator).'" name="separator">';
print '<input type="hidden" value="'.dol_escape_htmltag($enclosure).'" name="enclosure">';
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
print '<table summary="selectofimportprofil" class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("ImportModelName").'</td>';
print '<td>&nbsp;</td>';
print '<td>'.$langs->trans("Visibility").'</td>';
print '<td></td>';
print '</tr>';
print '<tr class="oddeven">';
print '<td><input name="import_name" size="48" value=""></td><td style="text-align:right">';
print '<td><input name="import_name" value=""></td>';
print '<td>';
$arrayvisibility = array('private'=>$langs->trans("Private"), 'all'=>$langs->trans("Everybody"));
print $form->selectarray('visibility', $arrayvisibility, 'private');
print '</td>';
print '<td class="right">';
print '<input type="submit" class="button" value="'.$langs->trans("SaveImportProfile").'">';
print '</td></tr>';
// List of existing import profils
$sql = "SELECT rowid, label";
$sql = "SELECT rowid, label, fk_user, entity";
$sql .= " FROM ".MAIN_DB_PREFIX."import_model";
$sql .= " WHERE type = '".$db->escape($datatoimport)."'";
if (empty($conf->global->EXPORTS_SHARE_MODELS)) { // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner.
$sql .= " AND fk_user IN (0, ".((int) $user->id).")";
}
$sql .= " ORDER BY rowid";
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$tmpuser = new user($db);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
print '<tr class="oddeven"><td>';
print $obj->label;
print '</td><td style="text-align:right">';
print '</td>';
print '<td>';
if (empty($obj->fk_user)) {
print $langs->trans("Everybody");
} else {
$tmpuser->fetch($obj->fk_user);
print $tmpuser->getNomUrl(1);
}
print '</td>';
print '<td class="right">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?step='.$step.$param.'&action=deleteprof&token='.newToken().'&id='.$obj->rowid.'&filetoimport='.urlencode($filetoimport).'">';
print img_delete();
print '</a>';
@ -1282,6 +1307,8 @@ if ($step == 4 && $datatoimport) {
}
print '</table>';
print '</div>';
print '</form>';
}
}
@ -2100,14 +2127,14 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
print '&nbsp;';
print '</td>';
print '</tr>';
} else // Print field of source file
{
} else {
// Print field of source file
print '<tr'.($nostyle ? '' : ' '.$bc[$var]).' style="height:'.$height.'">';
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
print img_picto($langs->trans("MoveField", $pos), 'grip_title', 'class="boxhandle" style="cursor:move;"');
print '</td>';
print '<td style="font-weight: normal">';
print '<td class="nowraponall" style="font-weight: normal">';
print $langs->trans("Field").' '.$pos;
$example = $fieldssource[$pos]['example1'];
if ($example) {

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -101,7 +102,36 @@ if (!empty($conf->global->MAIN_MOTD)) {
}
}
/*
* Show security warnings
*/
// Security warning repertoire install existe (si utilisateur admin)
if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) {
$message = '';
// Check if install lock file is present
$lockfile = DOL_DATA_ROOT.'/install.lock';
if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) {
$langs->load("errors");
//if (! empty($message)) $message.='<br>';
$message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
// Conf files must be in read only mode
if (is_writable($conffile)) {
$langs->load("errors");
//$langs->load("other");
//if (! empty($message)) $message.='<br>';
$message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
if ($message) {
print $message;
//$message.='<br>';
//print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install"));
}
}
/*
* Dashboard Dolibarr states (statistics)
@ -722,38 +752,6 @@ print $boxlist;
print '</div>';
/*
* Show security warnings
*/
// Security warning repertoire install existe (si utilisateur admin)
if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) {
$message = '';
// Check if install lock file is present
$lockfile = DOL_DATA_ROOT.'/install.lock';
if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) {
$langs->load("errors");
//if (! empty($message)) $message.='<br>';
$message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
// Conf files must be in read only mode
if (is_writable($conffile)) {
$langs->load("errors");
//$langs->load("other");
//if (! empty($message)) $message.='<br>';
$message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth');
}
if ($message) {
print $message;
//$message.='<br>';
//print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install"));
}
}
//print 'mem='.memory_get_usage().' - '.memory_get_peak_usage();
// End of page

View File

@ -19,7 +19,8 @@
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('HELP', '15', 'Request for functionnal help', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or bug', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL);
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL);

View File

@ -37,6 +37,11 @@
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
-- VMYSQL4.1 update llx_propal set tms = null where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;
-- VPGSQL8.2 DROP TRIGGER update_customer_modtime ON llx_ecm_directories;
-- VPGSQL8.2 DROP TRIGGER update_customer_modtime ON llx_ecm_files;
-- VPGSQL8.2 CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
-- VPGSQL8.2 CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
ALTER TABLE llx_ecm_files ADD COLUMN note_private text AFTER fk_user_m;
ALTER TABLE llx_ecm_files ADD COLUMN note_public text AFTER note_private;
@ -67,9 +72,6 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position)
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI');
ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 11, 'US-BASE', 'USA basic chart of accounts', 1);
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1);
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1);
@ -84,6 +86,15 @@ DELETE FROM llx_user_param where param = 'MAIN_THEME' and value in ('auguria', '
-- For v14
UPDATE llx_c_ticket_type set label = 'Issue or bug' WHERE code = 'ISSUE';
INSERT INTO llx_c_ticket_type (code, pos, label, active, use_default, description) VALUES('PROBLEM', '22', 'Problem', 0, 0, NULL);
ALTER TABLE llx_import_model MODIFY COLUMN type varchar(64);
ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
ALTER TABLE llx_import_model ADD COLUMN entity integer DEFAULT 0 NOT NULL;
ALTER TABLE llx_export_model ADD COLUMN entity integer DEFAULT 0 NOT NULL;
ALTER TABLE llx_product_lot ADD COLUMN eol_date datetime NULL;
ALTER TABLE llx_product_lot ADD COLUMN manufacturing_date datetime NULL;
ALTER TABLE llx_product_lot ADD COLUMN scrapping_date datetime NULL;

View File

@ -22,10 +22,10 @@
create table llx_export_model
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 0, -- by default on all entities for compatibility
fk_user integer DEFAULT 0 NOT NULL,
label varchar(50) NOT NULL,
type varchar(64) NOT NULL,
field text NOT NULL,
filter text
)ENGINE=innodb;

View File

@ -21,8 +21,9 @@
create table llx_import_model
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 0 NOT NULL, -- by default on all entities for compatibility
fk_user integer DEFAULT 0 NOT NULL,
label varchar(50) NOT NULL,
type varchar(50) NOT NULL,
type varchar(64) NOT NULL,
field text NOT NULL
)ENGINE=innodb;

View File

@ -489,10 +489,16 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_VARIANTS'=>'newboxdefonly',
'MAIN_MODULE_WEBSITE'=>'newboxdefonly',
);
migrate_reload_modules($db, $langs, $conf, $listofmodule);
$result = migrate_reload_modules($db, $langs, $conf, $listofmodule);
if ($result < 0) {
$error++;
}
// Reload menus (this must be always and only into last targeted version)
migrate_reload_menu($db, $langs, $conf);
$result = migrate_reload_menu($db, $langs, $conf);
if ($result < 0) {
$error++;
}
}
// Can force activation of some module during migration with parameter 'enablemodules=MAIN_MODULE_XXX,MAIN_MODULE_YYY,...'
@ -545,10 +551,11 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
print '</table>';
// Set constant to ask to remake a new ping to inform about upgrade (if first ping was done and OK)
$sql = 'UPDATE '.MAIN_DB_PREFIX."const SET VALUE = 'torefresh' WHERE name = 'MAIN_FIRST_PING_OK_ID'";
$db->query($sql, 1);
if (!$error) {
// Set constant to ask to remake a new ping to inform about upgrade (if first ping was done and OK)
$sql = 'UPDATE '.MAIN_DB_PREFIX."const SET VALUE = 'torefresh' WHERE name = 'MAIN_FIRST_PING_OK_ID'";
$db->query($sql, 1);
}
// We always commit.
// Process is designed so we can run it several times whatever is situation.
@ -4282,6 +4289,22 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
$mod->init($reloadmode);
}
} elseif ($moduletoreload == 'MAIN_MODULE_KNOWLEDGEMANAGEMENT') { // Permission has changed into 3.0 and 3.1
dolibarr_install_syslog("upgrade2::migrate_reload_modules Knowledge Management");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modKnowledgeManagement.class.php';
if ($res) {
$mod = new modKnowledgeManagement($db);
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
$mod->init($reloadmode);
}
} elseif ($moduletoreload == 'MAIN_MODULE_EVENTORGANIZATION') { // Permission has changed into 3.0 and 3.1
dolibarr_install_syslog("upgrade2::migrate_reload_modules EventOrganization");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modEventOrganization.class.php';
if ($res) {
$mod = new modEventOrganization($db);
$mod->remove('noboxes'); // We need to remove because a permission id has been removed
$mod->init($reloadmode);
}
} elseif ($moduletoreload == 'MAIN_MODULE_PAYBOX') { // Permission has changed into 3.0
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Paybox module");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modPaybox.class.php';

View File

@ -0,0 +1,9 @@
Knowledge Management base
=========================
A complete knowledge database inside your application.
Store, search and retreive any article to keep your knowledge into a database. It can be used to manage a list of FAQ, or a database
of process, or solutions of common problems.
If you are using the Ticket module, you can also link each article of your knowledge management database to the main

View File

@ -113,7 +113,7 @@ class KnowledgeRecord extends CommonObject
'question' => array('type'=>'text', 'label'=>'Question', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'csslist'=>'tdoverflow300'),
'answer' => array('type'=>'html', 'label'=>'Solution', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>3, 'csslist'=>'tdoverflow300'),
//'url' => array('type'=>'varchar(255)', 'label'=>'URL', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflow200', 'help'=>'UrlForInfoPage'),
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php', 'label'=>'TicketGroup', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory'),
'fk_c_ticket_category' => array('type'=>'integer:CTicketCategory:ticket/class/cticketcategory.class.php', 'label'=>'GroupOfTicket', 'enabled'=>'$conf->ticket->enabled', 'position'=>512, 'notnull'=>0, 'visible'=>-1, 'help'=>'YouCanLinkArticleToATicketCategory'),
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Valid'),),
);
public $rowid;

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/class/knowledgerecord.class
require_once DOL_DOCUMENT_ROOT.'/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("knowledgemanagement", "other"));
$langs->loadLangs(array("knowledgemanagement", "ticket", "other"));
// Get parameters
$id = GETPOST('id', 'int');

View File

@ -196,6 +196,7 @@ if (empty($reshook)) {
*/
$form = new Form($db);
$user_temp = new User($db);
$now = dol_now();
@ -554,11 +555,43 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
$cssforfield .= ($cssforfield ? ' ' : '').'right';
}
//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
if (!empty($arrayfields['t.'.$key]['checked'])) {
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>';
if ($key == 'status') {
print $object->getLibStatut(5);
} elseif ($key == 'fk_user_creat') {
if ($object->fk_user_creat > 0) {
if (isset($conf->cache['user'][$object->fk_user_creat])) {
$user_temp = $conf->cache['user'][$object->fk_user_creat];
} else {
$user_temp = new User($db);
$user_temp->fetch($object->fk_user_creat);
$conf->cache['user'][$object->fk_user_creat] = $user_temp;
}
print $user_temp->getNomUrl(-1);
}
} elseif ($key == 'fk_user_modif') {
if ($object->fk_user_modif > 0) {
if (isset($conf->cache['user'][$object->fk_user_modif])) {
$user_temp = $conf->cache['user'][$object->fk_user_modif];
} else {
$user_temp = new User($db);
$user_temp->fetch($object->fk_user_modif);
$conf->cache['user'][$object->fk_user_modif] = $user_temp;
}
print $user_temp->getNomUrl(-1);
}
} elseif ($key == 'fk_user_valid') {
if ($object->fk_user_valid > 0) {
if (isset($conf->cache['user'][$object->fk_user_valid])) {
$user_temp = $conf->cache['user'][$object->fk_user_valid];
} else {
$user_temp = new User($db);
$user_temp->fetch($object->fk_user_valid);
$conf->cache['user'][$object->fk_user_valid] = $user_temp;
}
print $user_temp->getNomUrl(-1);
}
} else {
print $object->showOutputField($val, $key, $object->$key, '');
}

View File

@ -158,7 +158,7 @@ ACCOUNTING_LENGTH_AACCOUNT=Length of the third-party accounting accounts (If you
ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of an accounting account. Needed by some countries (like Switzerland). If set to off (default), you can set the following two parameters to ask the application to add virtual zeros.
BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account
ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal
ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties)
ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties, break ability to search on a part of value)
ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting.
ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default
@ -328,6 +328,9 @@ ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountanc
ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting)
## Export
NotifiedExportDate=Notified export date (modification of the entries will not be possible)
NotifiedValidationDate=Validation of the entries (modification or deletion of the entries will not be possible)
ConfirmExportFile=Confirmation of the generation of the accounting export file ?
ExportDraftJournal=Export draft journal
Modelcsv=Model of export
Selectmodelcsv=Select a model of export

View File

@ -221,8 +221,8 @@ NotCompatible=This module does not seem compatible with your Dolibarr %s (Min %s
CompatibleAfterUpdate=This module requires an update to your Dolibarr %s (Min %s - Max %s).
SeeInMarkerPlace=See in Market place
SeeSetupOfModule=See setup of module %s
SetOptionTo=Set option <b>%s</b> to %s
Updated=Updated
Nouveauté=Novelty
AchatTelechargement=Buy / Download
GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: <a href="%s">%s</a>.
DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules
@ -399,6 +399,7 @@ SecurityToken=Key to secure URLs
NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s
PDF=PDF
PDFDesc=Global options for PDF generation
PDFOtherDesc=PDF Option specific to some modules
PDFAddressForging=Rules for address section
HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT
PDFRulesForSalesTax=Rules for Sales Tax / VAT
@ -561,7 +562,7 @@ Module53Desc=Management of Services
Module54Name=Contracts/Subscriptions
Module54Desc=Management of contracts (services or recurring subscriptions)
Module55Name=Barcodes
Module55Desc=Barcode management
Module55Desc=Barcode or QR code management
Module56Name=Payment by credit transfer
Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries.
Module57Name=Payments by Direct Debit
@ -848,10 +849,10 @@ Permission402=Create/modify discounts
Permission403=Validate discounts
Permission404=Delete discounts
Permission430=Use Debug Bar
Permission511=Read payments of salaries (yours and subordinates)
Permission512=Create/modify payments of salaries
Permission514=Delete payments of salaries
Permission517=Read payments of salaries of everybody
Permission511=Read salaries and payments (yours and subordinates)
Permission512=Create/modify salaries and payments
Permission514=Delete salaries and payments
Permission517=Read salaries and payments everybody
Permission519=Export salaries
Permission520=Read Loans
Permission522=Create/modify loans
@ -965,6 +966,8 @@ Permission23003=Delete Scheduled job
Permission23004=Execute Scheduled job
Permission50101=Use Point of Sale (SimplePOS)
Permission50151=Use Point of Sale (TakePOS)
Permission50152=Edit sales lines
Permission50153=Edit ordered sales lines
Permission50201=Read transactions
Permission50202=Import transactions
Permission50330=Read objects of Zapier
@ -1039,11 +1042,12 @@ DictionaryMeasuringUnits=Measuring Units
DictionarySocialNetworks=Social Networks
DictionaryProspectStatus=Prospect status for companies
DictionaryProspectContactStatus=Prospect status for contacts
DictionaryHolidayTypes=Types of leave
DictionaryHolidayTypes=Leave - Types of leave
DictionaryOpportunityStatus=Lead status for project/lead
DictionaryExpenseTaxCat=Expense report - Transportation categories
DictionaryExpenseTaxRange=Expense report - Range by transportation category
DictionaryTransportMode=Intracomm report - Transport mode
DictionaryBatchStatus=Product lot/serial Quality Control status
TypeOfUnit=Type of unit
SetupSaved=Setup saved
SetupNotSaved=Setup not saved
@ -1187,7 +1191,7 @@ SetupDescription4=<a href="%s">%s -> %s</a><br><br>This software is a suite of m
SetupDescription5=Other Setup menu entries manage optional parameters.
AuditedSecurityEvents=Security events that are audited
NoSecurityEventsAreAduited=No security events are audited. You can enable them from menu %s
Audit=Audit
Audit=Security events
InfoDolibarr=About Dolibarr
InfoBrowser=About Browser
InfoOS=About OS
@ -1319,9 +1323,12 @@ ConditionIsCurrently=Condition is currently %s
YouUseBestDriver=You use driver %s which is the best driver currently available.
YouDoNotUseBestDriver=You use driver %s but driver %s is recommended.
NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization.
ComboListOptim=Combo list loading optimization
SearchOptim=Search optimization
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other.
YouHaveXObjectUseComboOptim=You have %s %s in the database. You can go into setup of module to enable loading of combo list on key pressed event.
YouHaveXObjectUseSearchOptim=You have %s %s in the database. You can add the constant %s to 1 in Home-Setup-Other.
YouHaveXObjectUseSearchOptimDesc=This limits the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response.
YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to %s in Home-Setup-Other.
BrowserIsOK=You are using the %s web browser. This browser is ok for security and performance.
BrowserIsKO=You are using the %s web browser. This browser is known to be a bad choice for security, performance and reliability. We recommend using Firefox, Chrome, Opera or Safari.
PHPModuleLoaded=PHP component %s is loaded
@ -1433,6 +1440,7 @@ MemberMainOptions=Main options
AdherentLoginRequired= Manage a Login for each member
AdherentMailRequired=Email required to create a new member
MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default
MemberCreateAnExternalUserForSubscriptionValidated=Create an external user login for each new member subscription validated
VisitorCanChooseItsPaymentMode=Visitor can choose from available payment modes
MEMBER_REMINDER_EMAIL=Enable automatic reminder <b>by email</b> of expired subscriptions. Note: Module <strong>%s</strong> must be enabled and correctly setup to send reminders.
MembersDocModules=Document templates for documents generated from member record
@ -1763,7 +1771,7 @@ AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting men
AGENDA_REMINDER_BROWSER=Enable event reminder <b>on user's browser</b> (When remind date is reached, a popup is shown by the browser. Each user can disable such notifications from its browser notification setup).
AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification
AGENDA_REMINDER_EMAIL=Enable event reminder <b>by emails</b> (remind option/delay can be defined on each event).
AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the task %s must be enough to be sure that the remind are sent at the correct moment.
AGENDA_REMINDER_EMAIL_NOTE=Note: The frequency of the scheduled job %s must be enough to be sure that the remind are sent at the correct moment.
AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view
##### Clicktodial #####
ClickToDialSetup=Click To Dial module setup
@ -1979,6 +1987,8 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
MAIN_PDF_MARGIN_TOP=Top margin on PDF
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF
NothingToSetup=There is no specific setup required for this module.
SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups
EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes.<br>For example:<br>CODEGRP1+CODEGRP2
@ -2096,7 +2106,6 @@ PDF_SHOW_PROJECT=Show project on document
ShowProjectLabel=Project Label
PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF.
FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book.
FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled
RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard
JumpToBoxes=Jump to Setup -> Widgets
MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time"
@ -2120,12 +2129,18 @@ ConfFileIsReadableOrWritableByAnyUsers=The conf file is readable or writable by
MailToSendEventOrganization=Event Organization
AGENDA_EVENT_DEFAULT_STATUS=Default event status when creating a event from the form
YouShouldDisablePHPFunctions=You should disable PHP functions
IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands (for the module Scheduled job, or to run the external command line Anti-virus for example), you shoud disable PHP functions
IfCLINotRequiredYouShouldDisablePHPFunctions=Except if you need to run system commands in custom code, you shoud disable PHP functions
PHPFunctionsRequiredForCLI=For shell purpose (like scheduled job backup or running an anitivurs program), you must keep PHP functions
NoWritableFilesFoundIntoRootDir=No writable files or directories of the common programs were found into your root directory (Good)
RecommendedValueIs=Recommended: %s
NotRecommended=Not recommanded
ARestrictedPath=A restricted path
CheckForModuleUpdate=Check for external modules updates
CheckForModuleUpdateHelp=This action will connect to editors of external modules to check if a new version is available.
ModuleUpdateAvailable=An update is available
NoExternalModuleWithUpdate=No updates found for external modules
SwaggerDescriptionFile=Swagger API description file (for use with redoc for example)
YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead.
RandomlySelectedIfSeveral=Randomly selected if several pictures are available
DatabasePasswordObfuscated=Database password is obfuscated in conf file
DatabasePasswordNotObfuscated=Database password is NOT obfuscated in conf file

View File

@ -4,7 +4,7 @@ Actions=Events
Agenda=Agenda
TMenuAgenda=Agenda
Agendas=Agendas
LocalAgenda=Internal calendar
LocalAgenda=Default calendar
ActionsOwnedBy=Event owned by
ActionsOwnedByShort=Owner
AffectedTo=Assigned to
@ -14,13 +14,13 @@ EventsNb=Number of events
ListOfActions=List of events
EventReports=Event reports
Location=Location
ToUserOfGroup=Event assigned to any user in group
ToUserOfGroup=Event assigned to any user in the group
EventOnFullDay=Event on all day(s)
MenuToDoActions=All incomplete events
MenuDoneActions=All terminated events
MenuToDoMyActions=My incomplete events
MenuDoneMyActions=My terminated events
ListOfEvents=List of events (internal calendar)
ListOfEvents=List of events (default calendar)
ActionsAskedBy=Events reported by
ActionsToDoBy=Events assigned to
ActionsDoneBy=Events done by
@ -38,6 +38,7 @@ ActionsEvents=Events for which Dolibarr will create an action in agenda automati
EventRemindersByEmailNotEnabled=Event reminders by email was not enabled into %s module setup.
##### Agenda event labels #####
NewCompanyToDolibarr=Third party %s created
COMPANY_MODIFYInDolibarr=Third party %s modified
COMPANY_DELETEInDolibarr=Third party %s deleted
ContractValidatedInDolibarr=Contract %s validated
CONTRACT_DELETEInDolibarr=Contract %s deleted
@ -87,6 +88,7 @@ OrderDeleted=Order deleted
InvoiceDeleted=Invoice deleted
DraftInvoiceDeleted=Draft invoice deleted
CONTACT_CREATEInDolibarr=Contact %s created
CONTACT_MODIFYInDolibarr=Contact %s modified
CONTACT_DELETEInDolibarr=Contact %s deleted
PRODUCT_CREATEInDolibarr=Product %s created
PRODUCT_MODIFYInDolibarr=Product %s modified
@ -119,6 +121,7 @@ MRP_MO_UNVALIDATEInDolibarr=MO set to draft status
MRP_MO_PRODUCEDInDolibarr=MO produced
MRP_MO_DELETEInDolibarr=MO deleted
MRP_MO_CANCELInDolibarr=MO canceled
PAIDInDolibarr=%s paid
##### End agenda events #####
AgendaModelModule=Document templates for event
DateActionStart=Start date
@ -130,7 +133,7 @@ AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to use
AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>.
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events.
AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays.
AgendaShowBirthdayEvents=Show birthdays of contacts
AgendaShowBirthdayEvents=Birthdays of contacts
AgendaHideBirthdayEvents=Hide birthdays of contacts
Busy=Busy
ExportDataset_event1=List of agenda events
@ -152,6 +155,7 @@ ActionType=Event type
DateActionBegin=Start event date
ConfirmCloneEvent=Are you sure you want to clone the event <b>%s</b>?
RepeatEvent=Repeat event
OnceOnly=Once only
EveryWeek=Every week
EveryMonth=Every month
DayOfMonth=Day of month
@ -165,4 +169,4 @@ TimeType=Duration type
ReminderType=Callback type
AddReminder=Create an automatic reminder notification for this event
ErrorReminderActionCommCreation=Error creating the reminder notification for this event
BrowserPush=Browser Notification
BrowserPush=Browser Popup Notification

View File

@ -259,6 +259,7 @@ DateMaxPayment=Payment due on
DateInvoice=Invoice date
DatePointOfTax=Point of tax
NoInvoice=No invoice
NoOpenInvoice=No open invoice
ClassifyBill=Classify invoice
SupplierBillsToPay=Unpaid vendor invoices
CustomerBillsUnpaid=Unpaid customer invoices
@ -589,3 +590,4 @@ FacParentLine=Invoice Line Parent
SituationTotalRayToRest=Remainder to pay without taxe
PDFSituationTitle=Situation n° %d
SituationTotalProgress=Total progress %d %%
SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s

View File

@ -102,7 +102,7 @@ CashDeskGenericMaskCodes6 = <br><b>{TN}</b> tag is used to add the terminal numb
TakeposGroupSameProduct=Group same products lines
StartAParallelSale=Start a new parallel sale
SaleStartedAt=Sale started at %s
ControlCashOpening=Control cash popup at opening POS
ControlCashOpening=Open the "Control cash" popup when opening the POS
CloseCashFence=Close cash desk control
CashReport=Cash report
MainPrinterToUse=Main printer to use
@ -126,5 +126,5 @@ ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled
AllowDelayedPayment=Allow delayed payment
PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
WeighingScale=Weighing scale
ShowPriceHT = Display the price excluding tax column
ShowPriceHTOnReceipt = Display the price excluding tax column on receipt
ShowPriceHT = Display the column with the price excluding tax (on screen)
ShowPriceHTOnReceipt = Display the column with the price excluding tax (on receipt)

View File

@ -286,3 +286,9 @@ ReportPurchaseTurnover=Purchase turnover invoiced
ReportPurchaseTurnoverCollected=Purchase turnover collected
IncludeVarpaysInResults = Include various payments in reports
IncludeLoansInResults = Include loans in reports
InvoiceLate30Days = Invoices late > 30 days
InvoiceLate15Days = Invoices late > 15 days
InvoiceLateMinus15Days = Invoices late
InvoiceNotLate = To be collected < 15 days
InvoiceNotLate15Days = To be collected in 15 days
InvoiceNotLate30Days = To be collected in 30 days

View File

@ -60,7 +60,7 @@ CronErrEndDateStartDt=End date cannot be before start date
StatusAtInstall=Status at module installation
CronStatusActiveBtn=Schedule
CronStatusInactiveBtn=Disable
CronTaskInactive=This job is disabled
CronTaskInactive=This job is disabled (not scheduled)
CronId=Id
CronClassFile=Filename with class
CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module). <BR> For example to call the fetch method of Dolibarr Product object /htdocs/<u>product</u>/class/product.class.php, the value for module is<br><i>product</i>

View File

@ -11,6 +11,7 @@ ErrorBadValueForParamNotAString=Bad value for your parameter. It appends general
ErrorRefAlreadyExists=Reference <b>%s</b> already exists.
ErrorLoginAlreadyExists=Login %s already exists.
ErrorGroupAlreadyExists=Group %s already exists.
ErrorEmailAlreadyExists=Email %s already exists.
ErrorRecordNotFound=Record not found.
ErrorFailToCopyFile=Failed to copy file '<b>%s</b>' into '<b>%s</b>'.
ErrorFailToCopyDir=Failed to copy directory '<b>%s</b>' into '<b>%s</b>'.
@ -117,7 +118,7 @@ ErrorCantReadFile=Failed to read file '%s'
ErrorCantReadDir=Failed to read directory '%s'
ErrorBadLoginPassword=Bad value for login or password
ErrorLoginDisabled=Your account has been disabled
ErrorFailedToRunExternalCommand=Failed to run external command. Check it is available and runnable by your PHP server. If PHP <b>Safe Mode</b> is enabled, check that command is inside a directory defined by parameter <b>safe_mode_exec_dir</b>.
ErrorFailedToRunExternalCommand=Failed to run external command. Check it is available and runnable by your PHP server user. Check also the command is not protected on shell level by a security layer like apparmor.
ErrorFailedToChangePassword=Failed to change password
ErrorLoginDoesNotExists=User with login <b>%s</b> could not be found.
ErrorLoginHasNoEmail=This user has no email address. Process aborted.
@ -262,6 +263,7 @@ ErrorDateIsInFuture=Error, the date can't be in the future
ErrorAnAmountWithoutTaxIsRequired=Error, amount is mandatory
ErrorAPercentIsRequired=Error, please fill in the percentage correctly
ErrorYouMustFirstSetupYourChartOfAccount=You must first setup your chart of account
ErrorFailedToFindEmailTemplate=Failed to find template with code name %s
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
@ -298,3 +300,4 @@ WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So y
ErrorActionCommPropertyUserowneridNotDefined=User's owner is required
ErrorActionCommBadType=Selected event type (id: %n, code: %s) do not exist in Event Type dictionary
CheckVersionFail=Version check fail
ErrorWrongFileName=Name of the file cannot have __SOMETHING__ in it

View File

@ -1,4 +1,5 @@
# Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
# Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -81,7 +82,10 @@ PriceOfBoothHelp=Subscription price to stand a booth
EventOrganizationICSLink=Link ICS for events
ConferenceOrBoothInformation=Conference Or Booth informations
Attendees = Attendees
DownloadICSLink = Download ICS link
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
#
# Status
#
@ -94,8 +98,46 @@ EvntOrgCancelled = Cancelled
#
# Public page
#
SuggestForm = Suggestion page
RegisterPage = Page for conferences or booth
EvntOrgRegistrationHelpMessage = Here, you can vote for an event, or suggest a new conference or booth for the project
EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project
EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project
ListOfSuggestedConferences = List of suggested conferences
ListOfSuggestedBooths = List of suggested booths
SuggestConference = Suggest a new conference
SuggestBooth = Suggest a booth
ViewAndVote = View and vote for suggested events
PublicAttendeeSubscriptionPage = Public link of registration to a conference
MissingOrBadSecureKey = The security key is invalid or missing
EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference
EvntOrgStartDuration = This conference starts on
EvntOrgEndDuration = and ends on
EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s'
EvntOrgDuration = This conference starts on %s and ends on %s.
ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
EventType = Event type
#
# Vote page
#
EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page.
EvntOrgRegistrationConfWelcomeMessage = Welcome on the conference suggestion page.
EvntOrgRegistrationBoothWelcomeMessage = Welcome on the booth suggestion page.
EvntOrgVoteHelpMessage = Here, you can view and vote for the suggested events for the project
VoteOk = Your vote has been accepted.
AlreadyVoted = You have already voted for this event.
VoteError = An error has occurred during the vote, please try again.
#
# SubscriptionOk page
#
SubscriptionOk = Your subscription to this conference has been validated
#
# Subscription validation mail
#
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a conference
#
# Payment page
#
Attendee = Attendee
PaymentConferenceAttendee = Conference attendee payment
PaymentBoothLocation = Booth location payment

View File

@ -9,7 +9,7 @@ ConfirmDeleteEstablishment=Are you sure you wish to delete this establishment?
OpenEtablishment=Open establishment
CloseEtablishment=Close establishment
# Dictionary
DictionaryPublicHolidays=HRM - Public holidays
DictionaryPublicHolidays=Leave - Public holidays
DictionaryDepartment=HRM - Department list
DictionaryFunction=HRM - Job positions
# Module

View File

@ -47,7 +47,7 @@ KnowledgeManagementArea = Knowledge Management
# Menu
#
MenuKnowledgeRecord = Knowledge base
ListOfArticles = List of articles
ListKnowledgeRecord = List of articles
NewKnowledgeRecord = New article
ValidateReply = Validate solution
KnowledgeRecords = Articles

View File

@ -3,6 +3,7 @@ Language_am_ET=Ethiopian
Language_ar_AR=Arabic
Language_ar_EG=Arabic (Egypt)
Language_ar_SA=Arabic
Language_ar_TN=Arabic (Tunisia)
Language_az_AZ=Azerbaijani
Language_bn_BD=Bengali
Language_bn_IN=Bengali (India)
@ -84,6 +85,7 @@ Language_nl_NL=Dutch
Language_pl_PL=Polish
Language_pt_BR=Portuguese (Brazil)
Language_pt_PT=Portuguese
Language_ro_MD=Romanian (Moldavia)
Language_ro_RO=Romanian
Language_ru_RU=Russian
Language_ru_UA=Russian (Ukraine)

View File

@ -430,6 +430,7 @@ LT1IN=CGST
LT2IN=SGST
LT1GC=Additionnal cents
VATRate=Tax Rate
RateOfTaxN=Rate of tax %s
VATCode=Tax Rate code
VATNPR=Tax Rate NPR
DefaultTaxRate=Default tax rate
@ -729,6 +730,7 @@ MenuMembers=Members
MenuAgendaGoogle=Google agenda
MenuTaxesAndSpecialExpenses=Taxes | Special expenses
ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb
ThisLimitIsDefinedInSetupAt=Dolibarr limit (Menu %s): %s Kb, PHP limit (Param %s): %s Kb
NoFileFound=No documents uploaded
CurrentUserLanguage=Current language
CurrentTheme=Current theme
@ -1072,6 +1074,7 @@ ValidFrom=Valid from
ValidUntil=Valid until
NoRecordedUsers=No users
ToClose=To close
ToRefuse=To refuse
ToProcess=To process
ToApprove=To approve
GlobalOpenedElemView=Global view
@ -1126,9 +1129,11 @@ UpdateForAllLines=Update for all lines
OnHold=On hold
Civility=Civility
AffectTag=Affect Tag
CreateExternalUser=Create external user
ConfirmAffectTag=Bulk Tag Affect
ConfirmAffectTagQuestion=Are you sure you want to affect tags to the %s selected record(s)?
CategTypeNotFound=No tag type found for type of records
CopiedToClipboard=Copied to clipboard
InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration.
ConfirmCancel=Are you sure you want to cancel
EmailMsgID=Email MsgID

View File

@ -213,3 +213,5 @@ SendReminderForExpiredSubscription=Send reminder by email to members when subscr
MembershipPaid=Membership paid for current period (until %s)
YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email
XMembersClosed=%s member(s) closed
XExternalUserCreated=%s external user(s) created
ForceMemberNature=Force member nature (Individual or Corporation)

View File

@ -143,3 +143,4 @@ AsciiToHtmlConverter=Ascii to HTML converter
AsciiToPdfConverter=Ascii to PDF converter
TableNotEmptyDropCanceled=Table not empty. Drop has been canceled.
ModuleBuilderNotAllowed=The module builder is available but not allowed to your user.
ImportExportProfiles=Import and export profiles

View File

@ -8,12 +8,12 @@ MenuBOM=Bills of material
LatestBOMModified=Latest %s Bills of materials modified
LatestMOModified=Latest %s Manufacturing Orders modified
Bom=Bills of Material
BillOfMaterials=Bill of Material
BillOfMaterials=Bill of Materials
BOMsSetup=Setup of module BOM
ListOfBOMs=List of bills of material - BOM
ListOfManufacturingOrders=List of Manufacturing Orders
NewBOM=New bill of material
ProductBOMHelp=Product to create with this BOM.<br>Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
NewBOM=New bill of materials
ProductBOMHelp=Product to create (or disassemble) with this BOM.<br>Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list.
BOMsNumberingModules=BOM numbering templates
BOMsModelModule=BOM document templates
MOsNumberingModules=MO numbering templates
@ -22,7 +22,7 @@ FreeLegalTextOnBOMs=Free text on document of BOM
WatermarkOnDraftBOMs=Watermark on draft BOM
FreeLegalTextOnMOs=Free text on document of MO
WatermarkOnDraftMOs=Watermark on draft MO
ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ?
ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of materials %s ?
ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ?
ManufacturingEfficiency=Manufacturing efficiency
ConsumptionEfficiency=Consumption efficiency
@ -30,8 +30,8 @@ ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the produc
ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product
DeleteBillOfMaterials=Delete Bill Of Materials
DeleteMo=Delete Manufacturing Order
ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material?
ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material?
ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Materials?
ConfirmDeleteMo=Are you sure you want to delete this Bill Of Materials?
MenuMRP=Manufacturing Orders
NewMO=New Manufacturing Order
QtyToProduce=Qty to produce
@ -39,7 +39,7 @@ DateStartPlannedMo=Date start planned
DateEndPlannedMo=Date end planned
KeepEmptyForAsap=Empty means 'As Soon As Possible'
EstimatedDuration=Estimated duration
EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM
EstimatedDurationDesc=Estimated duration to manufacture (or disassemble) this product using this BOM
ConfirmValidateBom=Are you sure you want to validate the BOM with the reference <strong>%s</strong> (you will be able to use it to build new Manufacturing Orders)
ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ?
ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders)
@ -63,13 +63,14 @@ ConsumeAndProduceAll=Consume and Produce All
Manufactured=Manufactured
TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce.
ForAQuantityOf=For a quantity to produce of %s
ForAQuantityToConsumeOf=For a quantity to disassemble of %s
ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order?
ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements.
ProductionForRef=Production of %s
AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached
NoStockChangeOnServices=No stock change on services
ProductQtyToConsumeByMO=Product quantity still to consume by open MO
ProductQtyToProduceByMO=Product quentity still to produce by open MO
ProductQtyToProduceByMO=Product quantity still to produce by open MO
AddNewConsumeLines=Add new line to consume
ProductsToConsume=Products to consume
ProductsToProduce=Products to produce
@ -83,15 +84,13 @@ Workstations=Workstations
WorkstationsDescription=Workstations management
WorkstationSetup = Workstations setup
WorkstationSetupPage = Workstations setup page
WorkstationAbout = About Workstation
WorkstationAboutPage = Workstations about page
WorkstationList=Workstation list
WorkstationCreate=Add new workstation
ConfirmEnableWorkstation=Are you sure you want to enable workstation <b>%s</b> ?
EnableAWorkstation=Enable a workstation
ConfirmDisableWorkstation=Are you sure you want to disable workstation <b>%s</b> ?
DisableAWorkstation=Disable a workstation
DeleteWorkstation=Supprimer
DeleteWorkstation=Delete
NbOperatorsRequired=Number of operators required
THMOperatorEstimated=Estimated operator THM
THMMachineEstimated=Estimated machine THM

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