Merge remote-tracking branch 'upstream/develop' into actioncomm_category

This commit is contained in:
Frédéric FRANCE 2019-12-13 14:36:00 +01:00
commit 57055bad03
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
208 changed files with 1896 additions and 1059 deletions

View File

@ -145,6 +145,7 @@ NEW: #4301
For Developers or integrators: For Developers or integrators:
NEW: Add a manifest.json.php file for web app. NEW: Add a manifest.json.php file for web app.
NEW: Support of deployement of metapackages
NEW: Removed deprecated code that create linked object from ->origin NEW: Removed deprecated code that create linked object from ->origin
NEW: experimental zapier for dolibarr NEW: experimental zapier for dolibarr
NEW: Accountancy - Add hook bookkeepinglist on general ledger NEW: Accountancy - Add hook bookkeepinglist on general ledger

View File

@ -1,18 +1,14 @@
# DOLIBARR ERP & CRM # DOLIBARR ERP & CRM
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans). Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...). Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x480.png)
## LICENCE ## LICENCE
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure. Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
## INSTALLER DOLIBARR ## INSTALLER DOLIBARR
### Configuration simple ### Configuration simple
@ -23,7 +19,7 @@ Si vous avez peu de compétences techniques et que vous souhaitez installer Doli
- DoliDeb pour Debian ou Ubuntu - DoliDeb pour Debian ou Ubuntu
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia - DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
Les packages peuvent être téléchargés à partir de [site web officiel] (https://www.dolibarr.org/). Les packages peuvent être téléchargés à partir de [site web officiel](https://www.dolibarr.org/).
### Configuration avancée ### Configuration avancée
@ -31,50 +27,47 @@ Vous pouvez aussi utiliser un serveur Web et une base de données prise en charg
- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git): - Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
  git clone https://github.com/dolibarr/dolibarr -b x.y (où x.y est la version principale comme 3.6, 9.0, ...)   `git clone https://github.com/dolibarr/dolibarr -b x.y` (où x.y est la version principale comme 3.6, 9.0, ...)
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer. - Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
 
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée) - Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
- Depuis votre navigateur, allez à la page "install/" de dolibarr - Depuis votre navigateur, allez à la page "install/" de dolibarr
    L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à: L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
`http://localhost/dolibarr/htdocs/install/`
ou
`http://localhost/dolibarr/install/`
ou
`http://yourdolibarrvirtualhost/install/`
        http://localhost/dolibarr/htdocs/install/
        
    ou
    
        http://localhost/dolibarr/install/
        
    ou
    
    http://yourdolibarrvirtualhost/install/
   
