Browse Source

Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop

Laurent Destailleur 1 year ago
parent
commit
b65d5c8740

+ 40 - 0
ChangeLog

@@ -36,6 +36,46 @@ Following changes may create regressions for some external modules, but were nec
 * Endpoint for API /partnershipapi and /recruitment has been renamed into /partnerships and /recruitments to follow name conventions.
 
 
+***** ChangeLog for 18.0.3 compared to 18.0.2 *****
+FIX: #25793 Cannot add time spent (#26405)
+FIX: #26100 Ticket - On edit, list of closed project must be excluded (#26223)
+FIX: #26170
+FIX: #26195 Various payment - List of project excluded those assigned to third parties (#26222)
+FIX: #26349 add_customer_ref_on_linked_shipment
+FIX: avoid warning + CSRF
+FIX: avoid warning if module not activated
+FIX: Bad name for trigger in HRM module
+FIX: check tva_tx before comparing price_min_ttc (#25220)
+FIX: Compare the result of the send mail file function
+FIX: dol_eval with function starting with !
+FIX: Error handling for computed values on import (#24897)
+FIX: Error not returned on sales with takepos and batch module enabled
+FIX: error of webhook not returned
+FIX: firstname and lastname were not saved in attendee subscription
+FIX: HTML in ODT templates (#26181)
+FIX: Link to list of movement from the inventory code
+FIX: Mass import of stock from a file must accept empty source
+FIX: Max version of PHP (#26327)
+FIX: missing load group members for ldap synchro (#26167)
+FIX: missing project entity filter (Issue #26243) (#26247)
+FIX: modification of complementary attributes in invoices (#26180)
+FIX: On object validation, ecm index are not updated for uploaded files
+FIX: Propal's negative quantities
+FIX: public subscription page should not display acceptation for public register when it is not enabled (#26354)
+FIX: regression on rounding stocks fields on product list
+FIX: removed a non expected hidden input field in stockatdate page
+FIX: src_object_id and ttype not filed when uploading a file with API.
+FIX: suggested end for membership can be before subscription start (#26351)
+FIX: Supplier card - VAT Reserve Charge - Undefined function isInEEC() (#26379)
+FIX: syntax error
+FIX: template invoice list extrafield filters (backport v17) (#26227)
+FIX: Tooltip for search syntax must not appear on date fields
+FIX: upload of files src_object_type
+FIX: use event.key instead event.wich to avoid keyboard difference
+FIX: Use of line->insert instead of line->create
+FIX: user creation when LDAP is configured (#26332)
+FIX: Wrong backtopage given for the stocktransfer button from the stocktransfer list (#26271)
+
 ***** ChangeLog for 18.0.2 compared to 18.0.1 *****
 FIX: 17.0 PHP8: supplier invoice class
 FIX: #24908 #25824

+ 1 - 1
htdocs/comm/action/list.php

@@ -711,7 +711,7 @@ $newcardbutton = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-c
 
 $param .= '&mode='.$mode;
 
-print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode);
+print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num,  is_numeric($nbtotalofrecords) ? -1 * $nbtotalofrecords: $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode);
 
 print $s;
 

+ 2 - 2
htdocs/commande/list.php

@@ -718,9 +718,9 @@ if ($action == 'shipped' && $permissiontoadd) {
 			if ($objecttmp->fetch($checked)) {
 				if ($objecttmp->statut == 1 || $objecttmp->statut == 2) {
 					if ($objecttmp->cloture($user)) {
-						setEventMessages($langs->trans('PassedInClosedStatus', $objecttmp->ref), null, 'mesgs');
+						setEventMessages($langs->trans('StatusOrderDelivered', $objecttmp->ref), null, 'mesgs');
 					} else {
-						setEventMessages($langs->trans('CantBeClosed'), null, 'errors');
+						setEventMessages($langs->trans('ErrorOrderStatusCantBeSetToDelivered'), null, 'errors');
 						$error++;
 					}
 				} else {

+ 1 - 1
htdocs/compta/bank/releve.php

@@ -371,7 +371,7 @@ if (empty($numref)) {
 				} else {
 					print '<input type="hidden" name="oldbankreceipt" value="'.$objp->numr.'">';
 					print '<input type="text" name="newbankreceipt" value="'.$objp->numr.'">';
-					print '<input type="submit" class="button smallpaddingimp" name="actionnewbankreceipt" value="'.$langs->trans("Rename").'">';
+					print '<input type="submit" class="button smallpaddingimp" name="actionnewbankreceipt" value="'.$langs->trans("Save").'">';
 					print '<input type="submit" class="button button-cancel smallpaddingimp" name="cancel" value="'.$langs->trans("Cancel").'">';
 				}
 				print '</td>';

+ 1 - 1
htdocs/compta/bank/treso.php

@@ -172,7 +172,7 @@ if (GETPOST("account") || GETPOST("ref")) {
 	$error = 0;
 	$tab_sqlobjOrder = array();
 	$tab_sqlobj = array();
-	$nbtotalofrecords = 0;
+	$nbtotalofrecords = '';
 
 	foreach ($sqls as $sql) {
 		$resql = $db->query($sql);

+ 1 - 1
htdocs/core/boxes/box_members_by_tags.php

@@ -219,7 +219,7 @@ class box_members_by_tags extends ModeleBoxes
 					);
 					$this->info_box_contents[$line][] = array(
 						'td' => 'class="liste_total right"',
-						'text' => $sumMembers['total']['members_pending'].' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now, 3),
+						'text' => $sumMembers['total']['members_pending'].' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3),
 						'asis' => 1
 					);
 					$this->info_box_contents[$line][] = array(

+ 2 - 2
htdocs/core/boxes/box_members_by_type.php

@@ -170,7 +170,7 @@ class box_members_by_type extends ModeleBoxes
 					);
 					$this->info_box_contents[$line][] = array(
 						'td' => 'class="right"',
-						'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now, 3),
+						'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3),
 						'asis' => 1,
 					);
 					$this->info_box_contents[$line][] = array(
@@ -219,7 +219,7 @@ class box_members_by_type extends ModeleBoxes
 					);
 					$this->info_box_contents[$line][] = array(
 						'td' => 'class="liste_total right"',
-						'text' => $sumMembers['total']['members_pending'].' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, $now, 3),
+						'text' => $sumMembers['total']['members_pending'].' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3),
 						'asis' => 1
 					);
 					$this->info_box_contents[$line][] = array(

+ 3 - 1
htdocs/core/lib/functions.lib.php

@@ -5422,7 +5422,9 @@ function dol_print_error($db = '', $error = '', $errors = null)
 		print 'This website or feature is currently temporarly not available or failed after a technical error.<br><br>This may be due to a maintenance operation. Current status of operation ('.dol_print_date(dol_now(), 'dayhourrfc').') are on next line...<br><br>'."\n";
 		print $langs->trans("DolibarrHasDetectedError").'. ';
 		print $langs->trans("YouCanSetOptionDolibarrMainProdToZero");
-		define("MAIN_CORE_ERROR", 1);
+		if (!defined("MAIN_CORE_ERROR")) {
+			define("MAIN_CORE_ERROR", 1);
+		}
 	}
 
 	dol_syslog("Error ".$syslog, LOG_ERR);

+ 4 - 4
htdocs/hrm/position.php

@@ -177,8 +177,10 @@ if (empty($reshook)) {
 	$error = 0;
 
 	$backurlforlist = dol_buildpath('/hrm/position_list.php', 1);
-	//$backtopage = dol_buildpath('/hrm/position.php', 1) . '?fk_job=' . ($fk_job > 0 ? $fk_job : '__ID__');
-
+	$idBacktoPage = GETPOST('fk_job', 'aZ09');
+	if ($idBacktoPage > 0) {
+		$backtopage = dol_buildpath('/hrm/position.php', 1) . '?id=' . $idBacktoPage;
+	}
 	if (empty($backtopage) || ($cancel && empty($id))) {
 		if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
@@ -255,7 +257,6 @@ if ($action == 'create') {
 	if ($backtopage) {
 		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
 	}
-
 	if ($backtopageforcancel) {
 		print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
 	}
@@ -280,7 +281,6 @@ if ($action == 'create') {
 
 	//dol_set_focus('input[name="ref"]');
 }
-
 if ($job->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
 	if ($backtopage) {
 		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';

+ 1 - 1
htdocs/hrm/skill_card.php

@@ -578,7 +578,7 @@ if ($action != "create" && $action != "edit") {
 	$title = $langs->transnoentitiesnoconv("Skilldets");
 	$morejs = array();
 	$morecss = array();
-	$nbtotalofrecords = 0;
+	$nbtotalofrecords = '';
 
 	// Build and execute select
 	// --------------------------------------------------------------------

+ 1 - 0
htdocs/langs/en_US/errors.lang

@@ -105,6 +105,7 @@ ErrorFileIsInfectedWithAVirus=The antivirus program was not able to validate the
 ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module.
 ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor
 ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities
+ErrorOrderStatusCantBeSetToDelivered=Order status can't be set to delivered.
 ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete.
 ErrorBadMask=Error on mask
 ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number

+ 2 - 1
htdocs/langs/en_US/languages.lang

@@ -1,12 +1,13 @@
 # Dolibarr language file - Source file is en_US - languages
 Language_am_ET=Ethiopian
 Language_af_ZA=Afrikaans (South Africa)
+Language_en_AE=Arabic (United Arab Emirates)
 Language_ar_AR=Arabic
 Language_ar_DZ=Arabic (Algeria)
 Language_ar_EG=Arabic (Egypt)
 Language_ar_JO=Arabic (Jordania)
 Language_ar_MA=Arabic (Moroco)
-Language_ar_SA=Arabic
+Language_ar_SA=Arabic (Saudi Arabia)
 Language_ar_TN=Arabic (Tunisia)
 Language_ar_IQ=Arabic (Iraq)
 Language_as_IN=Assamese

+ 1 - 0
htdocs/langs/fr_FR/errors.lang

@@ -103,6 +103,7 @@ ErrorFileIsInfectedWithAVirus=L'antivirus n'a pas pu valider ce fichier (il est
 ErrorNumRefModel=Une référence existe en base (%s) et est incompatible avec cette numérotation. Supprimez la ligne ou renommez la référence pour activer ce module.
 ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur ou aucun tarif défini sur ce produit pour ce fournisseur
 ErrorOrdersNotCreatedQtyTooLow=Certaines commandes n'ont pas été créées en raison de quantités trop faibles
+ErrorOrderStatusCantBeSetToDelivered=La commande ne peut pas être classé livrée.
 ErrorModuleSetupNotComplete=La configuration du module %s semble incomplète. Aller sur la page Accueil - Configuration - Modules pour corriger.
 ErrorBadMask=Erreur sur le masque
 ErrorBadMaskFailedToLocatePosOfSequence=Erreur, masque sans numéro de séquence

+ 1 - 0
htdocs/langs/fr_FR/hrm.lang

@@ -28,6 +28,7 @@ DateEval=Date d'évaluation
 JobCard=Fiche emploi
 JobPosition=Profil de poste
 JobsPosition=Profils de poste
+Positions = Postes
 NewSkill=Nouvelle compétence
 SkillType=Type de compétence
 Skilldets=Liste des niveaux pour cette compétence

+ 1 - 0
htdocs/modulebuilder/index.php

@@ -1702,6 +1702,7 @@ if ($dirins && $action == 'addproperty' && empty($cancel) && !empty($module) &&
 				'position'=>GETPOST('propposition', 'int'),
 				'notnull'=>GETPOST('propnotnull', 'int'),
 				'index'=>GETPOST('propindex', 'int'),
+				'foreignkey'=>GETPOST('propforeignkey', 'alpha'),
 				'searchall'=>GETPOST('propsearchall', 'int'),
 				'isameasure'=>GETPOST('propisameasure', 'int'),
 				'comment'=>GETPOST('propcomment', 'alpha'),

+ 1 - 1
htdocs/product/stock/stockatdate.php

@@ -325,7 +325,7 @@ if ($sortfield == 'stock' && !empty($search_fk_warehouse)) {
 }
 $sql .= $db->order($sortfield, $sortorder);
 
-$nbtotalofrecords = 0;
+$nbtotalofrecords = '';
 if ($date && $dateIsValid) {	// We avoid a heavy sql if mandatory parameter date not yet defined
 	if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
 		$result = $db->query($sql);

+ 1 - 1
htdocs/projet/index.php

@@ -268,7 +268,7 @@ if ($resql) {
 
 			print '<td width="16" class="right nobordernopadding hideonsmartphone">';
 			$filename = dol_sanitizeFileName($obj->ref);
-			$filedir = $conf->commande->dir_output.'/'.dol_sanitizeFileName($obj->ref);
+			$filedir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($obj->ref);
 			$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->rowid;
 			print $formfile->getDocumentsLink($projectstatic->element, $filename, $filedir);
 			print '</td></tr></table>';

+ 2 - 0
htdocs/variants/class/ProductAttributeValue.class.php

@@ -288,6 +288,8 @@ class ProductAttributeValue extends CommonObjectLine
 			$sql .= " AND c2v.rowid IS NOT NULL AND p.tosell = 1";
 		}
 
+		$sql .= " ORDER BY v.position ASC";
+
 		$query = $this->db->query($sql);
 
 		while ($result = $this->db->fetch_object($query)) {