From ddbd6c371d08c09018149eca014242f1f98bb70d Mon Sep 17 00:00:00 2001 From: arnaud Date: Fri, 20 Jan 2017 11:58:30 +0100 Subject: [PATCH 01/64] MERGE DEGUEU --- build/pad/DoliWamp.pml | 2 +- build/pad/Dolibarr.pml | 16 ++++++++-------- build/pad/pad_dolibarr.xml | 16 ++++++++-------- build/pad/pad_doliwamp.xml | 2 +- .../phpexcel/Classes/PHPExcel/locale/cs/config | 2 +- .../Classes/PHPExcel/locale/cs/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/da/config | 4 ++-- .../Classes/PHPExcel/locale/da/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/de/config | 4 ++-- .../Classes/PHPExcel/locale/de/functions | 2 +- .../Classes/PHPExcel/locale/en/uk/config | 2 +- .../phpexcel/Classes/PHPExcel/locale/es/config | 4 ++-- .../Classes/PHPExcel/locale/es/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/fi/config | 4 ++-- .../Classes/PHPExcel/locale/fi/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/fr/config | 4 ++-- .../Classes/PHPExcel/locale/fr/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/hu/config | 2 +- .../Classes/PHPExcel/locale/hu/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/it/config | 4 ++-- .../Classes/PHPExcel/locale/it/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/nl/config | 4 ++-- .../Classes/PHPExcel/locale/nl/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/no/config | 4 ++-- .../Classes/PHPExcel/locale/no/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/pl/config | 4 ++-- .../Classes/PHPExcel/locale/pl/functions | 2 +- .../Classes/PHPExcel/locale/pt/br/config | 4 ++-- .../phpexcel/Classes/PHPExcel/locale/pt/config | 4 ++-- .../phpexcel/Classes/PHPExcel/locale/ru/config | 4 ++-- .../Classes/PHPExcel/locale/ru/functions | 2 +- .../phpexcel/Classes/PHPExcel/locale/sv/config | 4 ++-- .../phpexcel/Classes/PHPExcel/locale/tr/config | 4 ++-- .../Classes/PHPExcel/locale/tr/functions | 2 +- 34 files changed, 62 insertions(+), 62 deletions(-) diff --git a/build/pad/DoliWamp.pml b/build/pad/DoliWamp.pml index e0f2b99bfec..fa2da1902aa 100644 --- a/build/pad/DoliWamp.pml +++ b/build/pad/DoliWamp.pml @@ -42,7 +42,7 @@ DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs. DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. - DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. + DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. diff --git a/build/pad/Dolibarr.pml b/build/pad/Dolibarr.pml index 250aed0d791..3ef5e16137c 100644 --- a/build/pad/Dolibarr.pml +++ b/build/pad/Dolibarr.pml @@ -42,10 +42,10 @@ Dolibarr ERP & CRM, the easy to use open source software to manage your activity Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to follow. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. - Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: -Simple to install -Simple to use -Simple to develop + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: +Simple to install +Simple to use +Simple to develop Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian). @@ -62,10 +62,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). - Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): -Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) -Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) -Simple pour le développement (pas de frameworks lourds). + Dolibarr ERP/CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): +Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) +Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) +Simple pour le développement (pas de frameworks lourds). Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. diff --git a/build/pad/pad_dolibarr.xml b/build/pad/pad_dolibarr.xml index c8ad2c62cfb..0920a19311d 100644 --- a/build/pad/pad_dolibarr.xml +++ b/build/pad/pad_dolibarr.xml @@ -72,10 +72,10 @@ Dolibarr ERP & CRM, the easy to use open source software to manage your activity Dolibarr ERP & CRM, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs to manage. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or medium companies, freelancers or foundations. We can say Dolibarr is an ERP or CRM. Dolibarr is also available with an auto-installer for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. See DoliWamp software for this. - Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: -Simple to install -Simple to use -Simple to develop + Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. We can say Dolibarr is an ERP or CRM (or both depending on activated modules). It's an OpenSource project base on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems). Dolibarr differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: +Simple to install +Simple to use +Simple to develop Note that Dolibarr is also available with an auto-installer for Windows or Ubuntu users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. This version is called DoliWamp (for Windows) or DoliBuntu (for Ubuntu/Debian). @@ -84,10 +84,10 @@ Note that Dolibarr is also available with an auto-installer for Windows or Ubunt Dolibarr ERP & CRM, le gestionnaire simple pour gérer votre activité Dolibarr ERP & CRM, le logiciel simple et OpenSource pour gérer votre activité (factures, devis, facturation, commandes, compta, trésorerie, stocks, produits, agenda, comptes bancaires, associations) Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). - Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): -Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) -Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) -Simple pour le développement (pas de frameworks lourds). + Dolibarr ERP & CRM est un logiciel modulaire (on n'active que les fonctions que l'on désire) de gestions de TPE/PME, d'indépendants, d'entrepreneurs ou d'associations. En terme plus techniques, c'est un ERP et CRM. C'est un projet OpenSource qui s'exécute au sein d'un serveur Web et peut donc être accessible depuis n'importe quel lieu disposant d'une connexion Internet (Projet basé sur un serveur WAMP, MAMP ou LAMP: Apache, MySQL, PHP). Dolibarr vient compléter les offres déjà nombreuses de logiciels de cette catégorie (comme OpenBravo, OpenERP, SugarCRM, Neogia, Compiere, etc.) mais se démarque par le fait qu'ici tout est fait pour offrir de la simplicité (règle des 3 S): +Simple pour l'installation (avec au choix des installeurs clé en main pour ceux qui ignorent comment installer un serveur Web, ou une installation manuelle) +Simple pour l'utilisation (fonctions modulaires pour ne pas surcharger les menus, informations claires à la saisie) +Simple pour le développement (pas de frameworks lourds). Dolibarr intègre en effet sa propre architecture (design patterns) permettant à tout développeur d'être tout de suite opérationnel sans connaissances particulières autre que le PHP. diff --git a/build/pad/pad_doliwamp.xml b/build/pad/pad_doliwamp.xml index 3ee629c644b..8abf126d5f7 100644 --- a/build/pad/pad_doliwamp.xml +++ b/build/pad/pad_doliwamp.xml @@ -72,7 +72,7 @@ DoliWamp, the easy to use Dolibarr for Windows to manage your company,foundation DoliWamp is the Dolibarr ERP/CRM for Windows, the easy to use open source software to manage your activity (invoices, customers, suppliers, contracts, agenda, emailings...) and any other things a small or mid-sized business or a foundation needs. DoliWamp is the Dolibarr ERP/CRM autoinstaller for Windows users with no technical knowledge to install Dolibarr and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. Dolibarr ERP/CRM is a software package built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations. - DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. + DoliWamp is the Dolibarr ERP/CRM for Windows. Dolibarr ERP & CRM is a software built by modules addition (you enable only features you need), to manage small or mid-sized businesses, freelancers or foundations (You can manage or follow contacts, invoices, orders, commercial proposals, products, stock management, agenda, mass emailings, members of a foundation, bank accounts...). Based on a WAMP, MAMP or LAMP server (Apache, Mysql, PHP for all Operating Systems), you can install it as a standalone program or use it from anywhere with any web browser. Dolibarr is an OpenSource project. It differs from other ERP or CRM softwares (like OpenAguila, OpenBravo, OpenERP, Neogia, Compiere, etc) because everything was made to be more simple: Simple to install, Simple to use, Simple to develop. DoliWamp is the auto-installer for Windows users with no technical knowledge to install Dolibarr ERP/CRM and all its prerequisites (Apache, Mysql, PHP) with just one auto-exe file. diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config index 500460e8ab5..8992916acaf 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions index b648e20c2b0..f9d69784ae2 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config index b959379b133..cef47e9502d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIVISION/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions index 1599ccd1815..1db4d30bb1c 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config index 7e2ba9d2891..ff7e29899cc 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions index 8214f384878..ce85641a3c9 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config index 00acff8bc34..f008e61cc90 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config index 8f7d9e084ec..fa16f5639df 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #¡NULO! DIV0 = #¡DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions index aa065969f3d..51ce48b3153 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config index 36bc3fc70b8..a481864a6fa 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)? ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #TYHJÄ! DIV0 = #JAKO/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions index c10b3b9f381..7bed722a641 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config index 80f7d5411a6..2240d6b9f8b 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions index cce977b15bc..8d25f6ac193 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config index c6c315814c4..dec7cbde15d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions index 941c1b740d0..4abce13b91b 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config index 97af8b9a570..f862a02d72d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULLO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions index 862cf8302c8..b9219a6a4ce 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config index a14b476c945..7377a181df0 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #LEEG! DIV0 = #DEEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions index 79b7acd1ef9..b6b8296ef04 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config index e3e3cc4f786..15fcc128640 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions index 3cccce42a1d..57a80a7a406 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config index ea111797270..fb1e7b13d9d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = zł ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ZERO! DIV0 = #DZIEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions index 5607f8f672c..2e5697973c1 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config index d39c5c63438..e99aad6bea4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = R$ ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config index 5e486bb29ff..36df63cc012 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config index 098c8075d29..205c342ada4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = р ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ПУСТО! DIV0 = #ДЕЛ/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions index 86bcd4f63a7..324c3df2a81 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config index c2094c06249..454e52ef52f 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #Skärning! DIV0 = #Division/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config index cca084b2ba5..8a103d3c196 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = YTL ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #BOŞ! DIV0 = #SAYI/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions index 3e7c225f402..79645214714 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or From 8199ac9f89600273b91fe20a118b466c0f1d3381 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Mar 2017 19:49:58 +0100 Subject: [PATCH 02/64] FIX Can't download delivery receipts (function dol_check_secure_access_document) --- htdocs/core/lib/files.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 59e5a3426a2..586622538e9 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1725,9 +1725,8 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu } $original_file=$conf->expedition->dir_output."/sending/".$original_file; } - // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->livraison->dir_output)) + if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) { From 9b42177bd5c47079a030053bef0ad37caad06d53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Mar 2017 10:52:09 +0100 Subject: [PATCH 03/64] Fix half day for leave request. --- htdocs/hrm/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 30d0c911ba1..714f329add3 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -148,7 +148,7 @@ $langs->load("boxes"); -// Last leave requests +// Latest leave requests if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) { $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.photo, u.statut, x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status"; @@ -204,7 +204,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) $starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning'; $endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon'; - print ''.dol_print_date($obj->date_start,'day').' '.$langs->trans($listhalfday[$endhalfday]); + print ''.dol_print_date($obj->date_start,'day').' '.$langs->trans($listhalfday[$starthalfday]); print ''.dol_print_date($obj->date_end,'day').' '.$langs->trans($listhalfday[$endhalfday]); print ''.dol_print_date($db->jdate($obj->dm),'day').''; print ''.$holidaystatic->LibStatut($obj->status,3).''; From aa9d991923ba17f675c883472d953501f21bd90f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Mar 2017 01:03:02 +0100 Subject: [PATCH 04/64] Fix css --- htdocs/comm/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 4e99b7072fc..7ea7b840d6b 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -158,10 +158,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').''; + $var=true; if ($num > 0) { $i = 0; - $var=true; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -239,10 +239,10 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos print ''; print ''.$langs->trans("SupplierProposalsDraft").($num?' '.$num.'':'').''; + $var=true; if ($num > 0) { $i = 0; - $var=true; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -318,10 +318,10 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; print ''.$langs->trans("DraftOrders").($num?' '.$num.'':'').''; - if ($num) + $var = true; + if ($num > 0) { $i = 0; - $var = true; while ($i < $num) { $var=!$var; @@ -399,10 +399,10 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande print ''; print ''.$langs->trans("DraftSuppliersOrders").($num?' '.$num.'':'').''; - if ($num) + $var = true; + if ($num > 0) { $i = 0; - $var = true; while ($i < $num) { $var=!$var; From df59a595de716f16a3c7aa2ca75debf1c355f7af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Mar 2017 01:29:19 +0100 Subject: [PATCH 05/64] Fix link to files --- htdocs/core/lib/files.lib.php | 2 +- htdocs/core/tpl/ajaxrow.tpl.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 586622538e9..d27d6c1cdb1 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1726,7 +1726,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu $original_file=$conf->expedition->dir_output."/sending/".$original_file; } // Wrapping pour les bons de livraison - if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) + else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) { diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 123fcef662c..a28bbac5e5a 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -40,6 +40,7 @@ $(document).ready(function(){ $(".tdlineupdown").css("background-repeat","no-repeat"); $(".tdlineupdown").css("background-position","center center"); + console.log("Prepare tableDnd for #"); $("#").tableDnD({ onDrop: function(table, row) { var reloadpage = ""; From 2f4a4f493e4a04507ce96748d15e81ace1afd4bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Mar 2017 01:47:52 +0100 Subject: [PATCH 06/64] Missin translation --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 69a9344832b..6ff8d9deca0 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class. $langs->load("products"); $langs->load("suppliers"); $langs->load("bills"); -if (! empty($conf->margin->enabled)) $langs->load("margins"); +$langs->load("margins"); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); From 106d19a8af74db6cc24c0862cdd4138e106a6ea3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Mar 2017 03:53:11 +0100 Subject: [PATCH 07/64] FIX #6468 + Fix missing translation --- htdocs/comm/action/card.php | 15 +--------- .../class/fournisseur.commande.class.php | 27 ++++++++++------- htdocs/fourn/commande/dispatch.php | 30 ++++--------------- htdocs/langs/en_US/errors.lang | 1 + 4 files changed, 25 insertions(+), 48 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 7378e35db80..90596b54197 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1208,20 +1208,12 @@ if ($id > 0) // Affichage fiche action en mode visu print ''; - // Ref - /*print '';*/ - // Type if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''; } - // Title - //print ''; - // Full day event print ''; @@ -1243,11 +1235,6 @@ if ($id > 0) if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); print ''; - // Status - /*print '';*/ - // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { @@ -1281,7 +1268,7 @@ if ($id > 0) print '
'; print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); print '
'; - if (in_array($user->id,array_keys($listofuserid))) + if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid))) { print '
'; print $langs->trans("MyAvailability").': '.(($object->userassigned[$user->id]['transparency'] > 0)?$langs->trans("Busy"):$langs->trans("Available")); // We show nothing if event is assigned to nobody diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 98939ee01f2..676ca9f23ab 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1949,7 +1949,7 @@ class CommandeFournisseur extends CommonOrder } } - if (! $error && ! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to rception done, only if status of all line are ok (refuse denied) + if (! $error && ! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to reception done, only if status of all line are ok (refuse denied) { $dispatcheddenied=$this->getDispachedLines(2); if (count($dispatchedlinearray) > 0) @@ -1988,7 +1988,8 @@ class CommandeFournisseur extends CommonOrder $result = 0; $old_statut = $this->statut; $this->statut = $statut; - + $this->actionmsg2 = $comment; + // Call trigger $result=$this->call_trigger('ORDER_SUPPLIER_RECEIVE',$user); if ($result < 0) $error++; @@ -2810,13 +2811,14 @@ class CommandeFournisseur extends CommonOrder * * @param User $user User action * @param int $closeopenorder Close if received + * @param string $comment Comment * @return int <0 if KO, 0 if not applicable, >0 if OK */ - public function calcAndSetStatusDispatch(User $user, $closeopenorder=1) + public function calcAndSetStatusDispatch(User $user, $closeopenorder=1, $comment='') { - global $conf; + global $conf, $langs; - if (! empty($conf->commande->enabled) && ! empty($conf->fournisseur->enabled)) + if (! empty($conf->fournisseur->enabled)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; @@ -2845,14 +2847,18 @@ class CommandeFournisseur extends CommonOrder foreach($this->lines as $line) { $qtywished[$line->fk_product]+=$line->qty; } + + $date_liv = dol_now(); + //Compare array $diff_array=array_diff_assoc($qtydelivered,$qtywished); - if (count($diff_array)==0) + + if (count($diff_array)==0) //No diff => mean everythings is received { - //No diff => mean everythings is received if ($closeopenorder) { - $ret=$this->setStatus($user,5); + //$ret=$this->setStatus($user,5); + $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' if ($ret<0) { return -1; } @@ -2861,7 +2867,8 @@ class CommandeFournisseur extends CommonOrder else { //Diff => received partially - $ret=$this->setStatus($user,4); + //$ret=$this->setStatus($user,4); + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' if ($ret<0) { return -1; } @@ -2871,7 +2878,7 @@ class CommandeFournisseur extends CommonOrder else { //Diff => received partially - $ret=$this->setStatus($user,4); + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' if ($ret<0) { return -1; } diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index dc34686361f..c87b3a62bed 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -230,7 +230,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) } if (! $error) { - $result = $object->calcAndSetStatusDispatch($user, GETPOST('closeopenorder')?1:0); + $result = $object->calcAndSetStatusDispatch($user, GETPOST('closeopenorder')?1:0, GETPOST('comment')); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); $error ++; @@ -340,26 +340,7 @@ if ($id > 0 || ! empty($ref)) { print '
'; print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '
'.$langs->trans("Type").''.$object->type.'
'.$langs->trans("Title").''.dol_htmlentities($object->label).'
'.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).'
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; - print $object->getLibStatut(4); - print '
'; -/* - // Ref - print ''; - print ''; - print ''; - // Fournisseur - print '"; - print ''; - print ''; - - // Statut - print ''; - print ''; - print '"; -*/ // Date if ($object->methode_commande_id > 0) { print '\n"; @@ -609,7 +591,7 @@ if ($id > 0 || ! empty($ref)) { print '
'; print $langs->trans("Comment") . ' : '; - print 'trans("DispatchSupplierOrder", $object->ref); // print ' / '.$object->ref_supplier; // Not yet available print '" class="flat">
'; @@ -662,7 +644,7 @@ if ($id > 0 || ! empty($ref)) { print '
' . $langs->trans("Ref") . ''; - print $form->showrefnav($object, 'ref', '', 1, 'ref', 'ref'); - print '
' . $langs->trans("Supplier") . "' . $soc->getNomUrl(1, 'supplier') . '
' . $langs->trans("Status") . ''; - print $object->getLibStatut(4); - print "
' . $langs->trans("Date") . ''; @@ -585,7 +566,8 @@ if ($id > 0 || ! empty($ref)) { } elseif (count($listwarehouses) == 1) { print $formproduct->selectWarehouses(GETPOST("entrepot" . $suffix), "entrepot" . $suffix, '', 0, 0, $objp->fk_product); } else { - print $langs->trans("NoWarehouseDefined"); + $langs->load("errors"); + print $langs->trans("ErrorNoWarehouseDefined"); } print "
'; print ''; - print ''; + print ''; if (! empty($conf->productbatch->enabled)) { print ''; print ''; @@ -705,7 +687,7 @@ if ($id > 0 || ! empty($ref)) { print ''; // Comment - print ''; + print ''; // Status if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) { diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 77a99994fef..af18693f9d4 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -184,6 +184,7 @@ ErrorTaskAlreadyAssigned=Task already assigned to user ErrorModuleFileSeemsToHaveAWrongFormat=The module package seems to have a wrong format. ErrorFilenameDosNotMatchDolibarrPackageRules=The name of the module package (%s) does not match expected name syntax: %s ErrorDuplicateTrigger=Error, duplicate trigger name %s. Already loaded from %s. +ErrorNoWarehouseDefined=Error, no warehouses defined. # Warnings WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. From 4012aeff908e0ecaf158275713feeb9dbda55056 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Mar 2017 18:35:17 +0100 Subject: [PATCH 08/64] Fix translation --- dev/translation/sanity_check_en_langfiles.php | 2 ++ htdocs/core/boxes/box_graph_product_distribution.php | 2 ++ htdocs/langs/en_US/mails.lang | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index f566938d7e0..bb3430eb22c 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -300,6 +300,8 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0; // install.lang if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0; + // mail.lang + if (preg_match('/MailingModuleDesc/i', $value)) $qualifiedforclean=0; // main.lang if (preg_match('/^Duration/', $value)) $qualifiedforclean=0; if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0; diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index a709a7aef3a..2b3c69a9e15 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -249,6 +249,8 @@ class box_graph_product_distribution extends ModeleBoxes if (! empty($conf->commande->enabled) && ! empty($user->rights->commande->lire)) { + $langs->load("orders"); + // Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...) if ($showordernb) { diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 897085ec423..61dddb46691 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -79,6 +79,10 @@ MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters MailingModuleDescContactsByCompanyCategory=Contacts by third party category MailingModuleDescContactsByCategory=Contacts by categories MailingModuleDescContactsByFunction=Contacts by position +MailingModuleDescEmailsFromFile=Emails from file +MailingModuleDescEmailsFromUser=Emails input by user +MailingModuleDescDolibarrUsers=Users with Emails +MailingModuleDescThirdPartiesByCategories=Third parties (by categories) # Libelle des modules de liste de destinataires mailing LineInFile=Line %s in file From 68656dd29cb8e4df78cfc199b3ca087310d13b1b Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Sat, 25 Mar 2017 12:06:02 +0100 Subject: [PATCH 09/64] FIX : supplier default condition not retrived on create --- htdocs/supplier_proposal/card.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 050e0186444..6a34a5ddd61 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1050,7 +1050,9 @@ if ($action == 'create') } else { - if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; + $cond_reglement_id = $soc->cond_reglement_supplier_id; + $mode_reglement_id = $soc->mode_reglement_supplier_id; + if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } $object = new SupplierProposal($db); @@ -1087,12 +1089,12 @@ if ($action == 'create') // Terms of payment print ''; // Mode of payment print ''; // Bank Account From f4a7217f20382e39fc29265d5a10fd4f41a97d04 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 24 Mar 2017 23:39:25 +0100 Subject: [PATCH 10/64] display total line for all total line --- htdocs/comm/propal/list.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index aa6df1afb2b..44a2b9356e8 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -977,7 +977,12 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) + if (isset($totalarray['totalhtfield']) + || isset($totalarray['totalvatfield']) + || isset($totalarray['totalttcfield']) + || isset($totalarray['totalamfield']) + || isset($totalarray['totalrtpfield']) + ) { print ''; $i=0; From afefb475984ae29ef30e014e3c3f50da3b75e096 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 24 Mar 2017 23:40:34 +0100 Subject: [PATCH 11/64] Update list.php --- htdocs/commande/list.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index c72671319bc..073a20bc391 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1398,7 +1398,12 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) + if (isset($totalarray['totalhtfield']) + || isset($totalarray['totalvatfield']) + || isset($totalarray['totalttcfield']) + || isset($totalarray['totalamfield']) + || isset($totalarray['totalrtpfield']) + ) { print ''; $i=0; From 8d6819c6642e976c0e9235e72a06474f3785c334 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Fri, 24 Mar 2017 23:53:32 +0100 Subject: [PATCH 12/64] Update list.php --- htdocs/fourn/facture/list.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index bff5c773cfc..3afb97c5fb1 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -956,7 +956,12 @@ if ($resql) } // Show total line - if (isset($totalarray['totalhtfield'])) + if (isset($totalarray['totalhtfield']) + || isset($totalarray['totalvatfield']) + || isset($totalarray['totalttcfield']) + || isset($totalarray['totalamfield']) + || isset($totalarray['totalrtpfield']) + ) { print ''; $i=0; From 6e133e5bf6f3c03083cefaa5355a65015ad8d97d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Mar 2017 01:57:09 +0100 Subject: [PATCH 13/64] Fix security escapment --- htdocs/loan/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 8ef8e09eba9..d0ab75127ab 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -230,7 +230,7 @@ if ($action == 'create') } // Capital - print ''; + print ''; // Date Start print ""; @@ -245,10 +245,10 @@ if ($action == 'create') print ''; // Number of terms - print ''; + print ''; // Rate - print ''; + print ''; // Note Private print ''; From e38ad37ce33df734439f73ab4df49d7393a2659c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Mar 2017 05:02:06 +0200 Subject: [PATCH 14/64] FIX #6517 #6525 Autocompletion of thirdparty after n chars not implemented --- htdocs/core/class/html.form.class.php | 86 ++++++++++++++------------- htdocs/core/lib/agenda.lib.php | 2 +- htdocs/societe/ajax/company.php | 32 ++++------ 3 files changed, 59 insertions(+), 61 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 60ff30c6433..664997129df 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -931,36 +931,40 @@ class Form /** * Output html form to select a third party * - * @param string $selected Preselected type - * @param string $htmlname Name of field in form - * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)') - * @param string $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty') - * @param int $showtype Show third party type in combolist (customer, prospect or supplier) - * @param int $forcecombo Force to use combo box - * @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) - * @param int $limit Maximum number of elements - * @param string $morecss Add more css styles to the SELECT component - * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container - * @return string HTML string with select box for thirdparty. + * @param string $selected Preselected type + * @param string $htmlname Name of field in form + * @param string $filter optional filters criteras (example: 's.rowid <> x', 's.client IN (1,3)') + * @param string $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty') + * @param int $showtype Show third party type in combolist (customer, prospect or supplier) + * @param int $forcecombo Force to use combo box + * @param array $events Ajax event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) + * @param int $limit Maximum number of elements + * @param string $morecss Add more css styles to the SELECT component + * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container + * @param string $selected_input_value Value of preselected input text (for use with ajax) + * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) + * @param array $ajaxoptions Options for ajax_autocompleter + * @return string HTML string with select box for thirdparty. */ - function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='') + function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array()) { + global $conf,$user,$langs; + $out=''; - /* TODO Use ajax_autocompleter like for products (not finished) if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT) && ! $forcecombo) { $placeholder=''; - if ($selected && empty($selected_input_value)) { - require_once DOL_DOCUMENT_ROOT.'/societe/ajaxcompanies.php'; - $societe = new Societe($this->db); - $societe->fetch($selected); - $selected_input_value=$societe->ref; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $societetmp = new Societe($this->db); + $societetmp->fetch($selected); + $selected_input_value=$societetmp->name; + unset($societetmp); } - // mode=1 means customers products - $urloption='htmlname='.$htmlname.'&outjson=1&price_level='.$price_level.'&type='.$filtertype.'&mode=1&status='.$status.'&finished='.$finished; + // mode 1 + $urloption='htmlname='.$htmlname.'&outjson=1&filter='.$filter; print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : '; else if ($hidelabel > 1) { @@ -970,15 +974,15 @@ class Form print img_picto($langs->trans("Search"), 'search'); } } - print ''; + print 'global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; if ($hidelabel == 3) { print img_picto($langs->trans("Search"), 'search'); } } else - {*/ + { $out.=$this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam); - //} + } return $out; } @@ -1004,7 +1008,8 @@ class Form { global $conf,$user,$langs; - $out=''; $num=0; + $out=''; + $num=0; $outarray=array(); // On recherche les societes @@ -1020,19 +1025,18 @@ class Form if ($filterkey && $filterkey != '') { $sql.=" AND ("; - if (! empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE)) // Can use index - { - $sql.="(s.name LIKE '".$this->db->escape($filterkey)."%')"; + $prefix=empty($conf->global->COMPANY_DONOTSEARCH_ANYWHERE)?'%':''; // Can use index if COMPANY_DONOTSEARCH_ANYWHERE is on + // For natural search + $scrit = explode(' ', $filterkey); + $i=0; + if (count($scrit) > 1) $sql.="("; + foreach ($scrit as $crit) { + if ($i > 0) $sql.=" AND "; + $sql.="(s.nom LIKE '".$this->db->escape($prefix.$crit)."%')"; + $i++; } - else - { - // For natural search - $scrit = explode(' ', $filterkey); - foreach ($scrit as $crit) { - $sql.=" AND (s.name LIKE '%".$this->db->escape($crit)."%')"; - } - } - if (! empty($conf->barcode->enabled)) + if (count($scrit) > 1) $sql.=")"; + if (! empty($conf->barcode->enabled)) { $sql .= " OR s.barcode LIKE '".$this->db->escape($filterkey)."%'"; } @@ -1041,20 +1045,22 @@ class Form $sql.=$this->db->order("nom","ASC"); if ($limit > 0) $sql.=$this->db->plimit($limit); + // Build output string dol_syslog(get_class($this)."::select_thirdparty_list", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { + $events = null; + if ($conf->use_javascript_ajax && ! $forcecombo) { include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; $comboenhancement =ajax_combobox($htmlname, $events, $conf->global->COMPANY_USE_SEARCH_TO_SELECT); $out.= $comboenhancement; - $nodatarole=($comboenhancement?' data-role="none"':''); } // Construct $out and $outarray - $out.= ''."\n"; $textifempty=''; // Do not use textifempty = ' ' or ' ' here, or search on key will search on ' key'. @@ -1066,7 +1072,7 @@ class Form } if ($showempty) $out.= ''."\n"; - $num = $this->db->num_rows($resql); + $num = $this->db->num_rows($resql); $i = 0; if ($num) { @@ -1109,7 +1115,7 @@ class Form $out.= ''; } - array_push($outarray, array('key'=>$obj->rowid, 'value'=>$obj->rowid, 'label'=>$label)); + array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label)); $i++; if (($i % 10) == 0) $out.="\n"; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 09f89ba0c3f..b16792a0235 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -118,7 +118,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; } diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php index d2a244f9444..32f57f73c25 100644 --- a/htdocs/societe/ajax/company.php +++ b/htdocs/societe/ajax/company.php @@ -18,8 +18,8 @@ */ /** - * \file htdocs/product/ajax/company.php - * \brief File to return Ajax response on product list request + * \file htdocs/societe/ajax/company.php + * \brief File to return Ajax response on thirdparty list request */ if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL',1); // Disables token renewal @@ -33,15 +33,11 @@ if (empty($_GET['keysearch']) && ! defined('NOREQUIREHTML')) define('NOREQUIREH require '../../main.inc.php'; $htmlname=GETPOST('htmlname','alpha'); -$socid=GETPOST('socid','int'); -$type=GETPOST('type','int'); -$mode=GETPOST('mode','int'); -$status=((GETPOST('status','int') >= 0) ? GETPOST('status','int') : -1); +$filter=GETPOST('filter','alpha'); $outjson=(GETPOST('outjson','int') ? GETPOST('outjson','int') : 0); -$price_level=GETPOST('price_level','int'); $action=GETPOST('action', 'alpha'); $id=GETPOST('id', 'int'); -$price_by_qty_rowid=GETPOST('pbq', 'int'); + /* * View @@ -49,7 +45,7 @@ $price_by_qty_rowid=GETPOST('pbq', 'int'); //print ''."\n"; -dol_syslog(join(',',$_GET)); +dol_syslog(join(',', $_GET)); //print_r($_GET); if (! empty($action) && $action == 'fetch' && ! empty($id)) @@ -63,8 +59,11 @@ if (! empty($action) && $action == 'fetch' && ! empty($id)) if ($ret > 0) { $outname=$object->name; - - $outjson = array('name'=>$outname); + $outlabel = ''; + $outdesc = ''; + $outtype = $object->type; + + $outjson = array('ref' => $outref,'name' => $outname,'desc' => $outdesc,'type' => $outtype); } echo json_encode($outjson); @@ -73,7 +72,7 @@ else { require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $langs->load("products"); + $langs->load("companies"); $langs->load("main"); top_httphead(); @@ -90,14 +89,7 @@ else $searchkey=(GETPOST($id)?GETPOST($id):(GETPOST($htmlname)?GETPOST($htmlname):'')); $form = new Form($db); - if (empty($mode) || $mode == 'customer') - { - $arrayresult=$form->select_company_html($socid,$htmlname,"client IN (1,3)",0,0,0,null,$searchkey,$outjson); - } - elseif ($mode == 'supplier') - { - $arrayresult=$form->select_company_html($socid,$htmlname,"fournisseur=1",0,0,0,null,$searchkey,$outjson); - } + $arrayresult=$form->select_thirdparty_list(0,$htmlname,$filter,1,0,0,null,$searchkey,$outjson); $db->close(); From 6b2d8a3c34e911de4f110ae512d33565178c92ed Mon Sep 17 00:00:00 2001 From: arnaud Date: Thu, 6 Apr 2017 11:14:15 +0200 Subject: [PATCH 15/64] FIX limit+1 dosn't show Total line --- 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 b2b95d74963..14a5c484e8c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -551,7 +551,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $nbtotalofrecords = $db->num_rows($result); } -$sql.= $db->plimit($limit+1,$offset); +$sql.= $db->plimit($limit,$offset); //print $sql; $resql = $db->query($sql); From 76687028063578ceae53b626d93348bbeee32161 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 7 Apr 2017 08:56:10 +0200 Subject: [PATCH 16/64] fix: missing attribute update --- htdocs/fourn/class/fournisseur.commande.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 98939ee01f2..70c3f1a831a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1503,6 +1503,7 @@ class CommandeFournisseur extends CommonOrder $this->line->product_type=$product_type; $this->line->remise_percent=$remise_percent; $this->line->subprice=$pu_ht; + $this->line->rang=$this->rang; $this->line->info_bits=$info_bits; $this->line->vat_src_code=$vat_src_code; From a6ec22d7fee41c954b37249909271c6370047eff Mon Sep 17 00:00:00 2001 From: altatof Date: Fri, 7 Apr 2017 12:06:15 +0200 Subject: [PATCH 17/64] FIX: dont lose supplier ref if no supplier price in database --- htdocs/fourn/class/fournisseur.commande.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b2f2d3dc3c3..44364a884eb 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1373,7 +1373,7 @@ class CommandeFournisseur extends CommonOrder if ($result > 0) { $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice - $ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice + $fourn_ref = $prod->ref_fourn; // Ref supplier price set by get_buyprice } if ($result == 0) // If result == 0, we failed to found the supplier reference price { @@ -1457,7 +1457,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", '".$localtax1_type."',"; $sql.= " '".$localtax2_type."'"; - $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$ref."',"; + $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$fourn_ref."',"; $sql.= "'".price2num($total_ht)."',"; $sql.= "'".price2num($total_tva)."',"; $sql.= "'".price2num($total_localtax1)."',"; From 919633b2beb65208d4b9c309b3dbf28a4ffd8d36 Mon Sep 17 00:00:00 2001 From: altatof Date: Fri, 7 Apr 2017 12:10:01 +0200 Subject: [PATCH 18/64] escape supplier ref --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 44364a884eb..99babcda7fe 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1457,7 +1457,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", '".$localtax1_type."',"; $sql.= " '".$localtax2_type."'"; - $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$fourn_ref."',"; + $sql.= ", ".$remise_percent.",'".price2num($subprice,'MU')."','".$this->db->escape($fourn_ref)."',"; $sql.= "'".price2num($total_ht)."',"; $sql.= "'".price2num($total_tva)."',"; $sql.= "'".price2num($total_localtax1)."',"; From d892a89f453e7a1be99d0a8fa3b620d8fa04c0bf Mon Sep 17 00:00:00 2001 From: altatof Date: Fri, 7 Apr 2017 14:15:51 +0200 Subject: [PATCH 19/64] FIX: dont get empty "Incoterms : - " string if no incoterm --- htdocs/core/class/commonobject.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 018aef19519..60247186734 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3073,8 +3073,16 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - $res = $this->db->fetch_object($resql); - return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; + $num = $this->db->num_rows($resql); + if ($num > 0) + { + $res = $this->db->fetch_object($resql); + return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; + } + else + { + return ''; + } } else { From 74f0ae5bbb8a3a8660b7e6fbfff50605153d42e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 14:09:33 +0200 Subject: [PATCH 20/64] FIX #6623 User card shows "Return to list" link even if the user has no rights to list users Close #6623 --- htdocs/user/agenda_extsites.php | 6 +++++- htdocs/user/bank.php | 6 +++++- htdocs/user/card.php | 6 +++++- htdocs/user/clicktodial.php | 6 +++++- htdocs/user/document.php | 6 +++++- htdocs/user/info.php | 6 +++++- htdocs/user/ldap.php | 6 +++++- htdocs/user/note.php | 6 +++++- htdocs/user/param_ihm.php | 8 ++++++-- htdocs/user/perms.php | 6 +++++- 10 files changed, 51 insertions(+), 11 deletions(-) diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 823f5ad307e..52f67aaac0c 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -153,7 +153,11 @@ $head=user_prepare_head($object); dol_fiche_head($head, 'extsites', $langs->trans("User"), 0, 'user'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''; + +if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; +} dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 951c3a6ef7e..f8ff1aab18b 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -133,7 +133,11 @@ if ($id && $action != 'edit') $title = $langs->trans("User"); dol_fiche_head($head, 'bank', $title, 0, 'user'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 1728b0b170b..a225edc1873 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1183,7 +1183,11 @@ else else { $title = $langs->trans("User"); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } } $head = user_prepare_head($object); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index cb1e9f875aa..159cf038a01 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -98,7 +98,11 @@ if ($id > 0) dol_fiche_head($head, 'clicktodial', $title, 0, 'user'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 36338f03e10..b77cc400e56 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -129,7 +129,11 @@ if ($object->id) dol_fiche_head($head, 'document', $langs->trans("User"),0,'user'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/info.php b/htdocs/user/info.php index 1d10875b3eb..4b5ea6506c3 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -67,7 +67,11 @@ $title = $langs->trans("User"); dol_fiche_head($head, 'info', $title, 0, 'user'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''; + +if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; +} dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/ldap.php b/htdocs/user/ldap.php index 1da5911861c..0f0cc6b4ed7 100644 --- a/htdocs/user/ldap.php +++ b/htdocs/user/ldap.php @@ -96,7 +96,11 @@ $head = user_prepare_head($object); $title = $langs->trans("User"); dol_fiche_head($head, 'ldap', $title, 0, 'user'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''; + +if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; +} dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/note.php b/htdocs/user/note.php index ccd7eb153a4..4fc274208d7 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -89,7 +89,11 @@ if ($id) $title = $langs->trans("User"); dol_fiche_head($head, 'note', $title, 0, 'user'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 4d254349a7d..f71934be80f 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -161,8 +161,12 @@ if ($action == 'edit') if ($action == 'edit') { dol_fiche_head($head, 'guisetup', $title, 0, 'user'); - - $linkback = ''.$langs->trans("BackToList").''; + + $linkback = ''; + + if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; + } dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 3240ae2d5ec..3dd6e329380 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -257,7 +257,11 @@ else * Ecran ajout/suppression permission */ -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''; + +if ($user->rights->user->user->lire || $user->admin) { + $linkback = ''.$langs->trans("BackToList").''; +} dol_banner_tab($object,'id',$linkback,$user->rights->user->user->lire || $user->admin); From a8da0776132cb31314a13f83093939dbf96ac65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 14:13:04 +0200 Subject: [PATCH 21/64] FIX #6613 Default subject for Supplier proposal emails is filled with a non-existing key Close #6613 --- htdocs/supplier_proposal/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index b0792defc8f..9ed38461180 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1907,7 +1907,7 @@ if ($action == 'create') $formmail->withtocc = $liste; $formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false); - $formmail->withtopic = $outputlangs->trans('SendAskRef', '__ASKREF__'); + $formmail->withtopic = $outputlangs->trans('SendAskRef', '__SUPPLIERPROPREF__'); $formmail->withfile = 2; $formmail->withbody = 1; From 411d276ed2dea990fee8d6e5266b02f569b4fe71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 14:29:40 +0200 Subject: [PATCH 22/64] FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry Close #6669 --- htdocs/compta/facture.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f900e2889a3..8a80fa4bf96 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3744,7 +3744,9 @@ else if ($id > 0 || ! empty($ref)) print ''; if ($action != 'classify') { print ''; } print '
' . $langs->trans("Description") . '' . $langs->trans("Product") . '' . $langs->trans("batch_number") . '' . $langs->trans("EatByDate") . '' . dol_trunc($objp->comment) . '' . $objp->comment . '
' . $langs->trans('PaymentConditionsShort') . ''; - $form->select_conditions_paiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $soc->cond_reglement_id, 'cond_reglement_id', -1, 1); + $form->select_conditions_paiements(GETPOST('cond_reglement_id') > 0 ? GETPOST('cond_reglement_id') : $cond_reglement_id, 'cond_reglement_id', -1, 1); print '
' . $langs->trans('PaymentMode') . ''; - $form->select_types_paiements(GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $soc->mode_reglement_id, 'mode_reglement_id'); + $form->select_types_paiements(GETPOST('mode_reglement_id') > 0 ? GETPOST('mode_reglement_id') : $mode_reglement_id, 'mode_reglement_id'); print '
'.$langs->trans("LoanCapital").'
'.$langs->trans("LoanCapital").'
'.$langs->trans("Nbterms").'
'.$langs->trans("Nbterms").'
'.$langs->trans("Rate").' %
'.$langs->trans("Rate").' %
'; print $langs->trans("ThirdParty").'   '; print ''; - print $form->select_company($socid, 'socid', '', 1); + print $form->select_company($socid, 'socid', '', 'SelectThirdParty', 0, 0, null, 0); print '
id . '">'; - print img_edit($langs->trans('SetProject'), 1); + if ($user->rights->facture->creer) { + print img_edit($langs->trans('SetProject'), 1); + } print '
'; From da0af36086ab39407da9b3fdaee47ff68487a69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 14:51:15 +0200 Subject: [PATCH 23/64] FIX #6671 Cannot remove thirdparty type with "#" in its name Close #6671 --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 211b2a1dc71..caff34f8c9b 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -909,7 +909,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } //var_dump($elementList); From 2d83efc7e303778a595e6cfe31979bdbe0ee07f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 15:02:04 +0200 Subject: [PATCH 24/64] FIX #6673 Missing "nature" table header in thirdparty list Close #6673 --- htdocs/societe/list.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index b7125da21e2..f3ef24d12d2 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -40,6 +40,7 @@ $langs->load("customers"); $langs->load("suppliers"); $langs->load("bills"); $langs->load("compta"); +$langs->load('commercial'); // Security check $socid = GETPOST('socid','int'); @@ -160,7 +161,7 @@ $arrayfields=array( 's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4), 's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5), 's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6), - 'customerorsupplier'=>array('label'=>'Nature', 'checked'=>1), + 'customerorsupplier'=>array('label'=>$langs->trans('Nature'), 'checked'=>1), 's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), 's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm), 's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), @@ -592,7 +593,7 @@ if (! empty($arrayfields['s.ape']['checked'])) print_liste_field_titr if (! empty($arrayfields['s.idprof4']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof4","",$param,'class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); -if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre(''); // type of customer +if (! empty($arrayfields['customerorsupplier']['checked'])) print_liste_field_titre($arrayfields['customerorsupplier']['label']); // type of customer if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); // Extra fields From 2057613ad91bed05e3843151baedb1b6b656b95c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 15:18:02 +0200 Subject: [PATCH 25/64] FIX #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list Close #6675 --- htdocs/contact/list.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index af9be04a207..78664a795c7 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -129,7 +129,7 @@ $fieldstosearchall = array( $arrayfields=array( 'p.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1), 'p.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1), - 'p.poste'=>array('label'=>$langs->trans("Post"), 'checked'=>1), + 'p.poste'=>array('label'=>$langs->trans("PostOrFunction"), 'checked'=>1), 'p.town'=>array('label'=>$langs->trans("Town"), 'checked'=>0), 'p.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>0), 'p.phone'=>array('label'=>$langs->trans("PhonePro"), 'checked'=>1), @@ -761,8 +761,10 @@ if ($result) } // Action column - Links Add action and Export vcard print ''; - print ''.img_object($langs->trans("AddAction"),"action").''; - print '   '; + if ($user->rights->agenda->myactions->create) { + print ''.img_object($langs->trans("AddAction"),"action").''; + print '   '; + } print ''; print img_picto($langs->trans("VCard"),'vcard.png').' '; print ''; From 59fa5c2fe69d42ac84d545068c4b2ea2ae88590f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 17:38:59 +0200 Subject: [PATCH 26/64] FIX #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it Close #6680 --- htdocs/fourn/facture/card.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 2a1f1dab8bc..ebe198613c2 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2135,13 +2135,17 @@ else // Reopen a standard paid invoice if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) { - if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice + if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice { print ''.$langs->trans('ReOpen').''; } else { - print ''.$langs->trans('ReOpen').''; + if ($user->rights->fournisseur->facture->creer) { + print ''.$langs->trans('ReOpen').''; + } elseif (!$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) { + print ''.$langs->trans('ReOpen').''; + } } } From 12df7b6ab904bdcb11dcf5b818528fcfc3e3a7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 18:09:08 +0200 Subject: [PATCH 27/64] FIX #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode Close #6679 --- htdocs/fourn/facture/card.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 2a1f1dab8bc..d91f341b278 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -870,7 +870,7 @@ if (empty($reshook)) $action = ''; } - elseif ($action == 'classin') + elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer) { $object->fetch($id); $result=$object->setProject($projectid); @@ -1844,7 +1844,9 @@ else print ''; + if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) { + print ''; + } print '
'; print $langs->trans('PaymentConditions'); print ''; - if ($action != 'editconditions') print 'id.'">'.img_edit($langs->trans('SetConditions'),1).'id.'">'.img_edit($langs->trans('SetConditions'),1).'
'; print ''; if ($action == 'editconditions') @@ -1864,7 +1866,9 @@ else print ''; - if ($action != 'editmode') print ''; + if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) { + print ''; + } print '
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'),1).'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; print ''; if ($action == 'editmode') @@ -1994,7 +1998,7 @@ else print ''; - if ($action != 'classify') + if ($action != 'classify' && $user->rights->fournisseur->facture->creer) { print '"; } @@ -1111,7 +1111,7 @@ else print '
'; print $langs->trans('Project'); print 'id.'">'; print img_edit($langs->trans('SetProject'),1); From 996b5e9f874e47f68a46e34886df06c6eefb01ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 9 Apr 2017 18:17:46 +0200 Subject: [PATCH 28/64] Corrected translation errors and little bug showing a non-available button to a restricted user --- htdocs/compta/facture/fiche-rec.php | 8 +++++--- htdocs/core/class/html.form.class.php | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 3a55c8b57c2..289ac8d704a 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -899,7 +899,7 @@ if ($action == 'create') // Bank account if ($object->fk_account > 0) { - print "
".$langs->trans('BankAccount').""; + print "
".$langs->trans('RIB').""; $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); print "
'; - if ($action != 'classify') { + if ($action != 'classify' && $user->rights->facture->creer) { print ''; @@ -1129,9 +1129,11 @@ else } // Bank Account + $langs->load('banks'); + print ''; } + if (! empty($arrayfields['f.total_localtax1']['checked'])) + { + // Amount + print ''; + } + if (! empty($arrayfields['f.total_localtax2']['checked'])) + { + // Amount + print ''; + } if (! empty($arrayfields['f.total_ttc']['checked'])) { // Amount @@ -929,6 +956,8 @@ if ($resql) if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'],$_SERVER["PHP_SELF"],"f.fk_mode_reglement","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'],$_SERVER['PHP_SELF'],'f.localtax1','',$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'],$_SERVER['PHP_SELF'],'f.localtax2','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder); @@ -1120,6 +1149,22 @@ if ($resql) if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; $totalarray['totalvat'] += $obj->total_vat; } + // Amount LocalTax1 + if (! empty($arrayfields['f.total_localtax1']['checked'])) + { + print '\n"; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield']; + $totalarray['totallocaltax1'] += $obj->total_localtax1; + } + // Amount LocalTax2 + if (! empty($arrayfields['f.total_localtax2']['checked'])) + { + print '\n"; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield']; + $totalarray['totallocaltax2'] += $obj->total_localtax2; + } // Amount TTC if (! empty($arrayfields['f.total_ttc']['checked'])) { @@ -1211,6 +1256,8 @@ if ($resql) // Show total line if (isset($totalarray['totalhtfield']) || isset($totalarray['totalvatfield']) + || isset($totalarray['totallocaltax1field']) + || isset($totalarray['totallocaltax2field']) || isset($totalarray['totalttcfield']) || isset($totalarray['totalamfield']) || isset($totalarray['totalrtpfield']) @@ -1228,9 +1275,11 @@ if ($resql) } elseif ($totalarray['totalhtfield'] == $i) print ''; elseif ($totalarray['totalvatfield'] == $i) print ''; + elseif ($totalarray['totallocaltax1field'] == $i) print ''; + elseif ($totalarray['totallocaltax2field'] == $i) print ''; elseif ($totalarray['totalttcfield'] == $i) print ''; elseif ($totalarray['totalamfield'] == $i) print ''; - elseif ($totalarray['totalrtpfield'] == $i) print ''; + elseif ($totalarray['totalrtpfield'] == $i) print ''; else print ''; } print ''; From e67ae3665e6d2a5daf660fd1376215099688d371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Thu, 13 Apr 2017 09:12:01 +0200 Subject: [PATCH 32/64] NEW Show local taxes in supplier facture list Show localtax1 and localtax2 in supplier facture list, only if they are enabled in company config --- htdocs/fourn/facture/list.php | 60 +++++++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 1eb2dfaeb4a..1aecc895dfc 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -2,13 +2,14 @@ /* Copyright (C) 2002-2006 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2013 Philippe Grand - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Marcos García - * Copyright (C) 2015-2007 Juanjo Menent - * Copyright (C) 2015 Abbes Bahfir - * Copyright (C) 2015-2016 Ferran Marcet + * Copyright (C) 2015-2007 Juanjo Menent + * Copyright (C) 2015 Abbes Bahfir + * Copyright (C) 2015-2016 Ferran Marcet + * Copyright (C) 2017 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,6 +74,8 @@ $search_project=GETPOST('search_project','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_vat=GETPOST('search_montant_vat','alpha'); +$search_montant_localtax1=GETPOST('search_montant_localtax1','alpha'); +$search_montant_localtax2=GETPOST('search_montant_localtax2','alpha'); $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); $search_status=GETPOST('search_status','int'); $search_paymentmode=GETPOST('search_paymentmode','int'); @@ -157,6 +160,8 @@ $arrayfields=array( 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), + 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj=="1"), + 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj=="1"), 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), 'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), @@ -203,6 +208,8 @@ if (empty($reshook)) $search_amount_all_tax=""; $search_montant_ht=''; $search_montant_vat=''; + $search_montant_localtax1=''; + $search_montant_localtax2=''; $search_montant_ttc=''; $search_status=''; $search_paymentmode=''; @@ -251,6 +258,7 @@ $sql = "SELECT"; if ($search_all || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.date_lim_reglement as datelimite, f.fk_mode_reglement,"; $sql.= " f.total_ht, f.total_ttc, f.total_tva as total_vat, f.paye as paye, f.fk_statut as fk_statut, f.libelle as label, f.datec as date_creation, f.tms as date_update,"; +$sql.= " f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,"; $sql.= " s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; $sql.= " typent.code as typent_code,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; @@ -304,6 +312,8 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdp if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_montant_ht != '') $sql.= natural_search('f.total_ht', $search_montant_ht, 1); if ($search_montant_vat != '') $sql.= natural_search('f.total_tva', $search_montant_vat, 1); +if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1); +if ($search_montant_localtax2 != '') $sql.= natural_search('f.localtax2', $search_montant_localtax2, 1); if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1); if ($search_status != '' && $search_status >= 0) $sql.= " AND f.fk_statut = ".$db->escape($search_status); if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode.""; @@ -412,6 +422,8 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat); + if ($search_montant_localtax1 != '') $param.='&search_montant_localtax1='.urlencode($search_montant_localtax1); + if ($search_montant_localtax2 != '') $param.='&search_montant_localtax2='.urlencode($search_montant_localtax2); if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); @@ -736,6 +748,20 @@ if ($resql) print ''; print ''; } + if (! empty($arrayfields['f.total_localtax1']['checked'])) + { + // Amount + print ''; + } + if (! empty($arrayfields['f.total_localtax2']['checked'])) + { + // Amount + print ''; + } if (! empty($arrayfields['f.total_ttc']['checked'])) { // Amount @@ -814,6 +840,8 @@ if ($resql) if (! empty($arrayfields['f.fk_mode_reglement']['checked'])) print_liste_field_titre($arrayfields['f.fk_mode_reglement']['label'],$_SERVER["PHP_SELF"],"f.fk_mode_reglement","",$param,"",$sortfield,$sortorder); if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.total_localtax1']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax1']['label'],$_SERVER['PHP_SELF'],'f.localtax1','',$param,'align="right"',$sortfield,$sortorder); + if (! empty($arrayfields['f.total_localtax2']['checked'])) print_liste_field_titre($arrayfields['f.total_localtax2']['label'],$_SERVER['PHP_SELF'],'f.localtax2','',$param,'align="right"',$sortfield,$sortorder); if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -1016,6 +1044,22 @@ if ($resql) if (! $i) $totalarray['totalvatfield']=$totalarray['nbfield']; $totalarray['totalvat'] += $obj->total_vat; } + // Amount LocalTax1 + if (! empty($arrayfields['f.total_localtax1']['checked'])) + { + print '\n"; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totallocaltax1field']=$totalarray['nbfield']; + $totalarray['totallocaltax1'] += $obj->total_localtax1; + } + // Amount LocalTax2 + if (! empty($arrayfields['f.total_localtax2']['checked'])) + { + print '\n"; + if (! $i) $totalarray['nbfield']++; + if (! $i) $totalarray['totallocaltax2field']=$totalarray['nbfield']; + $totalarray['totallocaltax2'] += $obj->total_localtax2; + } // Amount TTC if (! empty($arrayfields['f.total_ttc']['checked'])) { @@ -1109,6 +1153,8 @@ if ($resql) // Show total line if (isset($totalarray['totalhtfield']) || isset($totalarray['totalvatfield']) + || isset($totalarray['totallocaltax1field']) + || isset($totalarray['totallocaltax2field']) || isset($totalarray['totalttcfield']) || isset($totalarray['totalamfield']) || isset($totalarray['totalrtpfield']) @@ -1126,9 +1172,11 @@ if ($resql) } elseif ($totalarray['totalhtfield'] == $i) print ''; elseif ($totalarray['totalvatfield'] == $i) print ''; + elseif ($totalarray['totallocaltax1field'] == $i) print ''; + elseif ($totalarray['totallocaltax2field'] == $i) print ''; elseif ($totalarray['totalttcfield'] == $i) print ''; elseif ($totalarray['totalamfield'] == $i) print ''; - elseif ($totalarray['totalrtpfield'] == $i) print ''; + elseif ($totalarray['totalrtpfield'] == $i) print ''; else print ''; } print ''; From 1cffa8c9fc754c3469518806f86fb3576d46e853 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Apr 2017 14:42:24 +0200 Subject: [PATCH 33/64] Fix for debian 8 --- build/debian/control | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build/debian/control b/build/debian/control index 29c2469a4e6..970f192f094 100755 --- a/build/debian/control +++ b/build/debian/control @@ -10,12 +10,13 @@ Build-Depends: debhelper (>= 9), po-debconf Package: dolibarr Architecture: all -Depends: libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, - php-cli, +# For debian 7 or 8 or 9 +Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5 | libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, + php5-cli | php-cli, # Required PHP extensions - php-mysql | php-mysqli, php-curl, php-gd, php-ldap, + php5-mysql | php5-mysqli | php-mysql | php-mysqli, php5-curl | php-curl, php5-gd | php-gd, php5-ldap | php-gd, # Required PHP libraries - php-pear, php-mail-mime, php-xml, php-mbstring, + php-pear, php-mail-mime, # php-tcpdf, # libfpdf-tpl-php, php-fpdf, # libphp-adodb, @@ -30,7 +31,9 @@ Depends: libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php ${misc:Depends}, ${perl:Depends} Recommends: apache2 | lighttpd | httpd, - mariadb-server | virtual-mysql-server + mariadb-server | virtual-mysql-server, +# Required PHP extensions for debian 9 but we can't add them into a Depends, it does not exists on debian 7 and 8 + php-xml, php-mbstring Suggests: www-browser, php5-geoip Description: Web based software to manage a company or foundation Dolibarr ERP & CRM is an easy to use open source/free software package for From db23a5222baedc5e8c5e38b11e5d185213de02ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Apr 2017 15:12:19 +0200 Subject: [PATCH 34/64] Fix translation --- htdocs/langs/en_US/bills.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 9ea58263dfd..c6ebb9e0834 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -125,7 +125,7 @@ BillStatusClosedPaidPartially=Paid (partially) BillShortStatusDraft=Draft BillShortStatusPaid=Paid BillShortStatusPaidBackOrConverted=Refund or converted -BillShortStatusConverted=Processed +BillShortStatusConverted=Paid BillShortStatusCanceled=Abandoned BillShortStatusValidated=Validated BillShortStatusStarted=Started From 6c069e9a1ac671a9df66073262285f4a911f3bff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Apr 2017 15:15:44 +0200 Subject: [PATCH 35/64] Fix label of long status --- htdocs/core/class/commoninvoice.class.php | 7 ++++--- htdocs/core/lib/functions.lib.php | 14 +------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index ac7bb3175fb..3e9d56f8f8c 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -307,7 +307,7 @@ abstract class CommonInvoice extends CommonObject * * @param int $paye Status field paye * @param int $status Id status - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @param int $type Type invoice * @return string Libelle du statut @@ -408,9 +408,10 @@ abstract class CommonInvoice extends CommonObject else return img_picto($langs->trans('BillStatusPaid'),'statut6').' '.$langs->trans('BillStatusPaid'); } } - if ($mode == 5) + if ($mode == 5 || $mode == 6) { - $prefix='Short'; + $prefix=''; + if ($mode == 5) $prefix='Short'; if (! $paye) { if ($status == 0) return ''.$langs->trans('Bill'.$prefix.'StatusDraft').' '.img_picto($langs->trans('BillStatusDraft'),'statut0'); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4cec1ce7de2..6b17f6eec50 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1157,24 +1157,12 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlstatus.=$object->getLibStatut(5,1); } } - elseif ($object->element == 'facture' || $object->element == 'invoice' || $object->element == 'invoice_supplier') + elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan'))) { $tmptxt=$object->getLibStatut(6, $object->totalpaye); if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye); $morehtmlstatus.=$tmptxt; } - elseif ($object->element == 'chargesociales') - { - $tmptxt=$object->getLibStatut(6, $object->totalpaye); - if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye); - $morehtmlstatus.=$tmptxt; - } - elseif ($object->element == 'loan') - { - $tmptxt=$object->getLibStatut(6, $object->totalpaye); - if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye); - $morehtmlstatus.=$tmptxt; - } elseif ($object->element == 'contrat' || $object->element == 'contract') { if ($object->statut==0) $morehtmlstatus.=$object->getLibStatut(2); From a73d72f243766c9cb97bcfe4e3e9cf73b7d1599b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Apr 2017 10:14:23 +0200 Subject: [PATCH 36/64] Add tables for default values --- .../install/mysql/migration/5.0.0-6.0.0.sql | 14 +++++++++ .../mysql/tables/llx_default_values.key.sql | 21 +++++++++++++ .../mysql/tables/llx_default_values.sql | 30 +++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_default_values.key.sql create mode 100644 htdocs/install/mysql/tables/llx_default_values.sql diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 78f378e8c1a..82ba61f8281 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -158,4 +158,18 @@ create table llx_payment_various )ENGINE=innodb; +create table llx_default_values +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, -- multi company id + type varchar(10), -- 'createform', 'filter', 'sortorder' + user_id integer DEFAULT 0 NOT NULL, -- 0 or user id + page varchar(255), -- relative url of page + param varchar(255), -- parameter + value varchar(128) -- value +)ENGINE=innodb; + +ALTER TABLE llx_default_values ADD UNIQUE INDEX uk_default_values(type, entity, user_id, page, param); + + diff --git a/htdocs/install/mysql/tables/llx_default_values.key.sql b/htdocs/install/mysql/tables/llx_default_values.key.sql new file mode 100644 index 00000000000..fe60f75884d --- /dev/null +++ b/htdocs/install/mysql/tables/llx_default_values.key.sql @@ -0,0 +1,21 @@ +-- ============================================================================ +-- Copyright (C) 2016 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =========================================================================== + + +ALTER TABLE llx_default_values ADD UNIQUE INDEX uk_default_values(type, entity, user_id, page, param); + diff --git a/htdocs/install/mysql/tables/llx_default_values.sql b/htdocs/install/mysql/tables/llx_default_values.sql new file mode 100644 index 00000000000..e693609702c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_default_values.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2013 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- ============================================================================ + + +create table llx_default_values +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, -- multi company id + type varchar(10), -- 'createform', 'filter', 'sortorder' + user_id integer DEFAULT 0 NOT NULL, -- 0 or user id + page varchar(255), -- relative url of page + param varchar(255), -- parameter + value varchar(128) -- value +)ENGINE=innodb; + + From 39ebaec06402957a03a92f818958b58062e2a138 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Apr 2017 11:22:48 +0200 Subject: [PATCH 37/64] Replace usage of $bc[$var] with class="oddeven" --- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/adherents/admin/adherent.php | 12 +- htdocs/adherents/index.php | 16 +-- htdocs/adherents/stats/byproperties.php | 4 +- htdocs/adherents/stats/geo.php | 4 +- htdocs/adherents/stats/index.php | 4 +- htdocs/adherents/subscription.php | 4 +- htdocs/adherents/subscription/list.php | 4 +- .../adherents/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/adherents/type.php | 8 +- htdocs/admin/agenda.php | 4 +- htdocs/admin/agenda_extsites.php | 12 +- htdocs/admin/agenda_other.php | 16 +-- htdocs/admin/bank.php | 2 +- htdocs/admin/barcode.php | 16 +-- htdocs/admin/boxes.php | 8 +- htdocs/admin/clicktodial.php | 4 +- htdocs/admin/commande.php | 16 +-- htdocs/admin/company.php | 128 +++++++++--------- htdocs/admin/compta.php | 2 +- htdocs/admin/const.php | 2 +- htdocs/admin/contract.php | 4 +- htdocs/admin/defaultvalues.php | 98 +++++++------- htdocs/admin/delais.php | 12 +- htdocs/admin/dict.php | 4 +- htdocs/admin/ecm.php | 4 +- htdocs/admin/events.php | 4 +- htdocs/admin/expensereport.php | 6 +- htdocs/admin/external_rss.php | 16 +-- htdocs/admin/facture.php | 12 +- htdocs/admin/fckeditor.php | 4 +- htdocs/admin/fichinter.php | 6 +- htdocs/admin/geoipmaxmind.php | 2 +- htdocs/admin/ihm.php | 4 +- htdocs/admin/ldap.php | 24 ++-- htdocs/admin/ldap_contacts.php | 32 ++--- htdocs/admin/ldap_groups.php | 12 +- htdocs/admin/ldap_members.php | 58 ++++---- htdocs/admin/ldap_users.php | 36 ++--- htdocs/admin/limits.php | 16 +-- htdocs/admin/livraison.php | 4 +- htdocs/admin/loan.php | 2 +- htdocs/admin/mailing.php | 8 +- htdocs/admin/mails.php | 60 ++++---- htdocs/admin/menus.php | 10 +- htdocs/admin/menus/other.php | 4 +- htdocs/admin/modulehelp.php | 2 +- htdocs/admin/modules.php | 6 +- htdocs/admin/multicurrency.php | 40 +++--- htdocs/admin/notification.php | 10 +- htdocs/admin/oauthlogintokens.php | 16 +-- htdocs/admin/pdf.php | 56 ++++---- htdocs/admin/perms.php | 2 +- htdocs/admin/prelevement.php | 6 +- htdocs/admin/propal.php | 12 +- htdocs/admin/proxy.php | 20 +-- htdocs/admin/receiptprinter.php | 6 +- htdocs/admin/resource.php | 12 +- htdocs/admin/salaries.php | 2 +- htdocs/admin/security.php | 38 +++--- htdocs/admin/security_file.php | 14 +- htdocs/admin/security_other.php | 16 +-- htdocs/admin/sms.php | 20 +-- htdocs/admin/stock.php | 64 ++++----- htdocs/admin/supplier_invoice.php | 4 +- htdocs/admin/supplier_order.php | 10 +- htdocs/admin/supplier_payment.php | 2 +- htdocs/admin/supplier_proposal.php | 8 +- htdocs/admin/syslog.php | 6 +- htdocs/admin/system/browser.php | 18 +-- htdocs/admin/system/constall.php | 8 +- htdocs/admin/system/database-tables.php | 10 +- htdocs/admin/system/database.php | 4 +- htdocs/admin/system/dbtable.php | 4 +- htdocs/admin/system/dolibarr.php | 68 +++++----- htdocs/admin/system/modules.php | 2 +- htdocs/admin/system/phpinfo.php | 8 +- htdocs/admin/taxes.php | 2 +- htdocs/admin/tools/eaccelerator.php | 28 ++-- htdocs/admin/tools/listevents.php | 4 +- htdocs/admin/tools/listsessions.php | 4 +- htdocs/admin/translation.php | 41 ++---- htdocs/admin/triggers.php | 4 +- htdocs/admin/user.php | 4 +- htdocs/bookmarks/admin/bookmark.php | 2 +- htdocs/bookmarks/list.php | 4 +- htdocs/cashdesk/admin/cashdesk.php | 12 +- htdocs/categories/admin/categorie.php | 4 +- htdocs/categories/viewcat.php | 16 +-- htdocs/comm/action/listactions.php | 4 +- htdocs/comm/action/rapport/index.php | 4 +- htdocs/comm/card.php | 22 +-- htdocs/comm/contact.php | 4 +- htdocs/comm/index.php | 42 +++--- htdocs/comm/mailing/cibles.php | 8 +- htdocs/comm/mailing/index.php | 6 +- htdocs/comm/mailing/list.php | 2 +- htdocs/comm/propal/index.php | 24 ++-- htdocs/comm/propal/list.php | 2 +- htdocs/comm/propal/stats/index.php | 2 +- .../comm/propal/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/comm/prospect/index.php | 10 +- htdocs/commande/customer.php | 4 +- htdocs/commande/index.php | 22 +-- htdocs/commande/orderstoinvoice.php | 4 +- htdocs/commande/stats/index.php | 4 +- htdocs/commande/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/compta/bank/annuel.php | 4 +- htdocs/compta/bank/bankentries.php | 4 +- htdocs/compta/bank/bilan.php | 8 +- htdocs/compta/bank/budget.php | 4 +- htdocs/compta/bank/categ.php | 8 +- htdocs/compta/bank/index.php | 2 +- htdocs/compta/bank/treso.php | 10 +- htdocs/compta/bank/various_payment/index.php | 4 +- htdocs/compta/charges/index.php | 14 +- htdocs/compta/clients.php | 4 +- htdocs/compta/deplacement/index.php | 4 +- htdocs/compta/deplacement/list.php | 4 +- htdocs/compta/facture/prelevement.php | 8 +- htdocs/compta/facture/stats/index.php | 4 +- .../facture/tpl/linkedobjectblock.tpl.php | 2 +- .../tpl/linkedobjectblockForRec.tpl.php | 2 +- htdocs/compta/index.php | 22 +-- htdocs/compta/localtax/clients.php | 8 +- htdocs/compta/localtax/index.php | 8 +- htdocs/compta/localtax/quadri_detail.php | 8 +- htdocs/compta/localtax/reglement.php | 4 +- htdocs/compta/paiement.php | 8 +- htdocs/compta/paiement/avalider.php | 4 +- htdocs/compta/paiement/card.php | 6 +- htdocs/compta/paiement/cheque/card.php | 8 +- htdocs/compta/paiement/cheque/index.php | 4 +- htdocs/compta/paiement/cheque/list.php | 6 +- htdocs/compta/paiement/rapport.php | 2 +- htdocs/compta/paiement_charge.php | 4 +- htdocs/compta/payment_sc/card.php | 6 +- htdocs/compta/prelevement/bons.php | 2 +- htdocs/compta/prelevement/card.php | 4 +- htdocs/compta/prelevement/create.php | 8 +- htdocs/compta/prelevement/demandes.php | 4 +- htdocs/compta/prelevement/factures.php | 4 +- htdocs/compta/prelevement/fiche-rejet.php | 2 +- htdocs/compta/prelevement/fiche-stat.php | 2 +- htdocs/compta/prelevement/index.php | 10 +- htdocs/compta/prelevement/list.php | 2 +- htdocs/compta/prelevement/rejets.php | 2 +- htdocs/compta/prelevement/stats.php | 4 +- htdocs/compta/recap-compta.php | 4 +- htdocs/compta/resultat/clientfourn.php | 10 +- htdocs/compta/resultat/index.php | 8 +- htdocs/compta/salaries/index.php | 4 +- htdocs/compta/sociales/card.php | 4 +- htdocs/compta/sociales/payments.php | 14 +- htdocs/compta/stats/cabyprodserv.php | 4 +- htdocs/compta/stats/cabyuser.php | 4 +- htdocs/compta/stats/casoc.php | 4 +- htdocs/compta/stats/index.php | 12 +- htdocs/compta/tva/clients.php | 8 +- htdocs/compta/tva/index.php | 8 +- htdocs/compta/tva/quadri.php | 8 +- htdocs/compta/tva/quadri_detail.php | 8 +- htdocs/compta/tva/quarter_report.php | 8 +- htdocs/contrat/card.php | 2 +- htdocs/contrat/index.php | 28 ++-- htdocs/contrat/services.php | 4 +- htdocs/contrat/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/core/boxes/box_actions.php | 2 +- htdocs/core/boxes/modules_boxes.php | 2 +- htdocs/core/class/commonobject.class.php | 4 +- htdocs/core/class/dolprintipp.class.php | 4 +- htdocs/core/class/html.formactions.class.php | 4 +- htdocs/core/class/html.formfile.class.php | 6 +- htdocs/core/class/translate.class.php | 38 +++--- htdocs/core/lib/admin.lib.php | 4 +- htdocs/core/lib/agenda.lib.php | 8 +- htdocs/core/lib/company.lib.php | 10 +- htdocs/core/lib/doleditor.lib.php | 4 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/ldap.lib.php | 2 +- htdocs/core/lib/project.lib.php | 4 +- htdocs/core/lib/sendings.lib.php | 4 +- htdocs/core/lib/usergroups.lib.php | 2 +- .../modules/printing/printipp.modules.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 2 +- .../rapport/pdf_paiement_fourn.class.php | 2 +- .../core/tpl/admin_extrafields_view.tpl.php | 4 +- htdocs/core/tpl/contacts.tpl.php | 4 +- htdocs/core/tpl/resource_view.tpl.php | 2 +- htdocs/cron/list.php | 2 +- htdocs/don/admin/donation.php | 8 +- htdocs/don/card.php | 2 +- htdocs/don/index.php | 8 +- htdocs/don/payment/card.php | 6 +- htdocs/don/payment/payment.php | 4 +- htdocs/expedition/card.php | 10 +- htdocs/expedition/index.php | 10 +- htdocs/expedition/list.php | 4 +- htdocs/expedition/shipment.php | 4 +- htdocs/expedition/stats/index.php | 4 +- .../expedition/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/expensereport/index.php | 4 +- htdocs/expensereport/list.php | 2 +- htdocs/expensereport/payment/card.php | 6 +- htdocs/expensereport/payment/payment.php | 4 +- htdocs/expensereport/stats/index.php | 4 +- .../tpl/linkedobjectblock.tpl.php | 2 +- htdocs/exports/class/export.class.php | 2 +- htdocs/exports/export.php | 20 +-- htdocs/exports/index.php | 6 +- htdocs/externalsite/admin/externalsite.php | 8 +- htdocs/fichinter/card.php | 4 +- htdocs/fichinter/index.php | 16 +-- htdocs/fichinter/stats/index.php | 4 +- .../fichinter/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/card.php | 16 +-- htdocs/fourn/commande/index.php | 24 ++-- htdocs/fourn/commande/list.php | 4 +- .../commande/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/contact.php | 4 +- htdocs/fourn/facture/card.php | 2 +- htdocs/fourn/facture/impayees.php | 4 +- htdocs/fourn/facture/list.php | 4 +- htdocs/fourn/facture/paiement.php | 6 +- htdocs/fourn/facture/rapport.php | 2 +- .../facture/tpl/linkedobjectblock.tpl.php | 2 +- htdocs/fourn/index.php | 16 +-- htdocs/fourn/paiement/card.php | 6 +- htdocs/fourn/product/list.php | 4 +- htdocs/fourn/recap-fourn.php | 8 +- htdocs/ftp/admin/ftpclient.php | 24 ++-- htdocs/ftp/index.php | 2 +- htdocs/holiday/define_holiday.php | 4 +- htdocs/holiday/view_log.php | 4 +- htdocs/hrm/admin/admin_establishment.php | 4 +- htdocs/hrm/index.php | 12 +- htdocs/imports/import.php | 20 +-- htdocs/imports/index.php | 4 +- htdocs/index.php | 2 +- .../install/mysql/migration/5.0.0-6.0.0.sql | 2 +- .../mysql/tables/llx_default_values.sql | 2 +- htdocs/install/upgrade2.php | 2 +- htdocs/livraison/card.php | 6 +- htdocs/loan/calc.php | 2 +- htdocs/loan/card.php | 4 +- htdocs/loan/payment/card.php | 6 +- htdocs/loan/payment/payment.php | 2 +- htdocs/margin/admin/margin.php | 24 ++-- htdocs/margin/agentMargins.php | 4 +- htdocs/margin/customerMargins.php | 6 +- htdocs/margin/productMargins.php | 6 +- htdocs/margin/tabs/productMargins.php | 6 +- htdocs/margin/tabs/thirdpartyMargins.php | 6 +- htdocs/paybox/admin/paybox.php | 22 +-- htdocs/paypal/admin/paypal.php | 30 ++-- htdocs/printing/admin/printing.php | 16 +-- htdocs/product/admin/dynamic_prices.php | 2 +- htdocs/product/admin/product.php | 38 +++--- htdocs/product/admin/product_tools.php | 6 +- .../product/canvas/product/tpl/list.tpl.php | 2 +- .../product/canvas/service/tpl/list.tpl.php | 2 +- htdocs/product/composition/card.php | 2 +- htdocs/product/fournisseurs.php | 4 +- htdocs/product/index.php | 10 +- htdocs/product/price.php | 10 +- htdocs/product/stats/commande.php | 4 +- htdocs/product/stats/contrat.php | 4 +- htdocs/product/stats/facture.php | 4 +- htdocs/product/stock/card.php | 4 +- htdocs/product/stock/index.php | 8 +- htdocs/product/stock/list.php | 4 +- htdocs/product/stock/massstockmove.php | 6 +- htdocs/product/stock/product.php | 6 +- htdocs/product/stock/productlot_list.php | 2 +- htdocs/product/stock/replenish.php | 2 +- htdocs/product/stock/valo.php | 4 +- htdocs/projet/activity/index.php | 24 ++-- htdocs/projet/admin/project.php | 22 +-- htdocs/projet/element.php | 2 +- htdocs/projet/graph_opportunities.inc.php | 4 +- htdocs/projet/index.php | 4 +- htdocs/projet/stats/index.php | 4 +- htdocs/projet/tasks/contact.php | 6 +- htdocs/projet/tasks/time.php | 2 +- htdocs/public/donations/donateurs_code.php | 4 +- htdocs/public/members/public_list.php | 4 +- htdocs/public/paybox/newpayment.php | 62 ++++----- htdocs/public/paypal/newpayment.php | 52 +++---- htdocs/resource/list.php | 2 +- htdocs/societe/admin/societe.php | 24 ++-- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/consumption.php | 4 +- htdocs/societe/index.php | 6 +- htdocs/societe/notify/index.php | 4 +- htdocs/societe/rib.php | 2 +- htdocs/societe/societecontact.php | 4 +- .../admin/supplier_proposal_extrafields.php | 4 +- .../supplier_proposaldet_extrafields.php | 4 +- htdocs/supplier_proposal/index.php | 16 +-- htdocs/supplier_proposal/list.php | 8 +- .../tpl/linkedobjectblock.tpl.php | 2 +- htdocs/user/agenda_extsites.php | 4 +- htdocs/user/card.php | 4 +- htdocs/user/group/card.php | 4 +- htdocs/user/group/index.php | 4 +- htdocs/user/home.php | 8 +- htdocs/user/param_ihm.php | 12 +- scripts/bank/export-bank-receipts.php | 2 +- 309 files changed, 1444 insertions(+), 1453 deletions(-) diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index e037549add8..d2b039a28e0 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -1200,7 +1200,7 @@ else $showemptyline=0; } - $var=!$var; + $value=$tabname[$i]; print '\n"; $var=true; // Login/Pass required for members -$var=!$var; + print ''; print ''; print ''; @@ -141,7 +141,7 @@ print "\n"; print ''; // Mail required for members -$var=!$var; + print ''; print ''; print ''; @@ -154,7 +154,7 @@ print "\n"; print ''; // Send mail information is on by default -$var=!$var; + print ''; print ''; print ''; @@ -167,7 +167,7 @@ print "\n"; print ''; // Insert subscription into bank account -$var=!$var; + print ''; print ''; print ''; @@ -188,7 +188,7 @@ print ''; // Use vat for invoice creation if ($conf->facture->enabled) { - $var=!$var; + print ''; print ''; print ''; @@ -213,7 +213,7 @@ if ($conf->facture->enabled) if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { - $var=!$var; + print ''; print ''; print ''; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 9c1b0bb01e1..6440fb72cb8 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -246,8 +246,8 @@ $var=true; krsort($Total); foreach ($Total as $key=>$value) { - $var=!$var; - print ""; + + print ''; print ""; print ""; print ""; @@ -298,9 +298,9 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; $staticmember->id=$obj->rowid; $staticmember->lastname=$obj->lastname; $staticmember->firstname=$obj->firstname; @@ -361,9 +361,9 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; $subscriptionstatic->id=$obj->cid; $subscriptionstatic->ref=$obj->cid; $staticmember->id=$obj->rowid; @@ -407,8 +407,8 @@ print "\n"; foreach ($AdherentType as $key => $adhtype) { - $var=!$var; - print ""; + + print ''; print ''; print ''; print ''; diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index c717d20be84..bd731e771f3 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -131,8 +131,8 @@ $var=true; foreach ($data as $val) { $year = $val['year']; - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index ae128d940e8..d2254b4afd6 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -295,8 +295,8 @@ if ($mode) foreach ($data as $val) { $year = $val['year']; - $var=!$var; - print ''; + + print ''; print ''; if ($label2) print ''; print ''; diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index aec8cd588f6..d1a8e707e43 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -183,7 +183,7 @@ foreach ($data as $val) while ($oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print ''; print ''; } - $var=!$var; + print ''; print '"; + + print ''; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; print ''; diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index e5abe964d7f..750ad483461 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -285,7 +285,7 @@ if ($result) $adherent->login=$obj->login; $adherent->photo=$obj->photo; - $var=!$var; + print ''; @@ -337,7 +337,7 @@ if ($result) } // Total - $var=!$var; + print ''; print "\n"; print "\n"; diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index f593e72faa9..19324812beb 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -33,7 +33,7 @@ $var=true; $total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + ?> > diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 846b0dab7a9..164c921d766 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -210,8 +210,8 @@ if (! $rowid && $action != 'create' && $action != 'edit') while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; print ''; print ''; print ''; @@ -530,8 +530,8 @@ if ($rowid > 0) $adh->firstname=$objp->firstname; // Lastname - $var=!$var; - print ''; + + print ''; if ($objp->societe != '') { print ''."\n"; diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index c11cbeff3a4..d076fcf7e26 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -173,8 +173,8 @@ if (! empty($triggers)) if ($trigger['code'] == 'FICHINTER_CLASSIFY_BILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) continue; if ($trigger['code'] == 'FICHINTER_CLASSIFY_UNBILLED' && empty($conf->global->FICHINTER_CLASSIFY_BILLED)) continue; - $var=!$var; - print ''; + + print ''; print ''; print ''; print '"; print ""; // Show external agenda -$var=!$var; -print ""; + +print ''; print ""; print '"; print ""; // Nb of agenda -$var=!$var; -print ""; + +print ''; print ""; print '"; + + print ''; // Nb print '"; // Name diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 9bf3a4ddc16..17f94ef30cb 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -265,7 +265,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) require_once $dir.'/'.$file; $module = new $classname($db, new ActionComm($db)); - $var=!$var; + print "\n"; print "'."\n"; print ''."\n"; // Manual or automatic -$var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; @@ -369,7 +369,7 @@ print ''."\n"; if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - $var=!$var; + print ''; print ''."\n"; print ''."\n"; @@ -380,7 +380,7 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) } // AGENDA_DEFAULT_FILTER_TYPE -$var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; @@ -389,7 +389,7 @@ $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AG print ''."\n"; // AGENDA_DEFAULT_FILTER_STATUS -$var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; @@ -398,7 +398,7 @@ $formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_ print ''."\n"; // AGENDA_DEFAULT_VIEW -$var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; @@ -410,7 +410,7 @@ print ''."\n"; // AGENDA NOTIFICATION if ($conf->global->MAIN_FEATURES_LEVEL > 0) { - $var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; @@ -422,7 +422,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) } else { print ''.img_picto($langs->trans('Enabled'),'switch_on').''; print ''."\n"; - $var=!$var; + print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 58d97842017..98cecb2f44b 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -199,7 +199,7 @@ while ($i < $nbofbank) { $var = !$var; - print ''; + print ''; print ''; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 29475d712df..a5fb5ef8d69 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -276,7 +276,7 @@ if ($resql) print '\n"; - $var=!$var; + $i++; } } @@ -312,8 +312,8 @@ print ''; // Chemin du binaire genbarcode sous linux if (! isset($_SERVER['WINDIR'])) { - $var=!$var; - print ''; + + print ''; print ''; print '"; + + print ''; print ''; print '"; + + print ''; print ''; print ''; + print ''; print ''; diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 9785e945a6a..72957aa77d3 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -342,7 +342,7 @@ print "\n"; $var=true; foreach($boxtoadd as $box) { - $var=!$var; + if (preg_match('/^([^@]+)@([^@]+)$/i',$box->boximg)) { @@ -421,7 +421,7 @@ foreach($boxactivated as $key => $box) } print "\n".''."\n"; - print ''; + print ''; print ''; @@ -468,7 +468,7 @@ print ''; print ''; print ''; -print ''; +print ''; print ''."\n"; @@ -479,7 +479,7 @@ print ''; // Activate FileCache - Developement if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) { - $var=!$var; + print ''; diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index a77fb706a71..808471e3e6c 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -80,7 +80,7 @@ print ''; print ''; print "\n"; -$var=!$var; + print ''; -$var=!$var; + print ''; @@ -588,7 +588,7 @@ print "\n"; print ''; //Use draft Watermark -$var=!$var; + print ""; print ''; print ""; @@ -603,8 +603,8 @@ print ''; // Shippable Icon in List /* Kept as hidden feature for the moment, result seems bugged. Whet is definition of "shippable" according to all different STOCK_CALCULATE_... options ? -$var=!$var; -print ""; + +print ''; print ''; print ''; print ''; // Ask for payment bank during order if ($conf->banque->enabled) { - $var=!$var; + print ''; } @@ -653,7 +653,7 @@ else // Ask for warehouse during order if ($conf->stock->enabled) { - $var=!$var; + print ''; } diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index d73f23d0ef7..ad25c3620c3 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -309,72 +309,72 @@ if ($action == 'edit' || $action == 'updateedit') print ''."\n"; // Name - $var=!$var; + print ''."\n"; // Addresse - $var=!$var; + print ''."\n"; - $var=!$var; + print ''."\n"; - $var=!$var; + print ''."\n"; // Country - $var=!$var; + print ''."\n"; - $var=!$var; + print ''."\n"; - $var=!$var; + print ''."\n"; - $var=!$var; + print ''; print ''."\n"; - $var=!$var; + print ''; print ''."\n"; - $var=!$var; + print ''; print ''."\n"; // Web - $var=!$var; + print ''; print ''."\n"; // Barcode if (! empty($conf->barcode->enabled)) { - $var=!$var; + print ''; print ''; } // Logo - $var=!$var; + print '\n"; $var=true; - $var=!$var; + print ''; @@ -985,7 +985,7 @@ else print "\n"; $var=true; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print '"; } } else { - $var=!$var; + print ''; } print "
'; print $langs->trans('Project'); print 'id . '">'; print img_edit($langs->trans('SetProject'), 1); print '
'; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3f8ed836f44..e787b3a65cc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3150,11 +3150,14 @@ class Form print ''; print '
'; - print $langs->trans('BankAccount'); + print $langs->trans('RIB'); print ''; if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon)) print 'id.'">'.img_edit($langs->trans('SetBankAccount'),1).'
'; } else { + + $langs->load('banks'); + if ($selected) { require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; $bankstatic=new Account($this->db); $bankstatic->fetch($selected); - print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); + print $this->textwithpicto($bankstatic->getNomUrl(1),$langs->trans("AccountCurrency").' '.$bankstatic->currency_code); } else { print " "; } From 2af3f010bf8600cbf1aa444e03bf48e1cfa44fe0 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 10 Apr 2017 15:54:02 +0200 Subject: [PATCH 29/64] expedition->dir_output is used by livraison not livraison->dir_output who not exist --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 59e5a3426a2..21156abd12f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1727,7 +1727,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu } // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->livraison->dir_output)) + else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) { From 8e33c8090db925391831b6f00193614969fe2fe8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 11 Apr 2017 19:07:03 +0200 Subject: [PATCH 30/64] FIX No filter on company when showing the link to elements. --- htdocs/core/class/html.form.class.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index d8ac0a33cb2..745955c45b9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5444,16 +5444,23 @@ class Form if (! is_object($object->thirdparty)) $object->fetch_thirdparty(); - $possiblelinks=array( - 'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.facnumber as ref, t.ref_client, t.total as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'contrat'=>array('enabled'=>$conf->contrat->enabled , 'perms'=>1, 'label'=>'LinkToContract', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, '' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'fichinter'=>array('enabled'=>$conf->ficheinter->enabled, 'perms'=>1, 'label'=>'LinkToIntervention', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'supplier_proposal'=>array('enabled'=>$conf->supplier_proposal->enabled , 'perms'=>1, 'label'=>'LinkToSupplierProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, '' as ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'order_supplier'=>array('enabled'=>$conf->fournisseur->commande->enabled , 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id), - 'invoice_supplier'=>array('enabled'=>$conf->fournisseur->facture->enabled , 'perms'=>1, 'label'=>'LinkToSupplierInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc = ".$object->thirdparty->id) - ); + $possiblelinks=array(); + if (is_object($object->thirdparty) && ! empty($object->thirdparty->id) && $object->thirdparty->id > 0) + { + $listofidcompanytoscan=$object->thirdparty->id; + if (($object->thirdparty->parent > 0) && ! empty($conf->global->THIRDPARTY_INCLUDE_PARENT_IN_LINKTO)) $listofidcompanytoscan.=','.$object->thirdparty->parent; + + $possiblelinks=array( + 'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('propal',1).')'), + 'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('commande',1).')'), + 'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.facnumber as ref, t.ref_client, t.total as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('facture',1).')'), + 'contrat'=>array('enabled'=>$conf->contrat->enabled , 'perms'=>1, 'label'=>'LinkToContract', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, '' as total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('contract',1).')'), + 'fichinter'=>array('enabled'=>$conf->ficheinter->enabled, 'perms'=>1, 'label'=>'LinkToIntervention', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('intervention',1).')'), + 'supplier_proposal'=>array('enabled'=>$conf->supplier_proposal->enabled , 'perms'=>1, 'label'=>'LinkToSupplierProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, '' as ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."supplier_proposal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('supplier_proposal',1).')'), + 'order_supplier'=>array('enabled'=>$conf->fournisseur->commande->enabled , 'perms'=>1, 'label'=>'LinkToSupplierOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."commande_fournisseur as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('commande_fournisseur',1).')'), + 'invoice_supplier'=>array('enabled'=>$conf->fournisseur->facture->enabled , 'perms'=>1, 'label'=>'LinkToSupplierInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_supplier, t.total_ht FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$listofidcompanytoscan.') AND t.entity IN ('.getEntity('facture_fourn',1).')') + ); + } global $action; From deb309ab7e5efa787b9e27ad4d59abc67f043f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josep=20Llu=C3=ADs?= Date: Thu, 13 Apr 2017 08:30:48 +0200 Subject: [PATCH 31/64] NEW Show local taxes in facture list Show localtax1 and localtax2 in facture list, only if they are enabled in company config --- htdocs/compta/facture/list.php | 57 +++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index a8cd12c1884..d6e0706b703 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -7,10 +7,11 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015-2016 Ferran Marcet + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015-2016 Ferran Marcet + * Copyright (C) 2017 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,6 +75,8 @@ $search_type=GETPOST('search_type','int'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_vat=GETPOST('search_montant_vat','alpha'); +$search_montant_localtax1=GETPOST('search_montant_localtax1','alpha'); +$search_montant_localtax2=GETPOST('search_montant_localtax2','alpha'); $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); $search_status=GETPOST('search_status','int'); $search_paymentmode=GETPOST('search_paymentmode','int'); @@ -155,6 +158,8 @@ $arrayfields=array( 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), + 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj=="1"), + 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj=="1"), 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), 'dynamount_payed'=>array('label'=>$langs->trans("Received"), 'checked'=>0), 'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0), @@ -198,6 +203,8 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOS $search_societe=''; $search_montant_ht=''; $search_montant_vat=''; + $search_montant_localtax1=''; + $search_montant_localtax2=''; $search_montant_ttc=''; $search_status=''; $search_paymentmode=''; @@ -344,6 +351,7 @@ llxHeader('',$langs->trans('CustomersInvoices'),'EN:Customers_Invoices|FR:Factur $sql = 'SELECT'; if ($sall || $search_product_category > 0) $sql = 'SELECT DISTINCT'; $sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total as total_ht, f.tva as total_vat, f.total_ttc,'; +$sql.= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; $sql.= ' f.datec as date_creation, f.tms as date_update,'; @@ -415,6 +423,8 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdp if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_vat, 1); +if ($search_montant_localtax1 != '') $sql.= natural_search('f.localtax1', $search_montant_localtax1, 1); +if ($search_montant_localtax2 != '') $sql.= natural_search('f.localtax2', $search_montant_localtax2, 1); if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1); if ($search_status != '' && $search_status >= 0) { @@ -478,6 +488,7 @@ $sql.=$hookmanager->resPrint; if (! $sall) { $sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,'; + $sql.= ' f.localtax1, f.localtax2,'; $sql.= ' f.datef, f.date_lim_reglement,'; $sql.= ' f.paye, f.fk_statut,'; $sql.= ' f.datec, f.tms,'; @@ -541,6 +552,8 @@ if ($resql) if ($search_product_category > 0) $param.='$search_product_category=' .urlencode($search_product_category); if ($search_montant_ht != '') $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_vat != '') $param.='&search_montant_vat='.urlencode($search_montant_vat); + if ($search_montant_localtax1 != '') $param.='&search_montant_localtax1='.urlencode($search_montant_localtax1); + if ($search_montant_localtax2 != '') $param.='&search_montant_localtax2='.urlencode($search_montant_localtax2); if ($search_montant_ttc != '') $param.='&search_montant_ttc='.urlencode($search_montant_ttc); if ($search_status != '') $param.='&search_status='.urlencode($search_status); if ($search_paymentmode > 0) $param.='search_paymentmode='.urlencode($search_paymentmode); @@ -843,6 +856,20 @@ if ($resql) print ''; print '
'; + print ''; + print ''; + print ''; + print ''.price($obj->total_localtax1)."'.price($obj->total_localtax2)."'.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totallocaltax1']).''.price($totalarray['totallocaltax2']).''.price($totalarray['totalttc']).''.price($totalarray['totalam']).''.price($totalarray['totalrtp']).''.price($totalarray['totalrtp']).'
'; + print ''; + print ''; + print ''; + print ''.price($obj->total_localtax1)."'.price($obj->total_localtax2)."'.price($totalarray['totalht']).''.price($totalarray['totalvat']).''.price($totalarray['totallocaltax1']).''.price($totalarray['totallocaltax2']).''.price($totalarray['totalttc']).''.price($totalarray['totalam']).''.price($totalarray['totalrtp']).''.price($totalarray['totalrtp']).'
'; if (! empty($tabcond[$i])) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index 8e265eb70f7..3958e80964a 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -128,7 +128,7 @@ print "
$key".$Number[$key]."".price($value)."
'.$adhtype->getNomUrl(1, dol_size(32)).''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->subscription,0,3).''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->subscription,0,3).'
'.$memberstatic->getmorphylib($val['label']).''.$val['nb'].''.dol_print_date($val['lastdate'],'dayhour').'
'.$val['label'].''.$val['label2'].''.$val['nb'].'
'; print ''; @@ -195,7 +195,7 @@ foreach ($data as $val) print '0
'; //print ''; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 0c9c8467f1f..cc7fbef58f5 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -825,8 +825,8 @@ if ($rowid > 0) while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print "
'.$subscriptionstatic->getNomUrl(1).'
".$langs->trans("Total")." 
trans("Subscription"); ?>
'.img_object($langs->trans("ShowType"),'group').' '.$objp->rowid.''.dol_escape_htmltag($objp->libelle).''.yn($objp->subscription).'
'.img_object($langs->trans("ShowMember"),"user").' '.$adh->getFullName($langs,0,-1,20).' / '.dol_trunc($objp->societe,12).'
'.$trigger['code'].''.$trigger['label'].''; diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index 79e6d3dbd6c..1e595b5088e 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -155,8 +155,8 @@ print ''.$langs->trans("Value")."
".$langs->trans("ExtSitesEnableThisTool")."'; if ($conf->use_javascript_ajax) @@ -178,8 +178,8 @@ print "
".$langs->trans("ExtSitesNbOfAgenda")."'; print ''; @@ -210,8 +210,8 @@ while ($i <= $MAXAGENDA) $color='AGENDA_EXT_COLOR'.$key; $enabled='AGENDA_EXT_ENABLED'.$key; - $var=!$var; - print "
'.$langs->trans("AgendaExtNb",$key)."
"; print (empty($module->name)?$name:$module->name); @@ -351,7 +351,7 @@ print ''.$langs->trans("Value").'
'.$langs->trans("AGENDA_USE_EVENT_TYPE").' 
'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'
'.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").' 
'.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").' 
'.$langs->trans("AGENDA_DEFAULT_VIEW").' 
'.$langs->trans('AGENDA_NOTIFICATION').' 
'.$langs->trans('AGENDA_NOTIFICATION_SOUND').' 
'.$bankorder[$i][0]."\n"; print $bankorder[$i][1]; print ''; print $formbarcode->setBarcodeEncoder($obj->coder,$barcodelist,$obj->rowid,'form'.$i); print "
'.$langs->trans("GenbarcodeLocation").''; print ''; @@ -328,8 +328,8 @@ if (! isset($_SERVER['WINDIR'])) // Module products if (! empty($conf->product->enabled)) { - $var=!$var; - print "
'.$langs->trans("SetDefaultBarcodeTypeProducts").''; $formbarcode->select_barcode_type($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE,"PRODUIT_DEFAULT_BARCODE_TYPE",1); @@ -339,8 +339,8 @@ if (! empty($conf->product->enabled)) // Module thirdparty if (! empty($conf->societe->enabled)) { - $var=!$var; - print "
'.$langs->trans("SetDefaultBarcodeTypeThirdParties").''; print $formbarcode->select_barcode_type($conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY,"GENBARCODE_BARCODETYPE_THIRDPARTY",1); @@ -397,7 +397,7 @@ if ($conf->produit->enabled) $modBarCode = new $file(); $var = !$var; - print '
'.(isset($modBarCode->name)?$modBarCode->name:$modBarCode->nom)."\n"; print $modBarCode->info($langs); print '
'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel); if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')'; print ''.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $langs->trans("MaxNbOfLinesForBoxes"); print '
'.$langs->trans("EnableFileCache").''; print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1); print ''.$langs->trans("Name").''.$langs->trans("Value").'
'; print $langs->trans("ClickToDialUseTelLink").''; print $form->selectyesno("CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS", $conf->global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS, 1).'
'; @@ -88,7 +88,7 @@ print '
'; print $langs->trans("ClickToDialUseTelLinkDesc"); print '
'; print $langs->trans("DefaultLink").''; print 'global->CLICKTODIAL_USE_TEL_LINK_ON_PHONE_NUMBERS?' disabled="disabled"':'').' value="'.$conf->global->CLICKTODIAL_URL.'">
'; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index a9041f5272b..65638ca1d77 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -330,7 +330,7 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
'.$langs->trans("ShippableOrderIconInList").' '; @@ -623,7 +623,7 @@ print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' '; if (! empty($conf->use_javascript_ajax)) @@ -645,7 +645,7 @@ if ($conf->banque->enabled) } else { - $var=!$var; + print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' '.$langs->trans('NotAvailable').'
'; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' '; if (! empty($conf->use_javascript_ajax)) @@ -675,7 +675,7 @@ if ($conf->stock->enabled) } else { - $var=!$var; + print '
'; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' '.$langs->trans('NotAvailable').'
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; print '
'; print '
'; print '
'; print '
'; //if (empty($country_selected)) $country_selected=substr($langs->defaultlang,-2); // By default, country of localization print $form->select_country($mysoc->country_id,'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '
'; $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_STATE,$mysoc->country_code,'state_id'); print '
'; print $form->selectCurrency($conf->currency,"currency"); print '
'; print '
'; print '
'; print '
'; print '
'; print '
'; print ''; // Note - $var=!$var; + print ''; print ''; @@ -409,17 +409,17 @@ if ($action == 'edit' || $action == 'updateedit') $langs->load("companies"); // Managing Director(s) - $var=!$var; + print ''; // Capital - $var=!$var; + print ''; // Juridical Status - $var=!$var; + print ''; // Object of the company - $var=!$var; + print ''; print ''; @@ -547,7 +547,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=true; - $var=!$var; + print ''; @@ -563,7 +563,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=true; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print ''; // Capital - $var=!$var; + print ''; // Juridical Status - $var=!$var; + print ''; @@ -820,7 +820,7 @@ else // ProfId1 if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-') { - $var=!$var; + print ''; print ''; print ''; - $var=!$var; + print ''; print '
'; print ''; @@ -392,7 +392,7 @@ if ($action == 'edit' || $action == 'updateedit') print '
'; print '
'; print '
'; print '
'; if ($mysoc->country_code) { print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code'); @@ -431,7 +431,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfID1 if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -447,7 +447,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfId2 if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -463,7 +463,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfId3 if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -479,7 +479,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfId4 if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -495,7 +495,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfId5 if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -511,7 +511,7 @@ if ($action == 'edit' || $action == 'updateedit') // ProfId6 if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-') { - $var=!$var; + print '
'; if (! empty($mysoc->country_code)) { @@ -525,13 +525,13 @@ if ($action == 'edit' || $action == 'updateedit') } // TVA Intra - $var=!$var; + print '
'; print ''; print '
'; print '
'; print $formother->select_month($conf->global->SOCIETE_FISCAL_MONTH_START,'fiscalmonthstart',0,1) . '
'; print ""; @@ -572,7 +572,7 @@ if ($action == 'edit' || $action == 'updateedit') print "
"; print "
'; print ""; @@ -596,7 +596,7 @@ if ($action == 'edit' || $action == 'updateedit') print ''; print "\n"; $var=true; - $var=!$var; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option print ""; print '
 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; @@ -619,7 +619,7 @@ if ($action == 'edit' || $action == 'updateedit') print "