- Suivez les instructions de l'installateur - Suivez les instructions de l'installateur
## METTRE A JOUR DOLIBARR ## METTRE A JOUR DOLIBARR
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci: Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers - Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
fournis dans ce nouveau package. fournis dans ce nouveau package.
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire). - Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents") Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
*Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/* *Note: Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
## CE QUI EST NOUVEAU ## CE QUI EST NOUVEAU
Voir fichier ChangeLog. Voir fichier ChangeLog.
## CE QUE DOLIBARR PEUT FAIRE ## CE QUE DOLIBARR PEUT FAIRE
### Modules principaux (tous optionnels): ### Modules principaux (tous optionnels)
- Annuaires des prospects et/ou client et/ou fournisseurs - Annuaires des prospects et/ou client et/ou fournisseurs
- Gestion de catalogue de produits et services - Gestion de catalogue de produits et services
@ -83,7 +76,7 @@ Voir fichier ChangeLog.
- Gestion des factures clients/fournisseurs et paiements - Gestion des factures clients/fournisseurs et paiements
- Gestion des virements bancaires SEPA - Gestion des virements bancaires SEPA
- Gestion des comptes bancaires - Gestion des comptes bancaires
- Calendrier/Agenda partagé (avec export ical, vcal) - Calendrier/Agenda partagé (avec export ical, vcal)
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...) - Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
- Gestion de contrats de services - Gestion de contrats de services
- Gestion de stock - Gestion de stock
@ -96,7 +89,7 @@ Voir fichier ChangeLog.
- Point de vente/Caisse enregistreuse - Point de vente/Caisse enregistreuse
- … - …
### Autres modules: ### Autres modules
- Gestion de marque-pages - Gestion de marque-pages
- Gestion des promesses de dons - Gestion des promesses de dons
@ -111,7 +104,7 @@ Voir fichier ChangeLog.
- Intégration de système de paiements (Paypal, Stripe, Paybox...) - Intégration de système de paiements (Paypal, Stripe, Paybox...)
- … - …
### Divers: ### Divers
- Multi-langue. - Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module. - Multi-utilisateurs avec différents niveaux de permissions par module.
@ -119,66 +112,60 @@ Voir fichier ChangeLog.
- Peux être multi-société par ajout du module externe multi-société. - Peux être multi-société par ajout du module externe multi-société.
- Plusieurs thèmes visuels. - Plusieurs thèmes visuels.
- Application simple à utiliser. - Application simple à utiliser.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis). - Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP. - Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
- APIs. - APIs.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers). - Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- Support natif de nombreuses fonctions spécifiques aux pays comme: - Support natif de nombreuses fonctions spécifiques aux pays comme:
- La tax espagnole TE et ISPF - La tax espagnole TE et ISPF
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM) - Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
- La loi française Finance 2016 et logiciels de caisse - La loi française Finance 2016 et logiciels de caisse
- La double taxe canadienne - La double taxe canadienne
- Le timbre fiscal tunisien - Le timbre fiscal tunisien
- Numérotation de facture de l'argentines (avec type A,B,C...) - Numérotation de facture de l'argentines (avec type A,B,C...)
- Compatible avec vos processus RGPD - Compatible avec vos processus RGPD
- ... - ...
- … - …
### Extension ### Extension
Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com). Dolibarr peut aussi être étendu à volonté avec l'ajout de module/applications externes développées par des développeus tiers, disponible sur [DoliStore](https://www.dolistore.com).
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE ## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
Voici un liste de fonctionnalités pas encore gérées par Dolibarr: Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
- Dolibarr ne contient pas de module de Gestion de la paie. - Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr n'embarque pas de Webmail intégré nativement. - Dolibarr n'embarque pas de Webmail intégré nativement.
- Dolibarr ne fait pas le café (pas encore). - Dolibarr ne fait pas le café (pas encore).
## DOCUMENTATION ## DOCUMENTATION
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org). La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
## CONTRIBUER ## CONTRIBUER
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a> <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
## CREDITS ## CREDITS
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs. Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
## ACTUALITES ET RESEAUX SOCIAUX ## ACTUALITES ET RESEAUX SOCIAUX
Suivez le projet Dolibarr project sur les réseaux francophones Suivez le projet Dolibarr project sur les réseaux francophones
- Facebook: <https://www.facebook.com/dolibarr.fr> - [Facebook](https://www.facebook.com/dolibarr.fr)
- Google+: <https://plus.google.com/+DolibarrFrance> - [Twitter](https://www.twitter.com/dolibarr_france)
- Twitter: <https://www.twitter.com/dolibarr_france>
ou sur les réseaux anglophones ou sur les réseaux anglophones
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](https://www.twitter.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)

View File

@ -16,7 +16,6 @@ You can use it as a standalone application or as a web application to be able to
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_640x400.png)
## LICENSE ## LICENSE
Dolibarr is released 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 (GPL-3+). Dolibarr is released 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 (GPL-3+).
@ -25,7 +24,6 @@ See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) fil
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list. Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
## INSTALLING ## INSTALLING
### Simple setup ### Simple setup
@ -42,51 +40,47 @@ Releases can be downloaded from [official website](https://www.dolibarr.org/).
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git): - Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
git clone https://github.com/dolibarr/dolibarr -b x.y (where x.y is main version like 3.6, 9.0, ...) `git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished) - Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
- From your browser, go to the dolibarr "install/" page - From your browser, go to the dolibarr "install/" page
The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like: The URL will depends on how you web setup was setup to point to your dolibarr installation. It may looks like:
`http://localhost/dolibarr/htdocs/install/`
or
`http://localhost/dolibarr/install/`
or
`http://yourdolibarrvirtualhost/install/`
http://localhost/dolibarr/htdocs/install/
or
http://localhost/dolibarr/install/
or
http://yourdolibarrvirtualhost/install/
- Follow the installer instructions - Follow the installer instructions
### Saas/Cloud setup ### Saas/Cloud setup
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free. If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See https://saas.dolibarr.org). However, this third solution is not free.
## UPGRADING ## UPGRADING
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr - At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. - At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page* *Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
## WHAT'S NEW ## WHAT'S NEW
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file. See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
## FEATURES ## FEATURES
### Main application/modules (all optional) ### Main application/modules (all optional)
@ -113,7 +107,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Foundations members management - Foundations members management
- Mass emailing - Mass emailing
- Surveys - Surveys
- Point of Sale (POS) - Point of Sale (POS)
- … - …
### Other application/modules ### Other application/modules
@ -144,14 +138,14 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- APIs - APIs
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) - An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country specific features: - Support a lot of country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT - Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp - Tunisian tax stamp
- Argentina invoice numbering using A,B,C... - Argentina invoice numbering using A,B,C...
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with European GDPR rules - Compatible with European GDPR rules
- ... - ...
- PDF or ODT generation for invoice, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- … - …
@ -160,12 +154,10 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite)) - Works with PHP 5.5+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. - Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
### Extending ### Extending
Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com). Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## WHAT DOLIBARR CAN'T DO YET ## WHAT DOLIBARR CAN'T DO YET
These are features that Dolibarr does **not** yet fully support: These are features that Dolibarr does **not** yet fully support:
@ -175,37 +167,31 @@ These are features that Dolibarr does **not** yet fully support:
- No native embedded Webmail - No native embedded Webmail
- Dolibarr can't do coffee (yet) - Dolibarr can't do coffee (yet)
## DOCUMENTATION ## DOCUMENTATION
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org). Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING ## CONTRIBUTING
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]. This project exists thanks to all the people who contribute. [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
<a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a> <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" /></a>
## CREDITS ## CREDITS
Dolibarr is the work of many contributors over the years and uses some fine libraries. Dolibarr is the work of many contributors over the years and uses some fine libraries.
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
## NEWS AND SOCIAL NETWORKS ## NEWS AND SOCIAL NETWORKS
Follow Dolibarr project on: Follow Dolibarr project on:
- [Facebook](https://www.facebook.com/dolibarr) - [Facebook](https://www.facebook.com/dolibarr)
- [Google+](https://plus.google.com/+DolibarrOrg)
- [Twitter](https://www.twitter.com/dolibarr) - [Twitter](https://www.twitter.com/dolibarr)
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr) - [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM) - [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
- [GitHub](https://github.com/Dolibarr/dolibarr) - [GitHub](https://github.com/Dolibarr/dolibarr)
### Sponsors ### Sponsors
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)] Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]

View File

@ -1,31 +1,37 @@
FROM php:7.0-apache FROM php:7.2-apache
ENV HOST_USER_ID 33 ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC' ENV PHP_INI_DATE_TIMEZONE 'UTC'
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev \ RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++\
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd \ && docker-php-ext-install gd \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \ && docker-php-ext-install ldap \
&& docker-php-ext-install mysqli \ && docker-php-ext-install mysqli \
&& apt-get purge -y libjpeg-dev libldap2-dev && docker-php-ext-install calendar \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
RUN mkdir /var/documents
RUN chown www-data /var/documents
COPY docker-run.sh /usr/local/bin/ COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug-2.5.5 && docker-php-ext-enable xdebug RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_host=docker.for.mac.host.internal' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
EXPOSE 80 EXPOSE 80

View File

@ -1,5 +1,5 @@
mariadb: mariadb:
image: mariadb:latest build: mariadb
environment: environment:
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr MYSQL_DATABASE: dolibarr

View File

@ -3,7 +3,8 @@
usermod -u $HOST_USER_ID www-data usermod -u $HOST_USER_ID www-data
groupmod -g $HOST_USER_ID www-data groupmod -g $HOST_USER_ID www-data
chown -hR www-data:www-data /var/www chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -f /usr/local/etc/php/php.ini ]; then if [ ! -f /usr/local/etc/php/php.ini ]; then
cat <<EOF > /usr/local/etc/php/php.ini cat <<EOF > /usr/local/etc/php/php.ini

View File

@ -0,0 +1,3 @@
FROM mariadb:latest
# Enable comented out UTF8 charset/collation options
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf

View File

@ -974,7 +974,7 @@ while ($i < min($num, $limit))
// Exported operation date // Exported operation date
if (! empty($arrayfields['t.date_export']['checked'])) if (! empty($arrayfields['t.date_export']['checked']))
{ {
print '<td align="center">' . dol_print_date($line->date_export, 'dayhour') . '</td>'; print '<td class="center">' . dol_print_date($line->date_export, 'dayhour') . '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }

View File

@ -116,7 +116,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
<tr> <tr>
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td> <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td> <td colspan="3" class="tdtop"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
</tr> </tr>
<tr> <tr>

View File

@ -125,7 +125,7 @@ echo $this->control->tpl['ajax_selectcountry'];
<tr> <tr>
<td class="tdtop"><?php echo $langs->trans("Note"); ?></td> <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
<td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td> <td colspan="3" class="tdtop"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
</tr> </tr>
<tr> <tr>

View File

@ -1072,16 +1072,10 @@ else
// Other attributes // Other attributes
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
//Hooks here
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
print '<tbody>'; print '<tbody>';
print "</table>\n"; print "</table>\n";
dol_fiche_end(); dol_fiche_end();
print '<div class="center">'; print '<div class="center">';
@ -1769,7 +1763,7 @@ else
/* /*
* Hotbar * Action bar
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';

View File

@ -124,7 +124,6 @@ if ($result)
} }
//print '<tr><td width="30%" class="notopnoleft" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';

View File

@ -71,7 +71,6 @@ $adht = new AdherentType($db);
$extrafields->fetch_name_optionals_label($object->table_element); $extrafields->fetch_name_optionals_label($object->table_element);
$errmsg = ''; $errmsg = '';
$errmsgs = array();
$defaultdelay = 1; $defaultdelay = 1;
$defaultdelayunit = 'y'; $defaultdelayunit = 'y';
@ -687,20 +686,19 @@ if ($rowid > 0)
$subscriptionstatic = new Subscription($db); $subscriptionstatic = new Subscription($db);
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0;
print '<table class="noborder centpercent">'."\n"; print '<table class="noborder centpercent">'."\n";
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder); print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateCreation").'</td>'; print_liste_field_titre('DateCreation', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td align="center">'.$langs->trans("Type").'</td>'; print_liste_field_titre('Type', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateStart").'</td>'; print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="center">'.$langs->trans("DateEnd").'</td>'; print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
print '<td class="right">'.$langs->trans("Amount").'</td>'; print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
if (!empty($conf->banque->enabled)) if (!empty($conf->banque->enabled))
{ {
print '<td class="right">'.$langs->trans("Account").'</td>'; print_liste_field_titre('Account', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
} }
print "</tr>\n"; print "</tr>\n";
@ -708,6 +706,7 @@ if ($rowid > 0)
$adh = new Adherent($db); $adh = new Adherent($db);
$adht = new AdherentType($db); $adht = new AdherentType($db);
$i = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
@ -766,6 +765,13 @@ if ($rowid > 0)
print "</tr>"; print "</tr>";
$i++; $i++;
} }
if (empty($num)) {
$colspan = 6;
if (!empty($conf->banque->enabled)) $colspan++;
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
}
print "</table>"; print "</table>";
} }
else else
@ -1002,7 +1008,7 @@ if ($rowid > 0)
print $langs->trans("CreateDolibarrThirdParty"); print $langs->trans("CreateDolibarrThirdParty");
print '</a>)'; print '</a>)';
} }
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled)))
{ {
$prodtmp = new Product($db); $prodtmp = new Product($db);
@ -1027,7 +1033,7 @@ if ($rowid > 0)
print $langs->trans("CreateDolibarrThirdParty"); print $langs->trans("CreateDolibarrThirdParty");
print '</a>)'; print '</a>)';
} }
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled)))
{ {
$prodtmp = new Product($db); $prodtmp = new Product($db);
@ -1070,9 +1076,9 @@ if ($rowid > 0)
} }
} }
print '<tr><td colspan="2">&nbsp;</td>'; print '<tr><td></td><td></td></tr>';
print '<tr><td width="30%">'.$langs->trans("SendAcknowledgementByMail").'</td>'; print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
print '<td>'; print '<td>';
if (!$object->email) if (!$object->email)
{ {
@ -1117,11 +1123,20 @@ if ($rowid > 0)
$helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailFrom").'</b>: '.$conf->global->ADHERENT_MAIL_FROM.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailRecipient").'</b>: '.$object->email.'<br>'."\n";
$helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n"; $helpcontent .= '<b>'.$langs->trans("MailTopic").'</b>:<br>'."\n";
$helpcontent .= $subjecttosend."\n"; if ($subjecttosend) {
$helpcontent .= $subjecttosend."\n";
} else {
$langs->load("errors");
$helpcontent .= '<span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).'</span>'."\n";
}
$helpcontent .= "<br>"; $helpcontent .= "<br>";
$helpcontent .= '<b>'.$langs->trans("MailText").'</b>:<br>'; $helpcontent .= '<b>'.$langs->trans("MailText").'</b>:<br>';
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; if ($texttosend) {
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n";
} else {
$langs->load("errors");
$helpcontent .= '<span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).'</span>'."\n";
}
print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend'); print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend');
} }
print '</td></tr>'; print '</td></tr>';

View File

@ -442,7 +442,7 @@ print $langs->trans('BankColorizeMovementDesc');
print "</td>"; print "</td>";
// Active // Active
if ($conf->global->BANK_COLORIZE_MOVEMENT) { if ($conf->global->BANK_COLORIZE_MOVEMENT) {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetbankcolorizemovement">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -450,7 +450,7 @@ if ($conf->global->BANK_COLORIZE_MOVEMENT) {
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setbankcolorizemovement">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }

View File

@ -74,7 +74,7 @@ llxHeader('', $langs->trans("Audit"), $wikihelp);
//$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>'; //$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("LogEventDesc", $langs->transnoentitiesnoconv("AdminTools"), $langs->transnoentitiesnoconv("Audit"))."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("LogEventDesc", $langs->transnoentitiesnoconv("AdminTools"), $langs->transnoentitiesnoconv("Audit"))."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@ -320,7 +320,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->FICHEINTER_ADDON == $classname) if ($conf->global->FICHEINTER_ADDON == $classname)
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -348,7 +348,7 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= $langs->trans($module->error).'<br>'; $htmltooltip .= $langs->trans($module->error).'<br>';
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -486,12 +486,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, -1, 0); print $form->textwithpicto('', $htmltooltip, -1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'intervention').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'intervention').'</a>';
@ -587,7 +587,7 @@ print '<tr class="oddeven">';
print '<td>'; print '<td>';
print $langs->trans("UseServicesDurationOnFichinter"); print $langs->trans("UseServicesDurationOnFichinter");
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.($conf->global->FICHINTER_USE_SERVICE_DURATION ? ' checked' : '').'>'; print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.($conf->global->FICHINTER_USE_SERVICE_DURATION ? ' checked' : '').'>';
print '</td>'; print '</td>';
print '<td class="right">'; print '<td class="right">';
@ -603,7 +603,7 @@ print '<tr class="oddeven">';
print '<td>'; print '<td>';
print $langs->trans("UseDurationOnFichinter"); print $langs->trans("UseDurationOnFichinter");
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.($conf->global->FICHINTER_WITHOUT_DURATION ? ' checked' : '').'>'; print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.($conf->global->FICHINTER_WITHOUT_DURATION ? ' checked' : '').'>';
print '</td>'; print '</td>';
print '<td class="right">'; print '<td class="right">';
@ -619,7 +619,7 @@ print '<tr class="oddeven">';
print '<td>'; print '<td>';
print $langs->trans("UseDateWithoutHourOnFichinter"); print $langs->trans("UseDateWithoutHourOnFichinter");
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.($conf->global->FICHINTER_DATE_WITHOUT_HOUR ? ' checked' : '').'>'; print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.($conf->global->FICHINTER_DATE_WITHOUT_HOUR ? ' checked' : '').'>';
print '</td>'; print '</td>';
print '<td class="right">'; print '<td class="right">';

View File

@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->HOLIDAY_ADDON == "$file") if ($conf->global->HOLIDAY_ADDON == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -281,7 +281,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -397,7 +397,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -405,13 +405,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->HOLIDAY_ADDON_PDF == $name) if ($conf->global->HOLIDAY_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -437,12 +437,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';

View File

@ -245,7 +245,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->LIVRAISON_ADDON_NUMBER == "$file") if ($conf->global->LIVRAISON_ADDON_NUMBER == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -408,12 +408,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").'</u>:'; $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").'</u>:';
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'sending').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'sending').'</a>';

View File

@ -571,7 +571,7 @@ foreach ($fieldsforcontent as $tmpfieldlist)
} }
print '</td>'; print '</td>';
if ($tmpfieldlist == 'topic') { if ($tmpfieldlist == 'topic') {
print '<td align="center" rowspan="' . (count($fieldsforcontent)) . '">'; print '<td class="center" rowspan="' . (count($fieldsforcontent)) . '">';
if ($action != 'edit') { if ($action != 'edit') {
print '<input type="submit" class="button" name="actionadd" value="' . $langs->trans("Add") . '">'; print '<input type="submit" class="button" name="actionadd" value="' . $langs->trans("Add") . '">';
} }
@ -730,7 +730,7 @@ if ($resql)
if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit'); if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit');
print '<td></td><td></td><td></td>'; print '<td></td><td></td><td></td>';
print '<td align="center">'; print '<td class="center">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">'; print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">'; print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
@ -874,7 +874,7 @@ if ($resql)
$url.='&'; $url.='&';
// Status / Active // Status / Active
print '<td align="center" class="nowrap">'; print '<td class="center nowrap">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>'; if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else print '<span class="opacitymedium">'.$actl[$obj->active].'</span>'; else print '<span class="opacitymedium">'.$actl[$obj->active].'</span>';
print "</td>"; print "</td>";

View File

@ -198,20 +198,36 @@ if ($action=='install')
// TODO Make more test // TODO Make more test
} }
// Now we install the module dol_syslog("Uncompress of module file is a success.");
if (! $error)
{ $modulenamearrays = array();
//var_dump($dirins); if (dol_is_file($modulenamedir.'/metapackage.conf')) {
@dol_delete_dir_recursive($dirins.'/'.$modulename); // delete the zip file // This is a meta package
dol_syslog("Uncompress of module file is a success. We copy it from ".$modulenamedir." into target dir ".$dirins.'/'.$modulename); $metafile = file_get_contents($modulenamedir.'/metapackage.conf');
$result=dolCopyDir($modulenamedir, $dirins.'/'.$modulename, '0444', 1); $modulenamearrays = explode("\n", $metafile);
if ($result <= 0) }
{ $modulenamearrays[$modulename] = $modulename;
dol_syslog('Failed to call dolCopyDir result='.$result." with param ".$modulenamedir." and ".$dirins.'/'.$modulename, LOG_WARNING);
$langs->load("errors"); foreach($modulenamearrays as $modulenameval) {
setEventMessages($langs->trans("ErrorFailToCopyDir", $modulenamedir, $dirins.'/'.$modulename), null, 'errors'); if (strpos($modulenameval, '#') === 0) continue; // Discard comments
$error++; if (strpos($modulenameval, '//') === 0) continue; // Discard comments
} if (! trim($modulenameval)) continue;
// Now we install the module
if (! $error)
{
//var_dump($dirins);
@dol_delete_dir_recursive($dirins.'/'.$modulenameval); // delete the zip file
dol_syslog("We copy now directory ".$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval." into target dir ".$dirins.'/'.$modulenameval);
$result=dolCopyDir($conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval, $dirins.'/'.$modulenameval, '0444', 1);
if ($result <= 0)
{
dol_syslog('Failed to call dolCopyDir result='.$result." with param ".$modulenamedir." and ".$dirins.'/'.$modulenameval, LOG_WARNING);
$langs->load("errors");
setEventMessages($langs->trans("ErrorFailToCopyDir", $conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulenameval, $dirins.'/'.$modulenameval), null, 'errors');
$error++;
}
}
} }
} }
} }

View File

@ -189,12 +189,12 @@ dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurren
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameters").'</td>'."\n"; print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="center">'.$langs->trans("Status").'</td>'."\n"; print '<td class="center">'.$langs->trans("Status").'</td>'."\n";
print '</tr>'; print '</tr>';
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>'; print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>';
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE'); print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE');
} else { } else {
@ -206,7 +206,7 @@ print '</td></tr>';
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>'; print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX'); print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX');
} else { } else {
@ -220,7 +220,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT").'</td>'; print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT").'</td>';
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT'); print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT');
} else { } else {
@ -313,7 +313,7 @@ print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n"; print '<td>'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).'</td>'."\n";
print '<td align="center">'.$langs->trans("Rate").'</td>'."\n"; print '<td class="center">'.$langs->trans("Rate").'</td>'."\n";
print '</tr>'; print '</tr>';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">'; print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';

View File

@ -175,7 +175,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
//print "> ".$conf->global->PAYMENT_ADDON." - ".$file; //print "> ".$conf->global->PAYMENT_ADDON." - ".$file;
if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON.'.php' == $file) if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON.'.php' == $file)
{ {
@ -205,7 +205,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors

View File

@ -66,8 +66,7 @@ llxHeader('', $langs->trans("DefaultRights"), $wikihelp);
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("DefaultRightsDesc"); print '<span class="opacitymedium">'.$langs->trans("DefaultRightsDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."</span><br><br>\n";
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br><br>\n";
$db->begin(); $db->begin();
@ -179,7 +178,7 @@ if ($result)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Module").'</td>'; print '<td>'.$langs->trans("Module").'</td>';
print '<td>'.$langs->trans("Permission").'</td>'; print '<td>'.$langs->trans("Permission").'</td>';
print '<td align="center">'.$langs->trans("Default").'</td>'; print '<td class="center">'.$langs->trans("Default").'</td>';
print '<td align="center">&nbsp;</td>'; print '<td align="center">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }
@ -194,7 +193,7 @@ if ($result)
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle)); $perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle));
print '<td>'.$perm_libelle. '</td>'; print '<td>'.$perm_libelle. '</td>';
print '<td align="center">'; print '<td class="center">';
if ($obj->bydefault == 1) if ($obj->bydefault == 1)
{ {
print img_picto($langs->trans("Active"), 'tick'); print img_picto($langs->trans("Active"), 'tick');

View File

@ -355,7 +355,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"),'switch_on'); print img_picto($langs->trans("Enabled"),'switch_on');
print '</a>'; print '</a>';
@ -363,13 +363,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->PAYMENTORDER_ADDON_PDF == $name) if ($conf->global->PAYMENTORDER_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"),'on'); print img_picto($langs->trans("Default"),'on');
@ -397,12 +397,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('',$htmltooltip,1,0); print $form->textwithpicto('',$htmltooltip,1,0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';

View File

@ -306,7 +306,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->PROPALE_ADDON == "$file") if ($conf->global->PROPALE_ADDON == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -338,7 +338,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -442,7 +442,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -484,12 +484,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';

View File

@ -82,7 +82,7 @@ llxHeader('', $langs->trans("Proxy"), $wikihelp);
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("ProxyDesc")."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("ProxyDesc")."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") if ($conf->global->RECEPTION_ADDON_NUMBER == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -290,7 +290,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -395,7 +395,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -403,13 +403,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Defaut // Defaut
print '<td align="center">'; print '<td class="center">';
if ($conf->global->RECEPTION_ADDON_PDF == $name) if ($conf->global->RECEPTION_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -434,12 +434,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); $htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').'</a>';

View File

@ -194,6 +194,7 @@ if ($action == 'maj_pattern')
/* /*
* View * View
*/ */
$form = new Form($db); $form = new Form($db);
$wikihelp = 'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad'; $wikihelp = 'EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
@ -201,7 +202,7 @@ llxHeader('', $langs->trans("Passwords"), $wikihelp);
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("GeneratedPasswordDesc")."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("GeneratedPasswordDesc")."</span><br>\n";
print "<br>\n"; print "<br>\n";
@ -245,7 +246,7 @@ print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("RuleForGeneratedPasswords").'</td>'; print '<td colspan="2">'.$langs->trans("RuleForGeneratedPasswords").'</td>';
print '<td>'.$langs->trans("Example").'</td>'; print '<td>'.$langs->trans("Example").'</td>';
print '<td align="center">'.$langs->trans("Activated").'</td>'; print '<td class="center">'.$langs->trans("Activated").'</td>';
print '</tr>'; print '</tr>';
foreach ($arrayhandler as $key => $module) foreach ($arrayhandler as $key => $module)
@ -405,8 +406,8 @@ print "<input type=\"hidden\" name=\"action\" value=\"encrypt\">";
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="3">'.$langs->trans("Parameters").'</td>'; print '<td colspan="3">'.$langs->trans("Parameters").'</td>';
print '<td align="center">'.$langs->trans("Activated").'</td>'; print '<td class="center">'.$langs->trans("Activated").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>'; print '<td class="center">'.$langs->trans("Action").'</td>';
print '</tr>'; print '</tr>';
// Disable clear password in database // Disable clear password in database

View File

@ -90,7 +90,7 @@ llxHeader('', $langs->trans("Files"), $wikihelp);
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("SecurityFilesDesc")."<br>\n"; print '<span class="opacitymedium">'.$langs->trans("SecurityFilesDesc")."</span><br>\n";
print "<br>\n"; print "<br>\n";

View File

