';
print '';
diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
index 1948ce28a57..a857898f5dc 100644
--- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
+++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql
@@ -76,6 +76,8 @@ ALTER TABLE llx_holiday_extrafields ADD INDEX idx_holiday_extrafields (fk_object
ALTER TABLE llx_societe_rib MODIFY label varchar(200);
+ALTER TABLE llx_societe ADD COLUMN logo_squarred varchar(255);
+
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('USER_SENTBYMAIL','Email sent','Executed when an email is sent from user card','user',300);
create table llx_entrepot_extrafields
diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql
index 4db88defc68..f312015a662 100644
--- a/htdocs/install/mysql/tables/llx_societe.sql
+++ b/htdocs/install/mysql/tables/llx_societe.sql
@@ -107,6 +107,7 @@ create table llx_societe
supplier_order_min_amount double(24,8) DEFAULT NULL, -- min amount for supplier orders
default_lang varchar(6), -- default language
logo varchar(255) DEFAULT NULL,
+ logo_squarred varchar(255) DEFAULT NULL,
canvas varchar(32) DEFAULT NULL, -- type of canvas if used (null by default)
fk_entrepot integer DEFAULT 0, -- if we need a link between third party and warehouse
webservices_url varchar(255), -- supplier webservice url
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index afce2e4fa34..b34ca99013d 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1070,6 +1070,9 @@ CompanyCountry=Country
CompanyCurrency=Main currency
CompanyObject=Object of the company
Logo=Logo
+LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...)
+LogoSquarred=Logo (squarred)
+LogoSquarredDesc=Must be a squarred icon (width = height). This logo will be used as the favorite icon or other need like for the top menu bar (if not disabled into disaply setup).
DoNotSuggestPaymentMode=Do not suggest
NoActiveBankAccountDefined=No active bank account defined
OwnerOfBankAccount=Owner of bank account %s
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index c4c702bc73b..2b4ae2bb7a0 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -465,6 +465,9 @@ class Societe extends CommonObject
public $logo;
public $logo_small;
public $logo_mini;
+ public $logo_squarred;
+ public $logo_squarred_small;
+ public $logo_squarred_mini;
public $array_options;
@@ -1072,6 +1075,7 @@ class Societe extends CommonObject
$sql .= ",barcode = ".(! empty($this->barcode)?"'".$this->db->escape($this->barcode)."'":"null");
$sql .= ",default_lang = ".(! empty($this->default_lang)?"'".$this->db->escape($this->default_lang)."'":"null");
$sql .= ",logo = ".(! empty($this->logo)?"'".$this->db->escape($this->logo)."'":"null");
+ $sql .= ",logo_squarred = ".(! empty($this->logo_squarred)?"'".$this->db->escape($this->logo_squarred)."'":"null");
$sql .= ",outstanding_limit= ".($this->outstanding_limit!=''?$this->outstanding_limit:'null');
$sql .= ",order_min_amount= ".($this->order_min_amount!=''?$this->order_min_amount:'null');
$sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount!=''?$this->supplier_order_min_amount:'null');
@@ -1266,7 +1270,7 @@ class Societe extends CommonObject
$sql .= ', s.webservices_url, s.webservices_key';
$sql .= ', s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode';
$sql .= ', s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj';
- $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo';
+ $sql .= ', s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred';
$sql .= ', s.fk_shipping_method';
$sql .= ', s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms';
$sql .= ', s.order_min_amount, s.supplier_order_min_amount';
@@ -1420,6 +1424,7 @@ class Societe extends CommonObject
$this->modelpdf = $obj->model_pdf;
$this->default_lang = $obj->default_lang;
$this->logo = $obj->logo;
+ $this->logo_squarred = $obj->logo_squarred;
$this->webservices_url = $obj->webservices_url;
$this->webservices_key = $obj->webservices_key;
@@ -2110,6 +2115,12 @@ class Societe extends CommonObject
$label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
$label.= '';
}
+ elseif (! empty($this->logo_squarred) && class_exists('Form'))
+ {
+ /*$label.= '
';
+ $label.= Form::showphoto('societe', $this, 0, 40, 0, 'photowithmargin', 'mini', 0); // Important, we must force height so image will have height tags and if image is inside a tooltip, the tooltip manager can calculate height and position correctly the tooltip.
+ $label.= '