From 4170e754d640df2e1d6fc47d51d1c5e0112f335f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Jun 2018 18:16:25 +0200 Subject: [PATCH 1/6] Fix trad --- htdocs/langs/en_US/products.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index abf262ec9ba..21c2e1dc62c 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -251,8 +251,8 @@ PriceNumeric=Number DefaultPrice=Default price ComposedProductIncDecStock=Increase/Decrease stock on parent change ComposedProduct=Sub-product -MinSupplierPrice=Minimum supplier price -MinCustomerPrice=Minimum customer price +MinSupplierPrice=Minimum buying price +MinCustomerPrice=Minimum selling price DynamicPriceConfiguration=Dynamic price configuration DynamicPriceDesc=On product card, with this module enabled, you should be able to set mathematic functions to calculate Customer or Supplier prices. Such function can use all mathematic operators, some constants and variables. You can set here the variables you want to be able to use and if the variable need an automatic update, the external URL to use to ask Dolibarr to update automaticaly the value. AddVariable=Add Variable From a30789e4234ef68df821bf8be50c710f4965f7d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jun 2018 00:34:45 +0200 Subject: [PATCH 2/6] Fix table name --- htdocs/install/mysql/migration/7.0.0-8.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 017f272b986..7ca1d16d67e 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -100,7 +100,7 @@ ALTER TABLE llx_inventory MODIFY COLUMN fk_warehouse integer DEFAULT NULL; ALTER TABLE llx_c_type_fees DROP COLUMN llx_c_type_fees; ALTER TABLE llx_c_type_fees ADD COLUMN type integer DEFAULT 0; -ALTER TABLE llx_c_ecotax CHANGE COLUMN libelle label varchar(255); +ALTER TABLE llx_c_ecotaxe CHANGE COLUMN libelle label varchar(255); ALTER TABLE llx_product_fournisseur_price DROP COLUMN unitcharges; From ff6ffa473825c52189fc715868cc442727ed926e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jun 2018 00:38:42 +0200 Subject: [PATCH 3/6] Fix data in tooltip --- htdocs/core/boxes/box_clients.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index a293b5166a2..7ab2de66a7b 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -87,7 +87,10 @@ class box_clients extends ModeleBoxes $sql.= ", s.client"; $sql.= ", s.code_fournisseur"; $sql.= ", s.fournisseur"; + $sql.= ", s.code_compta"; + $sql.= ", s.code_compta_fournisseur"; $sql.= ", s.logo"; + $sql.= ", s.email"; $sql.= ", s.datec, s.tms, s.status"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -114,9 +117,12 @@ class box_clients extends ModeleBoxes $thirdpartystatic->name = $objp->name; $thirdpartystatic->code_client = $objp->code_client; $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta = $objp->code_compta; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; $thirdpartystatic->client = $objp->client; $thirdpartystatic->fournisseur = $objp->fournisseur; $thirdpartystatic->logo = $objp->logo; + $thirdpartystatic->email = $objp->email; $this->info_box_contents[$line][] = array( 'td' => '', From ac758e02a9a59985d07c024b215e4ebefe5865ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Jun 2018 18:26:44 +0200 Subject: [PATCH 4/6] Fix error message with old usage of childtables --- htdocs/core/class/commonobject.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 97942687fe4..a165704c058 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3322,7 +3322,14 @@ abstract class CommonObject $langs->load("errors"); //print 'Found into table '.$table.', type '.$langs->transnoentitiesnoconv($elementname).', haschild='.$haschild; $haschild += $obj->nb; - $this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname)); + if (is_numeric($elementname)) // old usage + { + $this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table); + } + else // new usage: $elementname=Translation key + { + $this->errors[]=$langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname)); + } break; // We found at least one, we stop here } } From f292c1c662e7bc9c4015d55d2a998ce6bab79c4c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jun 2018 01:31:53 +0200 Subject: [PATCH 5/6] Option to solve autovalidation --- htdocs/contrat/class/contrat.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 24fbabb7772..640793b7f37 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -407,7 +407,10 @@ class Contrat extends CommonObject $this->fetch_thirdparty(); // A contract is validated so we can move thirdparty to status customer - $result=$this->thirdparty->set_as_client(); + if (empty($conf->global->CONTRACT_DISABLE_AUTOSET_AS_CLIENT_ON_CONTRACT_VALIDATION)) + { + $result=$this->thirdparty->set_as_client(); + } // Define new ref if ($force_number) From a076d4b461952dceb777ce622ad6ef68bf7a94ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Jun 2018 01:53:36 +0200 Subject: [PATCH 6/6] Fix translation during install --- htdocs/install/inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index f51254620af..810e289d7e3 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -172,6 +172,12 @@ if (! empty($dolibarr_main_document_root_alt)) // Security check (old method, when directory is renamed /install.lock) if (preg_match('/install\.lock/i',$_SERVER["SCRIPT_FILENAME"])) { + if (! is_object($langs)) + { + $langs = new Translate('..'); + $langs->setDefaultLang('auto'); + } + $langs->load("install"); print $langs->trans("YouTryInstallDisabledByDirLock"); if (! empty($dolibarr_main_url_root)) { @@ -190,6 +196,12 @@ if (constant('DOL_DATA_ROOT') === null) { } if (@file_exists($lockfile)) { + if (! is_object($langs)) + { + $langs = new Translate('..'); + $langs->setDefaultLang('auto'); + } + $langs->load("install"); print $langs->trans("YouTryInstallDisabledByFileLock"); if (! empty($dolibarr_main_url_root)) {