@ -473,7 +473,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
// Example with a yes / no select // Example with a yes / no select
/*print '<tr class="oddeven">'; /*print '<tr class="oddeven">';
print '<td>'.$langs->trans("INVENTORY_DISABLE_VIRTUAL").'</td>'; print '<td>'.$langs->trans("INVENTORY_DISABLE_VIRTUAL").'</td>';
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('INVENTORY_DISABLE_VIRTUAL'); print ajax_constantonoff('INVENTORY_DISABLE_VIRTUAL');
} else { } else {
@ -486,7 +486,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
// Example with a yes / no select // Example with a yes / no select
/*print '<tr class="oddeven">'; /*print '<tr class="oddeven">';
print '<td>'.$langs->trans("INVENTORY_USE_MIN_PA_IF_NO_LAST_PA").'</td>'; print '<td>'.$langs->trans("INVENTORY_USE_MIN_PA_IF_NO_LAST_PA").'</td>';
print '<td align="center">'; print '<td class="center">';
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
print ajax_constantonoff('INVENTORY_USE_MIN_PA_IF_NO_LAST_PA'); print ajax_constantonoff('INVENTORY_USE_MIN_PA_IF_NO_LAST_PA');
} else { } else {

View File

@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -297,7 +297,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -395,7 +395,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
//if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name") //if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF != "$name")
//{ //{
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
@ -411,13 +411,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name")
{ {
//print img_picto($langs->trans("Default"),'on'); //print img_picto($langs->trans("Default"),'on');
@ -438,10 +438,10 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
print '</td>'; print '</td>';

View File

@ -298,7 +298,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -327,7 +327,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -420,7 +420,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name") if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=order_supplier">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=order_supplier">';
@ -435,13 +435,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scan_dir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name")
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -460,10 +460,10 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1); $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1); $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
print '</td>'; print '</td>';

View File

@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
//print "> ".$conf->global->SUPPLIER_PAYMENT_ADDON." - ".$file; //print "> ".$conf->global->SUPPLIER_PAYMENT_ADDON." - ".$file;
if ($conf->global->SUPPLIER_PAYMENT_ADDON == $file || $conf->global->SUPPLIER_PAYMENT_ADDON.'.php' == $file) if ($conf->global->SUPPLIER_PAYMENT_ADDON == $file || $conf->global->SUPPLIER_PAYMENT_ADDON.'.php' == $file)
{ {
@ -289,7 +289,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors
@ -366,7 +366,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
//if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF != "$name") //if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF != "$name")
//{ //{
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
@ -382,13 +382,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&amp;value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'&amp;type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Default // Default
print '<td align="center">'; print '<td class="center">';
if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name") if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name")
{ {
//print img_picto($langs->trans("Default"),'on'); //print img_picto($langs->trans("Default"),'on');
@ -407,10 +407,10 @@ foreach ($dirmodels as $reldir)
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&amp;module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
print '</td>'; print '</td>';

View File

@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
else print $tmp; else print $tmp;
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file")
{ {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
@ -305,7 +305,7 @@ foreach ($dirmodels as $reldir)
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -408,7 +408,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&amp;value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -450,12 +450,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';

View File

@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir) {
print '</td>'."\n"; print '</td>'."\n";
print '<td align="center">'; print '<td class="center">';
if ($conf->global->TICKET_ADDON == 'mod_'.$classname) { if ($conf->global->TICKET_ADDON == 'mod_'.$classname) {
print img_picto($langs->trans("Activated"), 'switch_on'); print img_picto($langs->trans("Activated"), 'switch_on');
} else { } else {
@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir) {
} }
} }
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
@ -315,7 +315,7 @@ if ($conf->use_javascript_ajax) {
print $form->selectarray("TICKET_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKET_DISABLE_ALL_MAILS); print $form->selectarray("TICKET_DISABLE_ALL_MAILS", $arrval, $conf->global->TICKET_DISABLE_ALL_MAILS);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -330,7 +330,7 @@ if ($conf->use_javascript_ajax) {
print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL); print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -348,7 +348,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS); print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -365,7 +365,7 @@ if ($conf->use_javascript_ajax) {
print $form->selectarray("TICKET_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY); print $form->selectarray("TICKET_LIMIT_VIEW_ASSIGNED_ONLY", $arrval, $conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -386,7 +386,7 @@ if ($conf->use_javascript_ajax) {
print $form->selectarray("TICKET_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKET_AUTO_ASSIGN_USER_CREATE); print $form->selectarray("TICKET_AUTO_ASSIGN_USER_CREATE", $arrval, $conf->global->TICKET_AUTO_ASSIGN_USER_CREATE);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsAutoAssignTicketHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsAutoAssignTicketHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -426,7 +426,7 @@ if ($conf->use_javascript_ajax) {
print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL); print $form->selectarray("TICKET_ACTIVATE_LOG_BY_EMAIL", $arrval, $conf->global->TICKET_ACTIVATE_LOG_BY_EMAIL);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -438,7 +438,7 @@ print '</tr>';
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
print '<td class="left">'; print '<td class="left">';
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : $conf->global->TICKET_NOTIFICATION_EMAIL_FROM).'" size="20" ></td>'; print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_TO" value="'.(!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? $conf->global->TICKET_NOTIFICATION_EMAIL_TO : $conf->global->TICKET_NOTIFICATION_EMAIL_FROM).'" size="20" ></td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -447,7 +447,7 @@ print '</tr>';
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationFrom").'</td>'; print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationFrom").'</td>';
print '<td class="left">'; print '<td class="left">';
print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_FROM" value="'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'" size="20" ></td>'; print '<input type="text" name="TICKET_NOTIFICATION_EMAIL_FROM" value="'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'" size="20" ></td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketEmailNotificationFromHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -460,7 +460,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor = new DolEditor('TICKET_MESSAGE_MAIL_INTRO', $mail_intro, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
$doleditor->Create(); $doleditor->Create();
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), 1, 'help');
print '</td></tr>'; print '</td></tr>';
@ -472,7 +472,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor = new DolEditor('TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
$doleditor->Create(); $doleditor->Create();
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelpAdmin"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelpAdmin"), 1, 'help');
print '</td></tr>'; print '</td></tr>';

View File

@ -218,7 +218,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->selectarray("TICKET_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKET_EMAIL_MUST_EXISTS); print $form->selectarray("TICKET_EMAIL_MUST_EXISTS", $arrval, $conf->global->TICKET_EMAIL_MUST_EXISTS);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -235,7 +235,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->selectarray("TICKET_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKET_SHOW_MODULE_LOGO); print $form->selectarray("TICKET_SHOW_MODULE_LOGO", $arrval, $conf->global->TICKET_SHOW_MODULE_LOGO);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -251,7 +251,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->selectarray("TICKET_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKET_SHOW_COMPANY_LOGO); print $form->selectarray("TICKET_SHOW_COMPANY_LOGO", $arrval, $conf->global->TICKET_SHOW_COMPANY_LOGO);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsShowCompanyLogoHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsShowCompanyLogoHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -268,7 +268,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS); print $form->selectarray("TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS", $arrval, $conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -310,7 +310,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print '</td><td>'; print '</td><td>';
print '<input type="text" name="TICKET_PUBLIC_INTERFACE_TOPIC" value="'.$conf->global->TICKET_PUBLIC_INTERFACE_TOPIC.'" size="40" ></td>'; print '<input type="text" name="TICKET_PUBLIC_INTERFACE_TOPIC" value="'.$conf->global->TICKET_PUBLIC_INTERFACE_TOPIC.'" size="40" ></td>';
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help');
print '</td></tr>'; print '</td></tr>';
@ -322,7 +322,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
$doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HOME', $public_text_home, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
$doleditor->Create(); $doleditor->Create();
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHomeHelpAdmin"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHomeHelpAdmin"), 1, 'help');
print '</td></tr>'; print '</td></tr>';
@ -334,7 +334,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
$doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70); $doleditor = new DolEditor('TICKET_PUBLIC_TEXT_HELP_MESSAGE', $public_text_help_message, '100%', 180, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_2, 70);
$doleditor->Create(); $doleditor->Create();
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help');
print '</td></tr>'; print '</td></tr>';
@ -348,7 +348,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print $form->selectarray("TICKET_DISABLE_CUSTOMER_MAILS", $arrval, $conf->global->TICKET_DISABLE_CUSTOMER_MAILS); print $form->selectarray("TICKET_DISABLE_CUSTOMER_MAILS", $arrval, $conf->global->TICKET_DISABLE_CUSTOMER_MAILS);
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -361,7 +361,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
$doleditor = new DolEditor('TICKET_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70); $doleditor = new DolEditor('TICKET_MESSAGE_MAIL_NEW', $mail_mesg_new, '100%', 120, 'dolibarr_mailings', '', false, true, $conf->global->FCKEDITOR_ENABLE_MAIL, ROWS_2, 70);
$doleditor->Create(); $doleditor->Create();
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
print '</td></tr>'; print '</td></tr>';
@ -371,7 +371,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
print '</td><td>'; print '</td><td>';
print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'" size="40" ></td>'; print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'" size="40" ></td>';
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help'); print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
print '</td></tr>'; print '</td></tr>';

View File

@ -224,6 +224,13 @@ if (in_array($type, array('mysql', 'mysqli'))) {
print '<option value="POSTGRESQL">POSTGRESQL</option>'; print '<option value="POSTGRESQL">POSTGRESQL</option>';
print '</select>'; print '</select>';
print '<br>'; print '<br>';
print '<input type="checkbox" name="use_mysql_quick_param" value="yes" id="checkbox_use_quick" />';
print '<label for="checkbox_use_quick">';
print $form->textwithpicto($langs->trans('ExportUseMySQLQuickParameter'), $langs->trans('ExportUseMySQLQuickParameterHelp'));
print '</label>';
print '<br/>';
print '<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />'; print '<!-- <input type="checkbox" name="drop_database" value="yes" id="checkbox_drop_database" />';
print '<label for="checkbox_drop_database">'.$langs->trans("AddDropDatabase").'</label>'; print '<label for="checkbox_drop_database">'.$langs->trans("AddDropDatabase").'</label>';
print '-->'; print '-->';

View File

@ -302,11 +302,11 @@ if ($mode == 'overwrite')
print '<td>'; print '<td>';
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">'; print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
} }
else else
{*/ {*/
print '<td align="center">'; print '<td class="center">';
print '<input type="hidden" name="entity" value="'.$conf->entity.'">'; print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
//} //}
print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add" title="'.dol_escape_htmltag($langs->trans("YouMustEnabledTranslationOverwriteBefore")).'">'; print '<input type="submit" class="button"'.$disabled.' value="'.$langs->trans("Add").'" name="add" title="'.dol_escape_htmltag($langs->trans("YouMustEnabledTranslationOverwriteBefore")).'">';
@ -356,7 +356,7 @@ if ($mode == 'overwrite')
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int'))
{ {
print '<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.'">'; print '<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.'">';

View File

@ -263,7 +263,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -271,13 +271,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Defaut // Defaut
print '<td align="center">'; print '<td class="center">';
if ($conf->global->USER_ADDON_PDF == $name) if ($conf->global->USER_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -303,12 +303,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';

View File

@ -210,7 +210,7 @@ foreach ($dirmodels as $reldir)
// Active // Active
if (in_array($name, $def)) if (in_array($name, $def))
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&value='.$name.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&value='.$name.'">';
print img_picto($langs->trans("Enabled"), 'switch_on'); print img_picto($langs->trans("Enabled"), 'switch_on');
print '</a>'; print '</a>';
@ -218,13 +218,13 @@ foreach ($dirmodels as $reldir)
} }
else else
{ {
print '<td align="center">'."\n"; print '<td class="center">'."\n";
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&amp;scandir='.$module->scandir.'&amp;label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print "</td>"; print "</td>";
} }
// Defaut // Defaut
print '<td align="center">'; print '<td class="center">';
if ($conf->global->USERGROUP_ADDON_PDF == $name) if ($conf->global->USERGROUP_ADDON_PDF == $name)
{ {
print img_picto($langs->trans("Default"), 'on'); print img_picto($langs->trans("Default"), 'on');
@ -250,12 +250,12 @@ foreach ($dirmodels as $reldir)
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1); $htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
print '<td align="center">'; print '<td class="center">';
print $form->textwithpicto('', $htmltooltip, 1, 0); print $form->textwithpicto('', $htmltooltip, 1, 0);
print '</td>'; print '</td>';
// Preview // Preview
print '<td align="center">'; print '<td class="center">';
if ($module->type == 'pdf') if ($module->type == 'pdf')
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';

View File

@ -625,7 +625,7 @@ if ($id)
// Delete link // Delete link
if ($iserasable) print '<td align="center"><a class="reposition" href="'.$url.'action=delete">'.img_delete().'</a></td>'; if ($iserasable) print '<td align="center"><a class="reposition" href="'.$url.'action=delete">'.img_delete().'</a></td>';
else print '<td align="center">'.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').'</td>'; else print '<td class="center">'.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').'</td>';
print "</tr>\n"; print "</tr>\n";
} }

View File

@ -162,7 +162,7 @@ foreach ($workflowcodes as $key => $params)
print ' '.img_warning($langs->transnoentitiesnoconv($params['warning'])); print ' '.img_warning($langs->transnoentitiesnoconv($params['warning']));
} }
print "</td>\n"; print "</td>\n";
print '<td align="center">'; print '<td class="center">';
if (!empty($conf->use_javascript_ajax)) if (!empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff($key); print ajax_constantonoff($key);

View File

@ -1430,8 +1430,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="liste_titre">'; $out .= '<tr class="liste_titre">';
$out .= '<td>#</td>'; $out .= '<td>#</td>';
$out .= '<td>'.$langs->trans("Constant").'</td>'; $out .= '<td>'.$langs->trans("Constant").'</td>';
$out .= '<td align="center">'.$langs->trans("ExpectedValue").'</td>'; $out .= '<td class="center">'.$langs->trans("ExpectedValue").'</td>';
$out .= '<td align="center">'.$langs->trans("Value").'</td>'; $out .= '<td class="center">'.$langs->trans("Value").'</td>';
$out .= '</tr>'."\n"; $out .= '</tr>'."\n";
$i = 0; $i = 0;
@ -1451,8 +1451,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="oddeven">'; $out .= '<tr class="oddeven">';
$out .= '<td>'.$i.'</td>'."\n"; $out .= '<td>'.$i.'</td>'."\n";
$out .= '<td>'.$constname.'</td>'."\n"; $out .= '<td>'.$constname.'</td>'."\n";
$out .= '<td align="center">'.$constvalue.'</td>'."\n"; $out .= '<td class="center">'.$constvalue.'</td>'."\n";
$out .= '<td align="center">'.$valueforchecksum.'</td>'."\n"; $out .= '<td class="center">'.$valueforchecksum.'</td>'."\n";
$out .= "</tr>\n"; $out .= "</tr>\n";
} }
@ -1498,7 +1498,7 @@ class Setup extends DolibarrApi
$out .= '<tr class="liste_titre">'; $out .= '<tr class="liste_titre">';
$out .= '<td>#</td>'; $out .= '<td>#</td>';
$out .= '<td>'.$langs->trans("Filename").'</td>'; $out .= '<td>'.$langs->trans("Filename").'</td>';
$out .= '<td align="center">'.$langs->trans("ExpectedChecksum").'</td>'; $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
$out .= '</tr>'."\n"; $out .= '</tr>'."\n";
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); $tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
if (is_array($tmpfilelist) && count($tmpfilelist)) if (is_array($tmpfilelist) && count($tmpfilelist))
@ -1510,7 +1510,7 @@ class Setup extends DolibarrApi
$out .= '<tr class="oddeven">'; $out .= '<tr class="oddeven">';
$out .= '<td>'.$i.'</td>'."\n"; $out .= '<td>'.$i.'</td>'."\n";
$out .= '<td>'.$file['filename'].'</td>'."\n"; $out .= '<td>'.$file['filename'].'</td>'."\n";
$out .= '<td align="center">'.$file['expectedmd5'].'</td>'."\n"; $out .= '<td class="center">'.$file['expectedmd5'].'</td>'."\n";
$out .= "</tr>\n"; $out .= "</tr>\n";
} }
} }
@ -1532,8 +1532,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="liste_titre">'; $out .= '<tr class="liste_titre">';
$out .= '<td>#</td>'; $out .= '<td>#</td>';
$out .= '<td>'.$langs->trans("Filename").'</td>'; $out .= '<td>'.$langs->trans("Filename").'</td>';
$out .= '<td align="center">'.$langs->trans("ExpectedChecksum").'</td>'; $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
$out .= '<td align="center">'.$langs->trans("CurrentChecksum").'</td>'; $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
$out .= '<td class="right">'.$langs->trans("Size").'</td>'; $out .= '<td class="right">'.$langs->trans("Size").'</td>';
$out .= '<td class="right">'.$langs->trans("DateModification").'</td>'; $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
$out .= '</tr>'."\n"; $out .= '</tr>'."\n";
@ -1547,8 +1547,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="oddeven">'; $out .= '<tr class="oddeven">';
$out .= '<td>'.$i.'</td>'."\n"; $out .= '<td>'.$i.'</td>'."\n";
$out .= '<td>'.$file['filename'].'</td>'."\n"; $out .= '<td>'.$file['filename'].'</td>'."\n";
$out .= '<td align="center">'.$file['expectedmd5'].'</td>'."\n"; $out .= '<td class="center">'.$file['expectedmd5'].'</td>'."\n";
$out .= '<td align="center">'.$file['md5'].'</td>'."\n"; $out .= '<td class="center">'.$file['md5'].'</td>'."\n";
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
$totalsize += $size; $totalsize += $size;
$out .= '<td class="right">'.dol_print_size($size).'</td>'."\n"; $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
@ -1582,8 +1582,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="liste_titre">'; $out .= '<tr class="liste_titre">';
$out .= '<td>#</td>'; $out .= '<td>#</td>';
$out .= '<td>'.$langs->trans("Filename").'</td>'; $out .= '<td>'.$langs->trans("Filename").'</td>';
$out .= '<td align="center">'.$langs->trans("ExpectedChecksum").'</td>'; $out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
$out .= '<td align="center">'.$langs->trans("CurrentChecksum").'</td>'; $out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
$out .= '<td class="right">'.$langs->trans("Size").'</td>'; $out .= '<td class="right">'.$langs->trans("Size").'</td>';
$out .= '<td class="right">'.$langs->trans("DateModification").'</td>'; $out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
$out .= '</tr>'."\n"; $out .= '</tr>'."\n";
@ -1597,8 +1597,8 @@ class Setup extends DolibarrApi
$out .= '<tr class="oddeven">'; $out .= '<tr class="oddeven">';
$out .= '<td>'.$i.'</td>'."\n"; $out .= '<td>'.$i.'</td>'."\n";
$out .= '<td>'.$file['filename'].'</td>'."\n"; $out .= '<td>'.$file['filename'].'</td>'."\n";
$out .= '<td align="center">'.$file['expectedmd5'].'</td>'."\n"; $out .= '<td class="center">'.$file['expectedmd5'].'</td>'."\n";
$out .= '<td align="center">'.$file['md5'].'</td>'."\n"; $out .= '<td class="center">'.$file['md5'].'</td>'."\n";
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
$totalsize += $size; $totalsize += $size;
$out .= '<td class="right">'.dol_print_size($size).'</td>'."\n"; $out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";

