Browse Source

Merge branch '19.0-mmi' of gogs.iprospective.fr:iProspective/Dolibarr into 19.0-mmi

Mathieu Moulin 1 year ago
parent
commit
f5b6828b26

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

@@ -12019,7 +12019,7 @@ function getElementProperties($element_type)
 		$classpath = 'opensurvey/class';
 		$module = 'opensurvey';
 		$subelement = 'opensurveysondage';
-	} elseif ($element_type == 'order_supplier') {
+	} elseif ($element_type == 'order_supplier' || $element_type == 'commande_fournisseur') {
 		$classpath = 'fourn/class';
 		$module = 'fournisseur';
 		$classfile = 'fournisseur.commande';

+ 7 - 3
htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php

@@ -1697,7 +1697,8 @@ class pdf_eratosthene extends ModelePDFCommandes
 					}
 
 					// Recipient name
-					if ($usecontact && getDolGlobalInt('MAIN_USE_COMPANY_NAME_OF_CONTACT')) {
+                                        if ($usecontact && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || getDolGlobalString('MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
+//                                        if ($usecontact && getDolGlobalInt('MAIN_USE_COMPANY_NAME_OF_CONTACT')) {
 						$thirdparty = $object->contact;
 						$thirdparty->fetch_thirdparty();
 					} else {
@@ -1714,6 +1715,7 @@ class pdf_eratosthene extends ModelePDFCommandes
 					if ($this->page_largeur < 210) {
 						$widthrecbox = 84; // To work with US executive format
 					}
+					$widthrecbox = 60; // Forcage
 					$posy = getDolGlobalInt('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
 					$posy += $top_shift;
 					$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
@@ -1751,8 +1753,10 @@ class pdf_eratosthene extends ModelePDFCommandes
 					}
 
 					// Recipient name
-					if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
+                                        if ($usecontact && ($object->contact->socid == $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
+//					if ($usecontact && ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || !empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)))) {
 						$thirdparty = $object->contact;
+						$thirdparty->fetch_thirdparty();
 					} else {
 						$thirdparty = $object->thirdparty;
 					}
@@ -1772,10 +1776,10 @@ class pdf_eratosthene extends ModelePDFCommandes
 					$posy = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
 					$posy += $top_shift;
 					$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
+					$posx -= $widthrecbox + 5;
 					if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
 						$posx = $this->marge_gauche;
 					}
-					$posx -= $widthrecbox +5;
 
 					// Show recipient frame
 					$pdf->SetTextColor(0, 0, 0);

+ 3 - 1
htdocs/core/modules/propale/doc/pdf_cyan.modules.php

@@ -1820,7 +1820,7 @@ class pdf_cyan extends ModelePDFPropales
 					if ($this->page_largeur < 210) {
 						$widthrecbox = 84; // To work with US executive format
 					}
-					$widthrecbox = 60;
+					$widthrecbox = 60; // Forcage
 					$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
 					$posy += $top_shift;
 					$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
@@ -1874,9 +1874,11 @@ class pdf_cyan extends ModelePDFPropales
 					if ($this->page_largeur < 210) {
 						$widthrecbox = 84; // To work with US executive format
 					}
+					$widthrecbox = 60; // Forcage
 					$posy = getDolGlobalString('MAIN_PDF_USE_ISO_LOCATION') ? 40 : 42;
 					$posy += $top_shift;
 					$posx = $this->page_largeur - $this->marge_droite - $widthrecbox;
+					$posx -= $widthrecbox + 5;
 					if (getDolGlobalString('MAIN_INVERT_SENDER_RECIPIENT')) {
 						$posx = $this->marge_gauche;
 					}

+ 1 - 1
htdocs/custom/abricot

@@ -1 +1 @@
-Subproject commit 612485dd5b4410214c14b7cbd3fe797f9c0750e4
+Subproject commit fe29f76dadb78edb2645bf2c18e57cd64cb9da8f

+ 1 - 1
htdocs/custom/mbietransactions

@@ -1 +1 @@
-Subproject commit dd2d63940cd5d161bcfda486cf1e335b1dcde64b
+Subproject commit db398734334ca6435ae436f1f6a1ceefcbb56a06

+ 1 - 1
htdocs/custom/mmipayments

@@ -1 +1 @@
-Subproject commit 011d25aa8e7de3e170500c6ec1aa77a7f472dcb7
+Subproject commit 139ecfe594afd29db025c0be13adcdf7ec7030d9

+ 1 - 1
htdocs/custom/mmiproduct

@@ -1 +1 @@
-Subproject commit faf422cb6d89d4d0d9d2142573d2d850016084f3
+Subproject commit 7531b8f1acfaab9686893c447ce7c1f242e51ad7