diff --git a/ChangeLog b/ChangeLog
index 2c00bda48f3..5b73c4b2212 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,9 +18,65 @@ WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
+* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
+***** ChangeLog for 13.0.1 compared to 13.0.0 *****
+
+FIX: 10.0 before crediting a withdrawal receipt, check whether it has been credited already.
+FIX: 11.0 when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
+FIX: 11.0 when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
+FIX: create MO, Column 'tms' cannot be null
+FIX: #14290 #15900
+FIX: #16076
+FIX: #16077
+FIX: #16079
+FIX: #16080
+FIX: 16084
+FIX: #16107
+FIX: #16118 Timezone problem on some fields
+FIX: #16131
+FIX: #16135
+FIX: #16143
+FIX: #16156
+FIX: #16160
+FIX: #16185
+FIX: #16189, fix download/see check deposit PDF
+FIX: #16215
+FIX: Accountancy - label_operation is used instead of label_compte
+FIX: Add critical price patch
+FIX: Assignement of actors on tasks
+FIX: Bad dates on info tabs
+FIX: cash fence for takepos with multientity
+FIX: CSRF errors on margin forms
+FIX: encoding status in graph of vendor proposals
+FIX: Fix detect dispached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
+FIX: Hide/Unhide external ICSS calendars
+FIX: link to create event when task is in a project with a thirdparty
+FIX: Localtax must be converted with price2num
+FIX: manage price min for PRODUIT_CUSTOMER_PRICES
+FIX: Missing language ico
+FIX: Must not be able to edit vat of all lines if not draft
+FIX: Bad "htdocs" found into a path
+FIX: removed no more used proc update_modified_column_date_m on pgsql (its presence triggered errors)
+FIX: Vulnerability report by Ricardo Matias
+FIX: select default mail template
+FIX: Select transport mode function when creating a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql
+FIX: Merge of thirdparties : "unknow column fk_soc" + "Delivery" label
+FIX: SQL Error in group by with postgres or mysql strict mode
+FIX: takepos : load date function
+FIX: Timeout during import
+FIX: Trigger on expense report was not fired
+FIX: User creation of expense report not visible
+FIX: warning when adding a line if $remise_percent is an empty string
+FIX: status late on purchase orders
+FIX: ODT generation very slow
+FIX: amount in summary of report
+FIX: vat value when code contains number
+FIX: payment term label on PDF
+
+
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
For users:
diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 382b7ee6f62..341e99a8659 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -359,9 +359,9 @@ class AccountancyExport
print length_accountg($line->numero_compte).$separator;
print length_accounta($line->subledger_account).$separator;
print $line->sens.$separator;
- print price($line->montant).$separator;
- print $line->label_operation.$separator;
- print $line->doc_ref;
+ print price2fec(abs($line->montant)).$separator;
+ print dol_string_unaccent($line->label_operation).$separator;
+ print dol_string_unaccent($line->doc_ref);
print $end_line;
}
}
diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php
index d2755c9acd8..8f2ea3f0706 100644
--- a/htdocs/adherents/card.php
+++ b/htdocs/adherents/card.php
@@ -81,6 +81,9 @@ if (!empty($canvas)) {
$objcanvas->getCanvas('adherent', 'membercard', $canvas);
}
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('membercard', 'globalcard'));
+
// Security check
$result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', 0);
@@ -107,9 +110,6 @@ if ($id) {
$caneditfieldmember = $user->rights->adherent->creer;
}
-// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
-$hookmanager->initHooks(array('membercard', 'globalcard'));
-
/*
@@ -796,7 +796,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$adht = new AdherentType($db);
- print load_fiche_titre($langs->trans("NewMember"), '', 'members');
+ print load_fiche_titre($langs->trans("NewMember"), '', $object->picto);
if ($conf->use_javascript_ajax) {
print "\n".''."\n";
}
@@ -475,7 +472,7 @@ if ($action == 'create')
// Auto create payment
print '
'.$langs->trans('AutomaticCreationPayment').'
';
- print '
'."\n";
+ print '
'."\n";
// Number
print '
'.$langs->trans('Numero');
diff --git a/htdocs/compta/tva/class/paymentvat.class.php b/htdocs/compta/tva/class/paymentvat.class.php
index 35178dbc0ee..13369e596bc 100644
--- a/htdocs/compta/tva/class/paymentvat.class.php
+++ b/htdocs/compta/tva/class/paymentvat.class.php
@@ -194,7 +194,7 @@ class PaymentVAT extends CommonObject
$remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT');
if ($remaintopay == 0)
{
- $result = $contrib->set_paid($user);
+ $result = $contrib->setPaid($user);
}
else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing.");
}
@@ -480,7 +480,7 @@ class PaymentVAT extends CommonObject
{
$this->id = 0;
- $this->fk_tva = '';
+ $this->fk_tva = 0;
$this->datec = '';
$this->tms = '';
$this->datep = '';
@@ -489,9 +489,9 @@ class PaymentVAT extends CommonObject
$this->num_payment = '';
$this->note_private = '';
$this->note_public = '';
- $this->fk_bank = '';
- $this->fk_user_creat = '';
- $this->fk_user_modif = '';
+ $this->fk_bank = 0;
+ $this->fk_user_creat = 0;
+ $this->fk_user_modif = 0;
}
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 8a817e6575f..a39a00d8b01 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -246,14 +246,14 @@ class Tva extends CommonObject
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
- public function set_paid($user)
+ public function setPaid($user)
{
// phpcs:enable
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
$sql .= " paye = 1";
$sql .= " WHERE rowid = ".$this->id;
- $return = $this->db->query($sql);
- if ($return) return 1;
+ $resql = $this->db->query($sql);
+ if ($resql) return 1;
else return -1;
}
@@ -263,14 +263,14 @@ class Tva extends CommonObject
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
- public function set_unpaid($user)
+ public function setUnpaid($user)
{
// phpcs:enable
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
$sql .= " paye = 0";
$sql .= " WHERE rowid = ".$this->id;
- $return = $this->db->query($sql);
- if ($return) return 1;
+ $resql = $this->db->query($sql);
+ if ($resql) return 1;
else return -1;
}
diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
index d399584b48d..846f7440f97 100644
--- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php
+++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
@@ -40,11 +40,11 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
*/
public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
{
- $this->db = $db;
+ $this->db = $db;
$this->dirmodule = $dirmodule;
- $this->targetmodule = $targetmodule;
- $this->canvas = $canvas;
- $this->card = $card;
+ $this->targetmodule = $targetmodule;
+ $this->canvas = $canvas;
+ $this->card = $card;
}
/**
@@ -55,13 +55,19 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
*/
private function getTitle($action)
{
- global $langs;
+ global $langs, $conf;
$out = '';
- if ($action == 'view') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress"));
- if ($action == 'edit') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress"));
- if ($action == 'create') $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
+ if ($action == 'view') {
+ $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contact") : $langs->trans("ContactAddress"));
+ }
+ if ($action == 'edit') {
+ $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("EditContact") : $langs->trans("EditContactAddress"));
+ }
+ if ($action == 'create') {
+ $out .= (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress"));
+ }
return $out;
}
@@ -89,8 +95,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
$this->tpl['error'] = $this->error;
$this->tpl['errors'] = $this->errors;
- if ($action == 'view')
- {
+ if ($action == 'view') {
// Card header
$head = contact_prepare_head($this->object);
$title = $this->getTitle($action);
@@ -106,14 +111,12 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
} else {
// Confirm delete contact
- if ($action == 'delete' && $user->rights->societe->contact->supprimer)
- {
+ if ($action == 'delete' && $user->rights->societe->contact->supprimer) {
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1);
}
}
- if ($action == 'list')
- {
+ if ($action == 'list') {
$this->LoadListDatas($limit, $offset, $sortfield, $sortorder);
}
}
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 94eb700ab92..1d2cb3355a5 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -260,10 +260,25 @@ class Contact extends CommonObject
public $birthday;
public $default_lang;
- public $ref_facturation; // Reference number of invoice for which it is contact
- public $ref_contrat; // Nb de reference contrat pour lequel il est contact
- public $ref_commande; // Nb de reference commande pour lequel il est contact
- public $ref_propal; // Nb de reference propal pour lequel il est contact
+ /**
+ * @var int Number of invoices for which he is contact
+ */
+ public $ref_facturation;
+
+ /**
+ * @var int Number of contracts for which he is contact
+ */
+ public $ref_contrat;
+
+ /**
+ * @var int Number of orders for which he is contact
+ */
+ public $ref_commande;
+
+ /**
+ * @var int Number of proposals for which he is contact
+ */
+ public $ref_propal;
/**
* @var int user ID
@@ -412,9 +427,15 @@ class Contact extends CommonObject
$this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name);
$this->firstname = trim($this->firstname);
$this->setUpperOrLowerCase();
- if (empty($this->socid)) $this->socid = 0;
- if (empty($this->priv)) $this->priv = 0;
- if (empty($this->statut)) $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request
+ if (empty($this->socid)) {
+ $this->socid = 0;
+ }
+ if (empty($this->priv)) {
+ $this->priv = 0;
+ }
+ if (empty($this->statut)) {
+ $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request
+ }
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
@@ -610,88 +631,72 @@ class Contact extends CommonObject
$tmpobj = new User($this->db);
$tmpobj->fetch($this->user_id);
$usermustbemodified = 0;
- if ($tmpobj->office_phone != $this->phone_pro)
- {
+ if ($tmpobj->office_phone != $this->phone_pro) {
$tmpobj->office_phone = $this->phone_pro;
$usermustbemodified++;
}
- if ($tmpobj->office_fax != $this->fax)
- {
+ if ($tmpobj->office_fax != $this->fax) {
$tmpobj->office_fax = $this->fax;
$usermustbemodified++;
}
- if ($tmpobj->address != $this->address)
- {
+ if ($tmpobj->address != $this->address) {
$tmpobj->address = $this->address;
$usermustbemodified++;
}
- if ($tmpobj->town != $this->town)
- {
+ if ($tmpobj->town != $this->town) {
$tmpobj->town = $this->town;
$usermustbemodified++;
}
- if ($tmpobj->zip != $this->zip)
- {
+ if ($tmpobj->zip != $this->zip) {
$tmpobj->zip = $this->zip;
$usermustbemodified++;
}
- if ($tmpobj->zip != $this->zip)
- {
+ if ($tmpobj->zip != $this->zip) {
$tmpobj->state_id = $this->state_id;
$usermustbemodified++;
}
- if ($tmpobj->country_id != $this->country_id)
- {
+ if ($tmpobj->country_id != $this->country_id) {
$tmpobj->country_id = $this->country_id;
$usermustbemodified++;
}
- if ($tmpobj->email != $this->email)
- {
+ if ($tmpobj->email != $this->email) {
$tmpobj->email = $this->email;
$usermustbemodified++;
}
- if (!empty(array_diff($tmpobj->socialnetworks, $this->socialnetworks)))
- {
+ if (!empty(array_diff($tmpobj->socialnetworks, $this->socialnetworks))) {
$tmpobj->socialnetworks = $this->socialnetworks;
$usermustbemodified++;
}
- // if ($tmpobj->skype != $this->skype)
- // {
+ // if ($tmpobj->skype != $this->skype) {
// $tmpobj->skype = $this->skype;
// $usermustbemodified++;
// }
- // if ($tmpobj->twitter != $this->twitter)
- // {
+ // if ($tmpobj->twitter != $this->twitter) {
// $tmpobj->twitter = $this->twitter;
// $usermustbemodified++;
// }
- // if ($tmpobj->facebook != $this->facebook)
- // {
+ // if ($tmpobj->facebook != $this->facebook) {
// $tmpobj->facebook = $this->facebook;
// $usermustbemodified++;
// }
- // if ($tmpobj->linkedin != $this->linkedin)
- // {
+ // if ($tmpobj->linkedin != $this->linkedin) {
// $tmpobj->linkedin = $this->linkedin;
// $usermustbemodified++;
// }
- if ($usermustbemodified)
- {
+ if ($usermustbemodified) {
$result = $tmpobj->update($user, 0, 1, 1, 1);
if ($result < 0) { $error++; }
}
}
- if (!$error && !$notrigger)
- {
+ if (!$error && !$notrigger) {
// Call trigger
$result = $this->call_trigger('CONTACT_MODIFY', $user);
if ($result < 0) { $error++; }
// End call triggers
}
- if (!$error)
- {
+ if (!$error) {
$this->db->commit();
return 1;
} else {
@@ -723,9 +728,13 @@ class Contact extends CommonObject
// phpcs:enable
global $conf;
$dn = '';
- if ($mode == 0) $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS].",".$conf->global->LDAP_CONTACT_DN;
- elseif ($mode == 1) $dn = $conf->global->LDAP_CONTACT_DN;
- elseif ($mode == 2) $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS];
+ if ($mode == 0) {
+ $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS].",".$conf->global->LDAP_CONTACT_DN;
+ } elseif ($mode == 1) {
+ $dn = $conf->global->LDAP_CONTACT_DN;
+ } elseif ($mode == 2) {
+ $dn = $conf->global->LDAP_KEY_CONTACTS."=".$info[$conf->global->LDAP_KEY_CONTACTS];
+ }
return $dn;
}
diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php
index 8d78b410329..0c4a683ae33 100644
--- a/htdocs/contrat/card.php
+++ b/htdocs/contrat/card.php
@@ -889,8 +889,8 @@ if (empty($reshook))
$action = 'editref';
} else {
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
- $old_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($old_ref);
- $new_filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
+ $old_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($old_ref);
+ $new_filedir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
$files = dol_dir_list($old_filedir);
if (!empty($files))
@@ -935,7 +935,7 @@ if (empty($reshook))
// Actions to build doc
- $upload_dir = $conf->contrat->dir_output;
+ $upload_dir = $conf->contrat->multidir_output[$object->entity];
$permissiontoadd = $user->rights->contrat->creer;
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
@@ -2137,13 +2137,13 @@ if ($action == 'create')
* Documents generes
*/
$filename = dol_sanitizeFileName($object->ref);
- $filedir = $conf->contrat->dir_output."/".dol_sanitizeFileName($object->ref);
+ $filedir = $conf->contrat->multidir_output[$object->entity]."/".dol_sanitizeFileName($object->ref);
$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
$genallowed = $user->rights->contrat->lire;
$delallowed = $user->rights->contrat->creer;
- print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang);
+ print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, ($object->model_pdf ? $object->model_pdf : $conf->global->CONTRACT_ADDON_PDF), 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang, '', $object);
// Show links to link elements
@@ -2168,7 +2168,7 @@ if ($action == 'create')
// Presend form
$modelmail = 'contract';
$defaulttopic = 'SendContractRef';
- $diroutput = $conf->contrat->dir_output;
+ $diroutput = $conf->contrat->multidir_output[$object->entity];
$trackid = 'con'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 36edee80669..7c99a9483b9 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -1296,7 +1296,7 @@ class Contrat extends CommonObject
$ref = dol_sanitizeFileName($this->ref);
if ($conf->contrat->dir_output)
{
- $dir = $conf->contrat->dir_output."/".$ref;
+ $dir = $conf->contrat->multidir_output[$this->entity]."/".$ref;
if (file_exists($dir))
{
$res = @dol_delete_dir_recursive($dir);
diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php
index b68da3170ed..ba15af0de19 100644
--- a/htdocs/contrat/document.php
+++ b/htdocs/contrat/document.php
@@ -74,7 +74,7 @@ if ($object->id > 0)
$object->fetch_thirdparty();
}
-$upload_dir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($object->ref);
+$upload_dir = $conf->contrat->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
$modulepart = 'contract';
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php
index a4fea62133c..a890b1f3ce2 100644
--- a/htdocs/contrat/list.php
+++ b/htdocs/contrat/list.php
@@ -33,6 +33,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
@@ -203,7 +204,7 @@ $formcompany = new FormCompany($db);
$contracttmp = new Contrat($db);
$sql = 'SELECT';
-$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
+$sql .= " c.rowid, c.ref, c.datec as date_creation, c.tms as date_update, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias, s.email, s.town, s.zip, s.fk_pays as country_id, s.client, s.code_client, s.status as company_status, s.logo as company_logo,';
$sql .= " typent.code as typent_code,";
$sql .= " state.code_departement as state_code, state.nom as state_name,";
@@ -259,7 +260,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
-$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public,";
+$sql .= " GROUP BY c.rowid, c.ref, c.datec, c.tms, c.date_contrat, c.statut, c.ref_customer, c.ref_supplier, c.note_private, c.note_public, c.entity,";
$sql .= ' s.rowid, s.nom, s.name_alias, s.email, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.status, s.logo,';
$sql .= " typent.code,";
$sql .= " state.code_departement, state.nom";
@@ -643,7 +644,7 @@ while ($i < min($num, $limit))
}
$filename = dol_sanitizeFileName($obj->ref);
- $filedir = $conf->contrat->dir_output.'/'.dol_sanitizeFileName($obj->ref);
+ $filedir = $conf->contrat->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
print $formfile->getDocumentsLink($contracttmp->element, $filename, $filedir);
print '
';
if (!$i) $totalarray['nbfield']++;
}
// Plannned date of delivery
- if (!empty($arrayfields['cf.date_delivery']['checked']))
+ if (!empty($arrayfields['cf.date_livraison']['checked']))
{
print '
__(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+
create table llx_salary
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
index ded61d49e8b..5749acd93d8 100644
--- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
+++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
@@ -37,7 +37,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
date_birth date,
remuneration_requested integer,
remuneration_proposed integer,
- email_msgid varchar(255),
+ email_msgid varchar(175), -- Do not use a too large value, it generates trouble with unique index
fk_recruitment_origin INTEGER NULL
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php
index 14138dc5664..baac0eb2cbd 100644
--- a/htdocs/install/repair.php
+++ b/htdocs/install/repair.php
@@ -223,7 +223,7 @@ if ($ok && GETPOST('standard', 'alpha'))
{
$extrafields = new ExtraFields($db);
$listofmodulesextra = array('societe'=>'societe', 'adherent'=>'adherent', 'product'=>'product',
- 'socpeople'=>'socpeople', 'commande'=>'commande', 'facture'=>'facture',
+ 'socpeople'=>'socpeople', 'propal'=>'propal', 'commande'=>'commande', 'facture'=>'facture',
'supplier_proposal'=>'supplier_proposal', 'commande_fournisseur'=>'commande_fournisseur', 'facture_fourn'=>'facture_fourn',
'actioncomm'=>'actioncomm', 'bom_bom'=>'bom_bom', 'mrp_mo'=>'mrp_mo',
'adherent_type'=>'adherent_type', 'user'=>'user', 'projet'=>'projet', 'projet_task'=>'projet_task');
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 07c68a498b2..1dc7180bc4b 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -469,6 +469,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
'MAIN_MODULE_CRON'=>'newboxdefonly',
'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
+ 'MAIN_MODULE_BLOCKEDLOG'=>'noboxes',
'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
'MAIN_MODULE_DON'=>'newboxdefonly',
'MAIN_MODULE_ECM'=>'newboxdefonly',
@@ -482,7 +483,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
'MAIN_MODULE_PRINTING'=>'newboxdefonly',
'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
- 'MAIN_MODULE_RESOURCE'=>'newboxdefonly',
+ 'MAIN_MODULE_RESOURCE'=>'noboxes',
'MAIN_MODULE_SALARIES'=>'newboxdefonly',
'MAIN_MODULE_SYSLOG'=>'newboxdefonly',
'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
@@ -4289,7 +4290,7 @@ function migrate_delete_old_dir($db, $langs, $conf)
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
- * @param array $listofmodule List of modules
+ * @param array $listofmodule List of modules, like array('MODULE_KEY_NAME'=>', $reloadmode)
* @param int $force 1=Reload module even if not already loaded
* @return int <0 if KO, >0 if OK
*/
@@ -4328,6 +4329,15 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->remove('noboxes');
$mod->init($reloadmode);
}
+ } elseif ($moduletoreload == 'MAIN_MODULE_BLOCKEDLOG') {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate BlockedLog module");
+ $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modBlockedLog.class.php';
+ if ($res) {
+ $mod = new modBlockedLog($db);
+ // For this module we only reload menus.
+ $mod->delete_menus();
+ $mod->insert_menus($reloadmode);
+ }
} elseif ($moduletoreload == 'MAIN_MODULE_CRON') {
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Cron module");
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php';
@@ -4472,7 +4482,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
$mod->remove('noboxes'); // We need to remove because menu entries has changed
$mod->init($reloadmode);
}
- } else {
+ } else { // Other generic cases/modules
$reg = array();
$tmp = preg_match('/MAIN_MODULE_([a-zA-Z0-9]+)/', $moduletoreload, $reg);
if (!empty($reg[1]))
@@ -4484,12 +4494,15 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
{
$moduletoreloadshort = $reg[1];
}
+
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ".$moduletoreloadshort." with mode ".$reloadmode);
$res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php';
if ($res) {
$classname = 'mod'.$moduletoreloadshort;
$mod = new $classname($db);
+
//$mod->remove('noboxes');
+ $mod->delete_menus(); // We must delete to be sure it is insert with new values
$mod->init($reloadmode);
} else {
dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php');
@@ -4498,7 +4511,6 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
if ($res) {
$classname = 'mod'.$moduletoreloadshort;
$mod = new $classname($db);
- //$mod->remove('noboxes');
$mod->init($reloadmode);
} else {
dolibarr_install_syslog('Failed to include '.strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php', LOG_ERR);
@@ -4530,7 +4542,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo
/**
- * Reload menu if dynamic menus, if modified by version
+ * Reload SQL menu file (if dynamic menus, if modified by version)
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
diff --git a/htdocs/intracommreport/card.php b/htdocs/intracommreport/card.php
index 077f793d649..0226848bd48 100644
--- a/htdocs/intracommreport/card.php
+++ b/htdocs/intracommreport/card.php
@@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
$langs->loadLangs(array("intracommreport"));
-var_dump($_POST);
+
$action = GETPOST('action');
$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB ou DES
$year = GETPOSTINT('year');
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 35ba0390ad5..b7948532773 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -154,7 +154,7 @@ SystemToolsAreaDesc=This area provides administration functions. Use the menu to
Purge=Purge
PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server.
PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data)
-PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago.
+PurgeDeleteTemporaryFiles=Delete all log and temporary files (no risk of losing data). Parameter can be 'tempfilesold', 'logfiles' or both 'tempfilesold+logfiles'. Note: Deletion of temporary files is done only if the temp directory was created more than 24 hours ago.
PurgeDeleteTemporaryFilesShort=Delete log and temporary files
PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s. This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files.
PurgeRunNow=Purge now
@@ -232,6 +232,7 @@ BoxesAvailable=Widgets available
BoxesActivated=Widgets activated
ActivateOn=Activate on
ActiveOn=Activated on
+ActivatableOn=Activatable on
SourceFile=Source file
AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled
Required=Required
@@ -647,8 +648,8 @@ Module4000Name=HRM
Module4000Desc=Human resources management (management of department, employee contracts and feelings)
Module5000Name=Multi-company
Module5000Desc=Allows you to manage multiple companies
-Module6000Name=Workflow
-Module6000Desc=Workflow management (automatic creation of object and/or automatic status change)
+Module6000Name=Inter-modules Workflow
+Module6000Desc=Workflow management between different modules (automatic creation of object and/or automatic status change)
Module10000Name=Websites
Module10000Desc=Create websites (public) with a WYSIWYG editor. This is a webmaster or developer oriented CMS (it is better to know HTML and CSS language). Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the internet with your own domain name.
Module20000Name=Leave Request Management
@@ -1741,6 +1742,7 @@ YourCompanyDoesNotUseVAT=Your company has been defined to not use VAT (Home - Se
AccountancyCode=Accounting Code
AccountancyCodeSell=Sale account. code
AccountancyCodeBuy=Purchase account. code
+CREATE_NEW_VAT_WITHOUT_AUTO_PAYMENT=Keep the checkbox “Automatically create the payment” empty by default when creating a new tax
##### Agenda #####
AgendaSetup=Events and agenda module setup
PasswordTogetVCalExport=Key to authorize export link
@@ -1987,7 +1989,7 @@ SocialNetworkSetup=Setup of module Social Networks
EnableFeatureFor=Enable features for %s
VATIsUsedIsOff=Note: The option to use Sales Tax or VAT has been set to Off in the menu %s - %s, so Sales tax or Vat used will always be 0 for sales.
SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents
-FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
+FeatureSupportedOnTextFieldsOnly=Warning, feature supported on text fields and combo lists only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature.
EmailCollector=Email collector
EmailCollectorDescription=Add a scheduled job and a setup page to scan regularly email boxes (using IMAP protocol) and record emails received into your application, at the right place and/or create some records automatically (like leads).
NewEmailCollector=New Email Collector
@@ -2102,3 +2104,4 @@ SHOW_SUBPRODUCT_REF_IN_PDF=If the feature "%s" of module %s is used, show
AskThisIDToYourBank=Contact your bank to get this ID
AdvancedModeOnly=Permision available in Advanced permission mode only
ConfFileIsReadableOrWritableByAnyUsers=The conf file is reabable or writable by any users. Give permission to web server user and group only.
+MailToSendEventOrganization=Event Organization
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 88ff8fecdb6..7263b04730a 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -56,7 +56,8 @@ Paymentnumpad=Type of Pad to enter payment
Numberspad=Numbers Pad
BillsCoinsPad=Coins and banknotes Pad
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
-TakeposNeedsCategories=TakePOS needs product categories to work
+TakeposNeedsCategories=TakePOS needs at least one product categorie to work
+TakeposNeedsAtLeastOnSubCategoryIntoParentCategory=TakePOS needs at least 1 product category under the category %s to work
OrderNotes=Order Notes
CashDeskBankAccountFor=Default account to use for payments in
NoPaimementModesDefined=No paiment mode defined in TakePOS configuration
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index 99bed13179f..d4c9f95b0b9 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -203,6 +203,7 @@ ProfId2IT=-
ProfId3IT=-
ProfId4IT=-
ProfId5IT=EORI number
+ProfId6IT=-
ProfId1LU=Id. prof. 1 (R.C.S. Luxembourg)
ProfId2LU=Id. prof. 2 (Business permit)
ProfId3LU=-
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index baf04bbe4b8..545fcdb62fb 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -227,6 +227,7 @@ ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were
ErrorBadSyntaxForParamKeyForContent=Bad syntax for param keyforcontent. Must have a value starting with %s or %s
ErrorVariableKeyForContentMustBeSet=Error, the constant with name %s (with text content to show) or %s (with external url to show) must be set.
ErrorURLMustStartWithHttp=URL %s must start with http:// or https://
+ErrorHostMustNotStartWithHttp=Host name %s must NOT start with http:// or https://
ErrorNewRefIsAlreadyUsed=Error, the new reference is already used
ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible.
ErrorSearchCriteriaTooSmall=Search criteria too small.
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
new file mode 100644
index 00000000000..8a0475758e5
--- /dev/null
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -0,0 +1,57 @@
+# Copyright (C) 2021 Florian Henry
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+#
+# Generic
+#
+
+ModuleEventOrganizationName = Event Organization
+EventOrganizationDescription = Event Organization
+EventOrganizationDescriptionLong= Manage Event organization for conference, attendees, speaker, and attendees, with public subcription page
+
+#
+# Admin page
+#
+EventOrganizationSetup = Event Organization setup
+Settings = Settings
+EventOrganizationSetupPage = Event Organization setup page
+EVENTORGANIZATION_TASK_LABEL = Task label created when validate
+EVENTORGANIZATION_TASK_LABELTooltip = When validate a Conference or a booth, some tasks will be created in the project
for example: Send Call for Conference Send Call for Booth Receive call for conferences Receive call for Booth Open subscriptions to events for attendees Send remind of event to speakers Send remind of event to Booth hoster Send remind of event to attendees
+EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Category to add to third-parties automatically created when someone suggests a conference
+EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth
+EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference.
+EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth.
+EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a subscription to a booth has been paid.
+EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a subscription to an event has been paid.
+EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes
+EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers
+
+#
+# Object
+#
+EventOrganizationConfOrBooth= Conference Or Booth
+
+
+#
+# Template Mail
+#
+YourOragnisationEventConfRequestWasReceived = Your request for conference was received
+YourOragnisationEventBoothRequestWasReceived = Your request for booth was received
+EventOrganizationEmailAskConf = Request for conference
+EventOrganizationEmailAskBooth = Request for booth
+EventOrganizationEmailSubsBooth = Subscription for booth
+EventOrganizationEmailSubsEvent = Subscription for an event
+EventOrganizationMassEmailAttendes = Communication to attendes
+EventOrganizationMassEmailSpeakers = Communication to speakers
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index a5cd750e3d6..f7c55df211f 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -899,8 +899,10 @@ ViewAccountList=View ledger
ViewSubAccountList=View subaccount ledger
RemoveString=Remove string '%s'
SomeTranslationAreUncomplete=Some of the languages offered may be only partially translated or may contain errors. Please help to correct your language by registering at https://transifex.com/projects/p/dolibarr/ to add your improvements.
-DirectDownloadLink=Direct download link (public/external)
-DirectDownloadInternalLink=Direct download link (need to be logged and need permissions)
+DirectDownloadLink=Public download link
+PublicDownloadLinkDesc=Only the link is required to download the file
+DirectDownloadInternalLink=Private download link
+PrivateDownloadLinkDesc=You need to be logged and you need permissions to view or download the file
Download=Download
DownloadDocument=Download document
ActualizeCurrency=Update currency rate
@@ -1049,7 +1051,7 @@ KeyboardShortcut=Keyboard shortcut
AssignedTo=Assigned to
Deletedraft=Delete draft
ConfirmMassDraftDeletion=Draft mass delete confirmation
-FileSharedViaALink=File shared via a link
+FileSharedViaALink=File shared with a public link
SelectAThirdPartyFirst=Select a third party first...
YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
Inventory=Inventory
diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang
index 9ecc11ed93d..9ec22ad00cc 100644
--- a/htdocs/langs/en_US/products.lang
+++ b/htdocs/langs/en_US/products.lang
@@ -141,6 +141,7 @@ VATRateForSupplierProduct=VAT Rate (for this vendor/product)
DiscountQtyMin=Discount for this qty.
NoPriceDefinedForThisSupplier=No price/qty defined for this vendor/product
NoSupplierPriceDefinedForThisProduct=No vendor price/qty defined for this product
+PredefinedItem=Predefined item
PredefinedProductsToSell=Predefined Product
PredefinedServicesToSell=Predefined Service
PredefinedProductsAndServicesToSell=Predefined products/services to sell
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 2aedbd53377..3fbcbb0dca7 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -267,4 +267,7 @@ NewInvoice=New invoice
OneLinePerTask=One line per task
OneLinePerPeriod=One line per period
RefTaskParent=Ref. Parent Task
-ProfitIsCalculatedWith=Profit is calculated using
\ No newline at end of file
+ProfitIsCalculatedWith=Profit is calculated using
+AddPersonToTask=Add also to tasks
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress)
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100 %% progress won't be affected: you will have to close them manually. This option only affects open projects.
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index ad4946ee9f9..aabbe1791b3 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -99,6 +99,7 @@ VirtualStock=Virtual stock
VirtualStockAtDate=Virtual stock at date
VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished
VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc)
+AtDate=At date
IdWarehouse=Id warehouse
DescWareHouse=Description warehouse
LieuWareHouse=Localisation warehouse
diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang
index 7793fa5dead..b7babd403a1 100644
--- a/htdocs/langs/en_US/website.lang
+++ b/htdocs/langs/en_US/website.lang
@@ -46,12 +46,12 @@ SetHereVirtualHost=Use with Apache/NGinx/... Create on your web server
ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup:
YouCanAlsoTestWithPHPS=Use with PHP embedded server On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running php -S 0.0.0.0:8080 -t %s
YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org
-CheckVirtualHostPerms=Check also that virtual host has permission %s on files into %s
+CheckVirtualHostPerms=Check also that the virtual host user (for example www-data) has %s permissions on files into %s
ReadPerm=Read
WritePerm=Write
TestDeployOnWeb=Test/deploy on web
PreviewSiteServedByWebServer=Preview %s in a new tab.
The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory: %s URL served by external server: %s
-PreviewSiteServedByDolibarr=Preview %s in a new tab.
The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed. The inconvenient is that URL of pages are not user friendly and start with path of your Dolibarr. URL served by Dolibarr: %s
To use your own external web server to serve this web site, create a virtual host on your web server that point on directory %s then enter the name of this virtual server and click on the other preview button.
+PreviewSiteServedByDolibarr=Preview %s in a new tab.
The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed. The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr. URL served by Dolibarr: %s
To use your own external web server to serve this web site, create a virtual host on your web server that points on directory %s then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web".
VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined
NoPageYet=No pages yet
YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 2cff05c65db..639428eac1d 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -154,7 +154,7 @@ SystemToolsAreaDesc=Cet espace offre des fonctions d'administration diverses. Ut
Purge=Purger
PurgeAreaDesc=Cette page vous permet d'effacer tous les fichiers construits ou stockés par Dolibarr (fichiers temporaires ou tous les fichiers du répertoire %s). L'utilisation de cette fonction n'est pas nécessaire. Elle est fournie pour les utilisateurs qui hébergent Dolibarr chez un hébergeur qui n'offre pas les permissions de supprimer les fichiers sauvegardés par le serveur Web.
PurgeDeleteLogFile=Effacer les fichiers de traces de debug, incluant %s défini dans le module 'Journaux et traces' (pas de risque de perte de données)
-PurgeDeleteTemporaryFiles=Effacer tous les fichiers de log et fichiers temporaires (pas de risque de perte de données). Note : La suppression s'applique aux fichiers supprimés depuis plus de 24 heures.
+PurgeDeleteTemporaryFiles=Effacer tous les fichiers de log et fichiers temporaires (pas de risque de perte de données). Le paramètre peut être 'tempfilesold', 'logfiles' ou les 2 'tempfilesold+logfiles'. Note : La suppression s'applique aux fichiers supprimés depuis plus de 24 heures.
PurgeDeleteTemporaryFilesShort=Effacer les fichiers de log et fichiers temporaires
PurgeDeleteAllFilesInDocumentsDir=Effacer tous les fichiers du répertoire %s. Les fichiers temporaires mais aussi les fichiers «dumps» de sauvegarde de base de données, les fichiers joints aux éléments (tiers, factures, ...) ou fichiers stockés dans le module GED seront irrémédiablement effacés.
PurgeRunNow=Lancer la purge maintenant
diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang
index 1affdad0889..a963bffe13d 100644
--- a/htdocs/langs/fr_FR/projects.lang
+++ b/htdocs/langs/fr_FR/projects.lang
@@ -268,3 +268,5 @@ OneLinePerTask=Une ligne par tâche
OneLinePerPeriod=Une ligne par période
RefTaskParent=Réf. Tâche parent
ProfitIsCalculatedWith=Le bénéfice est calculé sur la base de
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classer le projet à clôturé lorsque toutes les tâches de ce projet sont à 100 %% de progression
+PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Non rétroactif : l’activation de cette option ne clôturera pas les projets dont les tâches sont déjà à 100 %%. Cette option ne classe que les projets ouverts.
diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php
index 29cae07e11d..1143fbcd474 100644
--- a/htdocs/loan/card.php
+++ b/htdocs/loan/card.php
@@ -67,7 +67,7 @@ if (empty($reshook))
if ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->loan->write)
{
$object->fetch($id);
- $result = $object->set_paid($user);
+ $result = $object->setPaid($user);
if ($result > 0)
{
setEventMessages($langs->trans('LoanPaid'), null, 'mesgs');
diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php
index 1a888375bf3..9f2d8297edc 100644
--- a/htdocs/loan/class/loan.class.php
+++ b/htdocs/loan/class/loan.class.php
@@ -379,12 +379,26 @@ class Loan extends CommonObject
/**
* Tag loan as paid completely
*
+ * @deprecated
+ * @see setPaid()
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
public function set_paid($user)
{
// phpcs:enable
+ dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE);
+ return $this->setPaid($user);
+ }
+
+ /**
+ * Tag loan as paid completely
+ *
+ * @param User $user Object user making change
+ * @return int <0 if KO, >0 if OK
+ */
+ public function setPaid($user)
+ {
$sql = "UPDATE ".MAIN_DB_PREFIX."loan SET";
$sql .= " paid = ".$this::STATUS_PAID;
$sql .= " WHERE rowid = ".$this->id;
@@ -399,14 +413,28 @@ class Loan extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Tag loan as payement started
+ * Tag loan as payment started
*
+ * @deprecated
+ * @see setStarted()
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
public function set_started($user)
{
// phpcs:enable
+ dol_syslog(get_class($this)."::set_started is deprecated, use setStarted instead", LOG_NOTICE);
+ return $this->setStarted($user);
+ }
+
+ /**
+ * Tag loan as payment started
+ *
+ * @param User $user Object user making change
+ * @return int <0 if KO, >0 if OK
+ */
+ public function setStarted($user)
+ {
$sql = "UPDATE ".MAIN_DB_PREFIX."loan SET";
$sql .= " paid = ".$this::STATUS_STARTED;
$sql .= " WHERE rowid = ".$this->id;
@@ -422,13 +450,26 @@ class Loan extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Tag loan as payement as unpaid
- *
+ * @deprecated
+ * @see setUnpaid()
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
public function set_unpaid($user)
{
// phpcs:enable
+ dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
+ return $this->setUnpaid($user);
+ }
+
+ /**
+ * Tag loan as payement as unpaid
+ *
+ * @param User $user Object user making change
+ * @return int <0 if KO, >0 if OK
+ */
+ public function setUnpaid($user)
+ {
$sql = "UPDATE ".MAIN_DB_PREFIX."loan SET";
$sql .= " paid = ".$this::STATUS_UNPAID;
$sql .= " WHERE rowid = ".$this->id;
diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php
index 34acb06f9ce..aa3f895f314 100644
--- a/htdocs/loan/class/paymentloan.class.php
+++ b/htdocs/loan/class/paymentloan.class.php
@@ -377,8 +377,7 @@ class PaymentLoan extends CommonObject
if ($sum_payment == 0)
{
dol_syslog(get_class($this)."::delete : set loan to unpaid", LOG_DEBUG);
- if ($loan->set_unpaid($user) < 1)
- {
+ if ($loan->setUnpaid($user) < 1) {
$error++;
dol_print_error($this->db);
}
@@ -532,7 +531,7 @@ class PaymentLoan extends CommonObject
if ($loan->paid == $loan::STATUS_UNPAID)
{
dol_syslog(get_class($this)."::addPaymentToBank : set loan payment to started", LOG_DEBUG);
- if ($loan->set_started($user) < 1)
+ if ($loan->setStarted($user) < 1)
{
$error++;
dol_print_error($this->db);
diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php
index 5e27a48fa02..b9e6783ceca 100644
--- a/htdocs/loan/schedule.php
+++ b/htdocs/loan/schedule.php
@@ -48,7 +48,9 @@ $object->fetch($loanid);
$echeances = new LoanSchedule($db);
$echeances->fetchAll($object->id);
-if ($object->paid > 0 && count($echeances->lines) == 0) $pay_without_schedule = 1;
+if ($object->paid > 0 && count($echeances->lines) == 0) {
+ $pay_without_schedule = 1;
+}
/*
* Actions
@@ -86,8 +88,9 @@ if ($action == 'createecheancier' && empty($pay_without_schedule)) {
$echeances->lines[] = $new_echeance;
$i++;
}
- var_dump($result);
- if ($result > 0) $db->commit();
+ if ($result > 0) {
+ $db->commit();
+ }
}
if ($action == 'updateecheancier' && empty($pay_without_schedule)) {
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index b314171c2c0..c91f4802974 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1517,7 +1517,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
// To use external ckeditor 4 js lib
$pathckeditor = constant('JS_CKEDITOR');
}
- print ''."\n";
print ''."\n";
print '';
+ } else {
+ $action = 'addcontact_confirm';
+ }
+}
+
// Add new contact
-if ($action == 'addcontact' && $user->rights->projet->creer)
+if ($action == 'addcontact_confirm' && $user->rights->projet->creer)
{
+ $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
+ $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
+
+ if (! ($contactid > 0)) {
+ $error++;
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors');
+ }
+
$result = 0;
$result = $object->fetch($id);
- if ($result > 0 && $id > 0)
+ if (!$error && $result > 0 && $id > 0)
{
- $contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
- $typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
+
+ if ($result == 0) {
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
+ }
+ elseif ($result < 0) {
+ if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
+ } else {
+ setEventMessages($object->error, $object->errors, 'errors');
+ }
+ }
+
+ $affecttotask=GETPOST('tasksavailable', 'intcomma');
+ if (!empty($affecttotask)) {
+ require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
+ $task_to_affect = explode(',', $affecttotask);
+ if (!empty($task_to_affect)) {
+ foreach ($task_to_affect as $task_id) {
+ if (GETPOSTISSET('person_'.$task_id) && GETPOST('person_'.$task_id, 'san_alpha')) {
+ $tasksToAffect = new Task($db);
+ $result=$tasksToAffect->fetch($task_id);
+ if ($result < 0) {
+ setEventMessages($tasksToAffect->error, null, 'errors');
+ } else {
+ $result = $tasksToAffect->add_contact($contactid, GETPOST('person_role_'.$task_id), GETPOST("source", 'aZ09'));
+ if ($result < 0) {
+ if ($tasksToAffect->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
+ } else {
+ setEventMessages($tasksToAffect->error, $tasksToAffect->errors, 'errors');
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
if ($result >= 0)
{
header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id);
exit;
- } else {
- if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
- {
- $langs->load("errors");
- setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
- } else {
- setEventMessages($object->error, $object->errors, 'errors');
- }
}
}
@@ -112,6 +233,7 @@ if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->pr
}
+
/*
* View
*/
@@ -122,7 +244,6 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
llxHeader('', $title, $help_url);
$form = new Form($db);
-$formcompany = new FormCompany($db);
$contactstatic = new Contact($db);
$userstatic = new User($db);
@@ -145,6 +266,16 @@ if ($id > 0 || !empty($ref))
$head = project_prepare_head($object);
print dol_get_fiche_head($head, 'contact', $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project'));
+ $formconfirm = $formconfirmtoaddtasks;
+
+ // Call Hook formConfirm
+ $parameters = array('formConfirm' => $formconfirm);
+ $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ if (empty($reshook)) $formconfirm .= $hookmanager->resPrint;
+ elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint;
+
+ // Print form confirm
+ print $formconfirm;
// Project card
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 08634cf6def..5cd7554c331 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -775,7 +775,6 @@ foreach ($listofreferent as $key => $value)
// Each element with at least one line is output
$qualifiedforfinalprofit = true;
if ($key == 'intervention' && empty($conf->global->PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT)) $qualifiedforfinalprofit = false;
- if ($key == 'propal' && $element->status != Propal::STATUS_SIGNED && $element->status != Propal::STATUS_BILLED) $qualifiedforfinalprofit = false;
//var_dump($key.' '.$qualifiedforfinalprofit);
// Calculate margin
@@ -784,7 +783,7 @@ foreach ($listofreferent as $key => $value)
$total_revenue_ht += $total_ht;
}
- if ($margin != "add") { // Revert sign
+ if ($margin != "add") { // Revert sign
$total_ht = -$total_ht;
$total_ttc = -$total_ttc;
}
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index b8ab088cf85..ad8418dfc0e 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -563,11 +563,10 @@ if (!empty($arrayfields['p.title']['checked']))
if (!empty($arrayfields['s.nom']['checked']))
{
print '
Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.
-
+
Unless the context is clear (as with the “Notifications” example, where it is understood that the “4” is the number of notifications), consider including additional context with a visually hidden piece of additional text.
-
+
Remember to use aria-label attribute for accessibility in Dolibarr. Don't forget to use aria-hidden on icons included in badges
Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only class.
-
-
+
+
Default status
-
+
Add any of the below mentioned modifier classes to change the appearance of a badge to be linked to a default status.
Note that depending on how they are used, badges may be confusing for users of screen readers and similar assistive technologies. While the styling of badges provides a visual cue as to their purpose, these users will simply be presented with the content of the badge. Depending on the specific situation, these badges may seem like random additional words or numbers at the end of a sentence, link, or button.
-
+
Unless the context is clear (as with the “Notifications” example, where it is understood that the “4” is the number of notifications), consider including additional context with a visually hidden piece of additional text.
-
+
Remember to use aria-label attribute for accessibility in Dolibarr. Don't forget to use aria-hidden on icons included in badges
-
-
-
+
+
+
Links
-
+
Using the contextual .badge-* classes on an <a> element quickly provide actionable badges with hover and focus states.
\n";
}
diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php
index ef12d844ddc..f53c2bc466d 100644
--- a/htdocs/reception/class/reception.class.php
+++ b/htdocs/reception/class/reception.class.php
@@ -1551,11 +1551,24 @@ class Reception extends CommonObject
/**
* Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
*
+ * @deprecated
+ * @see setBilled()
* @return int <0 if ko, >0 if ok
*/
public function set_billed()
{
// phpcs:enable
+ dol_syslog(get_class($this)."::set_billed is deprecated, use setBilled instead", LOG_NOTICE);
+ return $this->setBilled();
+ }
+
+ /**
+ * Classify the reception as invoiced (used when WORKFLOW_BILL_ON_RECEPTION is on)
+ *
+ * @return int <0 if ko, >0 if ok
+ */
+ public function setBilled()
+ {
global $user;
$error = 0;
diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php
index daaf9fbd623..3b9c1a9daa4 100644
--- a/htdocs/societe/admin/societe.php
+++ b/htdocs/societe/admin/societe.php
@@ -726,6 +726,7 @@ $form = new Form($db);
print '