View File

@ -213,13 +213,13 @@ while ($i < min($num, $limit))
print "</td>\n"; print "</td>\n";
// Target // Target
print '<td align="center">'; print '<td class="center">';
if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort"); if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort");
if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort"); if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort");
print "</td>\n"; print "</td>\n";
// Author // Author
print '<td align="center">'; print '<td class="center">';
if ($obj->fk_user) if ($obj->fk_user)
{ {
$userstatic->id=$obj->fk_user; $userstatic->id=$obj->fk_user;
@ -233,7 +233,7 @@ while ($i < min($num, $limit))
print "</td>\n"; print "</td>\n";
// Date creation // Date creation
print '<td align="center">'.dol_print_date($db->jdate($obj->dateb), 'day')."</td>"; print '<td class="center">'.dol_print_date($db->jdate($obj->dateb), 'day')."</td>";
// Position // Position
print '<td class="right">'.$obj->position."</td>"; print '<td class="right">'.$obj->position."</td>";

View File

@ -1069,7 +1069,7 @@ if ($action == 'create')
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1); $numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$societe->id.'&action=create"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
$urloption = '?action=create'; $urloption = '?action=create';
$url = dol_buildpath('comm/action/card.php', 2).$urloption; $url = dol_buildpath('comm/action/card.php', 2).$urloption;

View File

@ -618,7 +618,7 @@ if ($resql)
$formatToUse = $obj->fulldayevent ? 'day' : 'dayhour'; $formatToUse = $obj->fulldayevent ? 'day' : 'dayhour';
// Start date // Start date
if (!empty($arrayfields['a.datep']['checked'])) { if (!empty($arrayfields['a.datep']['checked'])) {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->dp), $formatToUse); print dol_print_date($db->jdate($obj->dp), $formatToUse);
$late = 0; $late = 0;
if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1;
@ -631,7 +631,7 @@ if ($resql)
// End date // End date
if (!empty($arrayfields['a.datep2']['checked'])) { if (!empty($arrayfields['a.datep2']['checked'])) {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->dp2), $formatToUse); print dol_print_date($db->jdate($obj->dp2), $formatToUse);
print '</td>'; print '</td>';
} }

View File

@ -603,7 +603,7 @@ echo '<td></td>';
$i=0; $i=0;
for ($h = $begin_d; $h < $end_d; $h++) for ($h = $begin_d; $h < $end_d; $h++)
{ {
echo '<td align="center">'; echo '<td class="center">';
print '<small style="font-family: courier">'.sprintf("%02d", $h).'</small>'; print '<small style="font-family: courier">'.sprintf("%02d", $h).'</small>';
print "</td>"; print "</td>";
} }

View File

@ -665,7 +665,7 @@ while($currentdaytoshow<$lastdaytoshow) {
} }
for ($h = $begin_h; $h < $end_h; $h++) for ($h = $begin_h; $h < $end_h; $h++)
{ {
echo '<td align="center">'; echo '<td class="center">';
print '<small style="font-family: courier">'.sprintf("%02d", $h).'</small>'; print '<small style="font-family: courier">'.sprintf("%02d", $h).'</small>';
print "</td>"; print "</td>";
} }

View File

@ -131,11 +131,11 @@ if ($resql)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Period").'</td>'; print '<td>'.$langs->trans("Period").'</td>';
print '<td align="center">'.$langs->trans("EventsNb").'</td>'; print '<td class="center">'.$langs->trans("EventsNb").'</td>';
print '<td align="center">'.$langs->trans("Action").'</td>'; print '<td class="center">'.$langs->trans("Action").'</td>';
print '<td>'.$langs->trans("PDF").'</td>'; print '<td>'.$langs->trans("PDF").'</td>';
print '<td align="center">'.$langs->trans("Date").'</td>'; print '<td class="center">'.$langs->trans("Date").'</td>';
print '<td align="center">'.$langs->trans("Size").'</td>'; print '<td class="center">'.$langs->trans("Size").'</td>';
print "</tr>\n"; print "</tr>\n";
while ($i < min($num, $limit)) while ($i < min($num, $limit))
@ -150,10 +150,10 @@ if ($resql)
print "<td>".$obj->df."</td>\n"; print "<td>".$obj->df."</td>\n";
// Nb of events // Nb of events
print '<td align="center">'.$obj->cc.'</td>'; print '<td class="center">'.$obj->cc.'</td>';
// Button to build doc // Button to build doc
print '<td align="center">'; print '<td class="center">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'), 'filenew').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&amp;page='.$page.'&amp;month='.$obj->month.'&amp;year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'), 'filenew').'</a>';
print '</td>'; print '</td>';
@ -184,8 +184,8 @@ if ($resql)
print $out; print $out;
print '</td>'; print '</td>';
print '<td align="center">'.dol_print_date(dol_filemtime($file), 'dayhour').'</td>'; print '<td class="center">'.dol_print_date(dol_filemtime($file), 'dayhour').'</td>';
print '<td align="center">'.dol_print_size(dol_filesize($file)).'</td>'; print '<td class="center">'.dol_print_size(dol_filesize($file)).'</td>';
} }
else { else {
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';

View File

@ -598,7 +598,7 @@ if ($object->fetch($id) >= 0)
print '<td>'.$obj->lastname.'</td>'; print '<td>'.$obj->lastname.'</td>';
print '<td>'.$obj->firstname.'</td>'; print '<td>'.$obj->firstname.'</td>';
print '<td>'.$obj->other.'</td>'; print '<td>'.$obj->other.'</td>';
print '<td align="center">'; print '<td class="center">';
if (empty($obj->source_id) || empty($obj->source_type)) if (empty($obj->source_id) || empty($obj->source_type))
{ {
print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility
@ -649,7 +649,7 @@ if ($object->fetch($id) >= 0)
else else
{ {
// Date sent // Date sent
print '<td align="center">'.$obj->date_envoi.'</td>'; print '<td class="center">'.$obj->date_envoi.'</td>';
print '<td class="nowrap right">'; print '<td class="nowrap right">';
print $object::libStatutDest($obj->statut, 2, $obj->error_text); print $object::libStatutDest($obj->statut, 2, $obj->error_text);

View File

@ -165,8 +165,8 @@ if ($result) {
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("LastMailings", $limit).'</td>'; print '<td colspan="2">'.$langs->trans("LastMailings", $limit).'</td>';
print '<td align="center">'.$langs->trans("DateCreation").'</td>'; print '<td class="center">'.$langs->trans("DateCreation").'</td>';
print '<td align="center">'.$langs->trans("NbOfEMails").'</td>'; print '<td class="center">'.$langs->trans("NbOfEMails").'</td>';
print '<td class="right"><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("AllEMailings").'</a></td></tr>'; print '<td class="right"><a href="'.DOL_URL_ROOT.'/comm/mailing/list.php">'.$langs->trans("AllEMailings").'</a></td></tr>';
$num = $db->num_rows($result); $num = $db->num_rows($result);
@ -184,8 +184,8 @@ if ($result) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="nowrap">'.$mailstatic->getNomUrl(1).'</td>'; print '<td class="nowrap">'.$mailstatic->getNomUrl(1).'</td>';
print '<td>'.dol_trunc($obj->titre, 38).'</td>'; print '<td>'.dol_trunc($obj->titre, 38).'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_creat), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->date_creat), 'day').'</td>';
print '<td align="center">'.($obj->nbemail ? $obj->nbemail : "0").'</td>'; print '<td class="center">'.($obj->nbemail ? $obj->nbemail : "0").'</td>';
print '<td class="right">'.$mailstatic->LibStatut($obj->statut, 5).'</td>'; print '<td class="right">'.$mailstatic->LibStatut($obj->statut, 5).'</td>';
print '</tr>'; print '</tr>';
$i++; $i++;

View File

@ -228,14 +228,14 @@ if ($result)
print '<td>'.$obj->titre.'</td>'; print '<td>'.$obj->titre.'</td>';
// Date creation // Date creation
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->datec), 'day'); print dol_print_date($db->jdate($obj->datec), 'day');
print '</td>'; print '</td>';
// Nb of email // Nb of email
if (!$filteremail) if (!$filteremail)
{ {
print '<td align="center">'; print '<td class="center">';
$nbemail = $obj->nbemail; $nbemail = $obj->nbemail;
/*if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) /*if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{ {

View File

@ -1475,9 +1475,10 @@ if ($action == 'create')
{ {
// Parse element/subelement (ex: project_task) // Parse element/subelement (ex: project_task)
$element = $subelement = $origin; $element = $subelement = $origin;
$regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs [1]; $element = $regs[1];
$subelement = $regs [2]; $subelement = $regs[2];
} }
if ($element == 'project') { if ($element == 'project') {
@ -1675,7 +1676,7 @@ if ($action == 'create')
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>'; print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1); $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -1544,6 +1544,7 @@ class Propal extends CommonObject
if (isset($this->note_public)) $this->note_public = trim($this->note_public); if (isset($this->note_public)) $this->note_public = trim($this->note_public);
if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf); if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf);
if (isset($this->import_key)) $this->import_key = trim($this->import_key); if (isset($this->import_key)) $this->import_key = trim($this->import_key);
if (! empty($this->duree_validite)) $this->fin_validite=$this->date + ($this->duree_validite * 24 * 3600);
// Check parameters // Check parameters
// Put here code to add control on parameters values // Put here code to add control on parameters values
@ -1555,7 +1556,8 @@ class Propal extends CommonObject
$sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").","; $sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").",";
$sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").",";
$sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").","; $sql .= " fk_soc=".(isset($this->socid) ? $this->socid : "null").",";
$sql .= " datep=".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null').","; $sql .= " datep=".(strval($this->date) != '' ? "'".$this->db->idate($this->date)."'" : 'null').",";
if (! empty($this->fin_validite)) $sql .= " fin_validite=".(strval($this->fin_validite)!='' ? "'".$this->db->idate($this->fin_validite)."'" : 'null').",";
$sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').","; $sql .= " date_valid=".(strval($this->date_validation) != '' ? "'".$this->db->idate($this->date_validation)."'" : 'null').",";
$sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; $sql .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").",";
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").","; $sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";

View File

@ -879,7 +879,7 @@ if ($resql)
// Country // Country
if (!empty($arrayfields['country.code_iso']['checked'])) if (!empty($arrayfields['country.code_iso']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
$tmparray = getCountry($obj->fk_pays, 'all'); $tmparray = getCountry($obj->fk_pays, 'all');
print $tmparray['label']; print $tmparray['label'];
print '</td>'; print '</td>';
@ -890,7 +890,7 @@ if ($resql)
{ {
if (!is_array($typenArray) || empty($typenArray)) $typenArray = $formcompany->typent_array(1); if (!is_array($typenArray) || empty($typenArray)) $typenArray = $formcompany->typent_array(1);
print '<td align="center">'; print '<td class="center">';
print $typenArray[$obj->typent_code]; print $typenArray[$obj->typent_code];
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
@ -899,7 +899,7 @@ if ($resql)
// Date proposal // Date proposal
if (!empty($arrayfields['p.date']['checked'])) if (!empty($arrayfields['p.date']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->dp), 'day'); print dol_print_date($db->jdate($obj->dp), 'day');
print "</td>\n"; print "</td>\n";
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
@ -910,7 +910,7 @@ if ($resql)
{ {
if ($obj->dfv) if ($obj->dfv)
{ {
print '<td align="center">'.dol_print_date($db->jdate($obj->dfv), 'day'); print '<td class="center">'.dol_print_date($db->jdate($obj->dfv), 'day');
print '</td>'; print '</td>';
} }
else else
@ -924,7 +924,7 @@ if ($resql)
{ {
if ($obj->ddelivery) if ($obj->ddelivery)
{ {
print '<td align="center">'.dol_print_date($db->jdate($obj->ddelivery), 'day'); print '<td class="center">'.dol_print_date($db->jdate($obj->ddelivery), 'day');
print '</td>'; print '</td>';
} }
else else
@ -936,7 +936,7 @@ if ($resql)
// Availability // Availability
if (! empty($arrayfields['ava.rowid']['checked'])) if (! empty($arrayfields['ava.rowid']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
$form->form_availability('', $obj->availability, 'none', 1); $form->form_availability('', $obj->availability, 'none', 1);
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;

View File

@ -274,7 +274,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre" height="24">'; print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>'; print '<td class="center">'.$langs->trans("Year").'</td>';
print '<td class="right">'.$langs->trans("NbOfProposals").'</td>'; print '<td class="right">'.$langs->trans("NbOfProposals").'</td>';
print '<td class="right">%</td>'; print '<td class="right">%</td>';
print '<td class="right">'.$langs->trans("AmountTotal").'</td>'; print '<td class="right">'.$langs->trans("AmountTotal").'</td>';

View File

@ -235,7 +235,7 @@ if ($socid > 0)
print '<td width="160">'.$langs->trans("Date").'</td>'; print '<td width="160">'.$langs->trans("Date").'</td>';
print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</td>'; print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</td>';
print '<td class="left">'.$langs->trans("NoteReason").'</td>'; print '<td class="left">'.$langs->trans("NoteReason").'</td>';
print '<td align="center">'.$langs->trans("User").'</td>'; print '<td class="center">'.$langs->trans("User").'</td>';
print '</tr>'; print '</tr>';
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
if ($num > 0) if ($num > 0)
@ -246,7 +246,7 @@ if ($socid > 0)
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>'; print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>';
print '<td align="center">'.price2num($obj->remise_percent).'%</td>'; print '<td class="center">'.price2num($obj->remise_percent).'%</td>';
print '<td class="left">'.$obj->note.'</td>'; print '<td class="left">'.$obj->note.'</td>';
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>';
print '</tr>'; print '</tr>';
@ -294,7 +294,7 @@ if ($socid > 0)
print '<td width="160">'.$langs->trans("Date").'</td>'; print '<td width="160">'.$langs->trans("Date").'</td>';
print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</td>'; print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</td>';
print '<td class="left">'.$langs->trans("NoteReason").'</td>'; print '<td class="left">'.$langs->trans("NoteReason").'</td>';
print '<td align="center">'.$langs->trans("User").'</td>'; print '<td class="center">'.$langs->trans("User").'</td>';
print '</tr>'; print '</tr>';
$num = $db->num_rows($resql); $num = $db->num_rows($resql);
if ($num > 0) if ($num > 0)
@ -305,7 +305,7 @@ if ($socid > 0)
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>'; print '<td>'.dol_print_date($db->jdate($obj->dc), "dayhour").'</td>';
print '<td align="center">'.price2num($obj->remise_percent).'%</td>'; print '<td class="center">'.price2num($obj->remise_percent).'%</td>';
print '<td class="left">'.$obj->note.'</td>'; print '<td class="left">'.$obj->note.'</td>';
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>';
print '</tr>'; print '</tr>';

View File

@ -61,9 +61,9 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
//if ($user->rights->societe->creer) //if ($user->rights->societe->creer)
//if ($user->rights->facture->creer) //if ($user->rights->facture->creer)
$amount_ttc_1 = GETPOST('amount_ttc_1'); $amount_ttc_1 = GETPOST('amount_ttc_1', 'alpha');
$amount_ttc_1 = price2num($amount_ttc_1); $amount_ttc_1 = price2num($amount_ttc_1);
$amount_ttc_2 = GETPOST('amount_ttc_2'); $amount_ttc_2 = GETPOST('amount_ttc_2', 'alpha');
$amount_ttc_2 = price2num($amount_ttc_2); $amount_ttc_2 = price2num($amount_ttc_2);
$error = 0; $error = 0;
@ -252,7 +252,7 @@ if ($socid > 0)
print '<input type="hidden" name="action" value="setremise">'; print '<input type="hidden" name="action" value="setremise">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), 0, 'company'); dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"), -1, 'company');
dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_banner_tab($object, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom');
@ -273,7 +273,7 @@ if ($socid > 0)
} }
print '<table class="border centpercent">'; print '<table class="border centpercent tableforfield borderbottom">';
if ($isCustomer) { // Calcul avoirs client en cours if ($isCustomer) { // Calcul avoirs client en cours
$remise_all = $remise_user = 0; $remise_all = $remise_user = 0;
@ -342,13 +342,15 @@ if ($socid > 0)
print '</div>'; print '</div>';
dol_fiche_end();
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
print '<br>'; print '<br>';
print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', ''); print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', '');
print '<div class="underbanner clearboth"></div>';
if ($isCustomer && !$isSupplier) { if ($isCustomer && !$isSupplier) {
print '<input type="hidden" name="discount_type" value="0" />'; print '<input type="hidden" name="discount_type" value="0" />';
@ -358,6 +360,8 @@ if ($socid > 0)
print '<input type="hidden" name="discount_type" value="1" />'; print '<input type="hidden" name="discount_type" value="1" />';
} }
dol_fiche_head();
print '<table class="border centpercent">'; print '<table class="border centpercent">';
if ($isCustomer && $isSupplier) { if ($isCustomer && $isSupplier) {
print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>'; print '<tr><td class="titlefield fieldrequired">'.$langs->trans('DiscountType').'</td>';
@ -376,9 +380,9 @@ if ($socid > 0)
print '<td><input type="text" class="quatrevingtpercent" name="desc" value="'.GETPOST('desc', 'none').'"></td></tr>'; print '<td><input type="text" class="quatrevingtpercent" name="desc" value="'.GETPOST('desc', 'none').'"></td></tr>';
print "</table>"; print "</table>";
}
dol_fiche_end(); dol_fiche_end();
}
if ($user->rights->societe->creer) if ($user->rights->societe->creer)
{ {
@ -404,7 +408,7 @@ if ($socid > 0)
/* /*
* Liste remises fixes client restant en cours (= liees a aucune facture ni ligne de facture) * List remises fixes client restant en cours (= liees a aucune facture ni ligne de facture)
*/ */
print load_fiche_titre($langs->trans("DiscountStillRemaining")); print load_fiche_titre($langs->trans("DiscountStillRemaining"));
@ -511,15 +515,14 @@ if ($socid > 0)
{ {
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>'; print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
} }
print '<td align="center">'; print '<td class="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>'; print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>'; print '</td>';
if ($user->rights->societe->creer || $user->rights->facture->creer) if ($user->rights->societe->creer || $user->rights->facture->creer)
{ {
print '<td class="nowrap">'; print '<td class="center nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>'; print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
//print ' &nbsp; '; print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>'; print '</td>';
} }
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
@ -535,7 +538,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
$db->free($resql); $db->free($resql);
print "</table>"; print "</table>";
@ -551,7 +556,7 @@ if ($socid > 0)
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
); );
$langs->load("dict"); $langs->load("dict");
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, '', 0);
} }
} }
else else
@ -672,9 +677,8 @@ if ($socid > 0)
if ($user->rights->societe->creer || $user->rights->facture->creer) if ($user->rights->societe->creer || $user->rights->facture->creer)
{ {
print '<td class="center nowrap">'; print '<td class="center nowrap">';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>'; print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=split&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_split($langs->trans("SplitDiscount")).'</a>';
//print ' &nbsp; '; print '<a class="reposition marginleftonly" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=remove&remid='.$obj->rowid.($backtopage ? '&backtopage='.urlencode($backtopage) : '').'">'.img_delete($langs->trans("RemoveDiscount")).'</a>';
print '</td>'; print '</td>';
} }
else print '<td>&nbsp;</td>'; else print '<td>&nbsp;</td>';
@ -690,7 +694,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
$db->free($resql); $db->free($resql);
print "</table>"; print "</table>";
@ -701,9 +707,9 @@ if ($socid > 0)
$amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT'); $amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT');
$amount2 = ($showconfirminfo['amount_ttc'] - $amount1); $amount2 = ($showconfirminfo['amount_ttc'] - $amount1);
$formquestion = array( $formquestion = array(
'text' => $langs->trans('TypeAmountOfEachNewDiscount'), 'text' => $langs->trans('TypeAmountOfEachNewDiscount'),
array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'),
array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
); );
$langs->load("dict"); $langs->load("dict");
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&remid='.$showconfirminfo['rowid'].($backtopage ? '&backtopage='.urlencode($backtopage) : ''), $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount', price($showconfirminfo['amount_ttc']), $langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0);
@ -738,7 +744,7 @@ if ($socid > 0)
// Discount linked to invoice lines // Discount linked to invoice lines
$sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,"; $sql = "SELECT rc.rowid, rc.amount_ht, rc.amount_tva, rc.amount_ttc, rc.tva_tx, rc.multicurrency_amount_ht, rc.multicurrency_amount_tva, rc.multicurrency_amount_ttc,";
$sql .= " rc.fk_facture_source,"; $sql .= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture_source,";
$sql .= " u.login, u.rowid as user_id,"; $sql .= " u.login, u.rowid as user_id,";
$sql .= " f.rowid as invoiceid, f.ref,"; $sql .= " f.rowid as invoiceid, f.ref,";
$sql .= " fa.ref as invoice_source_ref, fa.type as type"; $sql .= " fa.ref as invoice_source_ref, fa.type as type";
@ -890,7 +896,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
print "</table>"; print "</table>";
@ -1054,7 +1062,7 @@ if ($socid > 0)
{ {
print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>'; print '<td class="right">'.price($obj->multicurrency_amount_ttc).'</td>';
} }
print '<td align="center">'; print '<td class="center">';
print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>'; print '<a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a>';
print '</td>'; print '</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
@ -1064,7 +1072,9 @@ if ($socid > 0)
} }
else else
{ {
print '<tr><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>'; $colspan = 8;
if (!empty($conf->multicurrency->enabled)) $colspan += 2;
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
} }
print "</table>"; print "</table>";

