diff --git a/ChangeLog b/ChangeLog index 48ba5daa562..f439186f5ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,27 +2,6 @@ English Dolibarr ChangeLog -------------------------------------------------------------- -***** ChangeLog for 13.0.4 compared to 13.0.2 ***** - -FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules). -FIX: 13.0 - fatal - missing inclusion of ajax.lib.php for calling `ajax_autocompleter()` -FIX: #17919 pictures in docs. -FIX: #18006 -FIX: Accountancy - if we define a date start, automatic binding try to continue to solve old binding -FIX: Accoutancy Limit date payment not registered on purchases operations -FIX: Can't edit replacement invoice -FIX: deposit can create credit note in payment conf -FIX: division by zero on create -FIX: holiday: balances not updated correctly with pgsql because of case sensitivity field -FIX: holiday: status filter parameter has been renamed but not in links it was used -FIX: List and Create Companies Left Menus -FIX: method exists -FIX: need to add payment sum to getlibstatus function in object linked block -FIX: permission to close a proposal when using advanced permissions -FIX: Problem of z-index with popup and top menu -FIX: same thing on supplier orders -FIX: Status of invoice when making a replacement invoice -FIX: update contact birthday alert ***** ChangeLog for 14.0.0 compared to 13.0.0 ***** @@ -249,6 +228,29 @@ Following changes may create regressions for some external modules, but were nec * 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.4 compared to 13.0.3 ***** + +FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules). +FIX: 13.0 - fatal - missing inclusion of ajax.lib.php for calling `ajax_autocompleter()` +FIX: #17919 pictures in docs. +FIX: #18006 +FIX: Accountancy - if we define a date start, automatic binding try to continue to solve old binding +FIX: Accoutancy Limit date payment not registered on purchases operations +FIX: Can't edit replacement invoice +FIX: deposit can create credit note in payment conf +FIX: division by zero on create +FIX: holiday: balances not updated correctly with pgsql because of case sensitivity field +FIX: holiday: status filter parameter has been renamed but not in links it was used +FIX: List and Create Companies Left Menus +FIX: method exists +FIX: need to add payment sum to getlibstatus function in object linked block +FIX: permission to close a proposal when using advanced permissions +FIX: Problem of z-index with popup and top menu +FIX: same thing on supplier orders +FIX: Status of invoice when making a replacement invoice +FIX: update contact birthday alert + + ***** ChangeLog for 13.0.3 compared to 13.0.2 ***** FIX: 13.0 warning - missing quotes around 'label' diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 7fd294b89b2..c6c0d277edd 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -2340,7 +2340,7 @@ class ActionComm extends CommonObject $sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray); //Topic - $sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->trans('EventReminder')); + $sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->transnoentities('EventReminder')); // Recipient $recipient = new User($this->db); diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index e95cc3366c5..9c587a934e2 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -47,7 +47,7 @@ $massaction = GETPOST('massaction', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $pid = GETPOST("search_projectid", 'int', 3) ?GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3); -$search_status = (GETPOST("search_status", 'alpha') != '') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha'); +$search_status = (GETPOST("search_status", 'aZ09') != '') ? GETPOST("search_status", 'aZ09') : GETPOST("status", 'aZ09'); $type = GETPOST('search_type', 'alphanohtml') ?GETPOST('search_type', 'alphanohtml') : GETPOST('type', 'alphanohtml'); $optioncss = GETPOST('optioncss', 'alpha'); $year = GETPOST("year", 'int'); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 32edf9a1558..d5187c6a040 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1003,7 +1003,7 @@ if ($action == 'create') { $soc->fetch($socid); } - if (GETPOST('origin') && GETPOST('originid')) { + if (GETPOST('origin') && GETPOST('originid', 'int')) { // Parse element/subelement (ex: project_task) $regs = array(); $element = $subelement = GETPOST('origin'); @@ -1013,7 +1013,7 @@ if ($action == 'create') { } if ($element == 'project') { - $projectid = GETPOST('originid'); + $projectid = GETPOST('originid', 'int'); } else { // For compatibility if ($element == 'order' || $element == 'commande') { @@ -1094,7 +1094,8 @@ if ($action == 'create') { print ''; } else { print '
| '.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline - 1]->getLibStatut(4).' | '; + print ''.$object->lines[$cursorline - 1]->getLibStatut(4).' | '; print '';
if ($user->socid == 0) {
if ($object->statut > 0 && $action != 'activateline' && $action != 'unactivateline') {
diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php
index a7ac035506f..fbecacce515 100644
--- a/htdocs/core/actions_dellink.inc.php
+++ b/htdocs/core/actions_dellink.inc.php
@@ -27,17 +27,42 @@
// $permissiondellink must be defined
$dellinkid = GETPOST('dellinkid', 'int');
+$addlink = GETPOST('addlink', 'alpha');
$addlinkid = GETPOST('idtolinkto', 'int');
+$addlinkref = GETPOST('reftolinkto', 'alpha');
+$cancellink = GETPOST('cancel', 'alpha');
// Link invoice to order
-if ($action == 'addlink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $id > 0 && $addlinkid > 0) {
+if ($action == 'addlink' && !empty($permissiondellink) && !$cancellink && $id > 0 && $addlinkid > 0) {
$object->fetch($id);
$object->fetch_thirdparty();
- $result = $object->add_object_linked(GETPOST('addlink', 'alpha'), $addlinkid);
+ $result = $object->add_object_linked($addlink, $addlinkid);
+}
+
+// Link by reference
+if ($action == 'addlinkbyref' && ! empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && !empty($conf->global->MAIN_LINK_BY_REF_IN_LINKTO)) {
+ $element_prop = getElementProperties($addlink);
+ if (is_array($element_prop)) {
+ dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php');
+
+ $objecttmp = new $element_prop['classname']($db);
+ $ret = $objecttmp->fetch(0, $addlinkref);
+ if ($ret > 0) {
+ $object->fetch($id);
+ $object->fetch_thirdparty();
+ $result = $object->add_object_linked($addlink, $objecttmp->id);
+ if (isset($_POST['reftolinkto'])) unset($_POST['reftolinkto']);
+ } elseif ($ret < 0) {
+ setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
+ } else {
+ $langs->load('errors');
+ setEventMessage($langs->trans('ErrorRecordNotFound'), 'errors');
+ }
+ }
}
// Delete link
-if ($action == 'dellink' && !empty($permissiondellink) && !GETPOST('cancel', 'alpha') && $dellinkid > 0) {
+if ($action == 'dellink' && !empty($permissiondellink) && !$cancellink && $dellinkid > 0) {
$result = $object->deleteObjectLinked(0, '', 0, '', $dellinkid);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index 45c87401416..a3ddb3d7c7f 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -680,9 +680,7 @@ class dolReceiptPrinter extends Printer
foreach ($object->lines as $line) {
$total_localtax1 += $line->total_localtax1;
}
- foreach ($vatarray as $vatkey => $vatvalue) {
- $this->printer->text(str_pad(price($total_localtax1), 10, ' ', STR_PAD_LEFT)."\n");
- }
+ $this->printer->text(str_pad(price($total_localtax1), 10, ' ', STR_PAD_LEFT)."\n");
break;
case 'DOL_PRINT_OBJECT_TAX2':
//var_dump($object);
@@ -690,9 +688,7 @@ class dolReceiptPrinter extends Printer
foreach ($object->lines as $line) {
$total_localtax2 += $line->total_localtax2;
}
- foreach ($vatarray as $vatkey => $vatvalue) {
- $this->printer->text(str_pad(price($total_localtax2), 10, ' ', STR_PAD_LEFT)."\n");
- }
+ $this->printer->text(str_pad(price($total_localtax2), 10, ' ', STR_PAD_LEFT)."\n");
break;
case 'DOL_PRINT_OBJECT_TOTAL':
$title = $langs->trans('TotalHT');
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 178404da973..a6280a7c9f5 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1332,7 +1332,7 @@ class Form
}
// We search companies
- $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
+ $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.tva_intra, s.client, s.fournisseur, s.code_client, s.code_fournisseur";
if (!empty($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST)) {
$sql .= ", s.address, s.zip, s.town";
$sql .= ", dictp.code as country_code";
@@ -1384,6 +1384,7 @@ class Form
$sql .= " OR s.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
}
$sql .= " OR s.code_client LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.code_fournisseur LIKE '".$this->db->escape($prefix.$filterkey)."%'";
+ $sql .= " OR s.name_alias LIKE '".$this->db->escape($prefix.$filterkey)."%' OR s.tva_intra LIKE '".$this->db->escape($prefix.$filterkey)."%'";
$sql .= ")";
}
$sql .= $this->db->order("nom", "ASC");
@@ -7970,6 +7971,21 @@ class Form
if (!empty($possiblelink['perms']) && (empty($restrictlinksto) || in_array($key, $restrictlinksto)) && (empty($excludelinksto) || !in_array($key, $excludelinksto))) {
print ' use_javascript_ajax) ? '' : ' style="display:none"').'>';
+
+ if (!empty($conf->global->MAIN_LINK_BY_REF_IN_LINKTO)) {
+ print ' ';
//$linktoelem.=($linktoelem?' ':'');
- if ($num > 0) {
+ if ($num > 0 || !empty($conf->global->MAIN_LINK_BY_REF_IN_LINKTO)) {
$linktoelemlist .= ''; + } + $sql = $possiblelink['sql']; $resqllist = $this->db->query($sql); @@ -8027,7 +8043,7 @@ class Form print ' |