"; print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; @@ -641,7 +641,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; $var=true; - $var=!$var; + // Note: When option is not set, it must not appears as set on on, because there is no default value for this option print ""; print '
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; @@ -661,7 +661,7 @@ if ($action == 'edit' || $action == 'updateedit') print "
"; print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; @@ -698,22 +698,22 @@ else print ''; $var=true; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; // Web - $var=!$var; + print ''; // Barcode if (! empty($conf->barcode->enabled)) { - $var=!$var; + print ''; } // Logo - $var=!$var; + print ''; - $var=!$var; + print ''; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM)) print $conf->global->MAIN_INFO_SOCIETE_NOM; else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyName")).''; print '
'.$langs->trans("CompanyAddress").'' . nl2br(empty($conf->global->MAIN_INFO_SOCIETE_ADDRESS)?'':$conf->global->MAIN_INFO_SOCIETE_ADDRESS) . '
'.$langs->trans("CompanyZip").'' . (empty($conf->global->MAIN_INFO_SOCIETE_ZIP)?'':$conf->global->MAIN_INFO_SOCIETE_ZIP) . '
'.$langs->trans("CompanyTown").'' . (empty($conf->global->MAIN_INFO_SOCIETE_TOWN)?'':$conf->global->MAIN_INFO_SOCIETE_TOWN) . '
'.$langs->trans("CompanyCountry").''; if ($mysoc->country_code) { @@ -724,13 +724,13 @@ else else print img_warning().' '.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).''; print '
'.$langs->trans("State").''; if (! empty($conf->global->MAIN_INFO_SOCIETE_STATE)) print getState($conf->global->MAIN_INFO_SOCIETE_STATE); else print ' '; print '
'.$langs->trans("CompanyCurrency").''; print currency_name($conf->currency,1); print ' ('.$conf->currency; @@ -738,28 +738,28 @@ else print ')'; print '
'.$langs->trans("Phone").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_TEL,$mysoc->country_code) . '
'.$langs->trans("Fax").'' . dol_print_phone($conf->global->MAIN_INFO_SOCIETE_FAX,$mysoc->country_code) . '
'.$langs->trans("Mail").'' . dol_print_email($conf->global->MAIN_INFO_SOCIETE_MAIL,0,0,0,80) . '
'.$langs->trans("Web").'' . dol_print_url($conf->global->MAIN_INFO_SOCIETE_WEB,'_blank',80) . '
'.$langs->trans("Gencod").'' . $conf->global->MAIN_INFO_SOCIETE_GENCOD . '
'.$langs->trans("Logo").''; $tagtd='tagtd '; @@ -785,7 +785,7 @@ else print '
'.$langs->trans("Note").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_NOTE) ? nl2br($conf->global->MAIN_INFO_SOCIETE_NOTE) : '') . '
'; @@ -802,17 +802,17 @@ else $var=true; // Managing Director(s) - $var=!$var; + print '
'.$langs->trans("ManagingDirectors").''; print $conf->global->MAIN_INFO_SOCIETE_MANAGERS . '
'.$langs->trans("Capital").''; print $conf->global->MAIN_INFO_CAPITAL . '
'.$langs->trans("JuridicalStatus").''; print getFormeJuridiqueLabel($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE); print '
'.$langs->transcountry("ProfId1",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_SIREN)) { @@ -836,7 +836,7 @@ else // ProfId2 if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-') { - $var=!$var; + print '
'.$langs->transcountry("ProfId2",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_SIRET)) { @@ -852,7 +852,7 @@ else // ProfId3 if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-') { - $var=!$var; + print '
'.$langs->transcountry("ProfId3",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_APE)) { @@ -868,7 +868,7 @@ else // ProfId4 if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-') { - $var=!$var; + print '
'.$langs->transcountry("ProfId4",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_RCS)) { @@ -884,7 +884,7 @@ else // ProfId5 if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-') { - $var=!$var; + print '
'.$langs->transcountry("ProfId5",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_PROFID5)) { @@ -900,7 +900,7 @@ else // ProfId6 if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-') { - $var=!$var; + print '
'.$langs->transcountry("ProfId6",$mysoc->country_code).''; if (! empty($conf->global->MAIN_INFO_PROFID6)) { @@ -914,7 +914,7 @@ else } // VAT - $var=!$var; + print '
'.$langs->trans("VATIntra").''; if (! empty($conf->global->MAIN_INFO_TVAINTRA)) @@ -951,7 +951,7 @@ else print '
'.$langs->trans("CompanyObject").'' . (! empty($conf->global->MAIN_INFO_SOCIETE_OBJECT) ? nl2br($conf->global->MAIN_INFO_SOCIETE_OBJECT) : '') . '
'; @@ -967,7 +967,7 @@ else print "
'.$langs->trans("FiscalMonthStart").''; $monthstart=(! empty($conf->global->SOCIETE_FISCAL_MONTH_START)) ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1; print dol_print_date(dol_mktime(12,0,0,$monthstart,1,2000,1),'%B','gm') . '
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."'; print ""; @@ -994,7 +994,7 @@ else print "
"; print "
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."'; print ""; @@ -1020,7 +1020,7 @@ else print "\n"; $var=true; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print ''; $showemptyline=0; } - $var=!$var; + $value=$tabname[$i]; print ''; + +print ''; print ''; print ''; diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 892e0860cbd..161b1aac45d 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -99,8 +99,8 @@ foreach ($eventstolog as $key => $arr) { if ($arr['id']) { - $var=!$var; - print ''; + + print ''; print ''; print ''; @@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir) if (file_exists($dir.'/'.$file)) { - $var=!$var; + $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -522,7 +522,7 @@ else print ''."\n"; //Use draft Watermark -$var=!$var; + print ''; print ""; - $var=!$var; - print ""; + + print ''; print ""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print ""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print ""; print ""; + + print ''; print ""; print ''; print ''; print "\n"; -$var=!$var; -print ''; + +print ''; print ""; print ""; -$var=!$var; -print ''; + +print ''; print ""; print "\n"; print ''; -$var=!$var; + print ''; print ''; print ''; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 23ff67f92e7..9f1d3913630 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -159,8 +159,8 @@ else // Si condition non remplie, on ne propose pas l'option if (! $conditions[$const]) continue; - $var=!$var; - print ""; + + print ''; print ''; print ''; print ''; @@ -433,7 +433,7 @@ foreach ($dirmodels as $reldir) { if (file_exists($dir.'/'.$file)) { - $var=!$var; + $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); @@ -557,7 +557,7 @@ print "\n"; print ''; //Use draft Watermark -$var=!$var; + print ""; print ''; print ""; diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index b4d379e15d1..7626148b9da 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -105,7 +105,7 @@ print ''; print "\n"; -$var=!$var; + print ''; print ''."\n"; // Background - $var=!$var; + print ''."\n"; // Background login - $var=!$var; + print ''; print "\n"; // Synchro utilisateurs/groupes active -$var=!$var; + print ''; // Synchro contact active if (! empty($conf->societe->enabled)) { - $var=!$var; + print ''; print "\n"; // Type -$var=!$var; + print ''; // Version -$var=!$var; + print ''; // Serveur primaire -$var=!$var; + print ''; // Serveur secondaire -$var=!$var; + print ''; // Port -$var=!$var; + print ''; // DNserver -$var=!$var; + print ''; // Utiliser TLS -$var=!$var; + print ''; print "\n"; // DNAdmin -$var=!$var; + print ''; // Pass -$var=!$var; + print '\n"; // DN Pour les contacts -$var=!$var; + print ''; @@ -133,7 +133,7 @@ print ''; print ''; // List of object class used to define attributes in structure -$var=!$var; + print ''; @@ -152,7 +152,7 @@ print ''; print "\n"; // Common name -$var=!$var; + print ''; @@ -160,7 +160,7 @@ print ''; @@ -168,7 +168,7 @@ print ''; @@ -176,7 +176,7 @@ print ''; @@ -184,7 +184,7 @@ print ''; @@ -192,7 +192,7 @@ print ''; @@ -200,7 +200,7 @@ print ''; @@ -208,7 +208,7 @@ print ''; @@ -216,7 +216,7 @@ print ''; @@ -224,7 +224,7 @@ print ''; @@ -232,7 +232,7 @@ print ''; @@ -240,7 +240,7 @@ print ''; @@ -248,7 +248,7 @@ print ''; @@ -256,7 +256,7 @@ print ''; diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 90946f5ea44..919ae1c0552 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -116,7 +116,7 @@ print ''; print "\n"; // DN pour les groupes -$var=!$var; + print ''; @@ -124,7 +124,7 @@ print ''; print ''; // List of object class used to define attributes in structure -$var=!$var; + print ''; @@ -145,7 +145,7 @@ print "\n"; // Filtre // Common name -$var=!$var; + print ''; @@ -153,7 +153,7 @@ print ''; @@ -162,7 +162,7 @@ print ''; */ // Description -$var=!$var; + print ''; @@ -170,7 +170,7 @@ print ''; diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 52117961b54..ff09f233afd 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -142,7 +142,7 @@ print ''; print "\n"; // DN Pour les adherents -$var=!$var; + print ''; @@ -150,7 +150,7 @@ print ''; print ''; // List of object class used to define attributes in structure -$var=!$var; + print ''; @@ -158,7 +158,7 @@ print ''; print ''; // Filter, used to filter search -$var=!$var; + print ''; @@ -179,7 +179,7 @@ print "\n"; // Filtre // Common name -$var=!$var; + print ''; @@ -187,7 +187,7 @@ print ''; @@ -195,7 +195,7 @@ print ''; @@ -203,7 +203,7 @@ print ''; print ''; // Login unix -$var=!$var; + print ''; @@ -211,7 +211,7 @@ print ''; @@ -219,7 +219,7 @@ print ''; @@ -227,7 +227,7 @@ print ''; print ''; // Password crypted -$var=!$var; + print ''; @@ -235,7 +235,7 @@ print ''; print ''; // Mail -$var=!$var; + print ''; @@ -243,7 +243,7 @@ print ''; @@ -251,7 +251,7 @@ print ''; print ''; // Phone perso -$var=!$var; + print ''; @@ -259,7 +259,7 @@ print ''; print ''; // Mobile -$var=!$var; + print ''; @@ -267,7 +267,7 @@ print ''; print ''; // Skype -$var=!$var; + print ''; @@ -275,7 +275,7 @@ print ''; print ''; // Fax -$var=!$var; + print ''; @@ -283,7 +283,7 @@ print ''; print ''; // Address -$var=!$var; + print ''; @@ -291,7 +291,7 @@ print ''; print ''; // ZIP -$var=!$var; + print ''; @@ -299,7 +299,7 @@ print ''; print ''; // TOWN -$var=!$var; + print ''; @@ -307,7 +307,7 @@ print ''; print ''; // COUNTRY -$var=!$var; + print ''; @@ -315,7 +315,7 @@ print ''; print ''; // Description -$var=!$var; + print ''; @@ -323,7 +323,7 @@ print ''; print ''; // Public Note -$var=!$var; + print ''; @@ -331,7 +331,7 @@ print ''; print ''; // Birthday -$var=!$var; + print ''; @@ -339,7 +339,7 @@ print ''; print ''; // Status -$var=!$var; + print ''; @@ -347,7 +347,7 @@ print ''; print ''; // First subscription date -$var=!$var; + print ''; @@ -355,7 +355,7 @@ print ''; print ''; // First subscription amount -$var=!$var; + print ''; @@ -363,7 +363,7 @@ print ''; print ''; // Last subscription date -$var=!$var; + print ''; @@ -371,7 +371,7 @@ print ''; print ''; // Last subscription amount -$var=!$var; + print ''; @@ -379,7 +379,7 @@ print ''; print ''; // End last subscriptions -$var=!$var; + print ''; diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 45043b8a52b..cc99edfe3a7 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -129,7 +129,7 @@ print ''; print "\n"; // DN Pour les utilisateurs -$var=!$var; + print ''; @@ -137,7 +137,7 @@ print ''; print ''; // List of object class used to define attributes in structure -$var=!$var; + print ''; @@ -145,7 +145,7 @@ print ''; print ''; // Filter, used to filter search -$var=!$var; + print ''; @@ -164,7 +164,7 @@ print ''; print "\n"; // Common name -$var=!$var; + print ''; @@ -172,7 +172,7 @@ print ''; @@ -180,7 +180,7 @@ print ''; @@ -188,7 +188,7 @@ print ''; @@ -196,7 +196,7 @@ print ''; @@ -204,7 +204,7 @@ print ''; @@ -212,7 +212,7 @@ print ''; @@ -220,7 +220,7 @@ print ''; @@ -228,7 +228,7 @@ print ''; @@ -236,7 +236,7 @@ print ''; @@ -244,7 +244,7 @@ print ''; @@ -252,7 +252,7 @@ print ''; @@ -260,7 +260,7 @@ print ''; @@ -268,7 +268,7 @@ print ''; @@ -276,7 +276,7 @@ print ''; diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 3806258d246..3dcefa65a11 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -106,20 +106,20 @@ if ($action == 'edit') print '
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; @@ -1048,7 +1048,7 @@ else print "
"; print "
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; @@ -1071,7 +1071,7 @@ else print "\n"; $var=true; - $var=!$var; + print ""; print '\n"; - $var=!$var; + print ""; print ''; + print ''; print ''; print ''; print ''; @@ -239,7 +239,7 @@ else print ''; $var=false; - print ''; + print ''; print ''; print '
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; @@ -1100,7 +1100,7 @@ else print "
"; print "
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index abe5663084b..c097b9f39b1 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -148,7 +148,7 @@ print "\n"; foreach ($list as $key) { - $var=!$var; + print ''; diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 7fa47724c3d..c7b943625ae 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -247,7 +247,7 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + print "\n"; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 487203c9f4d..043450bdda4 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -266,7 +266,7 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var=!$var; + print ''; @@ -519,7 +519,7 @@ else print ''."\n"; //Use draft Watermark -$var=!$var; + print ''; + print ''; print ''; print ''; @@ -192,7 +192,7 @@ if ($action == 'edit') print ''; $var=false; - print ''; + print ''; print ''; print '
'.$module->nom."\n"; print $module->info(); print '
'; print $langs->trans("WatermarkOnDraftContractCards").''; print ''; diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 237f235f99c..266ebac9100 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -37,7 +37,7 @@ if (!$user->admin) accessforbidden(); $id=GETPOST('rowid','int'); $action=GETPOST('action','alpha'); -$mode = GETPOST('mode')?GETPOST('mode'):'createform'; +$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder' $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -47,13 +47,15 @@ if ($page == -1) { $page = 0; } $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -if (! $sortfield) $sortfield='lang,transkey'; +if (! $sortfield) $sortfield='page,param'; if (! $sortorder) $sortorder='ASC'; $defaulturl = GETPOST('defaulturl'); $defaultkey = GETPOST('defaultkey','alpha'); $defaultvalue = GETPOST('defaultvalue'); +$defaulturl=preg_replace('/^\//', '', $defaulturl); + /* * Actions @@ -69,7 +71,7 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Purge search criteria -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers { $defaulturl=''; $defaultkey=''; @@ -95,13 +97,13 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update')) } if (! $error) { - //$sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."')"; - //$result = $db->query($sql); - - // TODO Insert var - + $db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."default_values(type, user_id, page, param, value, entity) VALUES ('".$db->escape($mode)."', 0, '".$db->escape($defaulturl)."','".$db->escape($defaultkey)."','".$db->escape($defaultvalue)."', ".$db->escape($conf->entity).")"; + $result = $db->query($sql); if ($result > 0) { + $db->commit(); setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action=""; $defaulturl=''; @@ -110,7 +112,8 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update')) } else { - dol_print_error($db); + $db->rollback(); + setEventMessages($db->lasterror(), null, 'errors'); $action=''; } } @@ -119,7 +122,7 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update')) // Delete line from delete picto if ($action == 'delete') { - //$sql = "DELETE FROM ".MAIN_DB_PREFIX."overwrite_trans WHERE rowid = ".$db->escape($id); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."default_values WHERE rowid = ".$db->escape($id); // Delete const $result = $db->query($sql); if ($result >= 0) @@ -176,7 +179,7 @@ dol_fiche_head($head, $mode, '', -1, ''); print ''; print ''; -print ''; +print ''; print ''; print ''; @@ -185,16 +188,29 @@ if ($mode == 'createform') $texthelp.=$langs->trans("PageUrlForDefaultValuesCrea else $texthelp.=$langs->trans("PageUrlForDefaultValuesList", 'societe/list.php'); $texturl=$form->textwithpicto($langs->trans("Url"), $texthelp); print_liste_field_titre($texturl,$_SERVER["PHP_SELF"],'defaulturl','',$param,'',$sortfield,$sortorder); +$texthelp=$langs->trans("TheKeyIsTheNameOfHtmlField"); +if ($mode != 'sortorder') $textkey=$form->textwithpicto($langs->trans("Key"), $texthelp); +else $textkey=$form->textwithpicto($langs->trans("Key"), $texthelp); +print_liste_field_titre($textkey,$_SERVER["PHP_SELF"],'defaultkey','',$param,'',$sortfield,$sortorder); if ($mode != 'sortorder') { - $texthelp=$langs->trans("TheKeyIsTheNameOfHtmlField"); - $textkey=$form->textwithpicto($langs->trans("Key"), $texthelp); - print_liste_field_titre($textkey,$_SERVER["PHP_SELF"],'defaultkey','',$param,'',$sortfield,$sortorder); + $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
'; + // See list into GETPOST + $texthelp.='__USERID__
'; + $texthelp.='__MYCOUNTRYID__
'; + $texthelp.='__DAY__
'; + $texthelp.='__MONTH__
'; + $texthelp.='__YEAR__
'; + if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__
'; + $textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp); +} +else +{ + $texthelp='ASC or DESC'; + $textvalue=$form->textwithpicto($langs->trans("SortOrder"), $texthelp); } -$texthelp=$langs->trans("YouCanUseSubstitutionValue"); -$textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp); print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'defaultvalue', '', $param, '', $sortfield, $sortorder); -//if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,transkey','',$param,'',$sortfield,$sortorder); +if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,page','',$param,'',$sortfield,$sortorder); print ''; print "\n"; @@ -206,17 +222,14 @@ print ''; print ''."\n"; -if ($mode != 'sortorder') -{ - print ''; -} +print ''; print ''; // Limit to superadmin -/*if (! empty($conf->multicompany->enabled) && !$user->entity) +if (! empty($conf->multicompany->enabled) && !$user->entity) { print ''; print '\n"; print ''; // Show constants -/*$sql = "SELECT"; -$sql.= " rowid"; -$sql.= ", lang"; -$sql.= ", transkey"; -$sql.= ", transvalue"; -$sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; -$sql.= " WHERE 1 = 1";*/ -//$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")"; -//if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug -//else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits -//if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); -//$sql.= " ORDER BY entity, name ASC"; +$sql = "SELECT rowid, entity, type, page, param, value"; +$sql.= " FROM ".MAIN_DB_PREFIX."default_values"; +$sql.= " WHERE type = '".$db->escape($mode)."'"; +$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")"; $sql.= $db->order($sortfield, $sortorder); dol_syslog("translation::select from table", LOG_DEBUG); @@ -259,17 +264,14 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + print "\n"; print ''; - print ''."\n"; - if ($mode != 'sortorder') - { - print ''."\n"; - } + print ''."\n"; + print ''."\n"; // Value print ''; print ''; print "\n"; @@ -290,6 +292,10 @@ if ($result) $i++; } } +else +{ + dol_print_error($db); +} print '
'; print ''; print ''; - print ''; - print ''; +print ''; +print ''; print ''; print ''; print ''; @@ -224,28 +237,20 @@ print ''; } else -{*/ +{ print ''; print ''; -//} +} print ''; print "
'.$obj->lang.''.$obj->transkey.''.$obj->page.''.$obj->param.''; @@ -278,11 +280,11 @@ if ($result) print ''; print ''; */ - print $obj->transvalue; + print $obj->value; print ''; - print ''.img_delete().''; + print ''.img_delete().''; print '
'; diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 597327c04ba..0280673906b 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -173,9 +173,9 @@ if ($action == 'edit') { foreach($delays as $delay) { - $var=!$var; + $value=(! empty($conf->global->{$delay['code']})?$conf->global->{$delay['code']}:0); - print '
'.img_object('',$delay['img']).''.$langs->trans('Delays_'.$delay['code']).''; print ' '.$langs->trans("days").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_METEO").'' .$form->selectyesno('MAIN_DISABLE_METEO',(empty($conf->global->MAIN_DISABLE_METEO)?0:1),1) . '
'; @@ -220,9 +220,9 @@ else { foreach($delays as $delay) { - $var=!$var; + $value=(! empty($conf->global->{$delay['code']})?$conf->global->{$delay['code']}:0); - print '
'.img_object('',$delay['img']).''.$langs->trans('Delays_'.$delay['code']).''.$value.' '.$langs->trans("days").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_METEO").'' . yn($conf->global->MAIN_DISABLE_METEO) . '
'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 7392ca23905..d1a2709e221 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1570,12 +1570,12 @@ else { if ($showemptyline) { - $var=!$var; + print '
   
'; if (! empty($tabcond[$i])) diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 41824fea4c6..7b7357ee9eb 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -84,8 +84,8 @@ $var=true; $form = new Form($db); // Mail required for members -$var=!$var; -print '
'.$langs->trans("ECMAutoTree").' 
'.$arr['id'].''; $key='MAIN_LOGEVENTS_'.$arr['id']; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index a26a21fbede..746f7183123 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -275,7 +275,7 @@ foreach ($dirmodels as $reldir) if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
'; print $langs->trans("WatermarkOnDraftOrders").'
'; print ''; diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 8e550f98c99..7f81a5d0fef 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -266,20 +266,20 @@ if ($resql) print '
".$langs->trans("Title")."
".$langs->trans("URL")."
".$langs->trans("Status").""; if ($result > 0 && empty($rss->error)) @@ -299,8 +299,8 @@ if ($resql) // Logo if ($result > 0 && empty($rss->error)) { - $var=!$var; - print "
".$langs->trans("Logo")."'; $imageurl=$rssparser->getImageUrl(); diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index c95d8297cf9..65f8f31dd0a 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -628,8 +628,8 @@ print ''; print $langs->trans("PaymentMode").'
".$langs->trans("SuggestPaymentByRIBOnAccount").""; if (! empty($conf->banque->enabled)) @@ -671,8 +671,8 @@ else print $langs->trans("BankModuleNotActive"); } print "
".$langs->trans("SuggestPaymentByChequeToAddress").""; print '
'.img_object("",$picto[$const]).''.$langs->trans($desc).''; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 8d31db0d3af..cbcf925b907 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -310,7 +310,7 @@ foreach ($dirmodels as $reldir) if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").''; diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 1036d1057a9..193ee35a80f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -421,7 +421,7 @@ if ($action == 'edit') // Edit print '
'; print '
'; print ''; @@ -603,7 +603,7 @@ else // Show print '
'.$langs->trans("BackgroundImageLogin").''; print '
'; print $conf->global->MAIN_LOGIN_BACKGROUND; diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index 5c1b0fcad11..5eeab2a2838 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -110,7 +110,7 @@ print '
'.$langs->trans("LDAPSynchronization").'
'.$langs->trans("LDAPDnSynchroActive").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); @@ -127,7 +127,7 @@ print '
'.$langs->trans("LDAPDnContactActive").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); @@ -139,7 +139,7 @@ if (! empty($conf->societe->enabled)) // Synchro member active if (! empty($conf->adherent->enabled)) { - $var=!$var; + print '
'.$langs->trans("LDAPDnMemberActive").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); @@ -156,7 +156,7 @@ print ''.$langs->trans("Example").'
'.$langs->trans("Type").''; $arraylist=array(); $arraylist['activedirectory']='Active Directory'; @@ -166,7 +166,7 @@ print $form->selectarray('type',$arraylist,$conf->global->LDAP_SERVER_TYPE); print ' 
'.$langs->trans("Version").''; $arraylist=array(); $arraylist['3']='Version 3'; @@ -175,21 +175,21 @@ print $form->selectarray('LDAP_SERVER_PROTOCOLVERSION',$arraylist,$conf->global- print ''.$langs->trans("LDAPServerProtocolVersion").'
'; print $langs->trans("LDAPPrimaryServer").''; print ''; print ''.$langs->trans("LDAPServerExample").'
'; print $langs->trans("LDAPSecondaryServer").''; print ''; print ''.$langs->trans("LDAPServerExample").'
'.$langs->trans("LDAPServerPort").''; if (! empty($conf->global->LDAP_SERVER_PORT)) { @@ -202,13 +202,13 @@ else print ''.$langs->trans("LDAPServerPortExample").'
'.$langs->trans("LDAPServerDn").''; print ''; print ''.$langs->trans("LDAPServerDnExample").'
'.$langs->trans("LDAPServerUseTLS").''; $arraylist=array(); $arraylist['0']=$langs->trans("No"); @@ -221,13 +221,13 @@ print ''.$langs->trans("ForANonAnonymousAccess").'
'.$langs->trans("LDAPAdminDn").''; print ''; print ''.$langs->trans("LDAPAdminDnExample").'
'.$langs->trans("LDAPPassword").''; if (! empty($conf->global->LDAP_ADMIN_PASS)) { diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 4901c127e8b..fdc25346863 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -125,7 +125,7 @@ print "
'.$langs->trans("LDAPContactDn").''; print ''; print ''.$langs->trans("LDAPContactDnExample").' 
'.$langs->trans("LDAPContactObjectClassList").''; print ''; print ''.$langs->trans("LDAPContactObjectClassListExample").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").''; print ''; print ''.$langs->trans("LDAPFieldCompanyExample").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").''; print ''; print ''.$langs->trans("LDAPFieldHomePhoneExample").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").''; print ''; print ' '.$langs->trans("LDAPSynchronizeGroups").'
'.$langs->trans("LDAPGroupDn").''; print ''; print ''.$langs->trans("LDAPGroupDnExample").' 
'.$langs->trans("LDAPGroupObjectClassList").''; print ''; print ''.$langs->trans("LDAPGroupObjectClassListExample").'
'.$langs->trans("LDAPFieldName").''; print ''; print ''.$langs->trans("LDAPFieldCommonNameExample").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").'
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").''; print ''; print ''.$langs->trans("LDAPFieldGroupMembersExample").''.$langs->trans("LDAPSynchronizeMembers").'
'.$langs->trans("LDAPMemberDn").''; print ''; print ''.$langs->trans("LDAPMemberDnExample").' 
'.$langs->trans("LDAPMemberObjectClassList").''; print ''; print ''.$langs->trans("LDAPMemberObjectClassListExample").' 
'.$langs->trans("LDAPFilterConnection").''; print ''; print ''.$langs->trans("LDAPFilterConnectionExample").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").' 
'.$langs->trans("LDAPFieldLoginUnix").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldPasswordCrypted").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").' 
'.$langs->trans("LDAPFieldMail").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").' 
'.$langs->trans("LDAPFieldHomePhone").''; print ''; print ''.$langs->trans("LDAPFieldHomePhoneExample").' 
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").' 
'.$langs->trans("LDAPFieldSkype").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").' 
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").' 
'.$langs->trans("LDAPFieldAddress").''; print ''; print ''.$langs->trans("LDAPFieldAddressExample").' 
'.$langs->trans("LDAPFieldZip").''; print ''; print ''.$langs->trans("LDAPFieldZipExample").' 
'.$langs->trans("LDAPFieldTown").''; print ''; print ''.$langs->trans("LDAPFieldTownExample").' 
'.$langs->trans("LDAPFieldCountry").''; print ''; print '  
'.$langs->trans("LDAPFieldDescription").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").' 
'.$langs->trans("LDAPFieldNotePublic").''; print ''; print ''.$langs->trans("LDAPFieldNotePublicExample").' 
'.$langs->trans("LDAPFieldBirthdate").''; print ''; print '  
'.$langs->trans("LDAPFieldStatus").''; print ''; print '  
'.$langs->trans("LDAPFieldFirstSubscriptionDate").''; print ''; print '  
'.$langs->trans("LDAPFieldFirstSubscriptionAmount").''; print ''; print '  
'.$langs->trans("LDAPFieldLastSubscriptionDate").''; print ''; print '  
'.$langs->trans("LDAPFieldLastSubscriptionAmount").''; print ''; print '  
'.$langs->trans("LDAPFieldEndLastSubscription").''; print ''; print ' '.$langs->trans("LDAPSynchronizeUsers").'
'.$langs->trans("LDAPUserDn").''; print ''; print ''.$langs->trans("LDAPUserDnExample").' 
'.$langs->trans("LDAPUserObjectClassList").''; print ''; print ''.$langs->trans("LDAPUserObjectClassListExample").' 
'.$langs->trans("LDAPFilterConnection").''; print ''; print ''.$langs->trans("LDAPFilterConnectionExample").''.$langs->trans("LDAPNamingAttribute").'
'.$langs->trans("LDAPFieldFullname").''; print ''; print ''.$langs->trans("LDAPFieldFullnameExample").''; print ''; print ''.$langs->trans("LDAPFieldNameExample").''; // Firstname -$var=!$var; + print '
'.$langs->trans("LDAPFieldFirstName").''; print ''; print ''.$langs->trans("LDAPFieldFirstNameExample").''; print ''; print ''.$langs->trans("LDAPFieldLoginExample").''; // Login samba -$var=!$var; + print '
'.$langs->trans("LDAPFieldLoginSamba").''; print ''; print ''.$langs->trans("LDAPFieldLoginSambaExample").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").''; print ''; print ''.$langs->trans("LDAPFieldPasswordExample").''; print ''; print ''.$langs->trans("LDAPFieldMailExample").''; // Phone -$var=!$var; + print '
'.$langs->trans("LDAPFieldPhone").''; print ''; print ''.$langs->trans("LDAPFieldPhoneExample").''; // Mobile -$var=!$var; + print '
'.$langs->trans("LDAPFieldMobile").''; print ''; print ''.$langs->trans("LDAPFieldMobileExample").''; print ''; print ''.$langs->trans("LDAPFieldSkypeExample").''; // Fax -$var=!$var; + print '
'.$langs->trans("LDAPFieldFax").''; print ''; print ''.$langs->trans("LDAPFieldFaxExample").''; // Title -$var=!$var; + print '
'.$langs->trans("LDAPFieldTitle").''; print ''; print ''.$langs->trans("LDAPFieldTitleExample").''; // Note -$var=!$var; + print '
'.$langs->trans("Note").''; print ''; print ''.$langs->trans("LDAPFieldDescriptionExample").''; print ''; print ''.$langs->trans("LDAPFieldSidExample").'
'; print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; @@ -140,20 +140,20 @@ else print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print '
'; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print '
'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").'
'; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print '
'; print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index e49f25d7ef8..10d86f1b373 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -258,7 +258,7 @@ foreach ($dirmodels as $reldir) if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; + print ''; @@ -385,7 +385,7 @@ foreach ($dirmodels as $reldir) { if (file_exists($dir.'/'.$file)) { - $var=!$var; + $name = substr($file, 4, dol_strlen($file) -16); $classname = substr($file, 0, dol_strlen($file) -12); diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 3213503835d..ee6b9ef74ee 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -96,7 +96,7 @@ print "\n"; foreach ($list as $key) { - $var=!$var; + print ''; diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index 541c8aa1b2d..ebb49e8385e 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -113,21 +113,21 @@ print ''; print ''; print "\n"; -$var=!$var; + print ''; -$var=!$var; + print ''; -$var=!$var; + print ''; // Constant to add salt into the unsubscribe and check read tag. // It is also used as a security key parameter. -$var=!$var; + print ''; // Disable - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // Method - $var=!$var; + print ''; // Host server - $var=!$var; + print ''; // Port - $var=!$var; + print ''; // STARTTLS - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // From - $var=!$var; + print ''; print ''; // Default from type - $var=!$var; + $liste = array(); $liste['user'] = $langs->trans('UserEmail'); $liste['company'] = $langs->trans('CompanyEmail').' ('.(empty($conf->global->MAIN_INFO_SOCIETE_MAIL)?$langs->trans("NotDefined"):$conf->global->MAIN_INFO_SOCIETE_MAIL).')'; @@ -424,17 +424,17 @@ if ($action == 'edit') print ''; // Separator - $var=!$var; + print ''; // From - $var=!$var; + print ''; print ''; // Autocopy to - $var=!$var; + print ''; print ''; @@ -465,15 +465,15 @@ else print ''; // Disable - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // Method - $var=!$var; + print ''; // Host server - $var=!$var; + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { print ''; @@ -492,7 +492,7 @@ else } // Port - $var=!$var; + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { print ''; @@ -503,21 +503,21 @@ else } // SMTPS ID - $var=!$var; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { print ''; } // SMTPS PW - $var=!$var; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { print ''; } // TLS - $var=!$var; + print ''; // STARTTLS - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // From - $var=!$var; + print ''; print ''; // Default from type - $var=!$var; + print ''; print ''; // Separator - $var=!$var; + print ''; // Errors To - $var=!$var; + print ''; print ''; // Autocopy to - $var=!$var; + print ''; print ''; // Menu top - $var=!$var; + print ''; print ''; // Menu smartphone - $var=!$var; + print ''; print ''; print ''; - $var=!$var; + print ''; print ''; print ''; - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; // Hide unauthorized menu -$var=!$var; -print ""; + +print ''; print ''; print ''; print ''; - $var=!$var; + print "\n"; $url='https://www.dolistore.com'; print ''; @@ -789,7 +789,7 @@ if ($mode == 'marketplace') print ''; print ''; - $var=!$var; + print "\n"; $url='https://partners.dolibarr.org'; print ''; diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 5b86bcdc1c3..3aa6ad5dc26 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -183,8 +183,8 @@ print ''."\n"; print ''; print ''."\n"; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; /* TODO uncomment when the functionality will integrated -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; */ /* TODO uncomment when the functionality will integrated -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; print ''."\n"; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; @@ -323,8 +323,8 @@ print ''; print ''; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; + + print ''; print ''; print ''; print ''; print ''; print ''; print "\n"; -$var=!$var; + print ''; print '\n"; $notificationtrigger=new InterfaceNotification($db); $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); -print ''; +print ''; print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 2433575e553..06315222825 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -211,7 +211,7 @@ if ($mode == 'setup' && $user->admin) print ''; print "\n"; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("OAuthIDSecret").''; @@ -223,7 +223,7 @@ if ($mode == 'setup' && $user->admin) print ''."\n"; $var = ! $var; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("IsTokenGenerated"); @@ -250,7 +250,7 @@ if ($mode == 'setup' && $user->admin) print ''; $var = ! $var; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("Token").''; @@ -273,7 +273,7 @@ if ($mode == 'setup' && $user->admin) { // Token refresh $var = ! $var; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("TOKEN_REFRESH").''; @@ -284,7 +284,7 @@ if ($mode == 'setup' && $user->admin) // Token expired $var = ! $var; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("TOKEN_EXPIRED").''; @@ -295,7 +295,7 @@ if ($mode == 'setup' && $user->admin) // Token expired at $var = ! $var; - print ''; + print ''; print ''; //var_dump($key); print $langs->trans("TOKEN_EXPIRE_AT").''; @@ -368,8 +368,8 @@ if ($mode == 'userconf' && $user->admin) $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; $resql = $db->query($sql); while ($row=$db->fetch_array($resql)) { - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 55bd83cbc19..500281e0a10 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -128,7 +128,7 @@ if ($action == 'edit') // Edit if (empty($selected)) $selected=dol_getDefaultFormat(); // Show pdf format - $var=!$var; + print ''; @@ -145,13 +145,13 @@ if ($action == 'edit') // Edit print ''; // Hide VAT Intra on address - $var=!$var; + print ''; // Show prof id 1 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid1=$langs->transcountry("ProfId1",$mysoc->country_code); @@ -169,7 +169,7 @@ if ($action == 'edit') // Edit } // Show prof id 2 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid2=$langs->transcountry("ProfId2",$mysoc->country_code); @@ -187,7 +187,7 @@ if ($action == 'edit') // Edit } // Show prof id 3 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid3=$langs->transcountry("ProfId3",$mysoc->country_code); @@ -205,7 +205,7 @@ if ($action == 'edit') // Edit } // Show prof id 4 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid4=$langs->transcountry("ProfId4",$mysoc->country_code); @@ -233,36 +233,36 @@ if ($action == 'edit') // Edit print ''; // Hide any PDF informations - $var=!$var; + print ''; //Desc - $var=!$var; + print ''; //Ref - $var=!$var; + print ''; //Details - $var=!$var; + print ''; // Place customer adress to the ISO location - $var=!$var; + print ''; - $var=!$var; + print ''; @@ -287,7 +287,7 @@ else // Show print ''; // Show pdf format - $var=!$var; + print ''; // Hide Intra VAT on address - $var=!$var; + print ''; // Show prof id 1 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid1=$langs->transcountry("ProfId1",$mysoc->country_code); @@ -347,7 +347,7 @@ else // Show } // Show prof id 2 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid2=$langs->transcountry("ProfId2",$mysoc->country_code); @@ -365,7 +365,7 @@ else // Show } // Show prof id 3 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid3=$langs->transcountry("ProfId3",$mysoc->country_code); @@ -383,7 +383,7 @@ else // Show } // Show prof id 4 in address into pdf - $var=!$var; + if (! $noCountryCode) { $pid4=$langs->transcountry("ProfId4",$mysoc->country_code); @@ -412,8 +412,8 @@ else // Show // Encrypt and protect PDF - $var=!$var; - print ""; + + print ''; print ''; // Hide any PDF informations - $var=!$var; + print ''; //Desc - $var=!$var; + print ''; //Ref - $var=!$var; + print ''; //Details - $var=!$var; + print ''; - $var=!$var; + print ''; - $var=!$var; + print ''; @@ -492,7 +492,7 @@ else // Show $var=false; if (! empty($dolibarr_pdf_force_fpdf)) { - $var=!$var; + print ''."\n"; print ''."\n"; print ''; } - $var=!$var; + print ''."\n"; print ''."\n"; print '\n"; } - $var=!$var; + print ''; print '"; + print ''; print ''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index c6ccb4f639c..0d041cad2b7 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -310,7 +310,7 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var=!$var; + print ''; @@ -546,11 +546,11 @@ print '\n"; print "\n"; print ""; -$var=!$var; + print ""; print ''; print ""; -print ""; +print ''; print ''; print '"; print ''; @@ -594,7 +594,7 @@ print '' print "\n"; print ''; -$var=!$var; + print ""; print ''; print ""; @@ -609,7 +609,7 @@ print ''; /* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation. if ($conf->banque->enabled) { - $var=!$var; + print ''; } diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 84836407499..224fac14ce7 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -133,8 +133,8 @@ print ''; print ''; print "\n"; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; -$var=!$var; + print ''; print ''; @@ -171,7 +171,7 @@ print ''; @@ -180,7 +180,7 @@ print ''; @@ -189,7 +189,7 @@ print ''; diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index b86023aa49a..1bac9d80bee 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -250,7 +250,7 @@ if ($mode == 'config' && $user->admin) } else { for ($line=0; $line < $nbofprinters; $line++) { $var = !$var; - print ''; + print ''; if ($action=='editprinter' && $printer->listprinters[$line]['rowid']==$printerid) { print ''; print ''; @@ -381,7 +381,7 @@ if ($mode == 'template' && $user->admin) $max = count($printer->listprinterstemplates); for ($line=0; $line < $max; $line++) { $var = !$var; - print ''; + print ''; if ($action=='edittemplate' && $printer->listprinterstemplates[$line]['rowid']==$templateid) { print ''; print ''; @@ -427,7 +427,7 @@ if ($mode == 'template' && $user->admin) $max = count($printer->tags); for ($tag=0; $tag < $max; $tag++) { $var = !$var; - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index d8fdddd2bb5..3f057bbdbb9 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -85,8 +85,8 @@ print ''; // Utilisation formulaire Ajax sur choix produit -$var=!$var; -print ''; + +print ''; print ''; if (empty($conf->use_javascript_ajax)) { @@ -111,8 +111,8 @@ else } print ''; -$var=!$var; -print ''; + +print ''; print ''; print ''; print ''; print ''; -$var=!$var; -print ''; + +print ''; print ''; print '\n"; foreach ($list as $key) { - $var=!$var; + print ''; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 3aa0bdf33bf..449180d25da 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -283,7 +283,7 @@ print ''; //if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1) // Patter for Password Perso if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ -$var=!$var; + $tabConf = explode(";",$conf->global->USER_PASSWORD_PATTERN); /*$this->length2 = $tabConf[0]; @@ -299,38 +299,38 @@ $var=!$var; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; - $var=!$var; - print ""; + + print ''; print '"; print ''; print ''; @@ -407,8 +407,8 @@ print ''; print ''; // Disable clear password in database -$var=!$var; -print ""; + +print ''; print ''; print '"; print ''; // Cryptage du mot de base de la base dans conf.php -$var=!$var; -print ""; + +print ''; print ''; print ''; // Disable link "Forget password" on logon -$var=!$var; -print ""; + +print ''; print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; @@ -158,8 +158,8 @@ print ''; print ''; // Use anti virus -$var=!$var; -print ""; + +print ''; print '"; print ''; // Use anti virus -$var=!$var; -print ""; + +print ''; print ''; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 9ce79359a7c..e5c66d9e24b 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -116,8 +116,8 @@ print ''; print ''; // Enable Captcha code -$var=!$var; -print ""; + +print ''; print ''; print ''; // Enable advanced perms -$var=!$var; -print ""; + +print ''; print ''; print ''; print ''; print "\n"; -$var=!$var; + $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout; -print ''; +print ''; print ''; @@ -194,10 +194,10 @@ print ''; print ''; -$var=!$var; + $sessiontimeout=ini_get("session.gc_maxlifetime"); if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE=""; -print ''; +print ''; print ''; print ''; // Disable - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // Method - $var=!$var; + print ''; // From - $var=!$var; + print ''; print ''; // Autocopy to - /*$var=!$var; + /* print ''; print ''; @@ -224,15 +224,15 @@ else print ''; // Disable - $var=!$var; + print ''; // Separator - $var=!$var; + print ''; // Method - $var=!$var; + print ''; // From - $var=!$var; + print ''; print ''; // Autocopy to - /*$var=!$var; + /* print ''; print '"; + +print ''; print ''; print '\n\n"; $found++; -$var=!$var; -print ""; + +print ''; print ''; print '"; + +print ''; print ''; print '\n\n"; $found++; -$var=!$var; -print ""; + +print ''; print ''; print '"; + + print ''; print ''; print "\n"; }*/ @@ -265,8 +265,8 @@ $var=true; $found=0; -$var=!$var; -print ""; + +print ''; print ''; print '\n\n"; $found++; -$var=!$var; -print ""; + +print ''; print ''; print '\n\n"; $found++; -$var=!$var; -print ""; + +print ''; print ''; print '"; + + print ''; print ''; print "\n"; }*/ @@ -343,8 +343,8 @@ print " \n"; print " \n"; print ''."\n"; -$var=!$var; -print ""; + +print ''; print ''; print '\n"; // Option to force stock to be enough before adding a line into document if($conf->invoice->enabled) { $var = !$var; - print ""; + print ''; print ''; print '"; + print ''; print ''; print '"; + print ''; print ''; print '\n"; print ''."\n"; $var = !$var; - print ""; + print ''; print ''; print '\n"; print ''."\n"; if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { - $var=!$var; - print ""; + + print ''; print ''; print '\n\n"; } -$var=!$var; -print ""; + +print ''; print ''; print '\n"; print "\n"; -$var=!$var; -print ""; + +print ''; print ''; print '"; + print ''; print ''; print ''; @@ -378,7 +378,7 @@ foreach ($dirmodels as $reldir) require_once $dir.'/'.$file; $module = new $classname($db, new FactureFournisseur($db)); - $var=!$var; + print "\n"; print "'; @@ -402,7 +402,7 @@ foreach ($dirmodels as $reldir) require_once $dir.'/'.$file; $module = new $classname($db, new CommandeFournisseur($db)); - $var=!$var; + print "\n"; print "\n"; - $var=!$var; + //} // Ask for payment bank during supplier order /* Kept as hidden for the moment if ($conf->banque->enabled) { - $var=!$var; + print ''; } diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 933ee22a062..14e13789887 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -384,7 +384,7 @@ foreach ($dirmodels as $reldir) require_once $dir.'/'.$file; $module = new $classname($db, new PaiementFourn($db)); - $var=!$var; + print "\n"; print "'; @@ -545,7 +545,7 @@ print '' print "\n"; print ''; -$var=!$var; + print ""; print ''; print ""; @@ -559,7 +559,7 @@ print ''; if ($conf->banque->enabled) { - $var=!$var; + print ''; } diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index ae32c073349..d8927c552b6 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -204,8 +204,8 @@ foreach ($syslogModules as $moduleName) //print $moduleName." = ".$moduleactive." - ".$module->getName()." ".($moduleactive == -1)."
\n"; if (($moduleactive == -1) && empty($conf->global->MAIN_FEATURES_LEVEL)) continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them) - $var=!$var; - print ''; + + print ''; print ''; print "\n"; $var=true; -$var=!$var; + print ''; print ''; + print ''; // Date print ''; diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index c313c91a7bd..56db6eb2ad7 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -141,9 +141,9 @@ if ($savehandler == 'files') foreach ($listofsessions as $key => $sessionentry) { - $var=!$var; + - print ""; + print ''; // Login print ''; diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index bb485c41999..6d3ee6ced8e 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -79,7 +79,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_array_options=array(); } - if ($action == 'add' || (GETPOST('add') && $action != 'update')) { $error=0; @@ -101,18 +100,22 @@ if ($action == 'add' || (GETPOST('add') && $action != 'update')) } if (! $error) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."')"; + $db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".$db->escape($conf->entity).")"; $result = $db->query($sql); if ($result > 0) { - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $db->commit(); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action=""; $transkey=""; $transvalue=""; } else { - dol_print_error($db); + $db->rollback(); + setEventMessages($db->lasterror(), null, 'errors'); $action=''; } } @@ -206,10 +209,9 @@ if ($mode == 'overwrite') // Line to add new record - $var=false; print "\n"; - print ''."\n"; print ''; + print ''; print ''."\n"; print ''."\n"; @@ -332,8 +324,8 @@ if ($mode == 'searchkey') foreach($filearray as $file) { $tmpfile=preg_replace('/.lang/i', '', basename($file['name'])); - $newlang->load($tmpfile, 0, 0, '', 0); - $newlangfileonly->load($tmpfile, 0, 0, '', 1); + $newlang->load($tmpfile, 0, 0, '', 0); // Load translation files + database overwrite + $newlangfileonly->load($tmpfile, 0, 0, '', 1); // Load translation files only //print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records
'."\n"; } } @@ -372,10 +364,9 @@ if ($mode == 'searchkey') print "\n"; // Line to search new record - $var=false; print "\n"; - print ''."\n"; @@ -408,14 +399,12 @@ if ($mode == 'searchkey') // Show result $i=0; - $var=false; foreach($recordtoshow as $key => $val) { $i++; if ($i <= $offset) continue; if ($i > ($offset + $limit)) break; - $var=!$var; - print ''; }*/ print ''."\n"; } diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index c1224bffe89..0aae9c6915e 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -64,8 +64,8 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_UNIT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_UNIT.'
'; print $form->textwithpicto($langs->trans("MAIN_MAX_DECIMALS_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_MAX_DECIMALS_TOT.'
'.$langs->trans("MAIN_MAX_DECIMALS_SHOWN").''.$conf->global->MAIN_MAX_DECIMALS_SHOWN.'
'; print $form->textwithpicto($langs->trans("MAIN_ROUNDING_RULE_TOT"),$langs->trans("ParameterActiveForNextInputOnly")); print ''.$conf->global->MAIN_ROUNDING_RULE_TOT.'
'.$module->nom."\n"; print $module->info(); print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $langs->trans("MailingEMailFrom").''; print ''; if (!empty($conf->global->MAILING_EMAIL_FROM) && ! isValidEmail($conf->global->MAILING_EMAIL_FROM)) print ' '.img_warning($langs->trans("BadEMail")); print '
'; print $langs->trans("MailingEMailError").''; print ''; if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail")); print '
'; print $langs->trans("MailingDelay").''; print ''; @@ -135,7 +135,7 @@ print '
'; print $langs->trans("ActivateCheckReadKey").''; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 6c01935ec39..4bc7627ceca 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -241,17 +241,17 @@ if ($action == 'edit') print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''; print $form->selectyesno('MAIN_DISABLE_ALL_MAILS',$conf->global->MAIN_DISABLE_ALL_MAILS,1); print '
 
'.$langs->trans("MAIN_MAIL_SENDMODE").''; // SuperAdministrator access only @@ -270,7 +270,7 @@ if ($action == 'edit') print '
'; if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { @@ -303,7 +303,7 @@ if ($action == 'edit') print '
'; if (! $conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE == 'mail') { @@ -338,7 +338,7 @@ if ($action == 'edit') // ID if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { - $var=!$var; + $mainstmpid=(! empty($conf->global->MAIN_MAIL_SMTPS_ID)?$conf->global->MAIN_MAIL_SMTPS_ID:''); print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; // SuperAdministrator access only @@ -358,7 +358,7 @@ if ($action == 'edit') // PW if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { - $var=!$var; + $mainsmtppw=(! empty($conf->global->MAIN_MAIL_SMTPS_PW)?$conf->global->MAIN_MAIL_SMTPS_PW:''); print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; // SuperAdministrator access only @@ -376,7 +376,7 @@ if ($action == 'edit') } // TLS - $var=!$var; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { @@ -390,7 +390,7 @@ if ($action == 'edit') print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) { @@ -404,17 +404,17 @@ if ($action == 'edit') print '
 
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).'
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").'
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_MAILS").''.yn($conf->global->MAIN_DISABLE_ALL_MAILS).'
 
'.$langs->trans("MAIN_MAIL_SENDMODE").''; $text=$listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text=$langs->trans("Undefined").img_warning(); @@ -481,7 +481,7 @@ else print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./','*',$conf->global->MAIN_MAIL_SMTPS_PW).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { @@ -531,7 +531,7 @@ else print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) { @@ -545,18 +545,18 @@ else print '
 
'.$langs->trans("MAIN_MAIL_EMAIL_FROM",ini_get('sendmail_from')?ini_get('sendmail_from'):$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_EMAIL_FROM; if (! empty($conf->global->MAIN_MAIL_EMAIL_FROM) && ! isValidEmail($conf->global->MAIN_MAIL_EMAIL_FROM)) print img_warning($langs->trans("ErrorBadEMail")); print '
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; if($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user'){ @@ -567,18 +567,18 @@ else print '
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").''.$conf->global->MAIN_MAIL_ERRORS_TO; if (! empty($conf->global->MAIN_MAIL_ERRORS_TO) && ! isValidEmail($conf->global->MAIN_MAIL_ERRORS_TO)) print img_warning($langs->trans("ErrorBadEMail")); print '
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''; if (! empty($conf->global->MAIN_MAIL_AUTOCOPY_TO)) diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 0d6ff4d34a0..506bc5fb2d8 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -179,7 +179,7 @@ if ($action == 'edit') print '
'.$langs->trans("DefaultMenuManager").''; $formadmin->select_menu(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED, 'MAIN_MENU_STANDARD', $dirstandard, empty($conf->global->MAIN_MENU_STANDARD_FORCED)?'':' disabled'); @@ -190,7 +190,7 @@ if ($action == 'edit') print '
'.$langs->trans("DefaultMenuSmartphoneManager").''; $formadmin->select_menu(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED, 'MAIN_MENU_SMARTPHONE', array_merge($dirstandard,$dirsmartphone), empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?'':' disabled'); @@ -217,7 +217,7 @@ else print '
'.$langs->trans("DefaultMenuManager").''; $filelib=preg_replace('/.php$/i','',(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED)); @@ -229,8 +229,8 @@ else print '
'.$langs->trans("DefaultMenuSmartphoneManager").''; $filelib=preg_replace('/.php$/i','',(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED)); diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 0a3cb6b99bc..82457a27bdf 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -90,8 +90,8 @@ print ''.$langs->trans("Status").'
'.$langs->trans("HideUnauthorizedMenu").''; if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 3fe6addea2d..94bfa8e05bb 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -285,7 +285,7 @@ if (isset($objMod->langfiles) && is_array($objMod->langfiles)) } } -$var=!$var; + // Version (with picto warning or not) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index ddaf940492f..4eb82e6183c 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -584,7 +584,7 @@ if ($mode == 'common') $oldfamily=$familykey; } - $var=!$var; + // Version (with picto warning or not) @@ -781,7 +781,7 @@ if ($mode == 'marketplace') print ''.$langs->trans("URL").'
'.$url.'
'.$langs->trans("Parameters").' '.$langs->trans("Value").'
'.$langs->transnoentitiesnoconv("multicurrency_useRateOnDocumentDate").' '; @@ -197,8 +197,8 @@ print ''; print '
'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").' '; @@ -211,8 +211,8 @@ print ''; print '
'.$langs->transnoentitiesnoconv("multicurrency_buyPriceInCurrency").' '; @@ -226,8 +226,8 @@ print '
'.$langs->transnoentitiesnoconv("multicurrency_modifyRateApplication").' '; @@ -260,8 +260,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print '
'.$langs->transnoentitiesnoconv("multicurrency_appId").' '; @@ -273,8 +273,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print '
'.$langs->transnoentitiesnoconv("multicurrency_appCurrencySource").' '; @@ -286,8 +286,8 @@ if (!empty($conf->global->MAIN_MULTICURRENCY_ALLOW_SYNCHRONIZATION)) print ''; print '
'.$langs->transnoentitiesnoconv("multicurrency_alternateCurrencySource").' '; @@ -311,8 +311,8 @@ print ''.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->trans print ' '.$langs->trans("Rate").'
'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).' 1'; @@ -334,8 +334,8 @@ foreach ($TCurrency as &$currency) { if($currency->code == $conf->currency) continue; - $var=!$var; - print '
'.$currency->code.' - '.$currency->name.' '; diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index a3b3eb50df6..9d75070a956 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -135,7 +135,7 @@ print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print $langs->trans("NotificationEMailFrom").''; @@ -165,14 +165,14 @@ print "
'; $var=true; $i=0; foreach($listofnotifiedevents as $notifiedevent) { - $var=!$var; + $label=$langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label']; if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder'); @@ -213,7 +213,7 @@ $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents(); $var=true; foreach($listofnotifiedevents as $notifiedevent) { - $var=!$var; + $label=$langs->trans("Notify_".$notifiedevent['code']); //!=$langs->trans("Notify_".$notifiedevent['code'])?$langs->trans("Notify_".$notifiedevent['code']):$notifiedevent['label']; if ($notifiedevent['elementtype'] == 'order_supplier') $elementLabel = $langs->trans('SupplierOrder'); @@ -222,7 +222,7 @@ foreach($listofnotifiedevents as $notifiedevent) elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order'); elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention'); - print '
'.$elementLabel.''.$notifiedevent['code'].''.$label.'
'.$row['login'].''.$row['module'].''.$row['driver'].'
'.$langs->trans("DictionaryPaperFormat").''; print $formadmin->select_paper_format($selected,'MAIN_PDF_FORMAT'); print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("ShowVATIntaInAddress").''; print $form->selectyesno('MAIN_TVAINTRA_NOT_IN_ADDRESS',(! empty($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS))?$conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS:0,1); print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("HideAnyVATInformationOnPDF").''; print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1); print '
'.$langs->trans("HideDescOnPDF").''; print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1); print '
'.$langs->trans("HideRefOnPDF").''; print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1); print '
'.$langs->trans("HideDetailsOnPDF").''; print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS:0,1); print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; print $form->selectyesno('MAIN_PDF_USE_ISO_LOCATION',(! empty($conf->global->MAIN_PDF_USE_ISO_LOCATION))?$conf->global->MAIN_PDF_USE_ISO_LOCATION:0,1); print '
'.$langs->trans("ShowDetailsInPDFPageFoot").''; print $form->selectarray('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', $arraydetailsforpdffoot, $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS); print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("DictionaryPaperFormat").''; $pdfformatlabel=''; @@ -323,13 +323,13 @@ else // Show print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("ShowVATIntaInAddress").''; print yn($conf->global->MAIN_TVAINTRA_NOT_IN_ADDRESS,1); print '
'; $text = $langs->trans("ProtectAndEncryptPdfFiles"); $desc = $form->textwithpicto($text,$langs->transnoentities("ProtectAndEncryptPdfFilesDesc"),1); @@ -440,35 +440,35 @@ else // Show print '
'.$langs->trans("HideAnyVATInformationOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1); print '
'.$langs->trans("HideDescOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1); print '
'.$langs->trans("HideRefOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1); print '
'.$langs->trans("HideDetailsOnPDF").''; print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS,1); print '
'.$langs->trans("PlaceCustomerAddressToIsoLocation").''; print yn($conf->global->MAIN_PDF_USE_ISO_LOCATION,1); print '
'.$langs->trans("ShowDetailsInPDFPageFoot").''; print $arraydetailsforpdffoot[$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS]; print '
dolibarr_pdf_force_fpdf'; @@ -501,7 +501,7 @@ else // Show print '
'.$langs->trans("LibraryToBuildPDF").''; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 84cb9ed8bf2..daafab71053 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -186,7 +186,7 @@ if ($result) print "
'.img_object('',$picto).' '.$objMod->getName(); diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 6d5c915dae2..1c557a83296 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -422,7 +422,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + if (!$obj->fk_soc) { $username=dolGetFirstLastname($obj->firstname,$obj->lastname); @@ -495,9 +495,9 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print "
'.dolGetFirstLastname($obj->firstname,$obj->lastname).''.$label.'
'.$module->nom."\n"; print $module->info(); print ''.$langs->trans("Value")." 
'.$langs->trans("DefaultProposalDurationValidity").''."global->PROPALE_VALIDITY_DURATION."\">
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) @@ -631,7 +631,7 @@ if ($conf->banque->enabled) } else { - $var=!$var; + print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").' '.$langs->trans('NotAvailable').'
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("ConnectionTimeout").''; print ''; @@ -143,8 +143,8 @@ print ' '.strtolower($langs->trans("Seconds")); print '
'.$langs->trans("ResponseTimeout").''; print ''; @@ -153,8 +153,8 @@ print ' '.strtolower($langs->trans("Seconds")); print '
'.$langs->trans("MAIN_PROXY_USE").''; print ''; @@ -162,7 +162,7 @@ print $form->selectyesno('MAIN_PROXY_USE',$conf->global->MAIN_PROXY_USE,1); print '
'.$langs->trans("MAIN_PROXY_HOST").''; print ''; print ''; print ''; print '
<'.$printer->tags[$tag].'>'.$langs->trans(strtoupper($printer->tags[$tag])).'
'.$langs->trans("UseSearchToSelectResource").'
'.$langs->trans('DisabledResourceLinkUser').''; echo ajax_constantonoff('RESOURCE_HIDE_ADD_CONTACT_USER'); @@ -120,8 +120,8 @@ print '
'.$langs->trans('DisabledResourceLinkContact').''; echo ajax_constantonoff('RESOURCE_HIDE_ADD_CONTACT_THIPARTY'); diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index b09f4820312..a04b23ce4fe 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -97,7 +97,7 @@ print "
'.$langs->trans("PasswordPatternDesc").'
' . $langs->trans("MinLength")."
' . $langs->trans("NbMajMin")."
' . $langs->trans("NbNumMin")."
' . $langs->trans("NbSpeMin")."
' . $langs->trans("NbIteConsecutive")."
' . $langs->trans("NoAmbiCaracAutoGeneration")." '.($tabConf[5] ? $langs->trans("Activated") : $langs->trans("Disabled")).'
'.$langs->trans("Action").'
'.$langs->trans("DoNotStoreClearPassword").''; if (! empty($conf->global->DATABASE_PWD_ENCRYPTED)) @@ -441,8 +441,8 @@ print "
'.$langs->trans("MainDbPasswordFileConfEncrypted").''; if (preg_match('/crypted:/i',$dolibarr_main_db_pass) || ! empty($dolibarr_main_db_encrypted_pass)) @@ -476,8 +476,8 @@ print '
'.$langs->trans("DisableForgetPasswordLinkOnLogonPage").''; if(! empty($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)) diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 0114bbb74b8..8c1b1fa5b07 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -136,7 +136,7 @@ print ''.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("MaxSizeForUploadedFiles").'.'; $max=@ini_get('upload_max_filesize'); if ($max) print ' '.$langs->trans("MustBeLowerThanPHPLimit",$max*1024,$langs->trans("Kb")).'.'; @@ -147,8 +147,8 @@ print ''; print ''.$langs->trans("UMask").''; print $form->textwithpicto('',$langs->trans("UMaskExplanation")); print '
'.$langs->trans("AntiVirusCommand").'
'; print $langs->trans("AntiVirusCommandExample"); // Check command in inside safe_mode @@ -181,8 +181,8 @@ print "
'.$langs->trans("AntiVirusParam").'
'; print $langs->trans("AntiVirusParamExample"); print '
'.$langs->trans("Status").'
'.$langs->trans("UseCaptchaCode").''; if (function_exists("imagecreatefrompng")) @@ -146,8 +146,8 @@ else print '
'.$langs->trans("UseAdvancedPerms").''; if (! empty($conf->use_javascript_ajax)) @@ -182,10 +182,10 @@ print ''.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("SessionTimeOut").''; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print '
'.$langs->trans("MAIN_APPLICATION_TITLE").''; print ''; diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 05fe548daff..4227116eaea 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -175,30 +175,30 @@ if ($action == 'edit') print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_SMS").''; print $form->selectyesno('MAIN_DISABLE_ALL_SMS',$conf->global->MAIN_DISABLE_ALL_SMS,1); print '
 
'.$langs->trans("MAIN_SMS_SENDMODE").''; if (count($listofmethods)) print $form->selectarray('MAIN_SMS_SENDMODE',$listofmethods,$conf->global->MAIN_SMS_SENDMODE,1); else print ''.$langs->trans("None").''; print '
'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).'
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").'
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DISABLE_ALL_SMS").''.yn($conf->global->MAIN_DISABLE_ALL_SMS).'
 
'.$langs->trans("MAIN_SMS_SENDMODE").''; $text=$listofmethods[$conf->global->MAIN_SMS_SENDMODE]; if (empty($text)) $text=$langs->trans("Undefined").' '.img_warning(); @@ -240,14 +240,14 @@ else print '
'.$langs->trans("MAIN_MAIL_SMS_FROM",$langs->transnoentities("Undefined")).''.$conf->global->MAIN_MAIL_SMS_FROM; if (!empty($conf->global->MAIN_MAIL_SMS_FROM) && ! isValidPhone($conf->global->MAIN_MAIL_SMS_FROM)) print ' '.img_warning($langs->trans("ErrorBadPhone")); print '
'.$langs->trans("MAIN_MAIL_AUTOCOPY_TO").''.$conf->global->MAIN_MAIL_AUTOCOPY_TO; if (!empty($conf->global->MAIN_MAIL_AUTOCOPY_TO) && ! isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail")); diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index f2a6d165bd5..1c5a92fb0e8 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -161,8 +161,8 @@ $var=true; $found=0; -$var=!$var; -print "
'.$langs->trans("DeStockOnBill").''; if (! empty($conf->facture->enabled)) @@ -181,8 +181,8 @@ else print "
'.$langs->trans("DeStockOnValidateOrder").''; if (! empty($conf->commande->enabled)) @@ -203,8 +203,8 @@ $found++; //if (! empty($conf->expedition->enabled)) //{ -$var=!$var; -print "
'.$langs->trans("DeStockOnShipment").''; if (! empty($conf->expedition->enabled)) @@ -223,8 +223,8 @@ else print "
'.$langs->trans("DeStockOnShipmentOnClosing").''; if (! empty($conf->expedition->enabled)) @@ -245,8 +245,8 @@ $found++; /*if (! $found) { - $var=!$var; - print "
'.$langs->trans("NoModuleToManageStockDecrease").'
'.$langs->trans("ReStockOnBill").''; if (! empty($conf->fournisseur->enabled)) @@ -286,8 +286,8 @@ print "
'.$langs->trans("ReStockOnValidateOrder").''; if (! empty($conf->fournisseur->enabled)) @@ -306,8 +306,8 @@ else print "
'.$langs->trans("ReStockOnDispatchOrder").''; if (! empty($conf->fournisseur->enabled)) @@ -328,8 +328,8 @@ $found++; /*if (! $found) { - $var=!$var; - print "
'.$langs->trans("NoModuleToManageStockIncrease").'
".$langs->trans("RuleForStockAvailability")." 
'.$langs->trans("WarehouseAllowNegativeTransfer").''; print "
"; @@ -359,7 +359,7 @@ print "
'.$langs->trans("StockMustBeEnoughForInvoice").''; print ""; @@ -374,7 +374,7 @@ if($conf->invoice->enabled) { if($conf->order->enabled) { $var = !$var; - print "
'.$langs->trans("StockMustBeEnoughForOrder").''; print ""; @@ -389,7 +389,7 @@ if($conf->order->enabled) { if($conf->expedition->enabled) { $var = !$var; - print "
'.$langs->trans("StockMustBeEnoughForShipment").''; print ""; @@ -417,7 +417,7 @@ if ($virtualdiffersfromphysical) print "  
'.$langs->trans("UseVirtualStockByDefault").''; print ""; @@ -441,8 +441,8 @@ print "  
'.$langs->trans("UseDispatchStatus").''; print ""; @@ -454,9 +454,9 @@ if (! empty($conf->fournisseur->enabled) && !empty($conf->global->STOCK_CALCULAT print "
'.$langs->trans("UserWarehouseAutoCreate").''; print ""; @@ -468,9 +468,9 @@ print ''; print "
'.$langs->trans("AllowAddLimitStockByWarehouse").''; @@ -489,9 +489,9 @@ print '
'; If not used by a module, I still need to understand in which case user may need this now we can set rule on product page. if ($conf->global->PRODUIT_SOUSPRODUITS) { - $var=!$var; + - print "
'.$langs->trans("IndependantSubProductStock").''; diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 7510bfe37ef..e20b92be95e 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir) if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
"; print (empty($module->name)?$name:$module->name); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 1ac6ae86989..fe7d06ed6a8 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -279,7 +279,7 @@ foreach ($dirmodels as $reldir) if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
"; print (empty($module->name)?$name:$module->name); @@ -501,14 +501,14 @@ $var=false; print ''; print ''; print "
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").' '; if (! empty($conf->use_javascript_ajax)) @@ -530,7 +530,7 @@ if ($conf->banque->enabled) } else { - $var=!$var; + print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").' '.$langs->trans('NotAvailable').'
"; print (empty($module->name)?$name:$module->name); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 7963aa7fabc..621dd302ccb 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -288,7 +288,7 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var=!$var; + print '
'.$module->nom."\n"; print $module->info(); print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '; if (! empty($conf->use_javascript_ajax)) @@ -581,7 +581,7 @@ if ($conf->banque->enabled) } else { - $var=!$var; + print '
'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').'
'; print ' '; print $module->getName(); @@ -257,7 +257,7 @@ print ''.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("SyslogLevel").''; print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 0fb3a6c9a7b..9590260f005 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -170,8 +170,8 @@ foreach($configfileparameters as $key) continue; } - $var=!$var; - print ""; + + print ''; if ($newkey == 'separator') { print ''; @@ -238,9 +238,9 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ''; + print ''; print ''."\n"; print ''."\n"; if (empty($conf->multicompany->enabled) || !$user->entity) print ''."\n"; // If superadmin or multicompany disabled diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 6e528c73094..1e70cbab6cc 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -108,8 +108,8 @@ else while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''; print ''; @@ -163,8 +163,8 @@ else while ($i < $num) { $row = $db->fetch_row($resql); - $var=!$var; - print ""; + + print ''; print ''; print ''; print ''; @@ -205,7 +205,7 @@ else $count = '?'; } - print ""; + print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index c50e6ca9e4c..39511e8a814 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -103,8 +103,8 @@ else $var=true; foreach($listtouse as $param => $paramval) { - $var=!$var; - print ''; + + print ''; print ''; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 3fc10bb0f3f..624edc2f38e 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -111,8 +111,8 @@ else while ($i < $num) { $row = $db->fetch_row($resql); - $var=!$var; - print ""; + + print ''; print ""; print ""; diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 6a5384da69a..52d25986567 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -72,7 +72,7 @@ $var=true; print '
'; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("UserAgent").''.$_SERVER['HTTP_USER_AGENT'].'
'.$langs->trans("BrowserName").''.$tmp['browsername'].'
'.$langs->trans("BrowserOS").''.$tmp['browseros'].'
'.$langs->trans("Version").''.$tmp['browserversion'].'
'.$langs->trans("Layout").' (phone/tablet/classic)'.$tmp['layout'].'
'.$langs->trans("IPAddress").''.$_SERVER['REMOTE_ADDR'].'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("Screen").''; print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; print '
 