View File

@ -1642,7 +1642,7 @@ if ($action == 'create' && $usercancreate)
}); });
</script>'; </script>';
} }
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td>'; print '</td>';
} }
print '</tr>'."\n"; print '</tr>'."\n";
@ -1734,7 +1734,7 @@ if ($action == 'create' && $usercancreate)
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("Project").'</td><td>'; print '<td>'.$langs->trans("Project").'</td><td>';
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0); $numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }

View File

@ -1020,7 +1020,7 @@ if ($resql)
// Country // Country
if (! empty($arrayfields['country.code_iso']['checked'])) if (! empty($arrayfields['country.code_iso']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
$tmparray=getCountry($obj->fk_pays, 'all'); $tmparray=getCountry($obj->fk_pays, 'all');
print $tmparray['label']; print $tmparray['label'];
print '</td>'; print '</td>';
@ -1029,7 +1029,7 @@ if ($resql)
// Type ent // Type ent
if (! empty($arrayfields['typent.code']['checked'])) if (! empty($arrayfields['typent.code']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code]; print $typenArray[$obj->typent_code];
print '</td>'; print '</td>';
@ -1039,7 +1039,7 @@ if ($resql)
// Order date // Order date
if (! empty($arrayfields['c.date_commande']['checked'])) if (! empty($arrayfields['c.date_commande']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->date_commande), 'day'); print dol_print_date($db->jdate($obj->date_commande), 'day');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -1047,7 +1047,7 @@ if ($resql)
// Plannned date of delivery // Plannned date of delivery
if (! empty($arrayfields['c.date_delivery']['checked'])) if (! empty($arrayfields['c.date_delivery']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($obj->date_delivery), 'day'); print dol_print_date($db->jdate($obj->date_delivery), 'day');
print '</td>'; print '</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
@ -1116,7 +1116,7 @@ if ($resql)
// Billed // Billed
if (! empty($arrayfields['c.facture']['checked'])) if (! empty($arrayfields['c.facture']['checked']))
{ {
print '<td align="center">'.yn($obj->billed).'</td>'; print '<td class="center">'.yn($obj->billed).'</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }

View File

@ -705,7 +705,7 @@ if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)
print '<td class="nowrap right">'.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5).'</td>'; print '<td class="nowrap right">'.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5).'</td>';
// Checkbox // Checkbox
print '<td align="center">'; print '<td class="center">';
print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">'; print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">';
print '</td>'; print '</td>';

View File

@ -301,7 +301,7 @@ print '<br><br>';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre" height="24">'; print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>'; print '<td class="center">'.$langs->trans("Year").'</td>';
print '<td class="right">'.$langs->trans("NbOfOrders").'</td>'; print '<td class="right">'.$langs->trans("NbOfOrders").'</td>';
print '<td class="right">%</td>'; print '<td class="right">%</td>';
print '<td class="right">'.$langs->trans("AmountTotal").'</td>'; print '<td class="right">'.$langs->trans("AmountTotal").'</td>';

View File

@ -93,7 +93,6 @@ $search_req_nb = GETPOST("req_nb", 'alpha');
$search_num_releve = GETPOST("search_num_releve", 'alpha'); $search_num_releve = GETPOST("search_num_releve", 'alpha');
$search_conciliated = GETPOST("search_conciliated", 'int'); $search_conciliated = GETPOST("search_conciliated", 'int');
$num_releve = GETPOST("num_releve", "alpha"); $num_releve = GETPOST("num_releve", "alpha");
$cat = GETPOST("cat");
if (empty($dateop)) $dateop = -1; if (empty($dateop)) $dateop = -1;
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@ -420,6 +419,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
$options = array(); $options = array();
$buttonreconcile = ''; $buttonreconcile = '';
$morehtmlref = '';
if ($id > 0 || !empty($ref)) if ($id > 0 || !empty($ref))
{ {
@ -458,9 +458,9 @@ if ($id > 0 || !empty($ref))
if ($user->rights->banque->consolidate) { if ($user->rights->banque->consolidate) {
$newparam = $param; $newparam = $param;
$newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam); $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam);
$buttonreconcile = '<a class="butActionNew" style="margin-bottom: 5px !important; margin-top: 5px !important" href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&amp;sortorder=asc,asc,asc&search_conciliated=0'.$newparam.'">'.$langs->trans("Conciliate").'</a>'; $buttonreconcile = '<a class="butAction" style="margin-bottom: 5px !important; margin-top: 5px !important" href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&amp;sortorder=asc,asc,asc&search_conciliated=0'.$newparam.'">'.$langs->trans("Conciliate").'</a>';
} else { } else {
$buttonreconcile = '<a class="butActionNewRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>'; $buttonreconcile = '<a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
} }
} }
} }
@ -703,7 +703,7 @@ if ($resql)
print '<td class=right>'.$langs->trans("Credit").'</td>'; print '<td class=right>'.$langs->trans("Credit").'</td>';
/*if (! empty($conf->accounting->enabled)) /*if (! empty($conf->accounting->enabled))
{ {
print '<td align="center">'; print '<td class="center">';
print $langs->trans("AccountAccounting"); print $langs->trans("AccountAccounting");
print '</td>'; print '</td>';
}*/ }*/
@ -739,11 +739,11 @@ if ($resql)
print '<td class="right"><input name="addcredit" class="flat" type="text" size="4" value="'.GETPOST("addcredit", "alpha").'"></td>'; print '<td class="right"><input name="addcredit" class="flat" type="text" size="4" value="'.GETPOST("addcredit", "alpha").'"></td>';
/*if (! empty($conf->accounting->enabled)) /*if (! empty($conf->accounting->enabled))
{ {
print '<td align="center">'; print '<td class="center">';
print $formaccounting->select_account($search_accountancy_code, 'search_accountancy_code', 1, null, 1, 1, ''); print $formaccounting->select_account($search_accountancy_code, 'search_accountancy_code', 1, null, 1, 1, '');
print '</td>'; print '</td>';
}*/ }*/
print '<td align="center">'; print '<td class="center">';
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Add").'"><br>'; print '<input type="submit" name="save" class="button" value="'.$langs->trans("Add").'"><br>';
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
@ -1101,7 +1101,7 @@ if ($resql)
print '</td>'; print '</td>';
} }
print '<td align="center">'; print '<td class="center">';
print '<input type="checkbox" id="selectAll" />'; print '<input type="checkbox" id="selectAll" />';
print ' <script type="text/javascript"> print ' <script type="text/javascript">
$("input#selectAll").change(function() { $("input#selectAll").change(function() {

View File

@ -492,11 +492,11 @@ if ($action == 'create')
$content = $object->code_guichet; $content = $object->code_guichet;
} elseif ($val == 'BankAccountNumber') { } elseif ($val == 'BankAccountNumber') {
$name = 'number'; $name = 'number';
$sizecss = 'minwidth200'; $sizecss = 'minwidth200';
$content = $object->number; $content = $object->number;
} elseif ($val == 'BankAccountNumberKey') { } elseif ($val == 'BankAccountNumberKey') {
$name = 'cle_rib'; $name = 'cle_rib';
$sizecss = 'minwidth50'; $sizecss = 'minwidth50';
$content = $object->cle_rib; $content = $object->cle_rib;
} }
@ -923,7 +923,7 @@ else
$cats = $c->containing($object->id, Categorie::TYPE_ACCOUNT); $cats = $c->containing($object->id, Categorie::TYPE_ACCOUNT);
if (is_array($cats)) if (is_array($cats))
{ {
foreach($cats as $cat) { foreach ($cats as $cat) {
$arrayselected[] = $cat->id; $arrayselected[] = $cat->id;
} }
} }

View File

@ -411,7 +411,7 @@ if ($action == "create" || $action == "start")
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td></td>'; print '<td></td>';
print '<td align="center">'.$langs->trans("InitialBankBalance"); print '<td class="center">'.$langs->trans("InitialBankBalance");
//print '<br>'.$langs->trans("TheoricalAmount").'<br>'.$langs->trans("RealAmount"); //print '<br>'.$langs->trans("TheoricalAmount").'<br>'.$langs->trans("RealAmount");
print '</td>'; print '</td>';
print '<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).'">'; print '<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).'">';
@ -422,7 +422,7 @@ if ($action == "create" || $action == "start")
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td></td>'; print '<td></td>';
print '<td align="center">'.$langs->trans("Cash"); print '<td class="center">'.$langs->trans("Cash");
//print '<br>'.$langs->trans("TheoricalAmount").'<br>'.$langs->trans("RealAmount"); //print '<br>'.$langs->trans("TheoricalAmount").'<br>'.$langs->trans("RealAmount");
print '</td>'; print '</td>';
$i = 0; $i = 0;
@ -439,7 +439,7 @@ if ($action == "create" || $action == "start")
print '<tr>'; print '<tr>';
// Initial amount // Initial amount
print '<td>'.$langs->trans("NbOfInvoices").'</td>'; print '<td>'.$langs->trans("NbOfInvoices").'</td>';
print '<td align="center">'; print '<td class="center">';
print '</td>'; print '</td>';
// Amount per payment type // Amount per payment type
$i = 0; $i = 0;
@ -457,7 +457,7 @@ if ($action == "create" || $action == "start")
print '<tr>'; print '<tr>';
// Initial amount // Initial amount
print '<td>'.$langs->trans("TheoricalAmount").'</td>'; print '<td>'.$langs->trans("TheoricalAmount").'</td>';
print '<td align="center">'; print '<td class="center">';
print price($initialbalanceforterminal[$terminalid]['cash']).'<br>'; print price($initialbalanceforterminal[$terminalid]['cash']).'<br>';
print '</td>'; print '</td>';
// Amount per payment type // Amount per payment type
@ -476,7 +476,7 @@ if ($action == "create" || $action == "start")
print '<tr>'; print '<tr>';
print '<td>'.$langs->trans("RealAmount").'</td>'; print '<td>'.$langs->trans("RealAmount").'</td>';
// Initial amount // Initial amount
print '<td align="center">'; print '<td class="center">';
print '<input name="opening" type="text" class="maxwidth100 center" value="'.(GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])).'">'; print '<input name="opening" type="text" class="maxwidth100 center" value="'.(GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])).'">';
print '</td>'; print '</td>';
// Amount per payment type // Amount per payment type
@ -489,7 +489,7 @@ if ($action == "create" || $action == "start")
$i++; $i++;
} }
// Save // Save
print '<td align="center">'; print '<td class="center">';
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '<input type="submit" name="add" class="button" value="'.$langs->trans("Save").'">'; print '<input type="submit" name="add" class="button" value="'.$langs->trans("Save").'">';
print '</td>'; print '</td>';

