From 52840478c02599701eb4b8b92ea85a4aaf693510 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Oct 2018 21:11:07 +0200 Subject: [PATCH 1/7] Clean code --- htdocs/core/class/CMailFile.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 7562cd609c2..ef8d07dfb45 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -569,7 +569,8 @@ class CMailFile $keyforstarttls ='MAIN_MAIL_EMAIL_STARTTLS_EMAILING'; } - if(!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) { + if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) + { $this->addr_to = $conf->global->MAIN_MAIL_FORCE_SENDTO; $this->addr_cc = ''; $this->addr_bcc = ''; From 63f47047259a10386376d378d54ae8cf9f35aec7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 01:05:10 +0200 Subject: [PATCH 2/7] Fix translation --- htdocs/langs/en_US/admin.lang | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4630757dbad..1fc67ae2ba6 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -620,7 +620,7 @@ Module50000Name=PayBox Module50000Desc=Offer customers a PayBox online payment page (credit/debit cards). This can be used to allow your customers to make free payments or for a payment on a particular Dolibarr object (invoice, order, ...) Module50100Name=Point of sales Module50100Desc=Point of sales module (POS). -Module50150Name=Point of salesaa +Module50150Name=Point of sales Module50150Desc=Point of sales module (Touch screen POS). Module50200Name=Paypal Module50200Desc=Offer customers a PayPal online payment page (PayPal account or credit/debit cards). This can be used to allow your customers to make free payments or for a payment on a particular Dolibarr object (invoice, order, ...) @@ -925,7 +925,7 @@ BackToModuleList=Back to modules list BackToDictionaryList=Back to list of Dictionaries TypeOfRevenueStamp=Type of tax stamp VATManagement=VAT Management -VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the VAT rate follows the active standard rule:
If the seller is not subject to VAT, then VAT defaults to 0. End of rule.

If the (seller's country = buyer's country), then the VAT by default equals the VAT of the product in the seller's country. End of rule.

If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to their customs office in their country and not to the seller. End of rule.

If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT by defaults to the VAT of the seller's country. End of rule.

If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.

In any other case the proposed default is VAT=0. End of rule.

+VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the VAT rate follows the active standard rule:
If the seller is not subject to VAT, then VAT defaults to 0. End of rule.
If the (seller's country = buyer's country), then the VAT by default equals the VAT of the product in the seller's country. End of rule.
If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to their customs office in their country and not to the seller. End of rule.
If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT by defaults to the VAT of the seller's country. End of rule.
If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.
In any other case the proposed default is VAT=0. End of rule.

VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases like associations, individuals or small companies. VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. VATIsNotUsedExampleFR=In France, it means associations that are non VAT declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (VAT in franchise) and paid a franchise VAT without any VAT declaration. This choice will display the reference "Non applicable VAT - art-293B of CGI" on invoices. From b2a7845c8abbfe36daa92a35cf33af3784b803f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 01:28:14 +0200 Subject: [PATCH 3/7] Fix trans --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1fc67ae2ba6..2afe1a77c32 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -925,7 +925,7 @@ BackToModuleList=Back to modules list BackToDictionaryList=Back to list of Dictionaries TypeOfRevenueStamp=Type of tax stamp VATManagement=VAT Management -VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the VAT rate follows the active standard rule:
If the seller is not subject to VAT, then VAT defaults to 0. End of rule.
If the (seller's country = buyer's country), then the VAT by default equals the VAT of the product in the seller's country. End of rule.
If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to their customs office in their country and not to the seller. End of rule.
If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT by defaults to the VAT of the seller's country. End of rule.
If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.
In any other case the proposed default is VAT=0. End of rule.

+VATIsUsedDesc=By default when creating prospects, invoices, orders etc. the VAT rate follows the active standard rule:
If the seller is not subject to VAT, then VAT defaults to 0. End of rule.
If the (seller's country = buyer's country), then the VAT by default equals the VAT of the product in the seller's country. End of rule.
If the seller and buyer are both in the European Community and goods are transport-related products (haulage, shipping, airline), the default VAT is 0. This rule is dependant on the seller's country - please consult with your accountant. The VAT should be paid by the buyer to their customs office in their country and not to the seller. End of rule.
If the seller and buyer are both in the European Community and the buyer is not a company (with a registered intra-Community VAT number) then the VAT by defaults to the VAT of the seller's country. End of rule.
If the seller and buyer are both in the European Community and the buyer is a company (with a registered intra-Community VAT number), then the VAT is 0 by default. End of rule.
In any other case the proposed default is VAT=0. End of rule. VATIsNotUsedDesc=By default the proposed VAT is 0 which can be used for cases like associations, individuals or small companies. VATIsUsedExampleFR=In France, it means companies or organizations having a real fiscal system (Simplified real or normal real). A system in which VAT is declared. VATIsNotUsedExampleFR=In France, it means associations that are non VAT declared or companies, organizations or liberal professions that have chosen the micro enterprise fiscal system (VAT in franchise) and paid a franchise VAT without any VAT declaration. This choice will display the reference "Non applicable VAT - art-293B of CGI" on invoices. From 548fafc6e9d52e05159cd1bc6383b097c88fa5eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 01:32:06 +0200 Subject: [PATCH 4/7] Fix trans --- htdocs/langs/en_US/admin.lang | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 2afe1a77c32..b173f7912dd 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -943,16 +943,16 @@ LocalTax2IsNotUsedDesc=Do not use other type of tax (other than VAT) LocalTax2Management=Third type of tax LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= -LocalTax1ManagementES= RE Management -LocalTax1IsUsedDescES= The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
If the buyer is not subjected to RE, RE by default=0. End of rule.
If the buyer is subjected to RE then the RE by default. End of rule.
-LocalTax1IsNotUsedDescES= By default the proposed RE is 0. End of rule. -LocalTax1IsUsedExampleES= In Spain they are professionals subject to some specific sections of the Spanish IAE. -LocalTax1IsNotUsedExampleES= In Spain they are professional and societies and subject to certain sections of the Spanish IAE. -LocalTax2ManagementES= IRPF Management -LocalTax2IsUsedDescES= The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.
If the seller is subjected to IRPF then the IRPF by default. End of rule.
-LocalTax2IsNotUsedDescES= By default the proposed IRPF is 0. End of rule. -LocalTax2IsUsedExampleES= In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. -LocalTax2IsNotUsedExampleES= In Spain they are businesses not subject to tax system of modules. +LocalTax1ManagementES=RE Management +LocalTax1IsUsedDescES=The RE rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
If the buyer is not subjected to RE, RE by default=0. End of rule.
If the buyer is subjected to RE then the RE by default. End of rule.
+LocalTax1IsNotUsedDescES=By default the proposed RE is 0. End of rule. +LocalTax1IsUsedExampleES=In Spain they are professionals subject to some specific sections of the Spanish IAE. +LocalTax1IsNotUsedExampleES=In Spain they are professional and societies and subject to certain sections of the Spanish IAE. +LocalTax2ManagementES=IRPF Management +LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices, orders etc. follow the active standard rule:
If the seller is not subjected to IRPF, then IRPF by default=0. End of rule.
If the seller is subjected to IRPF then the IRPF by default. End of rule.
+LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule. +LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. +LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. CalcLocaltax=Reports on local taxes CalcLocaltax1=Sales - Purchases CalcLocaltax1Desc=Local Taxes reports are calculated with the difference between localtaxes sales and localtaxes purchases @@ -1007,7 +1007,7 @@ MessageLogin=Login page message LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu -DefaultLanguage=Default language to use (variant) +DefaultLanguage=Default language to use (language code) EnableMultilangInterface=Enable multilingual interface EnableShowLogo=Show logo on left menu CompanyInfo=Company/Organization From 7cafdc4d9a1610a1a52c831cf8be85e3a1008a9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 16:56:43 +0200 Subject: [PATCH 5/7] Fix phpcs --- htdocs/compta/paiement/class/paiement.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index cc60c2cba8e..a7e7c48a370 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -233,11 +233,11 @@ class Paiement extends CommonObject $mtotal = $totalamount; } $note = ($this->note_public?$this->note_public:$this->note); - $payment_id = $this->payment_id ? $this->payment_id : null; - $payment_site = $this->payment_site ? $this->payment_site : null; + $payment_id = $this->payment_id ? $this->payment_id : null; + $payment_site = $this->payment_site ? $this->payment_site : null; $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat)"; - $sql.= " VALUES (".$conf->entity.", '".$this->ref."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', '".$total."', '".$mtotal."', ".$this->paiementid.", '".$this->num_paiement."', '".$this->db->escape($note)."', '".$this->payment_id."', '".$this->payment_site."', ".$user->id.")"; + $sql.= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '". $this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($this->num_paiement)."', '".$this->db->escape($note)."', '".$this->db->escape($this->payment_id)."', '".$this->db->escape($this->payment_site)."', ".$user->id.")"; dol_syslog(get_class($this)."::Create insert paiement", LOG_DEBUG); $resql = $this->db->query($sql); From 05326e271da8f2f0b2008bdfdc9d90f2ca957f09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 17:15:26 +0200 Subject: [PATCH 6/7] FIX Filter on invoice type --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 78576e4c00d..35338722353 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -422,7 +422,7 @@ if ($filtre) } if ($search_ref) $sql .= natural_search('f.facnumber', $search_ref); if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer); -if ($search_type != '') $sql.=" AND f.type IN (".$db->escape($search_type).")"; +if ($search_type != '' && $search_type != '-1') $sql.=" AND f.type IN (".$db->escape($search_type).")"; if ($search_project) $sql .= natural_search('p.ref', $search_project); if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_town) $sql.= natural_search('s.town', $search_town); From 66cb06eca9e876111cc27737e12cffc0a2fb93ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Oct 2018 17:33:14 +0200 Subject: [PATCH 7/7] NEW Top menu is always on screen with MD theme. --- htdocs/theme/md/style.css.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3b67c895e0d..2ec97ec7a9d 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1205,6 +1205,13 @@ td.showDragHandle { .side-nav-vert { margin-left: 228px; } +global->THEME_DISABLE_STICKY_TOPMENU)) { ?> +.side-nav-vert { + position: sticky; + top: 0px; + z-index: 210; +} + /* For smartphone (testmenuhider is on) */ browser->layout, array('phone','tablet')) && ((GETPOST('testmenuhider') || ! empty($conf->global->MAIN_TESTMENUHIDER)) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))) { ?>