From fa73fde312cd7b4fae03882e608cc2afe3f1689d Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Fri, 7 May 2021 15:12:23 +0200
Subject: [PATCH 01/10] phone_head_document
---
htdocs/comm/propal/card.php | 1 +
htdocs/commande/card.php | 1 +
htdocs/compta/facture/card.php | 1 +
htdocs/projet/card.php | 1 +
4 files changed, 4 insertions(+)
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 229303849f0..8039e3361ec 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1991,6 +1991,7 @@ if ($action == 'create') {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherProposals").')';
+ $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index f63b02c035e..01ad66a0af6 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2020,6 +2020,7 @@ if ($action == 'create' && $usercancreate) {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1);
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherOrders").')';
+ $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 252b8ac65a2..b4126f1434c 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -4157,6 +4157,7 @@ if ($action == 'create') {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherBills").')';
+ $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index 3c2d5b02829..c6fb5d5963b 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -992,6 +992,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : ';
if ($object->thirdparty->id > 0) {
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'project');
+ $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
$morehtmlref .= '';
From 8f49c68aa502835cb621b9535b116c38d5290492 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 01:14:28 +0200
Subject: [PATCH 02/10] Update .gitignore
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 371c8be2f5e..6ccdb28f67d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@ yarn.lock
package-lock.json
doc/install.lock
+desktop.ini
From 1d7765ce125eec6ba462d4dd8e468074e98803c3 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:29:15 +0200
Subject: [PATCH 03/10] update phone and address in popup
---
htdocs/comm/propal/card.php | 1 -
htdocs/commande/card.php | 1 -
htdocs/compta/facture/card.php | 1 -
htdocs/societe/class/societe.class.php | 12 ++++++++++--
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 8039e3361ec..229303849f0 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -1991,7 +1991,6 @@ if ($action == 'create') {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherProposals").')';
- $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 01ad66a0af6..f63b02c035e 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -2020,7 +2020,6 @@ if ($action == 'create' && $usercancreate) {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$soc->getNomUrl(1);
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherOrders").')';
- $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index b4126f1434c..252b8ac65a2 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -4157,7 +4157,6 @@ if ($action == 'create') {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1, 'customer');
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
$morehtmlref .= ' ('.$langs->trans("OtherBills").')';
- $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
// Project
if (!empty($conf->projet->enabled)) {
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index defcc71a3e5..d207c690a69 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2560,8 +2560,16 @@ class Societe extends CommonObject
}
}
$label .= '
'.$langs->trans('Email').': '.$this->email;
- if (!empty($this->country_code)) {
- $label .= '
'.$langs->trans('Country').': '.$this->country_code;
+ $phonelist = array();
+ if ($this->phone) {
+ $phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', ' ', 'phone');
+ }
+ if ($this->fax) {
+ $phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', ' ', 'fax');
+ }
+ $label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist);
+ if (!empty($this->address)) {
+ $label .= '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs);
}
if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) {
$label .= '
'.$langs->trans('VATIntra').': '.dol_escape_htmltag($this->tva_intra);
From 3cccdea20b5b89b2dab8e6d97d4c615ccc0217f3 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:31:08 +0200
Subject: [PATCH 04/10] Update .gitignore
---
.gitignore | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 6ccdb28f67d..db04b277351 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,9 +50,3 @@ node_modules/
#yarn
yarn.lock
-
-#package-lock
-package-lock.json
-
-doc/install.lock
-desktop.ini
From 5deff6676a9cc0eede19b840f6c8e7ec98ee85fe Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:31:33 +0200
Subject: [PATCH 05/10] Update .gitignore
---
.gitignore | 3 ---
1 file changed, 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index db04b277351..7b3fc6cb353 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,6 +47,3 @@ htdocs/.well-known/apple-developer-merchantid-domain-association
build/yarn-error.log
build/node_modules/
node_modules/
-
-#yarn
-yarn.lock
From dc8c746057ad3b2ef62173bab17285a4e6696213 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:32:07 +0200
Subject: [PATCH 06/10] Update .gitignore
---
.gitignore | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/.gitignore b/.gitignore
index 7b3fc6cb353..eab591c9904 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,13 @@ htdocs/includes/squizlabs/
htdocs/includes/webmozart/
htdocs/.well-known/apple-developer-merchantid-domain-association
+#yarn
+yarn.lock
+
+#package-lock
+package-lock.json
+
+doc/install.lock
# Node Modules
build/yarn-error.log
build/node_modules/
From b3358046805a62e2a95410687289e228704db3e9 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:32:47 +0200
Subject: [PATCH 07/10] Update .gitignore
---
.gitignore | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index eab591c9904..371c8be2f5e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,11 @@ htdocs/includes/squizlabs/
htdocs/includes/webmozart/
htdocs/.well-known/apple-developer-merchantid-domain-association
+# Node Modules
+build/yarn-error.log
+build/node_modules/
+node_modules/
+
#yarn
yarn.lock
@@ -50,7 +55,3 @@ yarn.lock
package-lock.json
doc/install.lock
-# Node Modules
-build/yarn-error.log
-build/node_modules/
-node_modules/
From 334f37052c4a02984ab922360b2a2c7ad054fd35 Mon Sep 17 00:00:00 2001
From: Anthony Berton <34568357+bb2a@users.noreply.github.com>
Date: Sat, 15 May 2021 02:36:56 +0200
Subject: [PATCH 08/10] Update card.php
---
htdocs/projet/card.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php
index c6fb5d5963b..3c2d5b02829 100644
--- a/htdocs/projet/card.php
+++ b/htdocs/projet/card.php
@@ -992,7 +992,6 @@ if ($action == 'create' && $user->rights->projet->creer) {
$morehtmlref .= '
'.$langs->trans('ThirdParty').' : ';
if ($object->thirdparty->id > 0) {
$morehtmlref .= $object->thirdparty->getNomUrl(1, 'project');
- $morehtmlref .= '
'.$langs->trans("Phone").' : '.dol_print_phone($object->thirdparty->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL', ' ', 'phone');
}
$morehtmlref .= '';
From 1093e66d26183beee9ddc8e75fee6d9aedfa1f4f Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 17 May 2021 10:14:14 +0200
Subject: [PATCH 09/10] Update societe.class.php
---
htdocs/societe/class/societe.class.php | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index d207c690a69..91059c7ecc1 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2560,14 +2560,16 @@ class Societe extends CommonObject
}
}
$label .= '
'.$langs->trans('Email').': '.$this->email;
- $phonelist = array();
- if ($this->phone) {
- $phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', ' ', 'phone');
+ if (!empty($this->phone) || !empty($this->fax)) {
+ $phonelist = array();
+ if ($this->phone) {
+ $phonelist[] = dol_print_phone($this->phone, $this->country_code, $this->id, 0, '', ' ', 'phone');
+ }
+ if ($this->fax) {
+ $phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', ' ', 'fax');
+ }
+ $label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist);
}
- if ($this->fax) {
- $phonelist[] = dol_print_phone($this->fax, $this->country_code, $this->id, 0, '', ' ', 'fax');
- }
- $label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist);
if (!empty($this->address)) {
$label .= '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs);
}
From 261414cb7f7b64bc062d3ce6f97998774134b0d7 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Mon, 17 May 2021 10:16:33 +0200
Subject: [PATCH 10/10] Update societe.class.php
---
htdocs/societe/class/societe.class.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 91059c7ecc1..66974c7e5e9 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2571,7 +2571,9 @@ class Societe extends CommonObject
$label .= '
'.$langs->trans('Phone').': '.implode(' ', $phonelist);
}
if (!empty($this->address)) {
- $label .= '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs);
+ $label .= '
'.$langs->trans("Address").': '.dol_format_address($this, 1, ' ', $langs); // Address + country
+ } elseif (!empty($this->country_code)) {
+ $label .= '
'.$langs->trans('Country').': '.$this->country_code;
}
if (!empty($this->tva_intra) || (!empty($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP) && strpos($conf->global->SOCIETE_SHOW_FIELD_IN_TOOLTIP, 'vatnumber') !== false)) {
$label .= '
'.$langs->trans('VATIntra').': '.dol_escape_htmltag($this->tva_intra);