'.$obj->name.''.$obj->value.''.$obj->entity.'
'.$obj->Name.''.$obj->Engine.'
'.$row[0].''.$row[1].''.$row[2].'
'.$row[0].''.$count.'
'; print $param; print '
$row[0]$row[1]
'; print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; print '
'.$langs->trans("Version").''.$langs->trans("Value").'
'.$langs->trans("CurrentVersion").' ('.$langs->trans("Programs").')'.DOL_VERSION; // If current version differs from last upgrade if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) @@ -123,9 +123,9 @@ if (function_exists('curl_init')) } print '
'.$langs->trans("VersionLastUpgrade").' ('.$langs->trans("Database").')'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
'.$langs->trans("VersionLastInstall").''.$conf->global->MAIN_VERSION_LAST_INSTALL.'
'; print ''; @@ -136,28 +136,28 @@ $var=true; print '
'; print ''; print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print '\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''; print ''; print ''; @@ -206,39 +206,39 @@ $var=true; print '
'; print '
'.$langs->trans("Session").''.$langs->trans("Value").'
'.$langs->trans("SessionSavePath").''.session_save_path().'
'.$langs->trans("SessionName").''.session_name().'
'.$langs->trans("SessionId").''.session_id().'
'.$langs->trans("CurrentSessionTimeOut").''.ini_get('session.gc_maxlifetime').' '.$langs->trans("seconds"); print ''; print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor"))); print "
'.$langs->trans("CurrentTheme").''.$conf->theme.'
'.$langs->trans("CurrentMenuHandler").''; print $conf->standard_menu; print '
'.$langs->trans("Screen").''; print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight']; print '
'.$langs->trans("Session").''; $i=0; foreach($_SESSION as $key => $val) @@ -188,7 +188,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S foreach($shmoparray as $key => $val) { - $var=!$var; + print '
'.$key.''.count($val).''.dol_getshmopaddress($key).'
'; print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + print ''."\n"; // Thousands -$var=!$var; + $thousand=$langs->transnoentitiesnoconv("SeparatorThousand"); if ($thousand == 'SeparatorThousand') $thousand=' '; // ' ' does not work on trans method if ($thousand == 'None') $thousand=''; print ''."\n"; // Decimals -$var=!$var; + $dec=$langs->transnoentitiesnoconv("SeparatorDecimal"); print ''."\n"; // Show results of functions to see if everything works -$var=!$var; + print ''."\n"; -$var=!$var; + print "\n"; if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) { - $var=!$var; + print ""; print "\n"; } -$var=!$var; + print ''."\n"; // Timezone $txt =$langs->trans("OSTZ").' (variable system TZ): '.(! empty($_ENV["TZ"])?$_ENV["TZ"]:$langs->trans("NotDefined")).'
'."\n"; $txt.=$langs->trans("PHPTZ").' (php.ini date.timezone): '.(ini_get("date.timezone")?ini_get("date.timezone"):$langs->trans("NotDefined")).''."
\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php $txt.=$langs->trans("Dolibarr constant MAIN_SERVER_TZ").': '.(empty($conf->global->MAIN_SERVER_TZ)?$langs->trans("NotDefined"):$conf->global->MAIN_SERVER_TZ); //$txt.=$langs->trans("YouCanEditPHPTZ"); // deprecated -$var=!$var; + print ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php -$var=!$var; + print ''."\n"; -$var=!$var; + print ''; -$var=!$var; + print ''; -$var=!$var; + print ''; // Database timezone if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { - $var=!$var; + print ''."\n"; } // Client -$var=!$var; + $tz=(int) $_SESSION['dol_tz'] + (int) $_SESSION['dol_dst']; print ''."\n"; print ''."\n"; -$var=!$var; + print ''."\n"; -$var=!$var; + $filesystemencoding=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 print ''."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php -$var=!$var; + $tmp=ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 if (empty($tmp) && ! empty($_SERVER["WINDIR"])) $tmp='iso-8859-1'; // By default for windows if (empty($tmp)) $tmp='utf-8'; // By default for other @@ -384,8 +384,8 @@ foreach($configfileparameters as $key => $value) } if (strpos($newkey, 'separator') !== false && $lastkeyshown == 'separator') continue; - $var=!$var; - print ""; + + print ''; if (strpos($newkey, 'separator') !== false) { print ''; @@ -468,9 +468,9 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ''; + print ''; print ''."\n"; print ''."\n"; if (empty($conf->multicompany->enabled) || !$user->entity) print ''."\n"; // If superadmin or multicompany disabled diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 706e0215059..68a01340303 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -118,7 +118,7 @@ $rights_ids = array(); foreach($sortorder as $numero=>$name) { $idperms=""; - $var=!$var; + // Module print "'; + + print ''; print ''; $valtoshow=$keyvalue; if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80); @@ -97,8 +97,8 @@ foreach($phparray as $key => $value) } else { - $var=!$var; - print ''; + + print ''; print ''; $i=0; foreach($keyvalue as $keyparam2 => $keyvalue2) diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 00bf0635293..788d8604584 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -204,7 +204,7 @@ print "\n"; foreach ($list as $key) { - $var=!$var; + print ''; diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index 5a142f3e51e..68d56bd2ded 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -174,7 +174,7 @@ function create_script_table($list) foreach($list as $script) { $var = ! $var; - print ''; + print ''; print ''; print ''; print ''; @@ -207,7 +207,7 @@ function create_key_table($list) foreach($list as $key) { $var = !$var; - print ''; + print ''; print ''; print ''; print ''; @@ -239,37 +239,37 @@ print ''; print ''; print ''; $var = !$var; -print ''; +print ''; print ''; print ''; print ''; $var = !$var; -print ''; +print ''; print ''; print ''; print ''; $var = !$var; -print ''; +print ''; print ''; print ''; print ''; $var = ! $var; -print ''; +print ''; print ''; print ''; print ''; $var = ! $var; -print ''; +print ''; print ''; print ''; print ''; $var = ! $var; -print ''; +print ''; print ''; print ''; print ''; $var = ! $var; -print ''; +print ''; print ''; print ''; print ''; @@ -289,12 +289,12 @@ if (is_array($resCached) || is_array($resRemoved)) { if (is_array($resCached)) { $var = ! $var; - print ""; + print ''; print ""; print ''; print ""; $var = ! $var; - print ""; + print ''; print ""; print ''; print ""; @@ -302,17 +302,17 @@ if (is_array($resCached) || is_array($resRemoved)) { if (is_array($resRemoved)) { $var = ! $var; - print ""; + print ''; print ""; print ''; print ""; $var = ! $var; - print ""; + print ''; print ""; print ''; print ""; $var = ! $var; - print ""; + print ''; print ""; print ''; print "
'.$langs->trans("LocalisationDolibarrParameters").''.$langs->trans("Value").'
'.$langs->trans("LanguageBrowserParameter","HTTP_ACCEPT_LANGUAGE").''.$_SERVER["HTTP_ACCEPT_LANGUAGE"].'
'.$langs->trans("CurrentUserLanguage").''.$langs->getDefaultLang().'
'.$langs->trans("CurrentValueSeparatorThousand").''.($thousand==' '?$langs->transnoentitiesnoconv("Space"):$thousand).'
'.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.'
  => price2num(1233.56+1)'.price2num(1233.56+1,'2').'
  => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56",'2')."
  => price2num('."'1 234.56')".price2num("1 234.56",'2')."
  => price(1234.56)'.price(1234.56).'
'.$langs->trans("CurrentTimeZone").''; // Timezone server PHP $a=getServerTimeZoneInt('now'); $b=getServerTimeZoneInt('winter'); @@ -251,18 +251,18 @@ $val.='       '.getServerTimeZoneString(); $val.='       '.$langs->trans("DaylingSavingTime").': '.($daylight==='unknown'?'unknown':($a==$c?yn($daylight):yn(0).($daylight?'     ('.$langs->trans('YesInSummer').')':''))); print $form->textwithtooltip($val,$txt,2,1,img_info('')); print '
  => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now(),'dayhour','tzserver').'
  => dol_print_date(0,"dayhourtext")'.dol_print_date(0,"dayhourtext").'
  => dol_get_first_day(1970,1,false)'.dol_get_first_day(1970,1,false).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,false),'dayhour').')
  => dol_get_first_day(1970,1,true)'.dol_get_first_day(1970,1,true).'     (=> dol_print_date() or idate() of this value = '.dol_print_date(dol_get_first_day(1970,1,true),'dayhour').')