View File

@ -198,7 +198,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
$payment_sc_static->ref = $obj->pid; $payment_sc_static->ref = $obj->pid;
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n"; print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
// Date payment // Date payment
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
// Type payment // Type payment
print '<td>'; print '<td>';
if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' '; if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
@ -313,7 +313,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
// Date // Date
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
// Type payment // Type payment
print '<td>'; print '<td>';
@ -439,7 +439,7 @@ while ($j < $numlt)
$tva_static->ref = $obj->rowid; $tva_static->ref = $obj->rowid;
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>"; print '<td class="right">'.price($obj->amount)."</td>";
print "</tr>\n"; print "</tr>\n";
@ -525,7 +525,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
// Date // Date
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
// Type payment // Type payment
print '<td>'; print '<td>';

View File

@ -4,7 +4,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -63,7 +63,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
if ($action == 'validate' && $user->rights->deplacement->creer) if ($action == 'validate' && $user->rights->deplacement->creer)
{ {
$object->fetch($id); $object->fetch($id);
if ($object->statut == 0) if ($object->statut == Deplacement::STATUS_DRAFT)
{ {
$result = $object->setStatut(1); $result = $object->setStatut(1);
if ($result > 0) if ($result > 0)
@ -81,9 +81,9 @@ if ($action == 'validate' && $user->rights->deplacement->creer)
elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer)
{ {
$object->fetch($id); $object->fetch($id);
if ($object->statut == 1) if ($object->statut == Deplacement::STATUS_VALIDATED)
{ {
$result = $object->setStatut(2); $result = $object->setStatut(Deplacement::STATUS_REFUNDED);
if ($result > 0) if ($result > 0)
{ {
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
@ -116,14 +116,14 @@ elseif ($action == 'add' && $user->rights->deplacement->creer)
{ {
$error = 0; $error = 0;
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
$object->type = GETPOST('type', 'alpha'); $object->type = GETPOST('type', 'alpha');
$object->socid = GETPOST('socid', 'int'); $object->socid = (int) GETPOST('socid', 'int');
$object->fk_user = GETPOST('fk_user', 'int'); $object->fk_user = (int) GETPOST('fk_user', 'int');
$object->note_private = GETPOST('note_private', 'alpha'); $object->note_private = GETPOST('note_private', 'alpha');
$object->note_public = GETPOST('note_public', 'alpha'); $object->note_public = GETPOST('note_public', 'alpha');
$object->statut = 0; $object->statut = Deplacement::STATUS_DRAFT;
if (!$object->date) if (!$object->date)
{ {
@ -178,8 +178,8 @@ elseif ($action == 'update' && $user->rights->deplacement->creer)
$object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
$object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
$object->type = GETPOST('type', 'alpha'); $object->type = GETPOST('type', 'alpha');
$object->socid = GETPOST('socid', 'int'); $object->socid = (int) GETPOST('socid', 'int');
$object->fk_user = GETPOST('fk_user', 'int'); $object->fk_user = (int) GETPOST('fk_user', 'int');
$object->note_private = GETPOST('note_private', 'alpha'); $object->note_private = GETPOST('note_private', 'alpha');
$object->note_public = GETPOST('note_public', 'alpha'); $object->note_public = GETPOST('note_public', 'alpha');
@ -523,7 +523,7 @@ elseif ($id)
print '<div class="tabsAction">'; print '<div class="tabsAction">';
if ($object->statut < 2) // if not refunded if ($object->statut < Deplacement::STATUS_REFUNDED) // if not refunded
{ {
if ($user->rights->deplacement->creer) if ($user->rights->deplacement->creer)
{ {
@ -535,7 +535,7 @@ elseif ($id)
} }
} }
if ($object->statut == 0) // if draft if ($object->statut == Deplacement::STATUS_DRAFT) // if draft
{ {
if ($user->rights->deplacement->creer) if ($user->rights->deplacement->creer)
{ {
@ -547,7 +547,7 @@ elseif ($id)
} }
} }
if ($object->statut == 1) // if validated if ($object->statut == Deplacement::STATUS_VALIDATED) // if validated
{ {
if ($user->rights->deplacement->creer) if ($user->rights->deplacement->creer)
{ {

View File

@ -3,6 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -81,14 +82,40 @@ class Deplacement extends CommonObject
*/ */
public $fk_user; public $fk_user;
public $km; /**
* @var string km value formatted
*/
public $km;
/**
* @var int Thirdparty id
*/
public $socid; public $socid;
public $statut; // 0=draft, 1=validated
/**
* @var int Status 0=draft, 1=validated, 2=Refunded
*/
public $statut;
public $extraparams=array(); public $extraparams=array();
public $statuts=array(); public $statuts=array();
public $statuts_short=array(); public $statuts_short=array();
/**
* Draft status
*/
const STATUS_DRAFT = 0;
/**
* Validated status
*/
const STATUS_VALIDATED = 1;
/**
* Refunded status
*/
const STATUS_REFUNDED = 2;
/** /**
* Constructor * Constructor
* *

View File

@ -172,7 +172,7 @@ if ($resql)
// Type // Type
print '<td>'.$langs->trans($obj->type).'</td>'; print '<td>'.$langs->trans($obj->type).'</td>';
// Date // Date
print '<td align="center">'.dol_print_date($db->jdate($obj->dd), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->dd), 'day').'</td>';
// User // User
print '<td>'; print '<td>';
$userstatic->id = $obj->fk_user; $userstatic->id = $obj->fk_user;

View File

@ -255,10 +255,10 @@ print '<br><br>';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
print '<tr height="24">'; print '<tr height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>'; print '<td class="center">'.$langs->trans("Year").'</td>';
print '<td align="center">'.$langs->trans("Number").'</td>'; print '<td class="center">'.$langs->trans("Number").'</td>';
print '<td align="center">'.$langs->trans("AmountTotal").'</td>'; print '<td class="center">'.$langs->trans("AmountTotal").'</td>';
print '<td align="center">'.$langs->trans("AmountAverage").'</td>'; print '<td class="center">'.$langs->trans("AmountAverage").'</td>';
print '</tr>'; print '</tr>';
$oldyear=0; $oldyear=0;

View File

@ -2801,7 +2801,7 @@ if ($action == 'create')
}); });
</script>'; </script>';
} }
if (!GETPOST('fac_rec', 'int')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddThirdParty").'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>'; if (!GETPOST('fac_rec', 'int')) print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&client=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td>'; print '</td>';
print '</tr>'."\n"; print '</tr>'."\n";
} }
@ -3008,7 +3008,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceFirstSituationAsk").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3016,7 +3016,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceSituationAsk").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3025,7 +3025,7 @@ if ($action == 'create')
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">'; print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> '; $tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> ';
$text = '<label>'.$tmp.$langs->trans("InvoiceReplacement").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceReplacement").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'; print '</div></div>';
@ -3114,7 +3114,7 @@ if ($action == 'create')
if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> '; if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = '<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
else $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > '; else $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > ';
$text = '<label>'.$tmp.$langs->trans("InvoiceAvoir").'</label> '; $text = '<label>'.$tmp.$langs->trans("InvoiceAvoir").'</label> ';
$text .= '('.$langs->trans("YouMustCreateInvoiceFromThird").') '; $text .= '<span class="opacitymedium">('.$langs->trans("YouMustCreateInvoiceFromThird").')</span> ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3); $desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc; print $desc;
print '</div></div>'."\n"; print '</div></div>'."\n";
@ -3211,7 +3211,6 @@ if ($action == 'create')
$rwStyle = ''; $rwStyle = '';
} }
$retained_warranty = GETPOST('retained_warranty', 'int'); $retained_warranty = GETPOST('retained_warranty', 'int');
$retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; $retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">'; print '<tr class="retained-warranty-line" style="'.$rwStyle.'" ><td class="nowrap">'.$langs->trans('RetainedWarranty').'</td><td colspan="2">';
@ -3260,7 +3259,7 @@ if ($action == 'create')
$langs->load('projects'); $langs->load('projects');
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">'; print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1); $numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="valignmiddle text-plus-circle">'.$langs->trans("AddProject").'</span><span class="fa fa-plus-circle valignmiddle"></span></a>'; print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>';
print '</td></tr>'; print '</td></tr>';
} }
@ -3909,9 +3908,14 @@ elseif ($id > 0 || !empty($ref))
if ($object->fk_fac_rec_source > 0) if ($object->fk_fac_rec_source > 0)
{ {
$tmptemplate = new FactureRec($db); $tmptemplate = new FactureRec($db);
$result = $tmptemplate->fetch($object->fk_fac_rec_source); $result = $tmptemplate->fetch($object->fk_fac_rec_source);
if ($result > 0) print '<span class="opacitymedium">. '.$langs->trans("GeneratedFromTemplate", $tmptemplate->ref).'</span>'; if ($result > 0) {
print '. <span class="opacitymedium">'.$langs->trans(
"GeneratedFromTemplate",
'<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$tmptemplate->id.'">'.$tmptemplate->ref.'</a>'
).'</span>';
}
} }
print '</td></tr>'; print '</td></tr>';
@ -4378,7 +4382,7 @@ elseif ($id > 0 || !empty($ref))
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ListOfSituationInvoices').'</td>'; print '<td>'.$langs->trans('ListOfSituationInvoices').'</td>';
print '<td></td>'; print '<td></td>';
print '<td align="center">'.$langs->trans('Situation').'</td>'; print '<td class="center">'.$langs->trans('Situation').'</td>';
if (!empty($conf->banque->enabled)) print '<td class="right"></td>'; if (!empty($conf->banque->enabled)) print '<td class="right"></td>';
print '<td class="right">'.$langs->trans('AmountHT').'</td>'; print '<td class="right">'.$langs->trans('AmountHT').'</td>';
print '<td class="right">'.$langs->trans('AmountTTC').'</td>'; print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
@ -4419,7 +4423,7 @@ elseif ($id > 0 || !empty($ref))
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$object->getNomUrl(1).'</td>'; print '<td>'.$object->getNomUrl(1).'</td>';
print '<td></td>'; print '<td></td>';
print '<td align="center">'.(($object->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$object->situation_counter.'</td>'; print '<td class="center">'.(($object->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$object->situation_counter.'</td>';
if (!empty($conf->banque->enabled)) print '<td class="right"></td>'; if (!empty($conf->banque->enabled)) print '<td class="right"></td>';
print '<td class="right">'.price($object->total_ht).'</td>'; print '<td class="right">'.price($object->total_ht).'</td>';
print '<td class="right">'.price($object->total_ttc).'</td>'; print '<td class="right">'.price($object->total_ttc).'</td>';
@ -4469,7 +4473,7 @@ elseif ($id > 0 || !empty($ref))
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$next_invoice->getNomUrl(1).'</td>'; print '<td>'.$next_invoice->getNomUrl(1).'</td>';
print '<td></td>'; print '<td></td>';
print '<td align="center">'.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$next_invoice->situation_counter.'</td>'; print '<td class="center">'.(($next_invoice->type == Facture::TYPE_CREDIT_NOTE) ? $langs->trans('situationInvoiceShortcode_AS') : $langs->trans('situationInvoiceShortcode_S')).$next_invoice->situation_counter.'</td>';
if (!empty($conf->banque->enabled)) print '<td class="right"></td>'; if (!empty($conf->banque->enabled)) print '<td class="right"></td>';
print '<td class="right">'.price($next_invoice->total_ht).'</td>'; print '<td class="right">'.price($next_invoice->total_ht).'</td>';
print '<td class="right">'.price($next_invoice->total_ttc).'</td>'; print '<td class="right">'.price($next_invoice->total_ttc).'</td>';
@ -4566,7 +4570,7 @@ elseif ($id > 0 || !empty($ref))
print '</td>'; print '</td>';
} }
print '<td class="right">'.price($sign * $objp->amount).'</td>'; print '<td class="right">'.price($sign * $objp->amount).'</td>';
print '<td align="center">'; print '<td class="center">';
if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0)
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletepaiement&paiement_id='.$objp->rowid.'">'; print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletepaiement&paiement_id='.$objp->rowid.'">';

View File

@ -564,22 +564,22 @@ if ($resql)
} }
if (!empty($arrayfields['recurring']['checked'])) if (!empty($arrayfields['recurring']['checked']))
{ {
print '<td align="center">'.yn($objp->frequency ? 1 : 0).'</td>'; print '<td class="center">'.yn($objp->frequency ? 1 : 0).'</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
if (!empty($arrayfields['f.frequency']['checked'])) if (!empty($arrayfields['f.frequency']['checked']))
{ {
print '<td align="center">'.($objp->frequency > 0 ? $objp->frequency : '').'</td>'; print '<td class="center">'.($objp->frequency > 0 ? $objp->frequency : '').'</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
if (!empty($arrayfields['f.unit_frequency']['checked'])) if (!empty($arrayfields['f.unit_frequency']['checked']))
{ {
print '<td align="center">'.($objp->frequency > 0 ? $objp->unit_frequency : '').'</td>'; print '<td class="center">'.($objp->frequency > 0 ? $objp->unit_frequency : '').'</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
if (!empty($arrayfields['f.nb_gen_done']['checked'])) if (!empty($arrayfields['f.nb_gen_done']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print ($objp->frequency > 0 ? $objp->nb_gen_done.($objp->nb_gen_max > 0 ? ' / '.$objp->nb_gen_max : '') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>'); print ($objp->frequency > 0 ? $objp->nb_gen_done.($objp->nb_gen_max > 0 ? ' / '.$objp->nb_gen_max : '') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>');
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
@ -587,7 +587,7 @@ if ($resql)
// Date last generation // Date last generation
if (!empty($arrayfields['f.date_last_gen']['checked'])) if (!empty($arrayfields['f.date_last_gen']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print ($objp->frequency > 0 ? dol_print_date($db->jdate($objp->date_last_gen), 'day') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>'); print ($objp->frequency > 0 ? dol_print_date($db->jdate($objp->date_last_gen), 'day') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>');
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
@ -595,7 +595,7 @@ if ($resql)
// Date next generation // Date next generation
if (!empty($arrayfields['f.date_when']['checked'])) if (!empty($arrayfields['f.date_when']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print '<div class="nowraponall">'; print '<div class="nowraponall">';
print ($objp->frequency ? ($invoicerectmp->isMaxNbGenReached() ? '<strike>' : '').dol_print_date($db->jdate($objp->date_when), 'day').($invoicerectmp->isMaxNbGenReached() ? '</strike>' : '') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>'); print ($objp->frequency ? ($invoicerectmp->isMaxNbGenReached() ? '<strike>' : '').dol_print_date($db->jdate($objp->date_when), 'day').($invoicerectmp->isMaxNbGenReached() ? '</strike>' : '') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>');
if (!$invoicerectmp->isMaxNbGenReached()) if (!$invoicerectmp->isMaxNbGenReached())
@ -612,14 +612,14 @@ if ($resql)
} }
if (!empty($arrayfields['f.datec']['checked'])) if (!empty($arrayfields['f.datec']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($objp->datec), 'dayhour'); print dol_print_date($db->jdate($objp->datec), 'dayhour');
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
if (!empty($arrayfields['f.tms']['checked'])) if (!empty($arrayfields['f.tms']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
print dol_print_date($db->jdate($objp->tms), 'dayhour'); print dol_print_date($db->jdate($objp->tms), 'dayhour');
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
@ -634,13 +634,13 @@ if ($resql)
print $hookmanager->resPrint; print $hookmanager->resPrint;
// Status // Status
if (!empty($arrayfields['status']['checked'])) { if (!empty($arrayfields['status']['checked'])) {
print '<td align="center">'; print '<td class="center">';
print $invoicerectmp->getLibStatut(3, 0); print $invoicerectmp->getLibStatut(3, 0);
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
} }
// Action column // Action column
print '<td align="center">'; print '<td class="center">';
if ($user->rights->facture->creer && empty($invoicerectmp->suspended)) if ($user->rights->facture->creer && empty($invoicerectmp->suspended))
{ {
if ($invoicerectmp->isMaxNbGenReached()) if ($invoicerectmp->isMaxNbGenReached())

View File

@ -1166,7 +1166,7 @@ if ($resql)
// Country // Country
if (! empty($arrayfields['country.code_iso']['checked'])) if (! empty($arrayfields['country.code_iso']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
$tmparray=getCountry($obj->fk_pays, 'all'); $tmparray=getCountry($obj->fk_pays, 'all');
print $tmparray['label']; print $tmparray['label'];
print '</td>'; print '</td>';
@ -1175,7 +1175,7 @@ if ($resql)
// Type ent // Type ent
if (! empty($arrayfields['typent.code']['checked'])) if (! empty($arrayfields['typent.code']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
if (! is_array($typenArray) || count($typenArray)==0) $typenArray = $formcompany->typent_array(1); if (! is_array($typenArray) || count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
print $typenArray[$obj->typent_code]; print $typenArray[$obj->typent_code];
print '</td>'; print '</td>';
@ -1184,7 +1184,7 @@ if ($resql)
// Staff // Staff
if (! empty($arrayfields['staff.code']['checked'])) if (! empty($arrayfields['staff.code']['checked']))
{ {
print '<td align="center">'; print '<td class="center">';
if (! is_array($staffArray) || count($staffArray)==0) $staffArray = $formcompany->effectif_array(1); if (! is_array($staffArray) || count($staffArray)==0) $staffArray = $formcompany->effectif_array(1);
print $staffArray[$obj->staff_code]; print $staffArray[$obj->staff_code];
print '</td>'; print '</td>';

View File

@ -587,11 +587,11 @@ if ($object->id > 0)
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="left">'.$langs->trans("DateRequest").'</td>'; print '<td class="left">'.$langs->trans("DateRequest").'</td>';
print '<td align="center">'.$langs->trans("User").'</td>'; print '<td class="center">'.$langs->trans("User").'</td>';
print '<td align="center">'.$langs->trans("Amount").'</td>'; print '<td class="center">'.$langs->trans("Amount").'</td>';
print '<td align="center">'.$langs->trans("WithdrawalReceipt").'</td>'; print '<td class="center">'.$langs->trans("WithdrawalReceipt").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="center">'.$langs->trans("DateProcess").'</td>'; print '<td class="center">'.$langs->trans("DateProcess").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';
@ -620,11 +620,11 @@ if ($object->id > 0)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td class="left">'.dol_print_date($db->jdate($obj->date_demande), 'day')."</td>\n"; print '<td class="left">'.dol_print_date($db->jdate($obj->date_demande), 'day')."</td>\n";
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>';
print '<td align="center">'.price($obj->amount).'</td>'; print '<td class="center">'.price($obj->amount).'</td>';
print '<td align="center">-</td>'; print '<td align="center">-</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="center">'.$langs->trans("OrderWaiting").'</td>'; print '<td class="center">'.$langs->trans("OrderWaiting").'</td>';
print '<td class="right">'; print '<td class="right">';
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;did='.$obj->rowid.'">'; print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=delete&amp;did='.$obj->rowid.'">';
@ -672,9 +672,9 @@ if ($object->id > 0)
print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>'; print '<td align="center"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->user_id.'">'.img_object($langs->trans("ShowUser"), 'user').' '.$obj->login.'</a></td>';
print '<td align="center">'.price($obj->amount).'</td>'; print '<td class="center">'.price($obj->amount).'</td>';
print '<td align="center">'; print '<td class="center">';
if ($obj->fk_prelevement_bons > 0) if ($obj->fk_prelevement_bons > 0)
{ {
$withdrawreceipt = new BonPrelevement($db); $withdrawreceipt = new BonPrelevement($db);
@ -686,7 +686,7 @@ if ($object->id > 0)
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_traite), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->date_traite), 'day')."</td>\n";
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';

View File

@ -276,7 +276,7 @@ print '<br><br>';
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre" height="24">'; print '<tr class="liste_titre" height="24">';
print '<td align="center">'.$langs->trans("Year").'</td>'; print '<td class="center">'.$langs->trans("Year").'</td>';
print '<td class="right">'.$langs->trans("NumberOfBills").'</td>'; print '<td class="right">'.$langs->trans("NumberOfBills").'</td>';
print '<td class="right">%</td>'; print '<td class="right">%</td>';
print '<td class="right">'.$langs->trans("AmountTotal").'</td>'; print '<td class="right">'.$langs->trans("AmountTotal").'</td>';

View File

@ -667,10 +667,10 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$chargestatic->getNomUrl(1).'</td>'; print '<td>'.$chargestatic->getNomUrl(1).'</td>';
print '<td align="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->date_ech), 'day').'</td>';
print '<td class="nowrap right">'.price($obj->amount).'</td>'; print '<td class="nowrap right">'.price($obj->amount).'</td>';
print '<td class="nowrap right">'.price($obj->sumpaid).'</td>'; print '<td class="nowrap right">'.price($obj->sumpaid).'</td>';
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>'; print '<td class="center">'.$chargestatic->getLibStatut(3).'</td>';
print '</tr>'; print '</tr>';
$tot_ttc += $obj->amount; $tot_ttc += $obj->amount;

View File

@ -584,8 +584,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$arraytitle.'</td>'; print '<td>'.$arraytitle.'</td>';
print '<td align="center">'.$langs->trans('Date').'</td>'; print '<td class="center">'.$langs->trans('Date').'</td>';
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>'; print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>';
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
print '<td>'.$langs->trans('Currency').'</td>'; print '<td>'.$langs->trans('Currency').'</td>';
print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>'; print '<td class="right">'.$langs->trans('MulticurrencyAmountTTC').'</td>';
@ -645,7 +645,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print "</td>\n"; print "</td>\n";
// Date // Date
print '<td align="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($objp->df), 'day')."</td>\n";
// Due date // Due date
if ($objp->dlr > 0) if ($objp->dlr > 0)
@ -666,7 +666,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
} }
// Currency // Currency
if (!empty($conf->multicurrency->enabled)) print '<td align="center">'.$objp->multicurrency_code."</td>\n"; if (!empty($conf->multicurrency->enabled)) print '<td class="center">'.$objp->multicurrency_code."</td>\n";
// Multicurrency Price // Multicurrency Price
if (!empty($conf->multicurrency->enabled)) if (!empty($conf->multicurrency->enabled))

View File

@ -502,7 +502,7 @@ if ($action == 'new')
print '<td class="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>'; print '<td class="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
// Link to payment // Link to payment
print '<td align="center">'; print '<td class="center">';
$paymentstatic->id = $value["paymentid"]; $paymentstatic->id = $value["paymentid"];
$paymentstatic->ref = $value["paymentid"]; $paymentstatic->ref = $value["paymentid"];
if ($paymentstatic->id) if ($paymentstatic->id)
@ -515,7 +515,7 @@ if ($action == 'new')
} }
print '</td>'; print '</td>';
// Link to bank transaction // Link to bank transaction
print '<td align="center">'; print '<td class="center">';
$accountlinestatic->rowid = $value["id"]; $accountlinestatic->rowid = $value["id"];
if ($accountlinestatic->rowid) if ($accountlinestatic->rowid)
{ {
@ -527,7 +527,7 @@ if ($action == 'new')
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td class="center">';
print '<input id="'.$value["id"].'" class="flat checkforremise_'.$bid.'" checked type="checkbox" name="toRemise[]" value="'.$value["id"].'">'; print '<input id="'.$value["id"].'" class="flat checkforremise_'.$bid.'" checked type="checkbox" name="toRemise[]" value="'.$value["id"].'">';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -685,14 +685,14 @@ else
while ($objp = $db->fetch_object($resql)) while ($objp = $db->fetch_object($resql))
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td align="center">'.$i.'</td>'; print '<td class="center">'.$i.'</td>';
print '<td align="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation print '<td class="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation
print '<td align="center">'.($objp->num_chq ? $objp->num_chq : '&nbsp;').'</td>'; print '<td class="center">'.($objp->num_chq ? $objp->num_chq : '&nbsp;').'</td>';
print '<td>'.dol_trunc($objp->emetteur, 24).'</td>'; print '<td>'.dol_trunc($objp->emetteur, 24).'</td>';
print '<td>'.dol_trunc($objp->banque, 24).'</td>'; print '<td>'.dol_trunc($objp->banque, 24).'</td>';
print '<td class="right">'.price($objp->amount).'</td>'; print '<td class="right">'.price($objp->amount).'</td>';
// Link to payment // Link to payment
print '<td align="center">'; print '<td class="center">';
$paymentstatic->id = $objp->pid; $paymentstatic->id = $objp->pid;
$paymentstatic->ref = $objp->pid; $paymentstatic->ref = $objp->pid;
if ($paymentstatic->id) if ($paymentstatic->id)
@ -705,7 +705,7 @@ else
} }
print '</td>'; print '</td>';
// Link to bank transaction // Link to bank transaction
print '<td align="center">'; print '<td class="center">';
$accountlinestatic->rowid = $objp->rowid; $accountlinestatic->rowid = $objp->rowid;
if ($accountlinestatic->rowid) if ($accountlinestatic->rowid)
{ {

View File

@ -197,7 +197,7 @@ if ($resql)
print '</td>'; print '</td>';
// Date // Date
print '<td align="center">'.dol_print_date($db->jdate($objp->dp), 'day').'</td>'; // TODO Use date hour print '<td class="center">'.dol_print_date($db->jdate($objp->dp), 'day').'</td>'; // TODO Use date hour
// Bank // Bank
print '<td>'; print '<td>';

View File

@ -306,7 +306,7 @@ if ($resql)
// Date // Date
$dateformatforpayment = 'day'; $dateformatforpayment = 'day';
if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour';
print '<td align="center">'.dol_print_date($db->jdate($objp->dp), $dateformatforpayment).'</td>'; print '<td class="center">'.dol_print_date($db->jdate($objp->dp), $dateformatforpayment).'</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;
// Thirdparty // Thirdparty

View File

@ -121,7 +121,7 @@ if ($resql)
print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n"; print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp), 'day')."</td>\n";
print "<td>$objp->paiement_type $objp->num_paiement</td>\n"; print "<td>$objp->paiement_type $objp->num_paiement</td>\n";
print '<td class="right">'.price($objp->amount).'</td>'; print '<td class="right">'.price($objp->amount).'</td>';
print '<td align="center">'; print '<td class="center">';
if ($objp->statut == 0) if ($objp->statut == 0)
{ {

View File

@ -267,7 +267,7 @@ if ($action == 'create')
print '<td class="right">'.$langs->trans("Amount").'</td>'; print '<td class="right">'.$langs->trans("Amount").'</td>';
print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>'; print '<td class="right">'.$langs->trans("AlreadyPaid").'</td>';
print '<td class="right">'.$langs->trans("RemainderToPay").'</td>'; print '<td class="right">'.$langs->trans("RemainderToPay").'</td>';
print '<td align="center">'.$langs->trans("Amount").'</td>'; print '<td class="center">'.$langs->trans("Amount").'</td>';
print "</tr>\n"; print "</tr>\n";
$total = 0; $total = 0;
@ -294,7 +294,7 @@ if ($action == 'create')
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>"; print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
print '<td align="center">'; print '<td class="center">';
if ($sumpaid < $objp->amount) if ($sumpaid < $objp->amount)
{ {
$namef = "amount_".$objp->id; $namef = "amount_".$objp->id;

View File

@ -241,7 +241,7 @@ if ($resql)
print '<td>'.$langs->trans('Type').'</td>'; print '<td>'.$langs->trans('Type').'</td>';
print '<td>'.$langs->trans('Label').'</td>'; print '<td>'.$langs->trans('Label').'</td>';
print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>'; print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
print '<td align="center">'.$langs->trans('Status').'</td>'; print '<td class="center">'.$langs->trans('Status').'</td>';
print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>'; print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
print "</tr>\n"; print "</tr>\n";
@ -267,7 +267,7 @@ if ($resql)
// Expected to pay // Expected to pay
print '<td class="right">'.price($objp->sc_amount).'</td>'; print '<td class="right">'.price($objp->sc_amount).'</td>';
// Status // Status
print '<td align="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>'; print '<td class="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>';
// Amount payed // Amount payed
print '<td class="right">'.price($objp->amount).'</td>'; print '<td class="right">'.price($objp->amount).'</td>';
print "</tr>\n"; print "</tr>\n";

View File

@ -156,7 +156,7 @@ if ($result)
print '<a href="card.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n"; print '<a href="card.php?id='.$obj->rowid.'">'.$obj->ref."</a></td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>\n"; print '<td class="right">'.price($obj->amount)."</td>\n";

View File

@ -339,7 +339,7 @@ if ($result)
print"\n<!-- debut table -->\n"; print"\n<!-- debut table -->\n";
print '<table class="noborder centpercent">'; print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td>'; print '<tr class="liste_titre"><td>'.$langs->trans("Ref").'</td>';
print '<td align="center">'.$langs->trans("Date").'</td><td class="right">'.$langs->trans("Amount").'</td>'; print '<td class="center">'.$langs->trans("Date").'</td><td class="right">'.$langs->trans("Amount").'</td>';
print '</tr>'; print '</tr>';
while ($i < min($num,$limit)) while ($i < min($num,$limit))
@ -355,7 +355,7 @@ if ($result)
print $bprev->getNomUrl(1); print $bprev->getNomUrl(1);
print "</td>\n"; print "</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->datec),'day')."</td>\n";
print '<td class="right">'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."</td>\n"; print '<td class="right">'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."</td>\n";

View File

@ -241,7 +241,7 @@ if ($result)
print '<td class="right">'.price($obj->amount_requested)."</td>\n"; print '<td class="right">'.price($obj->amount_requested)."</td>\n";
// Status of requests // Status of requests
print '<td align="center">'; print '<td class="center">';
if ($obj->statut == 0) if ($obj->statut == 0)
{ {

View File

@ -212,8 +212,8 @@ if ($resql)
print '<td class="right">'.price($obj->amount)."</td>\n"; print '<td class="right">'.price($obj->amount)."</td>\n";
print '<td>'.$rej->motifs[$obj->motif].'</td>'; print '<td>'.$rej->motifs[$obj->motif].'</td>';
print '<td align="center">'.yn($obj->afacturer).'</td>'; print '<td class="center">'.yn($obj->afacturer).'</td>';
print '<td align="center">'.$obj->fk_facture.'</td>'; print '<td class="center">'.$obj->fk_facture.'</td>';
print "</tr>\n"; print "</tr>\n";
$total += $obj->amount; $total += $obj->amount;

View File

@ -192,7 +192,7 @@ if ($result)
print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n"; print '<td align="center"><a href="card.php?id='.$obj->rowid.'">'.$obj->code_client."</a></td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>\n"; print '<td class="right">'.price($obj->amount)."</td>\n";

View File

@ -120,7 +120,7 @@ if ($resql)
} }
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td>'; print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td>';
print '<td align="center">'.$nbtotal.'</td><td>&nbsp;</td><td class="right">'; print '<td class="center">'.$nbtotal.'</td><td>&nbsp;</td><td class="right">';
print price($total); print price($total);
print '</td><td class="right">&nbsp;</td>'; print '</td><td class="right">&nbsp;</td>';
print "</tr></table>"; print "</tr></table>";

View File

@ -277,7 +277,7 @@ if ($resql)
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
// Date end period // Date end period
print '<td align="center">'; print '<td class="center">';
if ($obj->periode) if ($obj->periode)
{ {
print '<a href="list.php?year='.strftime("%Y", $db->jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode), 'day').'</a>'; print '<a href="list.php?year='.strftime("%Y", $db->jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode), 'day').'</a>';

View File

@ -170,7 +170,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
// Ref payment // Ref payment
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n"; print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
// Date payment // Date payment
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>'; print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
// Type payment // Type payment
print '<td>'; print '<td>';
if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' '; if ($obj->payment_code) print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
@ -272,7 +272,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
$tva_static->ref = $obj->rowid; $tva_static->ref = $obj->rowid;
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->dm), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>"; print '<td class="right">'.price($obj->amount)."</td>";
print "</tr>\n"; print "</tr>\n";
@ -373,7 +373,7 @@ while ($j < $numlt)
$tva_static->ref = $obj->rowid; $tva_static->ref = $obj->rowid;
print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$tva_static->getNomUrl(1)."</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->dp), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>"; print '<td class="right">'.price($obj->amount)."</td>";
print "</tr>\n"; print "</tr>\n";
@ -455,7 +455,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
$sal_static->ref = $obj->rowid; $sal_static->ref = $obj->rowid;
print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n"; print '<td class="left">'.$sal_static->getNomUrl(1)."</td>\n";
print '<td align="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n"; print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day')."</td>\n";
print '<td class="right">'.price($obj->amount)."</td>"; print '<td class="right">'.price($obj->amount)."</td>";
print "</tr>\n"; print "</tr>\n";

View File

@ -257,7 +257,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql = "SELECT fd.tva_tx AS vatrate,"; $sql = "SELECT fd.tva_tx AS vatrate,";
$sql .= " fd.product_type AS product_type,"; $sql .= " fd.product_type AS product_type,";
$sql .= " cc.label AS country,"; $sql .= " cc.code, cc.label AS country,";
for ($i = 1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$i, 'fd.total_ht', '0').") AS month".str_pad($i, 2, '0', STR_PAD_LEFT).","; $sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$i, 'fd.total_ht', '0').") AS month".str_pad($i, 2, '0', STR_PAD_LEFT).",";
} }
@ -289,7 +289,10 @@ if ($modecompta == 'CREANCES-DETTES') {
} else { } else {
print '<td class="left">'.$langs->trans("Service").'</td>'; print '<td class="left">'.$langs->trans("Service").'</td>';
} }
print '<td>'.$obj->country.'</td>'; // Country
print '<td>';
print $langs->trans("Country".$obj->code) != "Country".$obj->code ? $langs->trans("Country".$obj->code) : $obj->country;
print '</td>';
for ($i = 0; $i < 12; $i++) { for ($i = 0; $i < 12; $i++) {
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;
@ -335,7 +338,7 @@ if ($modecompta == 'CREANCES-DETTES') {
$sql2 = "SELECT ffd.tva_tx AS vatrate,"; $sql2 = "SELECT ffd.tva_tx AS vatrate,";
$sql2 .= " ffd.product_type AS product_type,"; $sql2 .= " ffd.product_type AS product_type,";
$sql2 .= " cc.label AS country,"; $sql2 .= " cc.code, cc.label AS country,";
for ($i = 1; $i <= 12; $i++) { for ($i = 1; $i <= 12; $i++) {
$sql2 .= " SUM(".$db->ifsql('MONTH(ff.datef)='.$i, 'ffd.total_ht', '0').") AS month".str_pad($i, 2, '0', STR_PAD_LEFT).","; $sql2 .= " SUM(".$db->ifsql('MONTH(ff.datef)='.$i, 'ffd.total_ht', '0').") AS month".str_pad($i, 2, '0', STR_PAD_LEFT).",";
} }
@ -368,7 +371,9 @@ if ($modecompta == 'CREANCES-DETTES') {
} else { } else {
print '<td class="left">'.$langs->trans("Service").'</td>'; print '<td class="left">'.$langs->trans("Service").'</td>';
} }
print '<td>'.$obj->country.'</td>'; print '<td>';
print $langs->trans("Country".$obj->code) != "Country".$obj->code ? $langs->trans("Country".$obj->code) : $obj->country;
print '</td>';
for ($i = 0; $i < 12; $i++) { for ($i = 0; $i < 12; $i++) {
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;

View File

@ -426,7 +426,7 @@ if (count($amount)) {
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>'; print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
// Other stats // Other stats
print '<td align="center">'; print '<td class="center">';
if (! empty($conf->propal->enabled) && $key>0) { if (! empty($conf->propal->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;'; print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;';
} }

View File

@ -602,7 +602,7 @@ if (count($amount)) {
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>'; print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
// Other stats // Other stats
print '<td align="center">'; print '<td class="center">';
if (! empty($conf->propal->enabled) && $key>0) { if (! empty($conf->propal->enabled) && $key>0) {
print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;'; print '&nbsp;<a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a>&nbsp;';
} }

View File

@ -43,11 +43,16 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin"));
$now = dol_now();
$current_date = dol_getdate($now);
if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1;
// Date range // Date range
$year = GETPOST("year", "int"); $year = GETPOST("year", "int");
if (empty($year)) if (empty($year))
{ {
$year_current = strftime("%Y", dol_now()); $year_current = $current_date['year'];
$year_start = $year_current; $year_start = $year_current;
} else { } else {
$year_current = $year; $year_current = $year;
@ -55,19 +60,36 @@ if (empty($year))
} }
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"));
$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"));
// Quarter // Set default period if not defined
if (empty($date_start) || empty($date_end)) // We define date_start and date_end if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{ {
$q = GETPOST("q"); $q = GETPOST("q", "int");
if (empty($q)) if (empty($q))
{ {
if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); } if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); }
else else
{ {
$date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm');
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; }
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat
if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) {
if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year
$year_start--;
}
} else {
if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year
$year_start--;
}
}
$date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false);
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
}
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm');
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
}
} }
} }
else else
@ -166,7 +188,7 @@ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue"); if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '<br>'.$langs->trans("ThisIsAnEstimatedValue");
//$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":""); //$periodlink=($year_start?"<a href='".$_SERVER["PHP_SELF"]."?year=".($year_start-1)."&modetax=".$modetax."'>".img_previous()."</a> <a href='".$_SERVER["PHP_SELF"]."?year=".($year_start+1)."&modetax=".$modetax."'>".img_next()."</a>":"");
$description .= $fsearch; $description .= ($description ? '<br>' : '').$fsearch;
if (!empty($conf->global->TAX_REPORT_EXTRA_REPORT)) if (!empty($conf->global->TAX_REPORT_EXTRA_REPORT))
{ {
$description .= '<br>' $description .= '<br>'

View File

@ -35,12 +35,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin"));
$now = dol_now();
$current_date = dol_getdate($now);
if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1;
// Date range // Date range
$year = GETPOST("year", "int"); $year = GETPOST("year", "int");
if (empty($year)) if (empty($year))
{ {
$year_current = strftime("%Y", dol_now()); $year_current = $current_date['year'];
if ($conf->global->SOCIETE_FISCAL_MONTH_START > date('m')) $year_current--;
$year_start = $year_current; $year_start = $year_current;
} else { } else {
$year_current = $year; $year_current = $year;
@ -48,6 +51,7 @@ if (empty($year))
} }
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"));
$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"));
// Set default period if not defined
if (empty($date_start) || empty($date_end)) // We define date_start and date_end if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{ {
$q = GETPOST("q", "int"); $q = GETPOST("q", "int");
@ -56,8 +60,27 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); }
else else
{ {
$date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm');
$date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
}
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat
if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) {
if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year
$year_start--;
}
} else {
if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year
$year_start--;
}
}
$date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false);
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
}
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm');
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
}
} }
} }
else else

View File

@ -44,11 +44,15 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin")); $langs->loadLangs(array("other", "compta", "banks", "bills", "companies", "product", "trips", "admin"));
$now = dol_now();
$current_date = dol_getdate($now);
if (empty($conf->global->SOCIETE_FISCAL_MONTH_START)) $conf->global->SOCIETE_FISCAL_MONTH_START = 1;
// Date range // Date range
$year = GETPOST("year", "int"); $year = GETPOST("year", "int");
if (empty($year)) if (empty($year))
{ {
$year_current = strftime("%Y", dol_now()); $year_current = $current_date['year'];
$year_start = $year_current; $year_start = $year_current;
} else { } else {
$year_current = $year; $year_current = $year;
@ -56,7 +60,7 @@ if (empty($year))
} }
$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"));
$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear")); $date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"));
// Quarter // Set default period if not defined
if (empty($date_start) || empty($date_end)) // We define date_start and date_end if (empty($date_start) || empty($date_end)) // We define date_start and date_end
{ {
$q = GETPOST("q", "int"); $q = GETPOST("q", "int");
@ -65,10 +69,27 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); }
else else
{ {
$date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm');
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; }
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat
if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) {
if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year
$year_start--;
}
} else {
if (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) < 6) { // If perdio started from less than 6 years, we show past year
$year_start--;
}
}
$date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false);
$date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
}
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month
$date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm');
$date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
}
} }
} }
else else

View File

@ -250,11 +250,11 @@ $dolibarr_main_prod='0';
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore'; $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
// $dolibarr_main_restrict_ip // $dolibarr_main_restrict_ip
// To restrict access to backoffice to some ip addresses only. // To restrict access to backoffice to some ip addresses only. Use a comma to separate values.
// Note: Pages that does not need login (like public pages, web site) are not protected with this. // Note: Pages that does not need login (like public pages, web site) are not protected with this.
// Default value: '' // Default value: ''
// Examples: // Examples:
// $dolibarr_main_restrict_ip='127.0.0.1, 192.168.0.1'; // $dolibarr_main_restrict_ip='127.0.0.1, ::1, 192.168.0.1';
// //
$dolibarr_main_restrict_ip=''; $dolibarr_main_restrict_ip='';

View File

@ -896,7 +896,7 @@ while ($i < min($num, $limit))
// No EMail // No EMail
if (! empty($arrayfields['p.no_email']['checked'])) if (! empty($arrayfields['p.no_email']['checked']))
{ {
print '<td align="center">'.yn($obj->no_email).'</td>'; print '<td class="center">'.yn($obj->no_email).'</td>';
if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['nbfield']++;
} }
if (! empty($conf->socialnetworks->enabled)) { if (! empty($conf->socialnetworks->enabled)) {

View File

@ -44,6 +44,7 @@ if ($cancel)
$action = ''; $action = '';
} }
// Action to add record // Action to add record
if ($action == 'add' && !empty($permissiontoadd)) if ($action == 'add' && !empty($permissiontoadd))
{ {

Some files were not shown because too many files have changed in this diff Show More