'.$langs->trans("MySQLTimeZone").' (database)'; // Timezone server base $sql="SHOW VARIABLES where variable_name = 'system_time_zone'"; $resql = $db->query($sql); @@ -274,7 +274,7 @@ if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') print '
'.$langs->trans("ClientTZ").''.($tz?($tz>=0?'+':'').$tz:'').' ('.($tz>=0?'+':'').($tz*60*60).')'; print '       '.$_SESSION['dol_tz_string']; @@ -284,14 +284,14 @@ else print yn(0); if (! empty($_SESSION['dol_dst_first'])) print '     ('.dol_print_date(dol_stringtotime($_SESSION['dol_dst_first']),'dayhour','gmt').' - '.dol_print_date(dol_stringtotime($_SESSION['dol_dst_second']),'dayhour','gmt').')'; print '
  => '.$langs->trans("ClientHour").''.dol_print_date(dol_now(),'dayhour','tzuser').'
'.$langs->trans("File encoding").' (php.ini unicode.filesystem_encoding)'.$filesystemencoding.'
 
'.$obj->name.''.$obj->value.''.$obj->entity.'
'; $alt=$name.' - '.$modules_files[$numero]; diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index 3e9ccbc895f..6bb431bfdfb 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -82,8 +82,8 @@ foreach($phparray as $key => $value) { if (! is_array($keyvalue)) { - $var=!$var; - print '
'.$keyparam.'
'.$keyparam.'
'.dol_trunc($script['file'],80,'left').''.dol_print_date($script['mtime'],'dayhour').''.number_format($script['size'] / 1024, 2).'KB
'.dol_trunc($key['name'],80,'left').''.dol_print_date($key['created'],'dayhour').''.number_format($key['size']/1024, 3).'KB
Information
Caching enabled'.($info['cache']?'yes':'no').'
Optimizer enabled'.$info['optimizer']?'yes':'no'.'
Memory usage'.number_format(100 * $info['memoryAllocated']/$info['memorySize'], 2).'%('.number_format($info['memoryAllocated'] / (1024*1024), 2).'MB / '.number_format($info['memorySize']/(1024*1024), 2).'MB)
Free memory in reserved cache'.number_format($info['memoryAvailable']/(1024*1024), 2).'MB
Cached scripts'.$info['cachedScripts'].'
Removed scripts'.$info['removedScripts'].'
Cached keys'.(isset($info['cachedKeys'])?$info['cachedKeys']:'').'
Caching
Optimizer
Clear cache
Clean cache
Purge cache
"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index 4e0651597ee..f5e6afd36b1 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -261,9 +261,9 @@ if ($result) { $obj = $db->fetch_object($result); - $var=!$var; + - print '
'.dol_print_date($db->jdate($obj->dateevent),'%Y-%m-%d %H:%M:%S').'
'.$sessionentry['login'].'
'; + print '
'; print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, 0, 'maxwidthonsmartphone', 1); print ''; @@ -236,18 +238,10 @@ if ($mode == 'overwrite') // Show constants - $sql = "SELECT"; - $sql.= " rowid"; - $sql.= ", lang"; - $sql.= ", transkey"; - $sql.= ", transvalue"; + $sql = "SELECT rowid, entity, lang, transkey, transvalue"; $sql.= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; $sql.= " WHERE 1 = 1"; //$sql.= " AND entity IN (".$user->entity.",".$conf->entity.")"; - //if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug - //else if (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits - //if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); - //$sql.= " ORDER BY entity, name ASC"; $sql.= $db->order($sortfield, $sortorder); dol_syslog("translation::select from table", LOG_DEBUG); @@ -256,16 +250,14 @@ if ($mode == 'overwrite') { $num = $db->num_rows($result); $i = 0; - $var=false; while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; print "\n"; - print '
'.$obj->lang.''.$obj->transkey.'
'; + print '
'; //print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1); print $formadmin->select_language($langcode,'langcode', 0, null, 0, 0, 0, 'maxwidthonsmartphone', 1); print '
'.$langcode.''.$key.''; + print '
'.$langcode.''.$key.''; print dol_escape_htmltag($val); print ''; if ($val != $newlangfileonly->tab_translate[$key]) @@ -425,7 +414,7 @@ if ($mode == 'searchkey') } /*if (! empty($conf->multicompany->enabled) && !$user->entity) { - print $val; + print ''.$val.'
$var=True; foreach ($triggers as $trigger) { - $var=!$var; - print ''; + + print ''; print ''; print ''; print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index d237ca3e727..e3998f6e37c 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -180,8 +180,8 @@ $var=true; $form = new Form($db); // Mail required for members -$var=!$var; -print ''; + +print ''; print ''; print ''; diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index b622aa1d9dd..e013fbcacc8 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -75,7 +75,7 @@ print ''; print ''; print ''; print "\n"; -$var=!$var; + print '"; + + print ''; // Id print ''; print ''; - $var=!$var; + } $i = 0; while ($i < $num && $i < $MAXLIST) @@ -916,13 +916,13 @@ if ($id > 0) $fichinter_static->id=$objp->id; $fichinter_static->statut=$objp->fk_statut; - print ""; + print ''; print ''."\n"; //print ''."\n"; print ''."\n"; print ''."\n"; print ''; - $var=!$var; + $i++; } $db->free($resql); @@ -978,8 +978,8 @@ if ($id > 0) while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print '"; + print ''; print ''; print ""; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index f8f987f1222..848aa2c05a5 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -167,7 +167,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print '"; } } else { - $var=!$var; + print ''; } print "
'.$trigger['picto'].''.$trigger['file'].''.$trigger['status'].'
'.$langs->trans("UserMailRequired").' 
'.$langs->trans("Name").''.$langs->trans("Value").'
'; print $langs->trans("NbOfBoomarkToShow").''; print ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 4e1996cf658..40a316d881b 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -122,8 +122,8 @@ if ($resql) { $obj = $db->fetch_object($resql); - $var=!$var; - print "
'; diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index de60e8b80cf..0f6da77fa43 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -100,26 +100,26 @@ print ''; print ''; print ''; print "\n"; -$var=!$var; + print ''; print ''; if (! empty($conf->banque->enabled)) { - $var=!$var; + print ''; print ''; - $var=!$var; + print ''; print ''; - $var=!$var; + print ''; print ''; // Force warehouse (this is not a default value) print ''; // Force warehouse (this is not a default value) print ''; + +print ''; print ''; print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index e138107fd3f..ebd5fa9991c 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -292,7 +292,7 @@ else $var=true; foreach ($cats as $cat) { - $var=!$var; + print "\t\n"; print "\t\t".'\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '\n"; print '"; + print ''; // Action (type) print '"; + + print ''; print "\n"; print ''; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 52fdaa6eceb..31def3d1b29 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -639,8 +639,8 @@ if ($id > 0) while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print '"; + + print ''; print '"; + + print ''; print ''; print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'.$langs->trans("CashDeskThirdPartyForSell").''; print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,0,1,array(),0); print '
'.$langs->trans("CashDeskBankAccountForSell").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CASH,'CASHDESK_ID_BANKACCOUNT_CASH',0,"courant=2",1); print '
'.$langs->trans("CashDeskBankAccountForCheque").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE,'CASHDESK_ID_BANKACCOUNT_CHEQUE',0,"courant=1",1); print '
'.$langs->trans("CashDeskBankAccountForCB").''; $form->select_comptes($conf->global->CASHDESK_ID_BANKACCOUNT_CB,'CASHDESK_ID_BANKACCOUNT_CB',0,"courant=1",1); @@ -128,7 +128,7 @@ if (! empty($conf->banque->enabled)) if (! empty($conf->stock->enabled)) { - $var=!$var; + print '
'.$langs->trans("CashDeskDoNotDecreaseStock").''; if (empty($conf->productbatch->enabled)) { @@ -145,7 +145,7 @@ if (! empty($conf->stock->enabled)) $disabled=$conf->global->CASHDESK_NO_DECREASE_STOCK; - $var=!$var; + print '
'.$langs->trans("CashDeskIdWareHouse").''; if (! $disabled) diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index d1af6bdafb2..bc27be9bb12 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -96,8 +96,8 @@ $var=true; $form = new Form($db); // Mail required for members -$var=!$var; -print '
'.$langs->trans("CategorieRecursiv").''. $form->textwithpicto('',$langs->trans("CategorieRecursivHelp"),1,'help').'
'; print "".$cat->label.""; @@ -363,7 +363,7 @@ if ($object->type == Categorie::TYPE_PRODUCT) $var=true; foreach ($prods as $prod) { - $var=!$var; + print "\t
'; print $prod->getNomUrl(1); @@ -414,7 +414,7 @@ if ($object->type == Categorie::TYPE_SUPPLIER) $var=true; foreach ($socs as $soc) { - $var=!$var; + print "\t
'; @@ -470,7 +470,7 @@ if($object->type == Categorie::TYPE_CUSTOMER) if ($user->societe_id > 0 && $soc->id != $user->societe_id) continue; // External user always see only themself $i++; - $var=!$var; + print "\t
'; print $soc->getNomUrl(1); @@ -523,7 +523,7 @@ if ($object->type == Categorie::TYPE_MEMBER) $var=true; foreach ($prods as $key => $member) { - $var=!$var; + print "\t
'; $member->ref=$member->login; @@ -578,7 +578,7 @@ if($object->type == Categorie::TYPE_CONTACT) foreach ($contacts as $key => $contact) { $i++; - $var=!$var; + print "\t
'; print $contact->getNomUrl(1,'category'); @@ -632,7 +632,7 @@ if ($object->type == Categorie::TYPE_ACCOUNT) $var=true; foreach ($accounts as $key => $account) { - $var=!$var; + print "\t
'; print $account->getNomUrl(1,0); @@ -687,7 +687,7 @@ if ($object->type == Categorie::TYPE_PROJECT) $var=true; foreach ($projects as $key => $project) { - $var=!$var; + print "\t
'; print $project->getNomUrl(1,0); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index ef260cb2197..8b1dc424239 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -400,7 +400,7 @@ if ($resql) continue; } - $var=!$var; + $actionstatic->id=$obj->id; $actionstatic->ref=$obj->id; @@ -409,7 +409,7 @@ if ($resql) $actionstatic->type_picto=$obj->type_picto; $actionstatic->label=$obj->label; - print "
'; diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 97f255abe14..760d82f0246 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -135,8 +135,8 @@ if ($resql) if ($obj) { - $var=!$var; - print "
".$obj->df."'.$obj->cc.'
'; $propal_static->id = $objp->propalid; $propal_static->ref = $objp->ref; @@ -723,8 +723,8 @@ if ($id > 0) while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - $var=!$var; - print "
'; $commande_static->id = $objp->cid; $commande_static->ref = $objp->ref; @@ -850,8 +850,8 @@ if ($id > 0) $contrat=new Contrat($db); $objp = $db->fetch_object($resql); - $var=!$var; - print "
'; $contrat->id=$objp->id; $contrat->ref=$objp->ref?$objp->ref:$objp->id; @@ -906,7 +906,7 @@ if ($id > 0) print ''.img_picto($langs->trans("Statistics"),'stats').'
'.img_object($langs->trans("ShowPropal"),"propal").' '.$objp->ref.''.dol_print_date($db->jdate($objp->startdate)).''.convertSecondToTime($objp->duration).''.$fichinter_static->getLibStatut(5).'
'; $facturestatic->id = $objp->facid; $facturestatic->ref = $objp->facnumber; diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 7b71e3ade9c..fe66e3ac243 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -150,9 +150,9 @@ if ($resql) { $obj = $db->fetch_object($resql); - $var=!$var; + - print "
'.img_object($langs->trans("ShowContact"),"contact"); print ' '.$obj->name.'$obj->firstname
'; $propalstatic->id=$obj->rowid; $propalstatic->ref=$obj->ref; @@ -192,13 +192,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } if ($total>0) { - $var=!$var; + print '
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoProposal").'

"; @@ -248,7 +248,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print '
'; $supplierproposalstatic->id=$obj->rowid; $supplierproposalstatic->ref=$obj->ref; @@ -272,13 +272,13 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos } if ($total>0) { - $var=!$var; + print '
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("NoProposal").'

"; @@ -326,7 +326,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); print ''; $orderstatic->id=$obj->rowid; @@ -352,13 +352,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } if ($total>0) { - $var=!$var; + print ''.$langs->trans("Total").''.price($total).""; } } else { - $var=!$var; + print ''.$langs->trans("NoOrder").''; } print "
"; @@ -407,7 +407,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); print ''; $supplierorderstatic->id=$obj->rowid; @@ -433,13 +433,13 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande } if ($total>0) { - $var=!$var; + print ''.$langs->trans("Total").''.price($total).""; } } else { - $var=!$var; + print ''.$langs->trans("NoSupplierOrder").''; } print "
"; @@ -503,7 +503,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) $companystatic->code_client = $objp->code_client; $companystatic->code_fournisseur = $objp->code_fournisseur; $companystatic->canvas=$objp->canvas; - print ''; + print ''; print ''.$companystatic->getNomUrl(1,'customer',48).''; print ''; print $companystatic->getLibCustProspStatut(); @@ -511,7 +511,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire) print ''.dol_print_date($db->jdate($objp->tms),'day').""; print ''; $i++; - $var=!$var; + } @@ -562,11 +562,11 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire) $companystatic->code_client = $objp->code_client; $companystatic->code_fournisseur = $objp->code_fournisseur; $companystatic->canvas=$objp->canvas; - print ''; + print ''; print ''.$companystatic->getNomUrl(1,'supplier',44).''; print ''.dol_print_date($db->jdate($objp->dm),'day').''; print ''; - $var=!$var; + $i++; } @@ -647,7 +647,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TO print $companystatic->getNomUrl(1,'customer',44); print ''."\n"; print "".$staticcontrat->LibStatut($obj->statut,3)."\n"; - $var=!$var; + $i++; } print "
"; @@ -695,8 +695,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) while ($i < $nbofloop) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -794,8 +794,8 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) while ($i < $nbofloop) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; // Ref print ''; diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 470ee2a4ec1..16f3f4db561 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -229,7 +229,7 @@ if ($object->fetch($id) >= 0) print ""; - $var=!$var; + $allowaddtarget=($object->statut == 0); @@ -311,7 +311,7 @@ if ($object->fetch($id) >= 0) if ($qualified) { $var = !$var; - //print ''; + //print ''; // print '
'; if ($allowaddtarget) @@ -523,9 +523,9 @@ if ($object->fetch($id) >= 0) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''.$obj->email.''; print ''.$obj->lastname.''; print ''.$obj->firstname.''; diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 0ea109960e7..b114cf92895 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -110,7 +110,7 @@ if (is_resource($handle)) foreach ($mailmodule->getSqlArrayForStats() as $sql) { - print ''; + print ''; $result=$db->query($sql); if ($result) @@ -176,9 +176,9 @@ if ($result) while ($i < $num ) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print ''.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.''; print ''.dol_trunc($obj->titre,38).''; print ''.dol_print_date($db->jdate($obj->date_creat),'day').''; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 622783d7ca5..99af5749963 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -158,7 +158,7 @@ if ($result) { $obj = $db->fetch_object($result); - $var=!$var; + print ""; print ''; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 82d57f721da..07779753c0d 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -122,8 +122,8 @@ if ($resql) $dataseries[]=array('label'=>$propalstatic->LibStatut($status,1),'data'=>(isset($vals[$status])?(int) $vals[$status]:0)); if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$propalstatic->LibStatut($status,0).''; print ''.(isset($vals[$status])?$vals[$status]:0).''; print "\n"; @@ -176,9 +176,9 @@ if (! empty($conf->propal->enabled)) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; $propalstatic->id=$obj->rowid; $propalstatic->ref=$obj->ref; @@ -236,10 +236,10 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $propalstatic->id=$obj->rowid; @@ -317,8 +317,8 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) while ($i < $nbofloop) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -405,9 +405,9 @@ if (! empty($conf->propal->enabled)) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $propalstatic->id=$obj->rowid; @@ -477,9 +477,9 @@ if (! empty($conf->propal->enabled)) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $propalstatic->id=$obj->rowid; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index ba01033eee5..ce6d6e2bc72 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -747,7 +747,7 @@ if ($resql) while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $var=!$var; + $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 2ec1a3d660b..abb24b8ffa4 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -300,7 +300,7 @@ foreach ($data as $val) while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index dd325da7297..f797025a5de 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -40,7 +40,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index b68bdb9135e..b28f86bc412 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -96,7 +96,7 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print ''; print ''; print img_action($langs->trans("Show"),$obj->id).' '; @@ -140,7 +140,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print ''; print ''.img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref.''; print ''; @@ -150,7 +150,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) $total += $obj->price; } if ($total>0) { - $var=!$var; + print ''.$langs->trans("Total")."".price($total).""; } print "
"; @@ -205,7 +205,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print ''; print ''; print img_object($langs->trans("ShowPropal"),"propal").' '.$obj->ref.''; @@ -263,7 +263,7 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print ''; $companystatic->id=$obj->socid; $companystatic->name=$obj->name; diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 5f9a5a570ff..b5672f276e7 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -155,9 +155,9 @@ if ($resql) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''; $result=''; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index f24202f7fff..a1a4d33bfb1 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -141,8 +141,8 @@ if ($resql) { if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$commandestatic->LibStatut($status,$bool,0).''; print ''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; print $commandestatic->LibStatut($status,$bool,3); @@ -196,7 +196,7 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); $commandestatic->id=$obj->rowid; @@ -208,7 +208,7 @@ if (! empty($conf->commande->enabled)) $companystatic->code_client=$obj->code_client; $companystatic->canvas=$obj->canvas; - print ""; + print ''; print ''; print $commandestatic->getNomUrl(1); print ""; @@ -220,7 +220,7 @@ if (! empty($conf->commande->enabled)) } else { - $var=!$var; + print ''.$langs->trans("NoOrder").''; } print "
"; @@ -268,10 +268,10 @@ if ($resql) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $commandestatic->id=$obj->rowid; @@ -349,9 +349,9 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $commandestatic->id=$obj->rowid; @@ -431,9 +431,9 @@ if (! empty($conf->commande->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $commandestatic->id=$obj->rowid; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 17c73c82698..c6b93cb8f0f 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -653,8 +653,8 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; $generic_commande->id=$objp->rowid; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 534011d73fe..dd79ee54ba1 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -323,7 +323,7 @@ foreach ($data as $val) while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print '
0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; @@ -335,7 +335,7 @@ foreach ($data as $val) print ''; } - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 38efbc91ca2..629cd3c0fb0 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -36,7 +36,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index a81a0072302..cb10fd8c3c7 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -203,8 +203,8 @@ print ''; $var=true; for ($mois = 1 ; $mois < 13 ; $mois++) { - $var=!$var; - print ''; + + print ''; print "".dol_print_date(dol_mktime(1,1,1,$mois,1,2000),"%B").""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php index 485e6738faf..bddf1292214 100644 --- a/htdocs/compta/bank/bankentries.php +++ b/htdocs/compta/bank/bankentries.php @@ -899,9 +899,9 @@ if ($resql) $bankaccount = $cachebankaccount[$objp->bankid]; } - $var=!$var; + - print ""; + print ''; // Ref if (! empty($arrayfields['b.rowid']['checked'])) diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index c1d668df8d7..eb6aea4f2dc 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -66,22 +66,22 @@ print ""; echo ''.$langs->trans("Summary").''; print "\n"; -$var=!$var; + $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement"; $paiem = valeur($sql); print "Somme des paiements (associes a une facture)".price($paiem).""; -$var=!$var; + $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount > 0"; $credits = valeur($sql); print "Somme des credits".price($credits).""; -$var=!$var; + $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount < 0"; $debits = valeur($sql); print "Somme des debits".price($debits).""; -$var=!$var; + $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank "; $solde = valeur($sql); print "".$langs->trans("BankBalance")."".price($solde).""; diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index cd6d2adb796..699edd31b7a 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -74,8 +74,8 @@ if ($result) while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; print "rowid\">$objp->label"; print ''.$objp->nombre.''; print ''.price(abs($objp->somme)).""; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index ae35eee80fa..0cf88224e63 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -105,8 +105,8 @@ if ($result) while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; print ''.$objp->rowid.''; if (GETPOST("action") == 'edit' && GETPOST("categid")== $objp->rowid) { @@ -136,8 +136,8 @@ if ($result) */ if ($action != 'edit') { - $var=!$var; - print ''; + + print ''; print ' '; print ''; print ''; diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php index 0f4e8b825b2..d840a6abf51 100644 --- a/htdocs/compta/bank/index.php +++ b/htdocs/compta/bank/index.php @@ -442,7 +442,7 @@ foreach ($accounts as $key=>$type) $lastcurrencycode=$acc->currency_code; } - print ''; + print ''; // Ref if (! empty($arrayfields['b.ref']['checked'])) diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index 5a42e516020..1dbe17d6a13 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -120,13 +120,13 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $var=true; // Current balance - $var=!$var; + print ''; print ''.$langs->trans("CurrentBalance").''; print ''.price($solde).''; print ''; - $var=!$var; + print ''; print ''.$langs->trans("RemainderToPay").''; print ' '; @@ -293,10 +293,10 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) // We discard lines with a remainder to pay to 0 if (price2num($total_ttc) != 0) { - $var=!$var; + // Show line - print ""; + print ''; print ''; if ($obj->dlr) print dol_print_date($db->jdate($obj->dlr),"day"); else print $langs->trans("NotDefined"); @@ -318,7 +318,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) } // Solde actuel - $var=!$var; + print ''; print ''.$langs->trans("FutureBalance").' ('.$object->currency_code.')'; print ''.price($solde, 0, $langs, 0, 0, -1, $object->currency_code).''; diff --git a/htdocs/compta/bank/various_payment/index.php b/htdocs/compta/bank/various_payment/index.php index 7366c0cf2a5..6c4b41333f1 100644 --- a/htdocs/compta/bank/various_payment/index.php +++ b/htdocs/compta/bank/various_payment/index.php @@ -193,8 +193,8 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; $variousstatic->id=$obj->rowid; $variousstatic->ref=$obj->rowid; diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 6215f2343e8..ee71290be2d 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -171,7 +171,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $obj = $db->fetch_object($resql); $var = !$var; - print ""; + print ''; // Date $date=$obj->periode; if (empty($date)) $date=$obj->date_ech; @@ -293,8 +293,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''.dol_print_date($db->jdate($obj->dm),'day').''."\n"; print "".$obj->label."\n"; @@ -423,8 +423,8 @@ while($j<$numlt) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''.dol_print_date($db->jdate($obj->dm),'day').''."\n"; print "".$obj->label."\n"; @@ -507,8 +507,8 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''.dol_print_date($db->jdate($obj->dateep),'day').''."\n"; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 6a3052a938d..28eaa0a7c9b 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -178,9 +178,9 @@ if ($resql) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''; $thirdpartystatic->id=$obj->rowid; $thirdpartystatic->name=$obj->name; diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 63556eeaee6..0748616f255 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -173,14 +173,14 @@ if ($result) $userstatic->id=$obj->uid; $userstatic->lastname=$obj->lastname; $userstatic->firstname=$obj->firstname; - print ''; + print ''; print ''.$deplacementstatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(1).''; print ''.$obj->km.''; print ''.dol_print_date($db->jdate($obj->dm),'day').''; print ''.$deplacementstatic->LibStatut($obj->fk_statut,3).''; print ''; - $var=!$var; + $i++; } diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 66fab1b9279..95f4082e082 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -178,8 +178,8 @@ if ($resql) $soc = new Societe($db); if ($obj->socid) $soc->fetch($obj->socid); - $var=!$var; - print ''; + + print ''; // Id print ''.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.''; // Type diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index ea886fbd65c..f3d83278885 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -612,9 +612,9 @@ if ($object->id > 0) while ($i < $num) { $obj = $db->fetch_object($result_sql); - $var=!$var; + - print ""; + print ''; print ''.dol_print_date($db->jdate($obj->date_demande),'day')."\n"; print ''.img_object($langs->trans("ShowUser"),'user').' '.$obj->login.''; print ''.price($obj->amount).''; @@ -663,9 +663,9 @@ if ($object->id > 0) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print ''.dol_print_date($db->jdate($obj->date_demande),'day')."\n"; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 767082997d8..77191136338 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -300,7 +300,7 @@ foreach ($data as $val) while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; @@ -311,7 +311,7 @@ foreach ($data as $val) print ''; print ''; } - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index 2fb2a7089ea..63c16afae15 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -36,7 +36,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php index 781f5609915..2e7858fdb08 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php @@ -36,7 +36,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 736d5696c3e..a73265288a2 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -193,7 +193,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; $tot_ttc+=$obj->total_ttc; $i++; - $var=!$var; + } print ''.$langs->trans("Total").''; @@ -335,7 +335,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); - print ''; + print ''; print ''; print ''; @@ -380,7 +380,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $total_ttc += $obj->total_ttc; $total += $obj->total; $totalam += $obj->am; - $var=!$var; + $i++; } } @@ -525,8 +525,8 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) while ($i < $num && $i < $max) { $objp = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; $donationstatic->id=$objp->rowid; $donationstatic->lastname=$objp->lastname; $donationstatic->firstname=$objp->firstname; @@ -592,7 +592,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) while ($i < $num) { $obj = $db->fetch_object($resql); - print ""; + print ''; $chargestatic->id=$obj->rowid; $chargestatic->ref=$obj->libelle; $chargestatic->lib=$obj->libelle; @@ -677,7 +677,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us { $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; @@ -783,7 +783,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); - print ''; + print ''; print '"; + print ''; print ''; print '\n"; print '\n"; @@ -694,7 +694,7 @@ else $accounts[$objp->bid]=0; $accounts[$objp->bid] += 1; - print ""; + print ''; print ''; print ''; // Date operation print ''; @@ -742,7 +742,7 @@ else } print ''; print ''; - $var=!$var; + $i++; } print "
'; $commandestatic->id=$obj->rowid; @@ -717,7 +717,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us //print "x".$tot_ttc."z".$obj->tot_fttc; $tot_tobill += ($obj->total_ttc-$obj->tot_fttc); $i++; - $var=!$var; + } print '
'.$langs->trans("Total").'   ('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')
'; print ''; @@ -829,7 +829,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $total_ttc += $obj->total_ttc; $total += $obj->total_ht; $totalam += $obj->am; - $var=!$var; + $i++; } @@ -970,7 +970,7 @@ if ($resql) while ($i < $db->num_rows($resql)) { $obj = $db->fetch_object($resql); - $var=!$var; + print ""; print ''; diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 5c21b67a891..40a5805f2b3 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -183,7 +183,7 @@ if($calc ==0 || $calc == 2) { if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) !=0) { - $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); if(empty($intra)) { @@ -196,7 +196,7 @@ if($calc ==0 || $calc == 2) $intra = ''; } } - print ""; + print ''; print '"; $company_static->id=$coll->socid; $company_static->name=$coll->name; @@ -258,7 +258,7 @@ if($calc ==0 || $calc == 1){ { if(($min == 0 or ($min > 0 && $coll->amount > $min)) && ($local==1?$coll->localtax1:$coll->localtax2) != 0) { - $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); if(empty($intra)) { @@ -271,7 +271,7 @@ if($calc ==0 || $calc == 1){ $intra = ''; } } - print ""; + print ''; print '"; $company_static->id=$coll->socid; $company_static->name=$coll->name; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 642c37b9d65..5d17688fc68 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -81,8 +81,8 @@ function pt ($db, $sql, $date) $var=True; while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; print '\n"; $total = $total + $obj->mm; @@ -190,8 +190,8 @@ for ($m = 1 ; $m < 13 ; $m++ ) { break; } - $var=!$var; - print ''; + + print ''; print ''; if($CalcLT==0) { $x_coll = 0; diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 175ff6cf98f..13c753db464 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -338,8 +338,8 @@ else if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -501,8 +501,8 @@ else if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - $var=!$var; - print ''; + + print ''; // Ref print ''; diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php index df96d0b7d67..54183ef72b9 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/reglement.php @@ -66,8 +66,8 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; $localtax_static->id=$obj->rowid; $localtax_static->ref=$obj->rowid; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 6a3e0e1a433..96f77e85758 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -599,7 +599,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + $soc = new Societe($db); $soc->fetch($objp->socid); @@ -622,7 +622,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $multicurrency_remaintopay=price2num($invoice->multicurrency_total_ttc - $multicurrency_payment - $multicurrency_creditnotes - $multicurrency_deposits,'MT'); } - print ''; + print ''; print ''; + + print ''; print '\n"; print '\n"; print '\n"; diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index a244a1feb60..1f00da90a8c 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -111,8 +111,8 @@ if ($resql) while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''; print '\n"; print "\n"; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 3c651ec7eb3..523d5256816 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -327,8 +327,8 @@ if ($resql) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; $invoice=new Facture($db); $invoice->fetch($objp->facid); @@ -372,7 +372,7 @@ if ($resql) $i++; } } - $var=!$var; + print "
".dol_print_date($db->jdate($obj->da),"day")."'.$obj->libelle.' '.$obj->label.'
'.$i."
'.$i."
'.$obj->dm."
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'
'.$fields['link'].'
'.$fields['link'].'
'; print $invoice->getNomUrl(1,''); @@ -859,8 +859,8 @@ if (! GETPOST('action')) while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); - $var=!$var; - print '
'.$objp->facnumber."'.dol_print_date($db->jdate($objp->dp))."'.$objp->paiement_type.' '.$objp->num_paiement."
'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."$objp->paiement_type $objp->num_paiement
\n"; print ''; diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 58a6cc3e747..625b2be518e 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -494,14 +494,14 @@ if ($action == 'new') foreach ($lines[$bid] as $lid => $value) { - $var=!$var; + $account_id = $bid; if (! isset($accounts[$bid])) $accounts[$bid]=0; $accounts[$bid] += 1; - print "
'.dol_print_date($value["date"],'day').''.$value["numero"]."'.$value["emetteur"]."
'.$i.''.dol_print_date($db->jdate($objp->date),'day').''.($objp->num_chq?$objp->num_chq:' ').'
"; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index bba49827104..2d77cb71061 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -77,7 +77,7 @@ if ($resql) { $num = $row[0]; } - print ""; + print ''; print ''.$langs->trans("BankChecksToReceipt").''; print ''; print ''.$num.''; @@ -129,7 +129,7 @@ if ($resql) $accountstatic->id=$objp->bid; $accountstatic->label=$objp->label; - $var=!$var; + print "\n"; print ''.$checkdepositstatic->getNomUrl(1).''; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index ae9bc315877..f1a9a839792 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -186,8 +186,8 @@ if ($resql) while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; // Num ref cheque print ''; @@ -225,7 +225,7 @@ if ($resql) } else { - print ""; + print ''; print ''.$langs->trans("None").""; print ''; } diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 27f34bef269..e9a90667e69 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -152,7 +152,7 @@ if ($year) { if (preg_match('/^payment/i',$file)) { - $var=!$var; + $tfile = $dir . '/'.$year.'/'.$file; $relativepath = $year.'/'.$file; print "".''.img_pdf().' '.$file.''; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 342294dfc12..bd262eaa675 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -266,9 +266,9 @@ if ($action == 'create') { $objp = $charge; - $var=!$var; + - print ""; + print ''; if ($objp->date_ech > 0) { diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index b64d92d873f..2d653f2ba05 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -239,8 +239,8 @@ if ($resql) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print ''; $socialcontrib->fetch($objp->scid); @@ -268,7 +268,7 @@ if ($resql) $i++; } } - $var=!$var; + print "\n"; $db->free($resql); diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 8f90183f0f7..dbbf9d09ac7 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -134,7 +134,7 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; + print ""; diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index bd16ec0e23b..62e57813886 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -322,7 +322,7 @@ if ($id > 0) { $obj = $db->fetch_object($result); - print ""; + print ''; // Status of line print ""; @@ -354,7 +354,7 @@ if ($id > 0) print ''; $total += $obj->amount; - $var=!$var; + $i++; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index b45a49dbe69..5d77a9b9771 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -194,8 +194,8 @@ if ($resql) while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; $invoicestatic->id=$obj->rowid; $invoicestatic->ref=$obj->facnumber; @@ -268,9 +268,9 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print ""; $bprev->id=$obj->rowid; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index e104ba75a1a..c1c8bd7e929 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -136,8 +136,8 @@ if ($resql) while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref facture print ''; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 33a7a4486a0..72d775a49c3 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -197,7 +197,7 @@ if ($result) $thirdpartytmp->id = $obj->socid; $thirdpartytmp->name = $obj->name; - print ""; + print ''; print ""; print $invoicetmp->getNomUrl(1); @@ -233,7 +233,7 @@ if ($result) print "\n"; $total += $obj->total_ttc; - $var=!$var; + $i++; } diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index d013f605504..064f41e41e8 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -164,7 +164,7 @@ if ($resql) print "\n"; $total += $obj->amount; - $var=!$var; + $i++; } } diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index a86280e66bd..c5d441e3260 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -146,7 +146,7 @@ if ($prev_id) print "\n"; - $var=!$var; + $i++; } diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 440af1cdbaf..2997667ab60 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -75,14 +75,14 @@ $var=true; print ''; print ''; -$var=!$var; + print ''; print ''; -$var=!$var; + print ''; print ''; @@ -197,9 +197,9 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print "'; print "\n"; - $var=!$var; + $i++; } diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index ceeef191aee..b666b355e24 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -120,7 +120,7 @@ if ($resql) print round($row[0]/$total*100,2)." %"; print ''; - $var=!$var; + $i++; } @@ -218,7 +218,7 @@ if ($resql) print ''; - $var=!$var; + $i++; } diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index aec371ac0b3..2a1234fccc1 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -198,8 +198,8 @@ if ($id > 0) // Display array foreach($TData as $data) { - $var=!$var; - print ""; + + print ''; print "\n"; print '\n"; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 6f780de554b..5c77bbba21d 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -235,7 +235,7 @@ if ($result) { while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; + print ""; print "\n"; @@ -280,7 +280,7 @@ if ($modecompta != 'CREANCES-DETTES') while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; + print ""; print ""; print ''; print ''; @@ -367,7 +367,7 @@ if ($result) { while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; + print ""; print "\n"; @@ -387,7 +387,7 @@ if ($result) { } else { - $var=!$var; + print ""; print ''; print ''; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 5b2c6b70a13..fe64bb7b999 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -671,8 +671,8 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) { $mois_modulo = $mois; if($mois>12) {$mois_modulo = $mois-12;} - $var=!$var; - print ''; + + print ''; print ""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { @@ -704,7 +704,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) } // Total -$var=!$var; + $nbcols=0; print ''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) @@ -721,7 +721,7 @@ print ''; print "\n"; // Balance -$var=!$var; + print ''; for ($annee = $year_start ; $annee <= $year_end ; $annee++) { diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index a6d99cbdaad..597b8aabad0 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -203,8 +203,8 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; $userstatic->id=$obj->uid; $userstatic->lastname=$obj->lastname; diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 76456aee99b..de70ce2a808 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -602,7 +602,7 @@ if ($id > 0) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + print "'; print '\n"; @@ -616,7 +616,7 @@ if ($id > 0) } else { - $var=!$var; + print ''; } diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 017bcb7686e..eda1633480a 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -163,7 +163,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $obj = $db->fetch_object($resql); $var = !$var; - print ""; + print ''; // Ref payment $payment_sc_static->id=$obj->pid; $payment_sc_static->ref=$obj->pid; @@ -259,8 +259,8 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''."\n"; print "\n"; @@ -361,8 +361,8 @@ while($j<$numlt) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''."\n"; print "\n"; @@ -443,8 +443,8 @@ if (! empty($conf->salaries->enabled) && $user->rights->salaries->read) $total = $total + $obj->amount; - $var=!$var; - print ""; + + print ''; print ''."\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 236e22ba981..ee6e7f1be27 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -357,8 +357,8 @@ if ($modecompta == 'CREANCES-DETTES') if (count($name)) { foreach($name as $key=>$value) { - $var=!$var; - print ""; + + print ''; // Product $fullname=$name[$key]; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index d72b06a1bb0..fff94c898c2 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -352,8 +352,8 @@ if (count($amount)) { $i = 0; foreach($arrayforsort as $key => $value) { - $var=!$var; - print ""; + + print ''; // Third party $fullname=$name[$key]; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 636c4e29d17..548809f4317 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -517,8 +517,8 @@ if (count($amount)) { } foreach($arrayforsort as $key=>$value) { - $var=!$var; - print ""; + + print ''; // Third party $fullname=$name[$key]; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 9d942caf57a..2bb9a7d50a0 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -222,8 +222,8 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) { $mois_modulo = $mois;// ajout if($mois>12){$mois_modulo = $mois-12;} // ajout - $var=!$var; - print ""; + + print ''; print ""; for ($annee = $year_start -1 ; $annee <= $year_end ; $annee++) // We start one year before to have data to be able to make delta @@ -312,8 +312,8 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) /* for ($mois = 1 ; $mois < 13 ; $mois++) { - $var=!$var; - print ""; + + print ''; print ""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) @@ -480,7 +480,7 @@ print ''; $totalam_Rac += $obj->am; $i++; } - $var=!$var; + print ""; } $db->free($resql); @@ -530,7 +530,7 @@ print ''; $total_pr += $obj->total_ttc-$obj->tot_fttc; $i++; } - $var=!$var; + print ""; } $db->free($resql); diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 84940bae414..0ede7fa091e 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -260,7 +260,7 @@ if (is_array($coll_list)) { $i = 1; foreach ($coll_list as $coll) { if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); if(empty($intra)) { if($coll->assuj == '1') { @@ -270,7 +270,7 @@ if (is_array($coll_list)) { $intra = ''; } } - print ""; + print ''; print '"; $company_static->id=$coll->socid; $company_static->name=$coll->name; @@ -340,7 +340,7 @@ if (is_array($coll_list)) { $i = 1; foreach ($coll_list as $coll) { if ($min == 0 or ($min > 0 && $coll->amount > $min)) { - $var=!$var; + $intra = str_replace($find,$replace,$coll->tva_intra); if (empty($intra)) { if ($coll->assuj == '1') { @@ -350,7 +350,7 @@ if (is_array($coll_list)) { $intra = ''; } } - print ""; + print ''; print '"; $company_static->id=$coll->socid; $company_static->name=$coll->name; diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index c9a65ac2f03..105bfcb2bf6 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -83,8 +83,8 @@ function pt ($db, $sql, $date) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; print '\n"; $total = $total + $obj->mm; @@ -171,8 +171,8 @@ for ($m = 1 ; $m < 13 ; $m++ ) break; } - $var=!$var; - print ""; + + print ''; print ''; $x_coll = 0; diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php index 57ce32b72fe..6d33c358af2 100644 --- a/htdocs/compta/tva/quadri.php +++ b/htdocs/compta/tva/quadri.php @@ -259,8 +259,8 @@ if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") $x_paye_sum = 0; $x_paye_ht = 0; foreach($x_both as $rate => $both){ - $var=!$var; - print ""; + + print ''; print ""; print ""; print ""; @@ -282,8 +282,8 @@ if ($conf->global->ACCOUNTING_MODE == "CREANCES-DETTES") $total = $total + $diff; $subtotal = $subtotal + $diff; - $var=!$var; - print ""; + + print ''; print ''; print "\n"; print "\n"; diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index e0a19d7a0f3..513eb25ff7e 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -396,8 +396,8 @@ else if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -553,8 +553,8 @@ else if (! empty($fields['ddate_start'])) $type=1; if (! empty($fields['ddate_end'])) $type=1; - $var=!$var; - print ''; + + print ''; // Ref print ''; diff --git a/htdocs/compta/tva/quarter_report.php b/htdocs/compta/tva/quarter_report.php index 626a0fd6c34..a3d902ed3f3 100644 --- a/htdocs/compta/tva/quarter_report.php +++ b/htdocs/compta/tva/quarter_report.php @@ -408,8 +408,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) { $type=1; } - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -576,8 +576,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) { $type=1; } - $var=!$var; - print ''; + + print ''; // Ref print ''; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index dc3ea846eee..0e5f3fca093 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1507,7 +1507,7 @@ else $objp = $db->fetch_object($result); - //$var=!$var; + // if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 9ec924254a9..3a779190679 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -82,7 +82,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele print ''; print '
'.$langs->trans("Statistics").'
'.$langs->trans("NbOfInvoiceToWithdraw").''; print ''; print $bprev->NbFactureAPrelever(); print ''; print '
'.$langs->trans("AmountToWithdraw").''; print price($bprev->SommeAPrelever(),'','',1,-1,-1,'auto'); @@ -129,7 +129,7 @@ if ($resql) $invoicestatic->type=$obj->type; $alreadypayed=$invoicestatic->getSommePaiement(); - $var=!$var; + print '
'; print $invoicestatic->getNomUrl(1,'withdraw'); print '
"; $bprev->id=$obj->rowid; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index d5ae2514034..f7fe4b77e7d 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -165,7 +165,7 @@ if ($result) { $obj = $db->fetch_object($result); - $var=!$var; + print "
"; diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 78a11e898df..ef72ca8f6e5 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -112,7 +112,7 @@ if ($result) print ''.$rej->motifs[$obj->motif].'
".dol_print_date($data['date'],'day')."'.$data['link']."
 ".$langs->trans("Bills").' '.$objp->name."
 ".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n"; @@ -304,7 +304,7 @@ if ($modecompta != 'CREANCES-DETTES') if ($total_ttc == 0) { - $var=!$var; + print "
 '.$langs->trans("None").'
 ".$langs->trans("Bills")." socid."\">".$objp->name."
 '.$langs->trans("None").'
".dol_print_date(dol_mktime(12,0,0,$mois_modulo,1,$annee),"%B")."
'.$langs->trans("TotalTTC").' 
'.$langs->trans("AccountingResult").'
"; print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."
'.$langs->trans("None").'
'.dol_print_date($db->jdate($obj->dm),'day').'".$obj->label."
'.dol_print_date($db->jdate($obj->dm),'day').'".$obj->label."
'.dol_print_date($db->jdate($obj->dateep),'day').'
".dol_print_date(dol_mktime(12,0,0,$mois_modulo,1,2000),"%B")."
".dol_print_date(dol_mktime(12,0,0,$mois,1,2000),"%B")."
Facture a encaisser : ".price($total_ttc_Rac)."<-- bug ici car n'exclut pas le deja r�gl� des factures partiellement r�gl�es
Signe et non facture:".price($total_pr)."<-- bug ici, ca devrait exclure le deja facture
'.$i."
'.$i."
'.$obj->dm."
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'
$rate%".price($both['coll']['totalht'])."".price($both['coll']['vat'])."
".price($diff)."
'.$fields['link'].'
'.$fields['link'].'
'.$fields['link'].'
'.$fields['link'].'
'; print ''; - print ''; + print ''; print ''; print ''; print "
'.$langs->trans("Search").'
'.$langs->trans("Contract").':
\n"; @@ -188,8 +188,8 @@ foreach($listofstatus as $status) $dataseries[]=array('label'=>$staticcontratligne->LibStatut($status,1,($bool?1:0)),'data'=>(isset($nb[$status.$bool])?(int) $nb[$status.$bool]:0)); if (empty($conf->use_javascript_ajax)) { - $var=!$var; - print ''; + + print ''; print ''.$staticcontratligne->LibStatut($status,0,($bool?1:0)).''; print ''.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).''; print "\n"; @@ -210,8 +210,8 @@ foreach($listofstatus as $status) { if (empty($conf->use_javascript_ajax)) { - $var=!$var; - print ''; + + print ''; print ''.$staticcontratligne->LibStatut($status,0,($bool?1:0)).''; print ''.($nb[$status.$bool]?$nb[$status.$bool]:0).' '.$staticcontratligne->LibStatut($status,3,($bool?1:0)).''; if ($status==4 && ! $bool) $bool=true; @@ -272,7 +272,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) print ''; //$tot_ttc+=$obj->total_ttc; $i++; - $var=!$var; + } } else @@ -334,9 +334,9 @@ if ($result) while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + - print ''; + print ''; print ''; $staticcontrat->ref=($obj->ref?$obj->ref:$obj->cid); $staticcontrat->id=$obj->cid; @@ -401,8 +401,8 @@ if ($resql) while ($i < min($num,$max)) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; $staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat); $staticcontrat->id=$obj->fk_contrat; @@ -482,8 +482,8 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; $staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat); @@ -563,8 +563,8 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; $staticcontrat->ref=($obj->ref?$obj->ref:$obj->fk_contrat); diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index 1e2820f10e0..d92bcd16679 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -519,9 +519,9 @@ while ($i < min($num,$limit)) $contractstatic->id=$obj->cid; $contractstatic->ref=$obj->ref?$obj->ref:$obj->cid; - $var=!$var; + - print ""; + print ''; // Ref if (! empty($arrayfields['c.ref']['checked'])) diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index 1257e3503a9..a2da6cef24e 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -33,7 +33,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index b6d38d17b53..e856d52c2b6 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -191,7 +191,7 @@ class box_actions extends ModeleBoxes // on affiche que les évènement du jours ou passé // qui ne sont pas à 100% $actioncejour=true; - $var=!$var; + // TR $logo=$contents[$line][0]['logo']; $label=$contents[$line][1]['text']; diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 39f39524b41..f5fa32e590d 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -278,7 +278,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" { if (isset($contents[$i])) { - $var=!$var; + // TR if (isset($contents[$i][0]['tr'])) $out.= ''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 634f27b1985..97586e31a7e 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3422,7 +3422,7 @@ abstract class CommonObject //Line extrafield $line->fetch_optionals($line->id,$extralabelslines); - $var=!$var; + //if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) if (is_object($hookmanager)) // Old code is commented on preceding line. @@ -3603,7 +3603,7 @@ abstract class CommonObject foreach ($this->lines as $line) { - $var=!$var; + if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) { diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php index 869b26e2f75..99f3c14f15c 100644 --- a/htdocs/core/class/dolprintipp.class.php +++ b/htdocs/core/class/dolprintipp.class.php @@ -116,8 +116,8 @@ class dolprintIPP { foreach ($jobs as $value) { - $var=!$var; - print ""; + + print ''; print ''.$value->job_id->_value0.''; print ''.$value->job_originating_user_name->_value0.''; print ''.$value->printer_uri->_value0.''; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 6050679631f..b799e0e2359 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -207,8 +207,8 @@ class FormActions $ref=$action->getNomUrl(1,-1); $label=$action->getNomUrl(0,38); - $var=!$var; - print ''; + + print ''; print ''.$ref.''; print ''.$label.''; print ''.$action->type.''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 2af32bf9be6..c982e3d4bb2 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1102,7 +1102,7 @@ class FormFile && $file['name'] != '..' && ! preg_match('/\.meta$/i',$file['name'])) { - $var=!$var; + if ($filearray[$key]['rowid'] > 0) $lastrowid = $filearray[$key]['rowid']; @@ -1446,9 +1446,9 @@ class FormFile if (! $found > 0 || ! is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) continue; // We do not show orphelins files - $var=!$var; + print ''."\n"; - print ''; + print ''; print ''; if ($found > 0 && is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) print $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]->getNomUrl(1,'document'); else print $langs->trans("ObjectDeleted",($id?$id:$ref)); diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 66d438d3ffe..a77740eafb8 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -175,18 +175,20 @@ class Translate { global $conf,$db; - // Load $this->tab_translate[] from database - if (empty($loadfromfileonly) && count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database. - + //dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang); + // Check parameters if (empty($domain)) { - dol_print_error('',get_class($this)."::Load ErrorWrongParameters"); - return -1; + dol_print_error('',get_class($this)."::Load ErrorWrongParameters"); + return -1; } if ($this->defaultlang == 'none_NONE') return 0; // Special language code to not translate keys + + + // Load $this->tab_translate[] from database + if (empty($loadfromfileonly) && count($this->tab_translate) == 0) $this->loadFromDatabase($db); // Nothing was loaded yet, so we load database. - //dol_syslog("Translate::Load Start domain=".$domain." alt=".$alt." forcelangdir=".$forcelangdir." this->defaultlang=".$this->defaultlang); $newdomain = $domain; $modulename = ''; @@ -275,12 +277,15 @@ class Translate * and split the rest until a line feed. * This is more efficient than fgets + explode + trim by a factor of ~2. */ - while ($line = fscanf($fp, "%[^= ]%*[ =]%[^\n]")) { - if (isset($line[1])) { + while ($line = fscanf($fp, "%[^= ]%*[ =]%[^\n]")) + { + if (isset($line[1])) + { list($key, $value) = $line; //if ($domain == 'orders') print "Domain=$domain, found a string for $tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."
"; //if ($key == 'Order') print "Domain=$domain, found a string for key=$key=$tab[0] with value $tab[1]. Currently in cache ".$this->tab_translate[$key]."
"; - if (empty($this->tab_translate[$key])) { // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) + if (empty($this->tab_translate[$key])) + { // If translation was already found, we must not continue, even if MAIN_FORCELANGDIR is set (MAIN_FORCELANGDIR is to replace lang dir, not to overwrite entries) $value = preg_replace('/\\n/', "\n", $value); // Parse and render carriage returns if ($key == 'DIRECTION') { // This is to declare direction of language if ($alt < 2 || empty($this->tab_translate[$key])) { // We load direction only for primary files or if not yet loaded @@ -391,8 +396,6 @@ class Translate $domain='database'; - if ($this->defaultlang == 'none_NONE') return 0; // Special language code to not translate keys - // Check parameters if (empty($db)) return 0; // Database handler can't be used @@ -450,7 +453,7 @@ class Translate $this->tab_translate+=$tmparray; // Faster than array_merge($tmparray,$this->tab_translate). Note: If a valuer already exists into tab_translate, value into tmparaay is not added. //print $newdomain."\n"; //var_dump($this->tab_translate); - if ($alt == 2) $fileread=1; + $fileread=1; $found=true; // Found in dolibarr PHP cache } } @@ -509,16 +512,9 @@ class Translate } } - if ($alt == 2) - { - if ($fileread) $this->_tab_loaded[$newdomain]=1; // Set domain file as loaded + if ($fileread) $this->_tab_loaded[$newdomain]=1; // Set domain file as loaded - if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain]=2; // Marque ce cas comme non trouve (no lines found for language) - } - - // Check to be sure that SeparatorDecimal differs from SeparatorThousand - if (! empty($this->tab_translate["SeparatorDecimal"]) && ! empty($this->tab_translate["SeparatorThousand"]) - && $this->tab_translate["SeparatorDecimal"] == $this->tab_translate["SeparatorThousand"]) $this->tab_translate["SeparatorThousand"]=''; + if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain]=2; // Marque ce cas comme non trouve (no lines found for language) return 1; } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 63b06dbd737..2a734b5f161 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1212,7 +1212,7 @@ function form_constantes($tableau,$strictw3c=0) if ($result) { $obj = $db->fetch_object($result); // Take first result of select - $var=!$var; + // For avoid warning in strict mode if (empty($obj)) { @@ -1221,7 +1221,7 @@ function form_constantes($tableau,$strictw3c=0) if (empty($strictw3c)) print "\n".'
'; - print ""; + print ''; // Show constant print ''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 408e671dfef..8d1705ca4d4 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -251,9 +251,9 @@ function show_array_actions_to_do($max=5) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ''; + print ''; $staticaction->type_code=$obj->code; $staticaction->label=($obj->label?$obj->label:$obj->type_label); @@ -347,9 +347,9 @@ function show_array_last_actions_done($max=5) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ''; + print ''; $staticaction->type_code=$obj->code; $staticaction->libelle=$obj->label; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 8ee372d1178..17b904da9db 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -576,7 +576,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin if ($user->rights->projet->lire && $userAccess > 0) { $var = !$var; - print ""; + print ''; // Ref print ''.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.''; @@ -893,7 +893,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='') { $var = !$var; - print ""; + print ''; print ''; $addressstatic->id = $address->id; @@ -929,7 +929,7 @@ function show_addresses($conf,$langs,$db,$object,$backtopage='') } else { - //print ""; + //print ''; //print ''.$langs->trans("NoAddressYetDefined").''; //print "\n"; } @@ -1245,7 +1245,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= foreach ($histo as $key=>$value) { - $var=!$var; + $actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo $out.=""; @@ -1454,7 +1454,7 @@ function show_subsidiaries($conf,$langs,$db,$object) $obj = $db->fetch_object($result); $var = !$var; - print ""; + print ''; print ''; $socstatic->id = $obj->rowid; diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 5ba8570ab57..43a53ee7f6f 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -71,7 +71,7 @@ function show_skin($fuser,$edit=0) print '';*/ print ''; - print ''; + print ''; print ''.$langs->trans("ThemeDir").''; print ''; foreach($dirskins as $dirskin) @@ -81,7 +81,7 @@ function show_skin($fuser,$edit=0) print ''; print ''; - //$var=!$var; + // print ''; print ''; print '"; + + print ''; print '"; + print ''; // Sending id print ''; print ''; print '"; $html.= ''; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index cc47c9570a6..11ee8a32d7d 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -199,7 +199,7 @@ class pdf_paiement while ($i < $num) { $objp = $this->db->fetch_object($result); - $var=!$var; + $lines[$i][0] = $objp->facnumber; $lines[$i][1] = dol_print_date($this->db->jdate($objp->dp),"day",false,$outputlangs,true); diff --git a/htdocs/core/modules/rapport/pdf_paiement_fourn.class.php b/htdocs/core/modules/rapport/pdf_paiement_fourn.class.php index 1d9f2333300..f20e912e1ed 100644 --- a/htdocs/core/modules/rapport/pdf_paiement_fourn.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement_fourn.class.php @@ -197,7 +197,7 @@ class pdf_paiement_fourn while ($i < $num) { $objp = $this->db->fetch_object($result); - $var=!$var; + $lines[$i][0] = $objp->ref; $lines[$i][1] = dol_print_date($this->db->jdate($objp->dp),"day",false,$outputlangs,true); diff --git a/htdocs/core/tpl/admin_extrafields_view.tpl.php b/htdocs/core/tpl/admin_extrafields_view.tpl.php index d20184c70b4..c33d79d062b 100644 --- a/htdocs/core/tpl/admin_extrafields_view.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_view.tpl.php @@ -52,8 +52,8 @@ print "\n"; $var=True; foreach($extrafields->attribute_type as $key => $value) { - $var=!$var; - print ""; + + print ''; print "\n"; print "\n"; print "\n"; diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 3077e49bf89..d6defba0fa9 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -72,7 +72,7 @@ if ($permission) { $var=true; if (empty($hideaddcontactforuser)) { - $var=!$var; + ?> " /> @@ -98,7 +98,7 @@ if ($permission) { if (empty($hideaddcontactforthirdparty)) { - $var=!$var; + ?> 0) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; + if (! verifCond($obj->test)) continue; // Discard line with test = false diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index ecc651c1f16..8d4f697deff 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -360,7 +360,7 @@ print ''; print ''; $var=! $var; -print ''; +print ''; print ''; print "\n"; - $var=!$var; + print ""; print ''; if (! empty($conf->global->DONATION_ART200)) { @@ -421,7 +421,7 @@ if (preg_match('/fr/i',$conf->global->MAIN_INFO_SOCIETE_COUNTRY)) } print ''; - $var=!$var; + print ""; print ''; if (! empty($conf->global->DONATION_ART238)) { @@ -435,7 +435,7 @@ if (preg_match('/fr/i',$conf->global->MAIN_INFO_SOCIETE_COUNTRY)) } print ''; - $var=!$var; + print ""; print ''; if (! empty($conf->global->DONATION_ART885)) { diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 0ace5c88e76..f6584628d25 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -703,7 +703,7 @@ if (! empty($id) && $action != 'edit') while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + print "'; print '\n"; diff --git a/htdocs/don/index.php b/htdocs/don/index.php index de4d84529fe..4912b6d8f1a 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -141,8 +141,8 @@ $totalnb=0; $var=true; foreach ($listofstatus as $status) { - $var=!$var; - print ""; + + print ''; print ''; print ''; print ''; @@ -191,10 +191,10 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; $donation_static->id=$obj->rowid; $donation_static->ref=$obj->ref?$obj->ref:$obj->rowid; diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index d3a9e7eb198..2e7d2a001fd 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -231,8 +231,8 @@ if ($resql) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print '
'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 6b17f6eec50..aa39e060563 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -129,7 +129,7 @@ function getEntity($element=false, $shared=0) else { $out=''; - $addzero = array('user', 'usergroup'); + $addzero = array('user', 'usergroup', 'email_template', 'default_values'); if (in_array($element, $addzero)) $out.= '0,'; $out.= $conf->entity; return $out; diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index d5a362663b7..d4ef7a2ed7a 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -147,7 +147,7 @@ function show_ldap_content($result,$level,$count,$var,$hide=0,$subcount=0) $hide=0; if (! is_numeric($key)) { - $var=!$var; + print '
'; print $key; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 29cdad35bc3..96bcbaa00c4 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -1149,8 +1149,8 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks= $projectstatic->datee = $db->jdate($objp->datee); $projectstatic->dateo = $db->jdate($objp->dateo); - $var=!$var; - print "
'; print $projectstatic->getNomUrl(1); if (! in_array('projectlabel', $hiddenfields)) print '
'.dol_trunc($objp->title,24); diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 488a74b76a3..3455979afbe 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -233,9 +233,9 @@ function show_list_sending_receive($origin,$origin_id,$filter='') $var=True; while ($i < $num) { - $var=!$var; + $objp = $db->fetch_object($resql); - print "
'; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index c5f14090a92..4350edc3797 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -499,7 +499,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) { $default='5a6482'; if ($conf->theme == 'md') $default='5a3278'; - $var=!$var; + print '
'.$langs->trans("TopMenuBackgroundColor").''; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index eaf655d7edf..5c5ea2a8ecd 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -163,7 +163,7 @@ class printing_printipp extends PrintingDriver $var = true; foreach ($list as $value) { - $var=!$var; + $printer_det = $this->get_printer_detail($value); $html.= "
'.$value.'
".$extrafields->attribute_pos[$key]."".$extrafields->attribute_label[$key]."".$key."
'; $label = $langs->trans("AccountAccounting"); @@ -407,7 +407,7 @@ if (preg_match('/fr/i',$conf->global->MAIN_INFO_SOCIETE_COUNTRY)) print '' . $langs->trans('Parameters') . '
' . $langs->trans("DONATION_ART200") . '
' . $langs->trans("DONATION_ART238") . '
' . $langs->trans("DONATION_ART885") . '
"; print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."
'.$donstatic->LibStatut($status,4).''.(! empty($nb[$status])?$nb[$status]:' ').''.(! empty($nb[$status])?price($somme[$status],'MT'):' ').'
'; $don->fetch($objp->did); @@ -253,7 +253,7 @@ if ($resql) $i++; } } - $var=!$var; + print "
\n"; $db->free($resql); diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 7eae70c9629..23526fd926d 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -257,9 +257,9 @@ if (GETPOST("action") == 'create') { $objp = $don; - $var=!$var; + - print ""; + print ''; print ''.price($objp->amount).""; diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 727f4ae669d..619a0089e1e 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -856,7 +856,7 @@ if ($action == 'create') $product = new Product($db); $line = $object->lines[$indiceAsked]; - $var=!$var; + // Show product and description $type=$line->product_type?$line->product_type:$line->fk_product_type; @@ -1272,7 +1272,7 @@ if ($action == 'create') $colspan=5; $line = new ExpeditionLigne($db); $line->fetch_optionals($object->id,$extralabelslines); - print ''; + print ''; print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan),$indiceAsked); print ''; } @@ -1788,7 +1788,7 @@ else if ($id || $ref) // Loop on each product to send/sent for ($i = 0 ; $i < $num_prod ; $i++) { - print ""; + print ''; if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { @@ -1953,12 +1953,12 @@ else if ($id || $ref) $colspan= empty($conf->productbatch->enabled) ? 5 : 6; $line = new ExpeditionLigne($db); $line->fetch_optionals($lines[$i]->id,$extralabelslines); - print ''; + print ''; print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan),$indiceAsked); print ''; } - $var=!$var; + } // TODO Show also lines ordered but not delivered diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 17f349348ff..481a6df9d00 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -99,7 +99,7 @@ if ($resql) $shipment->ref=$obj->ref; $shipment->ref_customer=$obj->ref_customer; - $var=!$var; + print "'; print $shipment->getNomUrl(1); print ""; @@ -156,8 +156,8 @@ if ($resql) $companystatic->name=$obj->name; $companystatic->id=$obj->socid; - $var=!$var; - print ""; + + print ''; print ''; print $orderstatic->getNomUrl(1); print ''; @@ -218,7 +218,7 @@ if ( $resql ) $companystatic->name=$obj->name; $companystatic->id=$obj->socid; - $var=!$var; + print ""; print $orderstatic->getNomUrl(1); print ''; @@ -274,7 +274,7 @@ if ($resql) $shipment->ref=$obj->ref; $shipment->ref_customer=$obj->ref_customer; - $var=!$var; + print ''; print $shipment->getNomUrl(1); print ''; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index 853c047b23c..b9ecc9e089c 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -475,9 +475,9 @@ if ($resql) $companystatic->ref=$obj->name; $companystatic->name=$obj->name; - $var=!$var; + - print ""; + print ''; // Ref if (! empty($arrayfields['e.ref']['checked'])) diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index f53b80b927d..da103ae98d1 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -654,7 +654,7 @@ if ($id > 0 || ! empty($ref)) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + // Show product and description $type=isset($objp->type)?$objp->type:$objp->product_type; @@ -664,7 +664,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($objp->date_start)) $type=1; if (! empty($objp->date_end)) $type=1; - print ""; + print ''; // Product label if ($objp->fk_product > 0) diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index f4e8d45f5a1..cccfc0d90a0 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -277,7 +277,7 @@ foreach ($data as $val) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print ''.$oldyear.''; @@ -287,7 +287,7 @@ foreach ($data as $val) print ''; } - $var=!$var; + print ''; print ''; if ($year) print ''.$year.''; diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index f66ff148d66..b55654f4786 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -34,7 +34,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 488c4c547ed..12956ee5764 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1803,7 +1803,7 @@ else while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + print ""; print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''; print ''.dol_print_date($db->jdate($objp->dp),'day')."\n"; diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 3f37be8fb8d..1ecf77252f3 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -197,7 +197,7 @@ if ($result) $userstatic->login=$obj->login; $userstatic->statut=$obj->statut; $userstatic->photo=$obj->photo; - print ''; + print ''; print ''.$expensereportstatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(-1).''; print ''.price($obj->total_ht).''; @@ -208,7 +208,7 @@ if ($result) print $expensereportstatic->LibStatut($obj->fk_status,3); print ''; print ''; - $var=!$var; + $i++; } diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index c04a2fc3b61..7f7b633577e 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -527,7 +527,7 @@ if ($resql) $expensereportstatic->note_private=$obj->note_private; $expensereportstatic->note_public=$obj->note_public; - $var=!$var; + print ''; // Ref if (! empty($arrayfields['d.ref']['checked'])) { diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index f9ba5af3dc0..4450f1644bf 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -226,8 +226,8 @@ if ($resql) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print ''; $expensereport->fetch($objp->did); @@ -248,7 +248,7 @@ if ($resql) $i++; } } - $var=!$var; + print "\n"; $db->free($resql); diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 56a5b1c7fb3..82c3fc16e30 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -273,9 +273,9 @@ if (GETPOST("action") == 'create') { $objp = $expensereport; - $var=!$var; + - print ""; + print ''; print ''.price($objp->total_ttc).""; diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index f0448db1771..e158e4728a8 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -262,7 +262,7 @@ foreach ($data as $val) while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print ''.$oldyear.''; print '0'; @@ -271,7 +271,7 @@ foreach ($data as $val) print ''; } - $var=!$var; + print ''; print ''.$year.''; print ''.$val['nb'].''; diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php index b31b90e5a88..7fec53bf3d8 100644 --- a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -32,7 +32,7 @@ $var=true; $total=0; foreach($linkedObjectBlock as $key => $objectlink) { - $var=!$var; + ?> > trans("ExpenseReport"); ?> diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index dd9dc38efdf..298950abe8e 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -591,7 +591,7 @@ class Export while ($objp = $this->db->fetch_object($resql)) { - $var=!$var; + // Process special operations if (! empty($this->array_export_special[$indice])) diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 152e095afa6..63792e2c61f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -585,8 +585,8 @@ if ($step == 2 && $datatoexport) foreach($fieldsarray as $code=>$label) { - $var=!$var; - print ""; + + print ''; $i++; @@ -766,8 +766,8 @@ if ($step == 3 && $datatoexport) // on boucle sur les champs foreach($fieldsarray as $code => $label) { - $var=!$var; - print ""; + + print ''; $i++; $entity=(! empty($objexport->array_export_entities[0][$code])?$objexport->array_export_entities[0][$code]:$objexport->array_export_icon[0]); @@ -951,8 +951,8 @@ if ($step == 4 && $datatoexport) $var=true; foreach($array_selected as $code=>$value) { - $var=!$var; - print ""; + + print ''; $entity=(! empty($objexport->array_export_entities[0][$code])?$objexport->array_export_entities[0][$code]:$objexport->array_export_icon[0]); $entityicon=(! empty($entitytoicon[$entity])?$entitytoicon[$entity]:$entity); @@ -1032,7 +1032,7 @@ if ($step == 4 && $datatoexport) print ' '; print ''; $var=false; - print ''; + print ''; print ''; print ''; print ''; @@ -1050,7 +1050,7 @@ if ($step == 4 && $datatoexport) $var=false; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); print ''; print $obj->label; @@ -1204,8 +1204,8 @@ if ($step == 5 && $datatoexport) unset($liste[$key]); } - $var=!$var; - print ''; + + print ''; print ''.img_picto_common($key,$objmodelexport->getPictoForKey($key)).''; $text=$objmodelexport->getDriverDescForKey($key); $label=$listeall[$key]; diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index ca3bcea1458..0fd45794e02 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -67,7 +67,7 @@ if (count($export->array_export_code)) { foreach ($export->array_export_code as $key => $value) { - $var=!$var; + print ''; //print img_object($export->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' '; print $export->array_export_module[$key]->getName(); @@ -134,8 +134,8 @@ foreach($liste as $key => $val) $liste[$key]=preg_replace('/__\(Disabled\)__/','('.$langs->transnoentitiesnoconv("Disabled").')',$liste[$key]); } - $var=!$var; - print ''; + + print ''; print ''.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).''; $text=$model->getDriverDescForKey($key); $label=$liste[$key]; diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/externalsite.php index bd0449dc028..99791a499fb 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/externalsite.php @@ -95,15 +95,15 @@ print ""; $var=true; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("Label").""; print "global->EXTERNALSITE_LABEL) || $conf->global->EXTERNALSITE_LABEL=='ExternalSite')?'':$conf->global->EXTERNALSITE_LABEL)) . "\" size=\"12\">"; print "".$langs->trans("ExampleMyMenuEntry").""; print ""; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("ExternalSiteURL").""; print "global->EXTERNALSITE_URL)?'':$conf->global->EXTERNALSITE_URL)) . "\" size=\"40\">"; print "http://localhost/myurl/"; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index e5bfa57d2f7..91e094c1a50 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1369,12 +1369,12 @@ else if ($id > 0 || ! empty($ref)) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; + // Ligne en mode visu if ($action != 'editline' || GETPOST('line_id','int') != $objp->rowid) { - print ''; + print ''; print ''; print ''; // ancre pour retourner sur la ligne print dol_htmlentitiesbr($objp->description); diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 59f94df5f7b..86706dd1eff 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -138,8 +138,8 @@ if ($resql) { if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$fichinterstatic->LibStatut($status,$bool,0).''; print ''.(isset($vals[$status.$bool])?$vals[$status.$bool]:0).' '; print $fichinterstatic->LibStatut($status,$bool,3); @@ -190,9 +190,9 @@ if (! empty($conf->ficheinter->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; print "rowid."\">".img_object($langs->trans("ShowFichinter"),"intervention").' '.$obj->ref.""; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).''; @@ -240,10 +240,10 @@ if ($resql) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $fichinterstatic->id=$obj->rowid; @@ -311,9 +311,9 @@ if (! empty($conf->ficheinter->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $fichinterstatic->id=$obj->rowid; diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index e6e1470b47a..4daa0b7e00d 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -291,7 +291,7 @@ foreach ($data as $val) while (! empty($year) && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$oldyear.''; @@ -304,7 +304,7 @@ foreach ($data as $val) print ''; } - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index 40ee1a1690b..455f383fd4a 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -33,7 +33,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 390872bb836..a9ba1ef80aa 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -407,7 +407,7 @@ if ($object->id > 0) while ($objp = $db->fetch_object($query)) { - $var=!$var; + $productstatic->id = $objp->rowid; $productstatic->ref = $objp->ref; @@ -415,7 +415,7 @@ if ($object->id > 0) $productstatic->type = $objp->fk_product_type; $productstatic->entity = $objp->entity; - print ""; + print ''; print ''; print $productstatic->getNomUrl(1); print ''; @@ -483,9 +483,9 @@ if ($object->id > 0) while ($i < $num && $i <= $MAXLIST) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''; $proposalstatic->id = $obj->rowid; $proposalstatic->ref = $obj->ref; @@ -587,9 +587,9 @@ if ($object->id > 0) while ($i < $num && $i < $MAXLIST) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''; $orderstatic->id = $obj->rowid; $orderstatic->ref = $obj->ref; @@ -660,8 +660,8 @@ if ($object->id > 0) while ($i < min($num,$MAXLIST)) { $obj = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; print ''; print ''; $facturestatic->id=$obj->rowid; diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index be27733294f..f7323cc8996 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -119,8 +119,8 @@ if ($resql) $dataseries[]=array('label'=>$commandestatic->LibStatut($statut,1),'data'=>(isset($vals[$statut])?(int) $vals[$statut]:0)); if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$commandestatic->LibStatut($statut,0).''; print ''.(isset($vals[$statut])?$vals[$statut]:0).''; print "\n"; @@ -177,9 +177,9 @@ if ($resql) while ($i < $num) { $row = $db->fetch_row($resql); - $var=!$var; + - print ""; + print ''; print ''.$langs->trans($commandestatic->statuts[$row[1]]).''; print ''.$row[0].' '.$commandestatic->LibStatut($row[1],3).''; @@ -225,9 +225,9 @@ if (! empty($conf->fournisseur->enabled)) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref.""; print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->name,24).''; @@ -268,9 +268,9 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print ""; + print ''; print ''; $userstatic->id=$obj->rowid; $userstatic->lastname=$obj->lastname; @@ -324,10 +324,10 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $commandestatic->id=$obj->rowid; @@ -393,9 +393,9 @@ $i = 0; $var = True; while ($i < $num) { -$var=!$var; + $obj = $db->fetch_object($resql); -print ""; +print ''; print ''; $commandestatic->id=$obj->rowid; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index a1324d250ab..8af15b92bc2 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1079,7 +1079,7 @@ if ($resql) while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $var=!$var; + $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; @@ -1090,7 +1090,7 @@ if ($resql) $objectstatic->date_delivery = $db->jdate($obj->date_delivery); $objectstatic->statut = $obj->fk_statut; - print ""; + print ''; // Ref if (! empty($arrayfields['cf.ref']['checked'])) diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index ff16f267431..232d12fad3d 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -35,7 +35,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index e6f6b288b14..b1db17f3754 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -111,9 +111,9 @@ if ($result) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print ''.img_object($langs->trans("ShowContact"),"contact").' '.$obj->lastname.''; print ''.$obj->firstname.''; diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index afc2dda78ea..5ca38304495 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2380,7 +2380,7 @@ else while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; + print ''; $paymentstatic->id=$objp->rowid; $paymentstatic->datepaye=$db->jdate($objp->dp); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index a5ea3b88286..4538351b6ad 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -235,9 +235,9 @@ if ($user->rights->fournisseur->facture->lire) $facturestatic->statut = $objp->fk_statut; $facturestatic->date_echeance = $db->jdate($objp->datelimite); - $var=!$var; + - print ""; + print ''; $classname = "impayee"; print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 1eb2dfaeb4a..bbe7c662e92 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -850,7 +850,7 @@ if ($resql) while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $var=!$var; + $datelimit=$db->jdate($obj->datelimite); $facturestatic->id=$obj->facid; @@ -859,7 +859,7 @@ if ($resql) $facturestatic->date_echeance = $db->jdate($obj->datelimite); $facturestatic->statut = $obj->fk_statut; - print ''; + print ''; if (! empty($arrayfields['f.ref']['checked'])) { print ''; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 952d1e13dbd..5f1d8cd2d99 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -447,8 +447,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print ''; @@ -742,7 +742,7 @@ if (empty($action)) while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); - $var=!$var; + print ''; // Ref payment diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index b0b0436af1b..a7241a1ecf4 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -152,7 +152,7 @@ if ($year) { if (preg_match('/^supplier_payment/i',$file)) { - $var=!$var; + $tfile = $dir . '/'.$year.'/'.$file; $relativepath = $year.'/'.$file; print "".''.img_pdf().' '.$file.''; diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index e54623e1993..e8154cd8259 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -36,7 +36,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index bc16806cdc2..47f95104398 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -81,9 +81,9 @@ if ($resql) while ($i < $num) { $row = $db->fetch_row($resql); - $var=!$var; + - print ""; + print ''; print ''.$langs->trans($commande->statuts[$row[1]]).''; print ''.$row[0].''; print ''.$commande->LibStatut($row[1],3).''; @@ -132,7 +132,7 @@ if (! empty($conf->fournisseur->enabled)) $var = true; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); print ''; $commandestatic->id=$obj->rowid; @@ -151,7 +151,7 @@ if (! empty($conf->fournisseur->enabled)) } if ($total>0) { - $var=!$var; + print ''.$langs->trans("Total").''.price($total).""; } print ""; @@ -190,7 +190,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- while ($i < $num && $i < 20) { $obj = $db->fetch_object($resql); - $var=!$var; + print ''; $facturestatic->ref=$obj->ref; $facturestatic->id=$obj->rowid; @@ -263,9 +263,9 @@ if ($resql) while ($obj = $db->fetch_object($resql) ) { - $var=!$var; + - print ""; + print ''; print ''.img_object($langs->trans("ShowSupplier"),"company").''; print " socid."\">".$obj->name."\n"; print ''.$obj->code_fournisseur.' '; @@ -300,7 +300,7 @@ if (count($companystatic->SupplierCategories)) foreach ($companystatic->SupplierCategories as $rowid => $label) { - $var=!$var; + print "\n"; print ''; $categstatic->id=$rowid; diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index c8e882e5003..339fc1cb6fd 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -316,8 +316,8 @@ if ($result > 0) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print ''.img_object($langs->trans('ShowBill'),'bill').' '; print ($objp->ref?$objp->ref:$objp->rowid); @@ -342,7 +342,7 @@ if ($result > 0) $i++; } } - $var=!$var; + print "\n"; $db->free($resql); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 0e17a48b356..94302eca4be 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -208,8 +208,8 @@ if ($resql) while ($i < min($num,$limit)) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''; $productstatic->id=$objp->rowid; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 1137f0de14b..470e6c64cc4 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -114,8 +114,8 @@ if ($socid > 0) } $totalpaye = $fac->getSommePaiement(); - $var=!$var; - print ""; + + print ''; print "".dol_print_date($fac->date)."\n"; print "id\">".img_object($langs->trans("ShowBill"),"bill")." ".$fac->ref."\n"; @@ -150,8 +150,8 @@ if ($socid > 0) while ($j < $nump) { $objp = $db->fetch_object($resqlp); - //$var=!$var; - print ""; + // + print ''; print ''.dol_print_date($db->jdate($objp->dp))."\n"; print ''; print '      '; // Decalage diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 01ada4f3185..158d9fed3da 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -247,38 +247,38 @@ else print ''; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("Name").""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("Server").""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("Port").""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("User").""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("Password").""; print ""; print ""; - $var=!$var; - print ""; + + print ''; print "".$langs->trans("FTPPassiveMode").""; print ''.$form->selectyesno('FTP_PASSIVE_'.$idrss, @constant("FTP_PASSIVE_" . $idrss), 1).''; print ""; diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 4658e9d09ec..c8ba7c6b786 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -554,7 +554,7 @@ else $is_directory=ftp_isdir($conn_id, $newremotefileiso); } - $var=!$var; + print ''; // Name print ''; diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 414bcf709f4..804ad55e10a 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -212,7 +212,7 @@ else foreach($listUsers as $users) { - $var=!$var; + // If user has not permission to edit/read all, we must see only subordinates if (empty($user->rights->holiday->read_all)) @@ -220,7 +220,7 @@ else if (($users['rowid'] != $user->id) && (! in_array($users['rowid'], $userchilds))) continue; // This user is not into hierarchy of current user, we hide it. } - print ''; + print ''; // User print ''; diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index 51d3e2d0be3..7fcf6a48a97 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -104,7 +104,7 @@ $var=true; foreach($cp->logs as $logs_CP) { - $var=!$var; + $user_action = new User($db); $user_action->fetch($logs_CP['fk_user_action']); @@ -112,7 +112,7 @@ foreach($cp->logs as $logs_CP) $user_update = new User($db); $user_update->fetch($logs_CP['fk_user_update']); - print ''; + print ''; print ''.$logs_CP['rowid'].''; print ''.$logs_CP['date_action'].''; print ''.$user_action->getNomUrl(-1).''; diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 25c2fbf24c7..5d1d0f89488 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -112,8 +112,8 @@ if ($result) $establishmentstatic->name=$obj->name; $establishmentstatic->status=$obj->status; - $var=!$var; - print ''; + + print ''; print ''.$establishmentstatic->getNomUrl(1).''; print ''.$obj->address.''; print ''.$obj->zip.''; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 63700629fd8..5364f510026 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -198,7 +198,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) $userstatic->login=$obj->login; $userstatic->photo=$obj->photo; $userstatic->statut=$obj->statut; - print ''; + print ''; print ''.$holidaystatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(-1, 'leave').''; print ''.$typeleaves[$obj->fk_type]['label'].''; @@ -211,7 +211,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) print ''.dol_print_date($db->jdate($obj->dm),'day').''; print ''.$holidaystatic->LibStatut($obj->status,3).''; print ''; - $var=!$var; + $i++; } @@ -272,14 +272,14 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) $userstatic->login=$obj->login; $userstatic->statut=$obj->statut; $userstatic->photo=$obj->photo; - print ''; + print ''; print ''.$deplacementstatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(-1).''; print ''.$obj->km.''; print ''.dol_print_date($db->jdate($obj->dm),'day').''; print ''.$deplacementstatic->LibStatut($obj->fk_statut,3).''; print ''; - $var=!$var; + $i++; } @@ -339,14 +339,14 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire $userstatic->login=$obj->login; $userstatic->statut=$obj->statut; $userstatic->photo=$obj->photo; - print ''; + print ''; print ''.$expensereportstatic->getNomUrl(1).''; print ''.$userstatic->getNomUrl(-1).''; print ''.price($obj->total_ttc).''; print ''.dol_print_date($db->jdate($obj->dm),'day').''; print ''.$expensereportstatic->LibStatut($obj->status,3).''; print ''; - $var=!$var; + $i++; } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 29bcc04d54b..8cbc3d742a3 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -446,8 +446,8 @@ if ($step == 2 && $datatoimport) $liste=$objmodelimport->liste_modeles($db); foreach($liste as $key) { - $var=!$var; - print ''; + + print ''; print ''.img_picto_common($key,$objmodelimport->getPictoForKey($key)).''; $text=$objmodelimport->getDriverDescForKey($key); print ''.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key),$text).''; @@ -601,8 +601,8 @@ if ($step == 3 && $datatoimport) $modulepart='import'; $urlsource=$_SERVER["PHP_SELF"].'?step='.$step.$param.'&filetoimport='.urlencode($filetoimport); $relativepath=$file; - $var=!$var; - print ''; + + print ''; print ''.img_mime($file).''; print ''; print ''; @@ -854,7 +854,7 @@ if ($step == 4 && $datatoimport) $lefti=1; foreach ($array_match_file_to_database as $key => $val) { - $var=!$var; + show_elem($fieldssource,$key,$val,$var); // key is field number in source file //print '> '.$lefti.'-'.$key.'-'.$val; $listofkeys[$key]=1; @@ -871,7 +871,7 @@ if ($step == 4 && $datatoimport) $num=count($fieldssource); while ($lefti <= $num) { - $var=!$var; + $newkey=getnewkey($fieldssource,$listofkeys); show_elem($fieldssource,$newkey,'',$var); // key start after field number in source file //print '> '.$lefti.'-'.$newkey; @@ -894,7 +894,7 @@ if ($step == 4 && $datatoimport) print ''; foreach($fieldstarget as $code=>$label) { - $var=!$var; + print ''; $i++; @@ -995,7 +995,7 @@ if ($step == 4 && $datatoimport) { if (empty($fieldsplaced[$key])) { - //$var=!$var; + // $nbofnotimportedfields++; show_elem($fieldssource,$key,'',$var,'nostyle'); //print '> '.$lefti.'-'.$key; @@ -1111,7 +1111,7 @@ if ($step == 4 && $datatoimport) print ''; print ''; $var=false; - print ''; + print ''; print ''; @@ -1129,7 +1129,7 @@ if ($step == 4 && $datatoimport) $var=false; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); print ''; + + print ''; print ''; $text=$model->getDriverDescForKey($key); print ''; diff --git a/htdocs/index.php b/htdocs/index.php index e0609c91274..460082399ba 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -332,7 +332,7 @@ if (empty($user->societe_id)) $board=$boardloaded[$classe]; } - $var=!$var; + if (!empty($langfile[$key])) $langs->load($langfile[$key]); $text=$langs->trans($titres[$key]); $boxstat.=''; diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index 82ba61f8281..91a0c36aaeb 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -162,7 +162,7 @@ create table llx_default_values ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - type varchar(10), -- 'createform', 'filter', 'sortorder' + type varchar(10), -- 'createform', 'filters', 'sortorder' user_id integer DEFAULT 0 NOT NULL, -- 0 or user id page varchar(255), -- relative url of page param varchar(255), -- parameter diff --git a/htdocs/install/mysql/tables/llx_default_values.sql b/htdocs/install/mysql/tables/llx_default_values.sql index e693609702c..ca9849c681d 100644 --- a/htdocs/install/mysql/tables/llx_default_values.sql +++ b/htdocs/install/mysql/tables/llx_default_values.sql @@ -20,7 +20,7 @@ create table llx_default_values ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - type varchar(10), -- 'createform', 'filter', 'sortorder' + type varchar(10), -- 'createform', 'filters', 'sortorder' user_id integer DEFAULT 0 NOT NULL, -- 0 or user id page varchar(255), -- relative url of page param varchar(255), -- parameter diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index c9391256f66..f535bf27ebd 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1291,7 +1291,7 @@ function migrate_paiementfourn_facturefourn($db,$langs,$conf) print ''; } - print ''; + print ''; print ''; $insert_sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn_facturefourn SET '; diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index b6097886529..4bfcc4611e6 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -594,9 +594,9 @@ else $var=true; while ($i < $num_prod) { - $var=!$var; + - print ""; + print ''; if ($object->lines[$i]->fk_product > 0) { $product = new Product($db); @@ -665,7 +665,7 @@ else $mode = ($object->statut == 0) ? 'edit' : 'view'; $line = new LivraisonLigne($db); $line->fetch_optionals($object->lines[$i]->id,$extralabelslines); - print ''; + print ''; print $line->showOptionals($extrafieldsline, $mode, array('style'=>$bc[$var], 'colspan'=>$colspan),$i); print ''; } diff --git a/htdocs/loan/calc.php b/htdocs/loan/calc.php index 76b4c989aa7..434d57b43c2 100644 --- a/htdocs/loan/calc.php +++ b/htdocs/loan/calc.php @@ -345,7 +345,7 @@ if ($form_complete && $show_progress) { $this_year_principal_paid = $this_year_principal_paid + $principal_paid; $var = !$var; - print ""; + print ''; print ''; print ''; print ''; diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index e063734cc51..cc407b9f054 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -652,8 +652,8 @@ if ($id > 0) while ($i < $num) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''; print '\n"; print "\n"; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 4a5faf4665f..5a9558222dc 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -226,8 +226,8 @@ if ($resql) { $objp = $db->fetch_object($resql); - $var=!$var; - print ''; + + print ''; // Ref print '
 
'; print ''; print '
'; print $obj->label; diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 98da9584308..32f08d5bda5 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -119,8 +119,8 @@ $liste=$model->liste_modeles($db); foreach($liste as $key) { - $var=!$var; - print '
'.img_picto_common($model->getDriverLabelForKey($key),$model->getPictoForKey($key)).''.$form->textwithpicto($model->getDriverLabelForKey($key),$text).'
fk_paiementfournfk_facturefourn'.$langs->trans('Amount').' 
'.$select_obj->rowid.''.$select_obj->fk_facture_fourn.''.$select_obj->amount.'
' . $current_month . '' . number_format($interest_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '' . number_format($principal_paid, "2", ".", ",") . ' ' . $langs->trans("Currency".$conf->currency) . '
'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."".$objp->paiement_type.' '.$objp->num_payment."
'; $loan->fetch($objp->id); @@ -250,7 +250,7 @@ if ($resql) $i++; } } - $var=!$var; + print "
\n"; $db->free($resql); diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 408fe3c646f..8c7a0af6cef 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -248,7 +248,7 @@ if ($action == 'create') $var=True; - print ""; + print ''; if ($loan->datestart > 0) { diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index 3a61ee0e72e..8f39f695952 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -133,11 +133,11 @@ $var=true; $form = new Form($db); // GLOBAL DISCOUNT MANAGEMENT -$var=!$var; + print ''; print ''; print ""; -print ''; +print ''; print ''.$langs->trans("MARGIN_TYPE").''; print ''; print ' '; print ''; // DISPLAY MARGIN RATES -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("DisplayMarginRates").''; print ''; if (! empty($conf->use_javascript_ajax)) @@ -189,8 +189,8 @@ print ''.$langs->trans('MarginRate').' = '.$langs->trans('Margin').' / '.$la print ''; // DISPLAY MARK RATES -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("DisplayMarkRates").''; print ''; if (! empty($conf->use_javascript_ajax)) @@ -212,8 +212,8 @@ print ''; print ''.$langs->trans('MarkRate').' = '.$langs->trans('Margin').' / '.$langs->trans('SellingPrice').''; print ''; -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("ForceBuyingPriceIfNull").''; print ''; if (! empty($conf->use_javascript_ajax)) @@ -242,11 +242,11 @@ $methods = array( 3 => $langs->trans('UseDiscountOnTotal') ); -$var=!$var; + print '
'; print ''; print ""; -print ''; +print ''; print ''.$langs->trans("MARGIN_METHODE_FOR_DISCOUNT").''; print ''; print Form::selectarray('MARGIN_METHODE_FOR_DISCOUNT', $methods, $conf->global->MARGIN_METHODE_FOR_DISCOUNT); @@ -259,11 +259,11 @@ print ''; print '
'; // INTERNAL CONTACT TYPE USED AS COMMERCIAL AGENT -$var=!$var; + print '
'; print ''; print ""; -print ''; +print ''; print ''.$langs->trans("AgentContactType").''; print ''; $formcompany = new FormCompany($db); diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index c7a0af0b605..846daad7806 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -220,9 +220,9 @@ if ($result) $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } - $var=!$var; + - print ""; + print ''; if ($agentid > 0) { $companystatic->id=$objp->socid; $companystatic->name=$objp->name; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index abfb89171dd..bcb3cc65699 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -260,9 +260,9 @@ if ($result) $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } - $var=!$var; + - print ""; + print ''; if ($client) { print ''; $invoicestatic->id=$objp->facid; @@ -295,7 +295,7 @@ if ($result) } // affichage totaux marges - $var=!$var; + $totalMargin = $cumul_vente - $cumul_achat; /*if ($totalMargin < 0) { diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index ff06d6ce69e..efcb35b802f 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -259,9 +259,9 @@ if ($result) $markRate = ($pv != 0)?(100 * $marge / $pv):'' ; } - $var=!$var; + - print ""; + print ''; if ($id > 0) { print ''; $invoicestatic->id=$objp->facid; @@ -307,7 +307,7 @@ if ($result) } // affichage totaux marges - $var=!$var; + $totalMargin = $cumul_vente - $cumul_achat; $marginRate = ($cumul_achat != 0)?(100 * $totalMargin / $cumul_achat):''; diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index bac8bebe52a..b1023839eca 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -196,12 +196,12 @@ if ($id > 0 || ! empty($ref)) $var=True; while ($i < $num /*&& $i < $conf->liste_limit*/) { $objp = $db->fetch_object($result); - $var=!$var; + $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; - print ''; + print ''; print ''; $invoicestatic->id=$objp->facid; $invoicestatic->ref=$objp->facnumber; @@ -229,7 +229,7 @@ if ($id > 0 || ! empty($ref)) } // affichage totaux marges - $var=!$var; + $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 99df684342d..45ce972bbc3 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -206,9 +206,9 @@ if ($socid > 0) $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; - $var=!$var; + - print ""; + print ''; print ''; $invoicestatic->id=$objp->facid; $invoicestatic->ref=$objp->facnumber; @@ -232,7 +232,7 @@ if ($socid > 0) } // affichage totaux marges - $var=!$var; + $totalMargin = $cumul_vente - $cumul_achat; if ($totalMargin < 0) { diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 8abcac5a6f1..6446e6c20c5 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -110,21 +110,21 @@ print ''.$langs->trans("AccountParameter").''; print ''.$langs->trans("Value").''; print "\n"; -$var=!$var; + print ''; print ''.$langs->trans("PAYBOX_PBX_SITE").''; print ''; print '
'.$langs->trans("Example").': 1999888 ('.$langs->trans("Test").')'; print ''; -$var=!$var; + print ''; print ''.$langs->trans("PAYBOX_PBX_RANG").''; print ''; print '
'.$langs->trans("Example").': 99 ('.$langs->trans("Test").')'; print ''; -$var=!$var; + print ''; print ''.$langs->trans("PAYBOX_PBX_IDENTIFIANT").''; print ''; @@ -138,7 +138,7 @@ print ''.$langs->trans("Value").''; print "\n"; /* -$var=!$var; + print ''; print $langs->trans("PAYBOX_IBS_DEVISE").''; print ''; @@ -147,7 +147,7 @@ print ''; */ /* -$var=!$var; + print ''; print $langs->trans("PAYBOX_CGI_URL_V1").''; print ''; @@ -155,42 +155,42 @@ print '
'.$langs->trans("Example").': http://mysite/cgi-bin/module_linux.cgi' print ''; */ -$var=!$var; + print ''; print ''.$langs->trans("PAYBOX_CGI_URL_V2").''; print ''; print '
'.$langs->trans("Example").': http://mysite/cgi-bin/modulev2_redhat72.cgi'; print ''; -$var=!$var; + print ''; print $langs->trans("VendorName").''; print ''; print '
'.$langs->trans("Example").': '.$mysoc->name; print ''; -$var=!$var; + print ''; print $langs->trans("CSSUrlForPaymentForm").''; print ''; print '
'.$langs->trans("Example").': http://mysite/mycss.css'; print ''; -$var=!$var; + print ''; print $langs->trans("MessageOK").''; $doleditor=new DolEditor('PAYBOX_MESSAGE_OK',$conf->global->PAYBOX_MESSAGE_OK,'',100,'dolibarr_details','In',false,true,true,ROWS_2,'90%'); $doleditor->Create(); print ''; -$var=!$var; + print ''; print $langs->trans("MessageKO").''; $doleditor=new DolEditor('PAYBOX_MESSAGE_KO',$conf->global->PAYBOX_MESSAGE_KO,'',100,'dolibarr_details','In',false,true,true,ROWS_2,'90%'); $doleditor->Create(); print ''; -$var=!$var; + print ''; print $langs->trans("PAYBOX_PAYONLINE_SENDEMAIL").''; print ''; diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index e63fb3e85c7..87ca506e653 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -128,33 +128,33 @@ print ''.$langs->trans("AccountParameter").''; print ''.$langs->trans("Value").''; print "\n"; -$var=!$var; + print ''; print $langs->trans("PAYPAL_API_SANDBOX").''; print $form->selectyesno("PAYPAL_API_SANDBOX",$conf->global->PAYPAL_API_SANDBOX,1); print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_API_USER").''; print ''; print '   '.$langs->trans("Example").': paypal_api1.mywebsite.com'; print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_API_PASSWORD").''; print ''; print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_API_SIGNATURE").''; print ''; print '
'.$langs->trans("Example").': ASsqXEmw4KzmX-CPChWSVDNCNfd.A3YNR7uz-VncXXAERFDFDFDF'; print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_SSLVERSION").''; print $form->selectarray("PAYPAL_SSLVERSION",array('1'=> $langs->trans('TLSv1'),'6'=> $langs->trans('TLSv1.2')),$conf->global->PAYPAL_SSLVERSION); @@ -167,54 +167,54 @@ print ''.$langs->trans("UsageParameter").''; print ''.$langs->trans("Value").''; print "\n"; -$var=!$var; + print ''; print $langs->trans("PAYPAL_API_INTEGRAL_OR_PAYPALONLY").''; print $form->selectarray("PAYPAL_API_INTEGRAL_OR_PAYPALONLY",array('integral'=> $langs->trans('PaypalModeIntegral'),'paypalonly'=> $langs->trans('PaypalModeOnlyPaypal')),$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY); print ''; -/*$var=!$var; +/* print ''; print ''.$langs->trans("PAYPAL_API_EXPRESS").''; print $form->selectyesno("PAYPAL_API_EXPRESS",$conf->global->PAYPAL_API_EXPRESS); print ''; */ -$var=!$var; + print ''; print $langs->trans("VendorName").''; print ''; print '   '.$langs->trans("Example").': '.$mysoc->name; print ''; -$var=!$var; + print ''; print $langs->trans("CSSUrlForPaymentForm").''; print ''; print '   '.$langs->trans("Example").': http://mysite/mycss.css'; print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_ADD_PAYMENT_URL").''; print $form->selectyesno("PAYPAL_ADD_PAYMENT_URL",$conf->global->PAYPAL_ADD_PAYMENT_URL,1); print ''; -$var=!$var; + print ''; print $langs->trans("MessageOK").''; $doleditor=new DolEditor('PAYPAL_MESSAGE_OK',$conf->global->PAYPAL_MESSAGE_OK,'',100,'dolibarr_details','In',false,true,true,ROWS_4,'90%'); $doleditor->Create(); print ''; -$var=!$var; + print ''; print $langs->trans("MessageKO").''; $doleditor=new DolEditor('PAYPAL_MESSAGE_KO',$conf->global->PAYPAL_MESSAGE_KO,'',100,'dolibarr_details','In',false,true,true,ROWS_4,'90%'); $doleditor->Create(); print ''; -$var=!$var; + print ''; print $langs->trans("PAYPAL_PAYONLINE_SENDEMAIL").''; print ''; @@ -227,7 +227,7 @@ print ''.$langs->trans("UrlGenerationParameters").''; print ''.$langs->trans("Value").''; print "\n"; -$var=!$var; + print ''; print $langs->trans("SecurityToken").''; print ''; @@ -235,7 +235,7 @@ if (! empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); print ''; -$var=!$var; + print ''; print $langs->trans("SecurityTokenIsUnique").''; print $form->selectyesno("PAYPAL_SECURITY_TOKEN_UNIQUE",(empty($conf->global->PAYPAL_SECURITY_TOKEN)?0:$conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE),1); diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index 8d9609459ed..23a958211b2 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -147,11 +147,11 @@ if ($mode == 'setup' && $user->admin) $submit_enabled=0; foreach ($printer->conf as $key) { - $var=!$var; + switch ($key['type']) { case "text": case "password": - print ''; + print ''; print ''.$langs->trans($key['varname']).''; print 'admin) print ''."\n"; break; case "info": // Google Api setup or Google OAuth Token - print ''; + print ''; print ''; if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { @@ -195,7 +195,7 @@ if ($mode == 'setup' && $user->admin) if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { // Token - print ''; + print ''; print ''.$langs->trans("Token").''; print ''; $tokenobj=null; @@ -265,8 +265,8 @@ if ($mode == 'config' && $user->admin) $langs->load($driver); $printer = new $classname($db); //print '
'.print_r($printer, true).'
'; - $var=!$var; - print ''; + + print ''; print ''.img_picto('', $printer->picto).' '.$langs->trans($printer->desc).''; print ''; if (! empty($conf->use_javascript_ajax)) @@ -348,8 +348,8 @@ if ($mode == 'userconf' && $user->admin) $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; $resql = $db->query($sql); while ($row=$db->fetch_array($resql)) { - $var=!$var; - print ''; + + print ''; print ''.$row['login'].''; print ''.$row['module'].''; print ''.$row['driver'].''; diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index 4345ea095ae..24f1d64e30c 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -166,7 +166,7 @@ if ($action != 'create_updater' && $action != 'edit_updater') { { foreach ($arrayglobalvars as $i=>$entry) { $var = !$var; - print ''; + print ''; print ''.$entry->code.''; print ''.$entry->description.''; print ''.price($entry->value).''; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index d0294dd3a70..ecdefb189b3 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -578,8 +578,8 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) $rowspan++; if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) $rowspan++; if (! empty($conf->global->MAIN_MULTILANGS)) $rowspan++; -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("PricingRule").''; print ''; $current_rule = 'PRODUCT_PRICE_UNIQ'; @@ -601,16 +601,16 @@ print ''; // multiprix nombre de prix a proposer if (! empty($conf->global->PRODUIT_MULTIPRICES)) { - $var=!$var; - print ''; + + print ''; print ''.$langs->trans("MultiPricesNumPrices").''; print ''; print ''; } // sousproduits activation/desactivation -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("AssociatedProductsAbility").''; print ''; print $form->selectyesno("activate_sousproduits",$conf->global->PRODUIT_SOUSPRODUITS,1); @@ -618,8 +618,8 @@ print ''; print ''; // Utilisation formulaire Ajax sur choix produit -$var=!$var; -print ''; + +print ''; print ''.$form->textwithpicto($langs->trans("UseSearchToSelectProduct"),$langs->trans('UseSearchToSelectProductTooltip'),1).''; if (empty($conf->use_javascript_ajax)) { @@ -643,16 +643,16 @@ print ''; if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) { - $var=!$var; - print ''; + + print ''; print ''.$langs->trans("NumberOfProductShowInSelect").''; print ''; print ''; } // Visualiser description produit dans les formulaires activation/desactivation -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("ViewProductDescInFormAbility").''; print ''; print $form->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1); @@ -661,8 +661,8 @@ print ''; // Activate propal merge produt card /* Kept as hidden feature only. PRODUIT_PDF_MERGE_PROPAL can be added manually. Still did not understand how this feature works. -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("MergePropalProductCard").''; print ''; print $form->selectyesno("activate_mergePropalProductCard",$conf->global->PRODUIT_PDF_MERGE_PROPAL,1); @@ -672,8 +672,8 @@ print ''; // Use units /* Kept as hidden feature only. PRODUCT_USE_UNITS is hidden for the moment. Because it seems to be a duplicated feature with already existing field to store unit of product -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("UseUnits").''; print ''; print $form->selectyesno("activate_units",$conf->global->PRODUCT_USE_UNITS,1); @@ -684,8 +684,8 @@ print ''; // View product description in thirdparty language if (! empty($conf->global->MAIN_MULTILANGS)) { - $var=!$var; - print ''; + + print ''; print ''.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").''; print ''; print $form->selectyesno("activate_viewProdTextsInThirdpartyLanguage", (! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)?$conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE:0), 1); @@ -726,7 +726,7 @@ if (! empty($conf->global->PRODUCT_CANVAS_ABILITY)) if ($conf->$module->enabled) { - $var=!$var; + print ""; print $object->description; diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index cc6f1b5116d..b6f469a893a 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -271,7 +271,7 @@ else print ''.$langs->trans("Value").''."\n"; print ''."\n"; - $var=!$var; + print ''."\n"; print ''.$langs->trans("OldVATRates").''."\n"; print ''."\n"; @@ -279,7 +279,7 @@ else print ''."\n"; print ''."\n"; - $var=!$var; + print ''."\n"; print ''.$langs->trans("NewVATRates").''."\n"; print ''."\n"; @@ -288,7 +288,7 @@ else print ''."\n"; /* - $var=!$var; + print ''."\n"; print ''.$langs->trans("PriceBaseTypeToChange").''."\n"; print ''."\n"; diff --git a/htdocs/product/canvas/product/tpl/list.tpl.php b/htdocs/product/canvas/product/tpl/list.tpl.php index e57fd5adfab..ad00d75259e 100644 --- a/htdocs/product/canvas/product/tpl/list.tpl.php +++ b/htdocs/product/canvas/product/tpl/list.tpl.php @@ -84,7 +84,7 @@ + ?> > $value) { diff --git a/htdocs/product/canvas/service/tpl/list.tpl.php b/htdocs/product/canvas/service/tpl/list.tpl.php index 4fc875e15bf..a7efe4f86ba 100644 --- a/htdocs/product/canvas/service/tpl/list.tpl.php +++ b/htdocs/product/canvas/service/tpl/list.tpl.php @@ -84,7 +84,7 @@ + ?> > $value) { diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 230a3dbee23..37068a1daca 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -571,7 +571,7 @@ if ($id > 0 || ! empty($ref)) continue; } } - $var=!$var; + print "\n"; $productstatic->id=$objp->rowid; $productstatic->ref=$objp->ref; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index afabf209897..75596bf9eca 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -621,9 +621,9 @@ if ($id > 0 || $ref) foreach($product_fourn_list as $productfourn) { - $var=!$var; + - print ""; + print ''; // Supplier print ''.$productfourn->getSocNomUrl(1,'supplier').''; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 73447e456e6..dc2628f4dc0 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -220,7 +220,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + print ''.$obj->label.''.$obj->nb.''; $total+=$obj->nb; $i++; @@ -292,8 +292,8 @@ if ($result) } } - $var=!$var; - print ""; + + print ''; print ''; $product_static->id=$objp->rowid; $product_static->ref=$objp->ref; @@ -427,7 +427,7 @@ function activitytrim($product_type) { if ($trim1+$trim2+$trim3+$trim4 > 0) { - $var=!$var; + print ''.$tmpyear.''; print ''.price($trim1).''; print ''.price($trim2).''; @@ -461,7 +461,7 @@ function activitytrim($product_type) } if ($trim1+$trim2+$trim3+$trim4 > 0) { - $var=!$var; + print ''.$tmpyear.''; print ''.price($trim1).''; print ''.price($trim2).''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 90adaa96856..0f42c6fb445 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -761,7 +761,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { $var = ! $var; - print ''; + print ''; // Label of price print ''; @@ -1243,7 +1243,7 @@ if ($action == 'edit_price' && $object->getRights()->creer) { $var = !$var; - print ''; + print ''; print ''; print $form->textwithpicto($langs->trans('SellingPrice') . ' ' . $i, $langs->trans("PrecisionUnitIsLimitedToXDecimals", $conf->global->MAIN_MAX_DECIMALS_UNIT), 1, 1); print ''; @@ -1724,7 +1724,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) foreach ($prodcustprice->lines as $line) { $var = ! $var; - print ""; + print ''; // Date $staticsoc = new Societe($db); $staticsoc->fetch($line->fk_soc); @@ -1805,7 +1805,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // Line for default price - print ""; + print ''; print "" . $langs->trans("Default") . ""; print "" . ""; @@ -1840,7 +1840,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $var = ! $var; - print ""; + print ''; // Date $staticsoc = new Societe($db); $staticsoc->fetch($line->fk_soc); diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 192017af2a5..341d002a1af 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -211,9 +211,9 @@ if ($id > 0 || ! empty($ref)) while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($result); - $var=!$var; + - print ''; + print ''; print ''; $orderstatic->id=$objp->commandeid; $orderstatic->ref=$objp->ref; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 8c5f1a3ba86..6a8183ca7de 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -177,9 +177,9 @@ if ($id > 0 || ! empty($ref)) while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print '
'.img_object($langs->trans("ShowContract"),"contract").' '; print $objp->rowid; print "\n"; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 53e5b0ab0a6..f0e5b0f13c4 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -234,9 +234,9 @@ if ($id > 0 || ! empty($ref)) while ($i < min($num,$conf->liste_limit)) { $objp = $db->fetch_object($result); - $var=!$var; + - print ''; + print ''; print ''; $invoicestatic->id=$objp->facid; $invoicestatic->ref=$objp->facnumber; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index eb853539e01..95f74352305 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -474,9 +474,9 @@ else } } - $var=!$var; + //print ''.dol_print_date($objp->datem).''; - print ""; + print ''; print ""; $productstatic->id=$objp->rowid; $productstatic->ref = $objp->ref; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index b2ecaf3afd1..a6e20aabcab 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -87,8 +87,8 @@ if ($result) while ($i < $num) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; print "rowid\">".img_object($langs->trans("ShowStock"),"stock")." ".$objp->label."\n"; print ''.$entrepot->LibStatut($objp->statut,5).''; print "\n"; @@ -149,8 +149,8 @@ if ($resql) while ($i < min($num,$max)) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''.dol_print_date($db->jdate($objp->datem),'dayhour').''; print "rowid\">"; print img_object($langs->trans("ShowProduct"),"product").' '.$objp->produit; diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index f31b7c9eb6e..f1c625308e7 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -197,7 +197,7 @@ if ($result) $warehouse->lieu = $objp->lieu; $warehouse->fk_parent = $objp->fk_parent; - print ""; + print ''; print '' . $warehouse->getNomUrl(1) . ''; // Location print ''.$objp->lieu.''; @@ -224,7 +224,7 @@ if ($result) print "\n"; - $var=!$var; + $i++; } diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index 03c0ebd78ba..2ab78ac735d 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -361,7 +361,7 @@ print getTitleFieldOfList('',0); print ''; -print ''; +print ''; // Product print ''; $filtertype=0; @@ -402,13 +402,13 @@ print ''; foreach($listofdata as $key => $val) { - $var=!$var; + $productstatic->fetch($val['id_product']); $warehousestatics->fetch($val['id_sw']); $warehousestatict->fetch($val['id_tw']); - print ''; + print ''; print ''; print $productstatic->getNomUrl(1).' - '.$productstatic->label; print ''; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 6c5040c1589..912ee7a7cc0 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -831,7 +831,7 @@ if ($resql) $entrepotstatic->libelle=$obj->label; $entrepotstatic->lieu=$obj->lieu; $stock_real = price2num($obj->reel, 'MS'); - print ''; + print ''; print ''.$entrepotstatic->getNomUrl(1).''; print ''.$stock_real.($stock_real < 0 ?' '.img_warning():'').''; // PMP @@ -897,7 +897,7 @@ if ($resql) } } $i++; - $var=!$var; + } } else dol_print_error($db); @@ -956,7 +956,7 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) print ''.$line['desiredstock'].''; print ''.img_delete().''; print ''; - $var=!$var; + } } diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index b6a51233fa2..b3c4737b1a5 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -452,7 +452,7 @@ if ($resql) $productlot->batch = $obj->batch; // You can use here results - print ''; + print ''; if (! empty($arrayfields['t.entity']['checked'])) { print ''.$obj->entity.''; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index ded0feec881..2de8bbb19b7 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -612,7 +612,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) $picto = img_picto($langs->trans("NoPendingReceptionOnSupplierOrder"), './img/no', '', 1); } - print ''; + print ''; // Select field //print ''; diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index be56636ee57..a523e2c66fc 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -102,7 +102,7 @@ if ($result) while ($i < min($num,$limit)) { $objp = $db->fetch_object($result); - print ""; + print ''; print ''.img_object($langs->trans("ShowWarehouse"),'stock').' '.$objp->ref.''; print ''.$objp->lieu.''; // PMP value @@ -120,7 +120,7 @@ if ($result) print "\n"; $total += price2num($objp->estimatedvalue,'MU'); $totalsell += price2num($objp->sellvalue,'MU'); - $var=!$var; + $i++; } diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 495337b4a7b..7bea4bf3213 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -148,8 +148,8 @@ if ( $resql ) while ($row = $db->fetch_object($resql)) { - $var=!$var; - print ""; + + print ''; print ''; $projectstatic->id=$row->rowid; $projectstatic->ref=$row->ref; @@ -205,8 +205,8 @@ if ( $resql ) while ($row = $db->fetch_object($resql)) { - $var=!$var; - print ""; + + print ''; print ''; $projectstatic->id=$row->rowid; $projectstatic->ref=$row->ref; @@ -265,8 +265,8 @@ if ($db->type != 'pgsql') while ($row = $db->fetch_object($resql)) { - $var=!$var; - print ""; + + print ''; print ''; $projectstatic->id=$row->rowid; $projectstatic->ref=$row->ref; @@ -322,7 +322,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) while ($row = $db->fetch_object($resql)) { - print ""; + print ''; print ''; $projectstatic->id=$row->rowid; $projectstatic->ref=$row->ref; @@ -331,7 +331,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_MONTH)) print ''; print ''.convertSecondToTime($row->nb, 'allhourmin').''; print "\n"; - $var=!$var; + } $db->free($resql); } @@ -373,7 +373,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR)) { while ($row = $db->fetch_object($resql)) { - print ""; + print ''; print ''; $projectstatic->id=$row->rowid; $projectstatic->ref=$row->ref; @@ -383,7 +383,7 @@ if (! empty($conf->global->PROJECT_TASK_TIME_YEAR)) print ''; print ''.convertSecondToTime($row->nb, 'allhourmin').''; print "\n"; - $var=!$var; + } $db->free($resql); } @@ -489,7 +489,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); - $var=!$var; + $username=''; if ($obj->userid && $userstatic->id != $obj->userid) // We have a user and it is not last loaded user @@ -499,7 +499,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && ! empty($conf->global->PROJECT_S } if ($userstatic->id) $username = $userstatic->getNomUrl(0,0); - print ""; + print ''; //print ''.$username.''; print ''; $projectstatic->id=$obj->projectid; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index fca5eeb22f6..5295e1a5516 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -337,8 +337,8 @@ print ''.$langs->trans("Value").''."\n"; print ' '."\n"; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("ManageOpportunitiesStatus").''; print ''; $arrval=array('0'=>$langs->trans("No"), @@ -350,8 +350,8 @@ print '"; print ''; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("ManageTasks").''; print ''; $arrval=array('0'=>$langs->trans("No"), @@ -414,7 +414,7 @@ foreach ($dirmodels as $reldir) if ($module->isEnabled()) { - $var=!$var; + print ''.$module->name."\n"; print $module->info(); print ''; @@ -518,7 +518,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) if ($module->isEnabled()) { - $var=!$var; + print ''.$module->name."\n"; print $module->info(); print ''; @@ -660,7 +660,7 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var=!$var; + print ''; print (empty($module->name)?$name:$module->name); print "\n"; @@ -911,8 +911,8 @@ print ''.$langs->trans("Value").''."\n"; print ' '."\n"; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("UseSearchToSelectProject").''; if (! $conf->use_javascript_ajax) { @@ -935,8 +935,8 @@ else } print ''; -$var=!$var; -print ''; + +print ''; print ''.$langs->trans("AllowToSelectProjectFromOtherCompany").''; print ''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index a2725e744f8..09a3fecc4bd 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -640,7 +640,7 @@ foreach ($listofreferent as $key => $value) } $var = ! $var; - print ''; + print ''; // Module print ''.$langs->trans($newclassname).''; // Nb diff --git a/htdocs/projet/graph_opportunities.inc.php b/htdocs/projet/graph_opportunities.inc.php index 668e96d2958..10bec155ded 100644 --- a/htdocs/projet/graph_opportunities.inc.php +++ b/htdocs/projet/graph_opportunities.inc.php @@ -67,8 +67,8 @@ if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) $dataseries[]=array('label'=>$labelstatus,'data'=>(isset($valsamount[$status])?(float) $valsamount[$status]:0)); if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$labelstatus.''; print ''.price((isset($valsamount[$status])?(float) $valsamount[$status]:0), 0, '', 1, -1, -1, $conf->currency).''; print "\n"; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 8292e4d31a8..8295e106be9 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -185,8 +185,8 @@ if ( $resql ) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; print ''; if ($obj->socid) { diff --git a/htdocs/projet/stats/index.php b/htdocs/projet/stats/index.php index e9aad0d0b7e..67504974759 100644 --- a/htdocs/projet/stats/index.php +++ b/htdocs/projet/stats/index.php @@ -322,7 +322,7 @@ foreach ($data_all_year as $val) while ($year && $oldyear > $year+1) { // If we have empty year $oldyear--; - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$oldyear.''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) @@ -334,7 +334,7 @@ foreach ($data_all_year as $val) print '0'; print ''; } - $var=!$var; + print ''; print '0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 02b31ea83ff..e2f94406558 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -361,7 +361,7 @@ if ($id > 0 || ! empty($ref)) if ($withproject) print ''; // Ligne ajout pour contact interne - print ""; + print ''; print ''; print img_object('','user').' '.$langs->trans("Users"); @@ -395,8 +395,8 @@ if ($id > 0 || ! empty($ref)) print ''; if ($withproject) print ''; - $var=!$var; - print ""; + + print ''; print ''; print img_object('','contact').' '.$langs->trans("ThirdPartyContacts"); diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 73aba634c4d..b090680b6bc 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -823,7 +823,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0) $totalarray=array(); foreach ($tasks as $task_time) { - $var=!$var; + print ''; $date1=$db->jdate($task_time->task_date); diff --git a/htdocs/public/donations/donateurs_code.php b/htdocs/public/donations/donateurs_code.php index ca50b39d061..3780481e23c 100644 --- a/htdocs/public/donations/donateurs_code.php +++ b/htdocs/public/donations/donateurs_code.php @@ -80,8 +80,8 @@ if ($resql) { $objp = $db->fetch_object($resql); - $var=!$var; - print ""; + + print ''; if ($objp->public) { print "".dolGetFirstLastname($objp->firstname, $objp->lastname)." ".$objp->societe."\n"; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 404b7085bdb..ed1c8139e2f 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -143,8 +143,8 @@ if ($result) while ($i < $num && $i < $conf->liste_limit) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; print ''.dolGetFirstLastname($objp->firstname, $objp->lastname).''."\n"; print ''.$objp->societe.''."\n"; print ''.$objp->email.''."\n"; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 5f83855529d..b4b978009b7 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -247,14 +247,14 @@ if (! GETPOST("source") && $valid) $fulltag=$tag; // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -275,7 +275,7 @@ if (! GETPOST("source") && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -283,7 +283,7 @@ if (! GETPOST("source") && $valid) print ''."\n"; // EMail - $var=!$var; + print ''.$langs->trans("YourEMail"); print ' ('.$langs->trans("ToComplete").')'; print ''."\n"; @@ -320,19 +320,19 @@ if (GETPOST("source") == 'order' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$order->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentOrderRef",$order->ref).''; print ''.$langs->trans("Designation"); print ''.$text; @@ -341,7 +341,7 @@ if (GETPOST("source") == 'order' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -361,7 +361,7 @@ if (GETPOST("source") == 'order' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -369,7 +369,7 @@ if (GETPOST("source") == 'order' && $valid) print ''."\n"; // EMail - $var=!$var; + print ''.$langs->trans("YourEMail"); print ' ('.$langs->trans("ToComplete").')'; $email=$order->thirdparty->email; @@ -408,19 +408,19 @@ if (GETPOST("source") == 'invoice' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$invoice->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentInvoiceRef",$invoice->ref).''; print ''.$langs->trans("Designation"); print ''.$text; @@ -429,7 +429,7 @@ if (GETPOST("source") == 'invoice' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -449,7 +449,7 @@ if (GETPOST("source") == 'invoice' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -457,7 +457,7 @@ if (GETPOST("source") == 'invoice' && $valid) print ''."\n"; // EMail - $var=!$var; + print ''.$langs->trans("YourEMail"); print ' ('.$langs->trans("ToComplete").')'; $email=$invoice->thirdparty->email; @@ -542,19 +542,19 @@ if (GETPOST("source") == 'contractline' && $valid) if (GETPOST('qty')) $qty=GETPOST('qty'); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$contract->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).''; if ($contractline->fk_product) { @@ -577,7 +577,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Quantity - $var=!$var; + $label=$langs->trans("Quantity"); $qty=1; $duration=''; @@ -605,7 +605,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -625,7 +625,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -633,7 +633,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // EMail - $var=!$var; + print ''.$langs->trans("YourEMail"); print ' ('.$langs->trans("ToComplete").')'; $email=$contract->thirdparty->email; @@ -673,14 +673,14 @@ if (GETPOST("source") == 'membersubscription' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("Member"); print ''; if ($member->morphy == 'mor' && ! empty($member->societe)) print $member->societe; @@ -688,7 +688,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentSubscription").''; print ''.$langs->trans("Designation"); print ''.$text; @@ -699,13 +699,13 @@ if (GETPOST("source") == 'membersubscription' && $valid) if ($member->last_subscription_date || $member->last_subscription_amount) { // Last subscription date - $var=!$var; + print ''.$langs->trans("LastSubscriptionDate"); print ''.dol_print_date($member->last_subscription_date,'day'); print ''."\n"; // Last subscription amount - $var=!$var; + print ''.$langs->trans("LastSubscriptionAmount"); print ''.price($member->last_subscription_amount); print ''."\n"; @@ -714,7 +714,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) } // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -738,7 +738,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -746,7 +746,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''."\n"; // EMail - $var=!$var; + print ''.$langs->trans("YourEMail"); $email=$member->email; $email=(GETPOST("email")?GETPOST("email"):(isValidEmail($email)?$email:'')); diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index 8313c39bb95..4acce4ac803 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -350,14 +350,14 @@ if (! GETPOST("source") && $valid) $fulltag=$tag; // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -377,7 +377,7 @@ if (! GETPOST("source") && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -419,19 +419,19 @@ if (GETPOST("source") == 'order' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$order->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentOrderRef",$order->ref).''; print ''.$langs->trans("Designation"); print ''.$text; @@ -440,7 +440,7 @@ if (GETPOST("source") == 'order' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -460,7 +460,7 @@ if (GETPOST("source") == 'order' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -526,19 +526,19 @@ if (GETPOST("source") == 'invoice' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$invoice->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentInvoiceRef",$invoice->ref).''; print ''.$langs->trans("Designation"); print ''.$text; @@ -547,7 +547,7 @@ if (GETPOST("source") == 'invoice' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -567,7 +567,7 @@ if (GETPOST("source") == 'invoice' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -679,19 +679,19 @@ if (GETPOST("source") == 'contractline' && $valid) if (GETPOST('qty')) $qty=GETPOST('qty'); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("ThirdParty"); print ''.$contract->thirdparty->name.''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentRenewContractId",$contract->ref,$contractline->ref).''; if ($contractline->fk_product) { @@ -714,7 +714,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Quantity - $var=!$var; + $label=$langs->trans("Quantity"); $qty=1; $duration=''; @@ -742,7 +742,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) print ' ('.$langs->trans("ToComplete").')'; print ''; @@ -762,7 +762,7 @@ if (GETPOST("source") == 'contractline' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; @@ -827,14 +827,14 @@ if (GETPOST("source") == 'membersubscription' && $valid) $fulltag=dol_string_unaccent($fulltag); // Creditor - $var=!$var; + print ''.$langs->trans("Creditor"); print ''.$creditor.''; print ''; print ''."\n"; // Debitor - $var=!$var; + print ''.$langs->trans("Member"); print ''; if ($member->morphy == 'mor' && ! empty($member->societe)) print $member->societe; @@ -842,7 +842,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''; // Object - $var=!$var; + $text=''.$langs->trans("PaymentSubscription").''; print ''.$langs->trans("Designation"); print ''.$text; @@ -853,13 +853,13 @@ if (GETPOST("source") == 'membersubscription' && $valid) if ($member->last_subscription_date || $member->last_subscription_amount) { // Last subscription date - $var=!$var; + print ''.$langs->trans("LastSubscriptionDate"); print ''.dol_print_date($member->last_subscription_date,'day'); print ''."\n"; // Last subscription amount - $var=!$var; + print ''.$langs->trans("LastSubscriptionAmount"); print ''.price($member->last_subscription_amount); print ''."\n"; @@ -868,7 +868,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) } // Amount - $var=!$var; + print ''.$langs->trans("Amount"); if (empty($amount)) { @@ -897,7 +897,7 @@ if (GETPOST("source") == 'membersubscription' && $valid) print ''."\n"; // Tag - $var=!$var; + print ''.$langs->trans("PaymentCode"); print ''.$fulltag.''; print ''; diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index e1047d22981..559dbce4b06 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -260,7 +260,7 @@ if ($ret) { foreach ($object->lines as $resource) { - $var=!$var; + $style=''; if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"'; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 8e7fe40859b..b949d5a27ba 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -431,7 +431,7 @@ foreach ($dirsociete as $dirroot) $modCodeCompta = new $file; $var = !$var; - print ''; + print ''; print ''.$modCodeCompta->name."\n"; print $modCodeCompta->info($langs); print ''; @@ -646,7 +646,7 @@ while ($i < $nbofloop) { $var = !$var; - print ''; + print ''; print ''.$profid[$i][0]."\n"; print $profid[$i][1]; print ''; @@ -722,8 +722,8 @@ print ''.$langs->trans("Value").''."\n"; print ' '."\n"; // Utilisation formulaire Ajax sur choix societe -$var=!$var; -print ""; + +print ''; print ''.$form->textwithpicto($langs->trans("DelaiedFullListToSelectCompany"),$langs->trans('UseSearchToSelectCompanyTooltip'),1).' '; if (! $conf->use_javascript_ajax) { @@ -746,8 +746,8 @@ else } print ''; -$var=!$var; -print ""; + +print ''; print ''.$form->textwithpicto($langs->trans("DelaiedFullListToSelectContact"),$langs->trans('UseSearchToSelectContactTooltip'),1).''; if (! $conf->use_javascript_ajax) { @@ -771,8 +771,8 @@ else print ''; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("AddRefInList").''; print ' '; print ''; @@ -791,8 +791,8 @@ print ''; print ''; -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("AskForPreferredShippingMethod").''; print ' '; print ''; @@ -813,8 +813,8 @@ print ''; /* // COMPANY_USE_SEARCH_TO_SELECT -$var=!$var; -print ""; + +print ''; print ''.$langs->trans("HideClosedThirdpartyComboBox").''; if (! empty($conf->global->COMPANY_HIDE_INACTIVE_IN_COMBOBOX)) { diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 2126c81ddfe..89bb836d119 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -267,7 +267,7 @@ if (! empty($socid)) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + print ""; $tmpuser->id=$obj->rowid; $tmpuser->firstname=$obj->firstname; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 0bff649d7d3..d0f92bb9c14 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -407,8 +407,8 @@ if ($sql_select) if (is_object($documentstaticline)) $documentstaticline->statut=$objp->status; - $var=!$var; - print ""; + + print ''; print ''; print $documentstatic->getNomUrl(1); print ''; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 5fa0fd37210..0f1450c491a 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -219,7 +219,7 @@ if (! empty($conf->categorie->enabled) && ! empty($conf->global->CATEGORY_GRAPHS while ($i < $num) { $obj = $db->fetch_object($result); - $var=!$var; + print ''.$obj->label.''.$obj->nb.''; $total+=$obj->nb; $i++; @@ -281,8 +281,8 @@ if ($result) { $objp = $db->fetch_object($result); - $var=!$var; - print ""; + + print ''; // Name print ''; $thirdparty_static->id=$objp->rowid; diff --git a/htdocs/societe/notify/index.php b/htdocs/societe/notify/index.php index a1042087faf..02125e8fad8 100644 --- a/htdocs/societe/notify/index.php +++ b/htdocs/societe/notify/index.php @@ -90,9 +90,9 @@ if ($result) { $obj = $db->fetch_object($result); - $var=!$var; + - print ""; + print ''; print "socid."\">".$obj->name."\n"; print "".dolGetFirstLastname($obj->firstname, $obj->lastname)."\n"; print "".$obj->titre."\n"; diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 42860abb98a..185589f01cb 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -460,7 +460,7 @@ if ($socid && $action != 'edit' && $action != "create") foreach ($rib_list as $rib) { - print ""; + print ''; // Label print ''.$rib->label.''; // Bank name diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 876c383031a..2bda75867dc 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -259,8 +259,8 @@ if ($id > 0 || ! empty($ref)) $companyname=$objp->company; - $var=!$var; - print ""; + + print ''; // Ref print ""; diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index ceb86d102bd..8d6d437f466 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -90,8 +90,8 @@ print "\n"; $var=True; foreach($extrafields->attribute_type as $key => $value) { - $var=!$var; - print ""; + + print ''; print "".$extrafields->attribute_pos[$key]."\n"; print "".$extrafields->attribute_label[$key]."\n"; print "".$key."\n"; diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index 12e5d2c23e6..2b0a22c51fa 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -94,8 +94,8 @@ print "\n"; $var=True; foreach($extrafields->attribute_type as $key => $value) { - $var=!$var; - print ""; + + print ''; print "".$extrafields->attribute_label[$key]."\n"; print "".$key."\n"; print "".$type2label[$extrafields->attribute_type[$key]]."\n"; diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php index f6ca9aaee45..09c7e230739 100644 --- a/htdocs/supplier_proposal/index.php +++ b/htdocs/supplier_proposal/index.php @@ -125,8 +125,8 @@ if ($resql) $dataseries[]=array('label'=>$supplier_proposalstatic->LibStatut($status,1),'data'=>(isset($vals[$status])?(int) $vals[$status]:0)); if (! $conf->use_javascript_ajax) { - $var=!$var; - print ""; + + print ''; print ''.$supplier_proposalstatic->LibStatut($status,0).''; print ''.(isset($vals[$status])?$vals[$status]:0).''; print "\n"; @@ -178,9 +178,9 @@ if (! empty($conf->supplier_proposal->enabled)) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; $supplier_proposalstatic->id=$obj->rowid; $supplier_proposalstatic->ref=$obj->ref; @@ -236,10 +236,10 @@ if ($resql) $var = True; while ($i < $num) { - $var=!$var; + $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $supplier_proposalstatic->id=$obj->rowid; @@ -317,8 +317,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos while ($i < $nbofloop) { $obj = $db->fetch_object($result); - $var=!$var; - print ''; + + print ''; // Ref print ''; diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 10ac76b48dd..c0e9611e6b6 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -579,12 +579,12 @@ if ($result) while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); - $var=!$var; + $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; - print ''; + print ''; print ''; print ''; @@ -671,14 +671,14 @@ if ($result) if ($total>0) { if($num<$limit){ - $var=!$var; + print ''; print ''; print ''; } else { - $var=!$var; + print ''; print ''; print ''; diff --git a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php index 8ba1f958918..d313eca10bd 100644 --- a/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php @@ -33,7 +33,7 @@ $var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $var=!$var; + $trclass=($var?'pair':'impair'); if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 62efff2f88f..0942bbf7ed8 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -185,8 +185,8 @@ while ($i <= $MAXAGENDA) $offsettz='AGENDA_EXT_OFFSETTZ_'.$id.'_'.$key; $color='AGENDA_EXT_COLOR_'.$id.'_'.$key; - $var=!$var; - print ""; + + print ''; // Nb print '"; // Name diff --git a/htdocs/user/card.php b/htdocs/user/card.php index e213578b860..c245f162de9 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1716,9 +1716,9 @@ else foreach($groupslist as $group) { - $var=!$var; + - print ""; + print ''; print '"; + print ''; print '"; + print ''; print '"; + print ''; print '"; + print ''; print ''; // Landing page - $var=!$var; + print ''; print ''; // Langue par defaut - $var=!$var; + print ''; print ''; // Taille max des listes - $var=!$var; + print ''; print ''; print ''; // Landing page - $var=!$var; + print ''; print ''; // Language - $var=!$var; + print ''; print ''; - $var=!$var; + print ''; print ''; print ''; diff --git a/scripts/bank/export-bank-receipts.php b/scripts/bank/export-bank-receipts.php index 2116d51e65b..ad70190b689 100755 --- a/scripts/bank/export-bank-receipts.php +++ b/scripts/bank/export-bank-receipts.php @@ -262,7 +262,7 @@ if ($resql) $totalbefore = $total; $total = $total + $objp->amount; - $var=!$var; + // Date operation $dateop=$db->jdate($objp->do); From 4e021c123b759f79e8939e14e2f4d42d964b02f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Apr 2017 11:28:19 +0200 Subject: [PATCH 38/64] Fix travis error --- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/main.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c982e3d4bb2..56d3b5e29fb 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -869,7 +869,7 @@ class FormFile else $this->infofiles['extensions'][$ext]++; // Preview - if (! empty($conf->use_javascript_ajax) && ! empty($conf->browser->layout != 'phone')) + if (! empty($conf->use_javascript_ajax) && ($conf->browser->layout != 'phone')) { $tmparray = getAdvancedPreviewUrl($modulepart, $relativepath, 1); if ($tmparray && $tmparray['url']) $tmpout.= '
  • '.img_picto('','detail').' '.$langs->trans("Preview").' '.$ext.'
  • '; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8fe2125251c..5e015cd9f62 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1899,7 +1899,7 @@ if (! function_exists("llxFooter")) if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent; - // TODO Move this in lib_head.js + // TODO Move this in lib_head.js.php // Wrapper to show tooltips (html or onclick popup) if (! empty($conf->use_javascript_ajax) && empty($conf->dol_no_mouse_hover)) @@ -1922,7 +1922,7 @@ if (! function_exists("llxFooter")) } // Wrapper to manage document_preview - if (! empty($conf->use_javascript_ajax) && ! empty($conf->browser->layout != 'phone')) + if (! empty($conf->use_javascript_ajax) && ($conf->browser->layout != 'phone')) { print "\n\n"; print '
    '.$langs->trans("TotalHT").''.price($total).'
    '.$langs->trans("TotalHTforthispage").''.price($total).'
    '.$langs->trans("AgendaExtNb",$key)."
    '; if ($caneditgroup) { diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 192d681ca81..eacb954e007 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -454,9 +454,9 @@ else foreach($object->members as $useringroup) { - $var=!$var; + - print "
    '; print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar'); diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 94c12147f1a..539c1f2be23 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -171,9 +171,9 @@ if ($resql) while ($i < $num) { $obj = $db->fetch_object($resql); - $var=!$var; + - print "
    '.img_object($langs->trans("ShowGroup"),"group").' '.$obj->name.''; if (! $obj->entity) { diff --git a/htdocs/user/home.php b/htdocs/user/home.php index 29ef7dac061..66a4448491e 100644 --- a/htdocs/user/home.php +++ b/htdocs/user/home.php @@ -124,9 +124,9 @@ if ($resql) while ($i < $num && $i < $max) { $obj = $db->fetch_object($resql); - $var=!$var; + - print "
    '; $fuserstatic->id = $obj->rowid; $fuserstatic->statut = $obj->statut; @@ -237,9 +237,9 @@ if ($canreadperms) while ($i < $num && (! $max || $i < $max)) { $obj = $db->fetch_object($resql); - $var=!$var; + - print "
    '.img_object($langs->trans("ShowGroup"),"group").' '.$obj->name.''; if (! $obj->entity) { diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index f0ca0f17c31..0441ede1563 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -239,7 +239,7 @@ if ($action == 'edit') print '
    '.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
    '.$langs->trans("LandingPage").''; print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE); @@ -253,7 +253,7 @@ if ($action == 'edit') print '
    '.$langs->trans("Language").''; $s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT); @@ -268,7 +268,7 @@ if ($action == 'edit') print '
    '.$langs->trans("MaxSizeList").''.$conf->global->MAIN_SIZE_LISTE_LIMIT.'conf->MAIN_SIZE_LISTE_LIMIT)?" checked":""); @@ -305,7 +305,7 @@ else print '
    '.$langs->trans("Parameter").''.$langs->trans("DefaultValue").' '.$langs->trans("PersonalValue").'
    '.$langs->trans("LandingPage").''; print (empty($conf->global->MAIN_LANDING_PAGE)?'':$conf->global->MAIN_LANDING_PAGE); @@ -323,7 +323,7 @@ else print '
    '.$langs->trans("Language").''; $s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT); @@ -337,7 +337,7 @@ else print (isset($object->conf->MAIN_LANG_DEFAULT) && $object->conf->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):(! empty($object->conf->MAIN_LANG_DEFAULT)?$langs->trans("Language_".$object->conf->MAIN_LANG_DEFAULT):'')); print '
    '.$langs->trans("MaxSizeList").''.(! empty($conf->global->MAIN_SIZE_LISTE_LIMIT)?$conf->global->MAIN_SIZE_LISTE_LIMIT:' ').'conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"").'> '.$langs->trans("UsePersonalValue").'