Merge remote-tracking branch 'upstream/develop' into actioncomm_category
This commit is contained in:
commit
57055bad03
@ -145,6 +145,7 @@ NEW: #4301
|
||||
For Developers or integrators:
|
||||
|
||||
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: experimental zapier for dolibarr
|
||||
NEW: Accountancy - Add hook bookkeepinglist on general ledger
|
||||
|
||||
87
README-FR.md
87
README-FR.md
@ -1,18 +1,14 @@
|
||||
# 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, ...).
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### 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
|
||||
- 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
|
||||
|
||||
@ -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):
|
||||
|
||||
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.
|
||||
|
||||
|
||||
- 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
|
||||
|
||||
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
|
||||
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
|
||||
- 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/*
|
||||
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
Voir fichier ChangeLog.
|
||||
|
||||
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
### Modules principaux (tous optionnels):
|
||||
### Modules principaux (tous optionnels)
|
||||
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Gestion de catalogue de produits et services
|
||||
@ -83,7 +76,7 @@ Voir fichier ChangeLog.
|
||||
- Gestion des factures clients/fournisseurs et paiements
|
||||
- Gestion des virements bancaires SEPA
|
||||
- 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é, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock
|
||||
@ -96,7 +89,7 @@ Voir fichier ChangeLog.
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- …
|
||||
|
||||
### Autres modules:
|
||||
### Autres modules
|
||||
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
@ -111,7 +104,7 @@ Voir fichier ChangeLog.
|
||||
- Intégration de système de paiements (Paypal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers:
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- 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é.
|
||||
- Plusieurs thèmes visuels.
|
||||
- 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.
|
||||
- APIs.
|
||||
- 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).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- 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)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- 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)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- …
|
||||
|
||||
### 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).
|
||||
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- 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.
|
||||
- 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
|
||||
|
||||
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
|
||||
|
||||
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>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
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)
|
||||
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr project sur les réseaux francophones
|
||||
|
||||
- Facebook: <https://www.facebook.com/dolibarr.fr>
|
||||
- Google+: <https://plus.google.com/+DolibarrFrance>
|
||||
- Twitter: <https://www.twitter.com/dolibarr_france>
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [Twitter](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
|
||||
64
README.md
64
README.md
@ -16,7 +16,6 @@ You can use it as a standalone application or as a web application to be able to
|
||||
|
||||

|
||||
|
||||
|
||||
## 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+).
|
||||
@ -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.
|
||||
|
||||
|
||||
## INSTALLING
|
||||
|
||||
### 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.
|
||||
|
||||
- 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)
|
||||
|
||||
- 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
|
||||
|
||||
### 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.
|
||||
|
||||
|
||||
|
||||
## 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.
|
||||
- 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*").
|
||||
|
||||
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
@ -113,7 +107,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Foundations members management
|
||||
- Mass emailing
|
||||
- Surveys
|
||||
- Point of Sale (POS)
|
||||
- Point of Sale (POS)
|
||||
- …
|
||||
|
||||
### Other application/modules
|
||||
@ -144,14 +138,14 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- APIs
|
||||
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- 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
|
||||
- Tunisian tax stamp
|
||||
- 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 GDPR rules
|
||||
- ...
|
||||
- Spanish Tax RE and ISPF
|
||||
- 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
|
||||
- Tunisian tax stamp
|
||||
- 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 GDPR rules
|
||||
- ...
|
||||
- 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))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
|
||||
|
||||
### 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).
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
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
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING
|
||||
|
||||
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>
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
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.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
@ -1,31 +1,37 @@
|
||||
FROM php:7.0-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ENV HOST_USER_ID 33
|
||||
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/* \
|
||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
||||
&& docker-php-ext-install gd \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install ldap \
|
||||
&& 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/
|
||||
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 '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.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_connect_back=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 '172.17.0.1 docker.host' >> /etc/hosts
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
build: mariadb
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: dolibarr
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
usermod -u $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
|
||||
cat <<EOF > /usr/local/etc/php/php.ini
|
||||
|
||||
3
build/docker/mariadb/Dockerfile
Normal file
3
build/docker/mariadb/Dockerfile
Normal 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
|
||||
@ -974,7 +974,7 @@ while ($i < min($num, $limit))
|
||||
// Exported operation date
|
||||
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']++;
|
||||
}
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
@ -125,7 +125,7 @@ echo $this->control->tpl['ajax_selectcountry'];
|
||||
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
@ -1072,16 +1072,10 @@ else
|
||||
|
||||
// Other attributes
|
||||
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 "</table>\n";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
@ -1769,7 +1763,7 @@ else
|
||||
|
||||
|
||||
/*
|
||||
* Hotbar
|
||||
* Action bar
|
||||
*/
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
@ -124,7 +124,6 @@ if ($result)
|
||||
}
|
||||
|
||||
|
||||
//print '<tr><td width="30%" class="notopnoleft" valign="top">';
|
||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
|
||||
|
||||
@ -71,7 +71,6 @@ $adht = new AdherentType($db);
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
||||
$errmsg = '';
|
||||
$errmsgs = array();
|
||||
|
||||
$defaultdelay = 1;
|
||||
$defaultdelayunit = 'y';
|
||||
@ -687,20 +686,19 @@ if ($rowid > 0)
|
||||
$subscriptionstatic = new Subscription($db);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
print '<td class="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Type").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateStart").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print_liste_field_titre('DateCreation', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('Type', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
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";
|
||||
|
||||
@ -708,6 +706,7 @@ if ($rowid > 0)
|
||||
$adh = new Adherent($db);
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
@ -766,6 +765,13 @@ if ($rowid > 0)
|
||||
print "</tr>";
|
||||
$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>";
|
||||
}
|
||||
else
|
||||
@ -1002,7 +1008,7 @@ if ($rowid > 0)
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
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)))
|
||||
{
|
||||
$prodtmp = new Product($db);
|
||||
@ -1027,7 +1033,7 @@ if ($rowid > 0)
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
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)))
|
||||
{
|
||||
$prodtmp = new Product($db);
|
||||
@ -1070,9 +1076,9 @@ if ($rowid > 0)
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr><td colspan="2"> </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>';
|
||||
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("MailRecipient").'</b>: '.$object->email.'<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 .= '<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 '</td></tr>';
|
||||
|
||||
@ -442,7 +442,7 @@ print $langs->trans('BankColorizeMovementDesc');
|
||||
print "</td>";
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -450,7 +450,7 @@ if ($conf->global->BANK_COLORIZE_MOVEMENT) {
|
||||
}
|
||||
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 "</td>";
|
||||
}
|
||||
|
||||
@ -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>';
|
||||
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";
|
||||
|
||||
|
||||
|
||||
@ -320,7 +320,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->FICHEINTER_ADDON == $classname)
|
||||
{
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
@ -348,7 +348,7 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip .= $langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
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("MultiLanguage").': '.yn($module->option_multilang, 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 '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
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 $langs->trans("UseServicesDurationOnFichinter");
|
||||
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 '</td>';
|
||||
print '<td class="right">';
|
||||
@ -603,7 +603,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $langs->trans("UseDurationOnFichinter");
|
||||
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 '</td>';
|
||||
print '<td class="right">';
|
||||
@ -619,7 +619,7 @@ print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print $langs->trans("UseDateWithoutHourOnFichinter");
|
||||
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 '</td>';
|
||||
print '<td class="right">';
|
||||
|
||||
@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->HOLIDAY_ADDON == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -397,7 +397,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -405,13 +405,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->HOLIDAY_ADDON_PDF == $name)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
|
||||
|
||||
@ -245,7 +245,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->LIVRAISON_ADDON_NUMBER == "$file")
|
||||
{
|
||||
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 '</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><br><u>'.$langs->trans("FeaturesSupported").'</u>:';
|
||||
$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 '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'sending').'</a>';
|
||||
|
||||
@ -571,7 +571,7 @@ foreach ($fieldsforcontent as $tmpfieldlist)
|
||||
}
|
||||
print '</td>';
|
||||
if ($tmpfieldlist == 'topic') {
|
||||
print '<td align="center" rowspan="' . (count($fieldsforcontent)) . '">';
|
||||
print '<td class="center" rowspan="' . (count($fieldsforcontent)) . '">';
|
||||
if ($action != 'edit') {
|
||||
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');
|
||||
|
||||
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="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
@ -874,7 +874,7 @@ if ($resql)
|
||||
$url.='&';
|
||||
|
||||
// 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>';
|
||||
else print '<span class="opacitymedium">'.$actl[$obj->active].'</span>';
|
||||
print "</td>";
|
||||
|
||||
@ -198,20 +198,36 @@ if ($action=='install')
|
||||
// TODO Make more test
|
||||
}
|
||||
|
||||
// Now we install the module
|
||||
if (! $error)
|
||||
{
|
||||
//var_dump($dirins);
|
||||
@dol_delete_dir_recursive($dirins.'/'.$modulename); // delete the zip file
|
||||
dol_syslog("Uncompress of module file is a success. We copy it from ".$modulenamedir." into target dir ".$dirins.'/'.$modulename);
|
||||
$result=dolCopyDir($modulenamedir, $dirins.'/'.$modulename, '0444', 1);
|
||||
if ($result <= 0)
|
||||
{
|
||||
dol_syslog('Failed to call dolCopyDir result='.$result." with param ".$modulenamedir." and ".$dirins.'/'.$modulename, LOG_WARNING);
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorFailToCopyDir", $modulenamedir, $dirins.'/'.$modulename), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
dol_syslog("Uncompress of module file is a success.");
|
||||
|
||||
$modulenamearrays = array();
|
||||
if (dol_is_file($modulenamedir.'/metapackage.conf')) {
|
||||
// This is a meta package
|
||||
$metafile = file_get_contents($modulenamedir.'/metapackage.conf');
|
||||
$modulenamearrays = explode("\n", $metafile);
|
||||
}
|
||||
$modulenamearrays[$modulename] = $modulename;
|
||||
|
||||
foreach($modulenamearrays as $modulenameval) {
|
||||
if (strpos($modulenameval, '#') === 0) continue; // Discard comments
|
||||
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++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,12 +189,12 @@ dol_fiche_head($head, 'settings', $langs->trans("ModuleSetup"), -1, "multicurren
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
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 class="oddeven">';
|
||||
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE');
|
||||
} else {
|
||||
@ -206,7 +206,7 @@ print '</td></tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->transnoentitiesnoconv("multicurrency_useOriginTx").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_ORIGIN_TX');
|
||||
} else {
|
||||
@ -220,7 +220,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->transnoentitiesnoconv("MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT');
|
||||
} else {
|
||||
@ -313,7 +313,7 @@ print '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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 '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
|
||||
|
||||
@ -175,7 +175,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
//print "> ".$conf->global->PAYMENT_ADDON." - ".$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);
|
||||
|
||||
if ($conf->global->PAYMENT_ADDON.'.php' == $file) // If module is the one used, we show existing errors
|
||||
|
||||
@ -66,8 +66,7 @@ llxHeader('', $langs->trans("DefaultRights"), $wikihelp);
|
||||
|
||||
print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
|
||||
|
||||
print $langs->trans("DefaultRightsDesc");
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br><br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("DefaultRightsDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."</span><br><br>\n";
|
||||
|
||||
$db->begin();
|
||||
|
||||
@ -179,7 +178,7 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Module").'</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"> </td>';
|
||||
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));
|
||||
print '<td>'.$perm_libelle. '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->bydefault == 1)
|
||||
{
|
||||
print img_picto($langs->trans("Active"), 'tick');
|
||||
|
||||
@ -355,7 +355,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
@ -363,13 +363,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->PAYMENTORDER_ADDON_PDF == $name)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
|
||||
@ -306,7 +306,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->PROPALE_ADDON == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -442,7 +442,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -484,12 +484,12 @@ foreach ($dirmodels as $reldir)
|
||||
$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 '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||
|
||||
@ -82,7 +82,7 @@ llxHeader('', $langs->trans("Proxy"), $wikihelp);
|
||||
|
||||
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";
|
||||
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->RECEPTION_ADDON_NUMBER == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -395,7 +395,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -403,13 +403,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->RECEPTION_ADDON_PDF == $name)
|
||||
{
|
||||
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("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').'</a>';
|
||||
|
||||
@ -194,6 +194,7 @@ if ($action == 'maj_pattern')
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$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 $langs->trans("GeneratedPasswordDesc")."<br>\n";
|
||||
print '<span class="opacitymedium">'.$langs->trans("GeneratedPasswordDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -245,7 +246,7 @@ print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("RuleForGeneratedPasswords").'</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>';
|
||||
|
||||
foreach ($arrayhandler as $key => $module)
|
||||
@ -405,8 +406,8 @@ print "<input type=\"hidden\" name=\"action\" value=\"encrypt\">";
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Activated").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Activated").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Action").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Disable clear password in database
|
||||
|
||||
@ -90,7 +90,7 @@ llxHeader('', $langs->trans("Files"), $wikihelp);
|
||||
|
||||
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";
|
||||
|
||||
|
||||
|
||||
@ -473,7 +473,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
// Example with a yes / no select
|
||||
/*print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("INVENTORY_DISABLE_VIRTUAL").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('INVENTORY_DISABLE_VIRTUAL');
|
||||
} else {
|
||||
@ -486,7 +486,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||
// Example with a yes / no select
|
||||
/*print '<tr class="oddeven">';
|
||||
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) {
|
||||
print ajax_constantonoff('INVENTORY_USE_MIN_PA_IF_NO_LAST_PA');
|
||||
} else {
|
||||
|
||||
@ -268,7 +268,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -395,7 +395,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
//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
|
||||
@ -411,13 +411,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name")
|
||||
{
|
||||
//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("PaymentMode").': '.yn($module->option_modereg, 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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -298,7 +298,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -420,7 +420,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">';
|
||||
@ -435,13 +435,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name")
|
||||
{
|
||||
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("PaymentMode").': '.yn($module->option_modereg, 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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
//print "> ".$conf->global->SUPPLIER_PAYMENT_ADDON." - ".$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);
|
||||
|
||||
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
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
//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
|
||||
@ -382,13 +382,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name")
|
||||
{
|
||||
//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><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'order').'</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file")
|
||||
{
|
||||
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 '</td>';
|
||||
|
||||
@ -408,7 +408,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -450,12 +450,12 @@ foreach ($dirmodels as $reldir)
|
||||
$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 '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
|
||||
|
||||
@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir) {
|
||||
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->TICKET_ADDON == 'mod_'.$classname) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir) {
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLimitViewAssignedOnlyHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsAutoAssignTicketHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsLogEnableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -438,7 +438,7 @@ print '</tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationTo").'</td>';
|
||||
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 '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketEmailNotificationToHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -447,7 +447,7 @@ print '</tr>';
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketEmailNotificationFrom").'</td>';
|
||||
print '<td class="left">';
|
||||
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 '</td>';
|
||||
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->Create();
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketMessageMailIntroHelpAdmin"), 1, 'help');
|
||||
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->Create();
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketMessageMailSignatureHelpAdmin"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailMustExistHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsShowModuleLogoHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsShowCompanyLogoHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsEmailAlsoSendToMainAddressHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -310,7 +310,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_INTERFACE_TOPIC" value="'.$conf->global->TICKET_PUBLIC_INTERFACE_TOPIC.'" size="40" ></td>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help');
|
||||
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->Create();
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHomeHelpAdmin"), 1, 'help');
|
||||
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->Create();
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTextHelpMessageHelpAdmin"), 1, 'help');
|
||||
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 '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketsDisableEmailHelp"), 1, 'help');
|
||||
print '</td>';
|
||||
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->Create();
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
@ -371,7 +371,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE))
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'" size="40" ></td>';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -224,6 +224,13 @@ if (in_array($type, array('mysql', 'mysqli'))) {
|
||||
print '<option value="POSTGRESQL">POSTGRESQL</option>';
|
||||
print '</select>';
|
||||
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 '<label for="checkbox_drop_database">'.$langs->trans("AddDropDatabase").'</label>';
|
||||
print '-->';
|
||||
|
||||
@ -302,11 +302,11 @@ if ($mode == 'overwrite')
|
||||
print '<td>';
|
||||
print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
}
|
||||
else
|
||||
{*/
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
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")).'">';
|
||||
@ -356,7 +356,7 @@ if ($mode == 'overwrite')
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int'))
|
||||
{
|
||||
print '<input type="hidden" class="button" name="rowid" value="'.$obj->rowid.'">';
|
||||
|
||||
@ -263,7 +263,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -271,13 +271,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->USER_ADDON_PDF == $name)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
|
||||
|
||||
@ -210,7 +210,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Active
|
||||
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 img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
@ -218,13 +218,13 @@ foreach ($dirmodels as $reldir)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<td class="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($conf->global->USERGROUP_ADDON_PDF == $name)
|
||||
{
|
||||
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);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
|
||||
|
||||
@ -625,7 +625,7 @@ if ($id)
|
||||
|
||||
// Delete link
|
||||
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";
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ foreach ($workflowcodes as $key => $params)
|
||||
print ' '.img_warning($langs->transnoentitiesnoconv($params['warning']));
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff($key);
|
||||
|
||||
@ -1430,8 +1430,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="liste_titre">';
|
||||
$out .= '<td>#</td>';
|
||||
$out .= '<td>'.$langs->trans("Constant").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("ExpectedValue").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("Value").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("ExpectedValue").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("Value").'</td>';
|
||||
$out .= '</tr>'."\n";
|
||||
|
||||
$i = 0;
|
||||
@ -1451,8 +1451,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="oddeven">';
|
||||
$out .= '<td>'.$i.'</td>'."\n";
|
||||
$out .= '<td>'.$constname.'</td>'."\n";
|
||||
$out .= '<td align="center">'.$constvalue.'</td>'."\n";
|
||||
$out .= '<td align="center">'.$valueforchecksum.'</td>'."\n";
|
||||
$out .= '<td class="center">'.$constvalue.'</td>'."\n";
|
||||
$out .= '<td class="center">'.$valueforchecksum.'</td>'."\n";
|
||||
$out .= "</tr>\n";
|
||||
}
|
||||
|
||||
@ -1498,7 +1498,7 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="liste_titre">';
|
||||
$out .= '<td>#</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";
|
||||
$tmpfilelist = dol_sort_array($file_list['missing'], 'filename');
|
||||
if (is_array($tmpfilelist) && count($tmpfilelist))
|
||||
@ -1510,7 +1510,7 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="oddeven">';
|
||||
$out .= '<td>'.$i.'</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";
|
||||
}
|
||||
}
|
||||
@ -1532,8 +1532,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="liste_titre">';
|
||||
$out .= '<td>#</td>';
|
||||
$out .= '<td>'.$langs->trans("Filename").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("ExpectedChecksum").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("CurrentChecksum").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
|
||||
$out .= '<td class="right">'.$langs->trans("Size").'</td>';
|
||||
$out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
|
||||
$out .= '</tr>'."\n";
|
||||
@ -1547,8 +1547,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="oddeven">';
|
||||
$out .= '<td>'.$i.'</td>'."\n";
|
||||
$out .= '<td>'.$file['filename'].'</td>'."\n";
|
||||
$out .= '<td align="center">'.$file['expectedmd5'].'</td>'."\n";
|
||||
$out .= '<td align="center">'.$file['md5'].'</td>'."\n";
|
||||
$out .= '<td class="center">'.$file['expectedmd5'].'</td>'."\n";
|
||||
$out .= '<td class="center">'.$file['md5'].'</td>'."\n";
|
||||
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
|
||||
$totalsize += $size;
|
||||
$out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
|
||||
@ -1582,8 +1582,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="liste_titre">';
|
||||
$out .= '<td>#</td>';
|
||||
$out .= '<td>'.$langs->trans("Filename").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("ExpectedChecksum").'</td>';
|
||||
$out .= '<td align="center">'.$langs->trans("CurrentChecksum").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("ExpectedChecksum").'</td>';
|
||||
$out .= '<td class="center">'.$langs->trans("CurrentChecksum").'</td>';
|
||||
$out .= '<td class="right">'.$langs->trans("Size").'</td>';
|
||||
$out .= '<td class="right">'.$langs->trans("DateModification").'</td>';
|
||||
$out .= '</tr>'."\n";
|
||||
@ -1597,8 +1597,8 @@ class Setup extends DolibarrApi
|
||||
$out .= '<tr class="oddeven">';
|
||||
$out .= '<td>'.$i.'</td>'."\n";
|
||||
$out .= '<td>'.$file['filename'].'</td>'."\n";
|
||||
$out .= '<td align="center">'.$file['expectedmd5'].'</td>'."\n";
|
||||
$out .= '<td align="center">'.$file['md5'].'</td>'."\n";
|
||||
$out .= '<td class="center">'.$file['expectedmd5'].'</td>'."\n";
|
||||
$out .= '<td class="center">'.$file['md5'].'</td>'."\n";
|
||||
$size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']);
|
||||
$totalsize += $size;
|
||||
$out .= '<td class="right">'.dol_print_size($size).'</td>'."\n";
|
||||
|
||||
@ -213,13 +213,13 @@ while ($i < min($num, $limit))
|
||||
print "</td>\n";
|
||||
|
||||
// Target
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->target == 0) print $langs->trans("BookmarkTargetReplaceWindowShort");
|
||||
if ($obj->target == 1) print $langs->trans("BookmarkTargetNewWindowShort");
|
||||
print "</td>\n";
|
||||
|
||||
// Author
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->fk_user)
|
||||
{
|
||||
$userstatic->id=$obj->fk_user;
|
||||
@ -233,7 +233,7 @@ while ($i < min($num, $limit))
|
||||
print "</td>\n";
|
||||
|
||||
// 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
|
||||
print '<td class="right">'.$obj->position."</td>";
|
||||
|
||||
@ -1069,7 +1069,7 @@ if ($action == 'create')
|
||||
|
||||
$numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
|
||||
print ' <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';
|
||||
$url = dol_buildpath('comm/action/card.php', 2).$urloption;
|
||||
|
||||
|
||||
@ -618,7 +618,7 @@ if ($resql)
|
||||
$formatToUse = $obj->fulldayevent ? 'day' : 'dayhour';
|
||||
// Start date
|
||||
if (!empty($arrayfields['a.datep']['checked'])) {
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->dp), $formatToUse);
|
||||
$late = 0;
|
||||
if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1;
|
||||
@ -631,7 +631,7 @@ if ($resql)
|
||||
|
||||
// End date
|
||||
if (!empty($arrayfields['a.datep2']['checked'])) {
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->dp2), $formatToUse);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ echo '<td></td>';
|
||||
$i=0;
|
||||
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 "</td>";
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ while($currentdaytoshow<$lastdaytoshow) {
|
||||
}
|
||||
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 "</td>";
|
||||
}
|
||||
|
||||
@ -131,11 +131,11 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Period").'</td>';
|
||||
print '<td align="center">'.$langs->trans("EventsNb").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Action").'</td>';
|
||||
print '<td class="center">'.$langs->trans("EventsNb").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Action").'</td>';
|
||||
print '<td>'.$langs->trans("PDF").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Date").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Size").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Date").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Size").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
while ($i < min($num, $limit))
|
||||
@ -150,10 +150,10 @@ if ($resql)
|
||||
print "<td>".$obj->df."</td>\n";
|
||||
|
||||
// Nb of events
|
||||
print '<td align="center">'.$obj->cc.'</td>';
|
||||
print '<td class="center">'.$obj->cc.'</td>';
|
||||
|
||||
// Button to build doc
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto($langs->trans('BuildDoc'), 'filenew').'</a>';
|
||||
print '</td>';
|
||||
|
||||
@ -184,8 +184,8 @@ if ($resql)
|
||||
print $out;
|
||||
|
||||
print '</td>';
|
||||
print '<td align="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_date(dol_filemtime($file), 'dayhour').'</td>';
|
||||
print '<td class="center">'.dol_print_size(dol_filesize($file)).'</td>';
|
||||
}
|
||||
else {
|
||||
print '<td> </td>';
|
||||
|
||||
@ -598,7 +598,7 @@ if ($object->fetch($id) >= 0)
|
||||
print '<td>'.$obj->lastname.'</td>';
|
||||
print '<td>'.$obj->firstname.'</td>';
|
||||
print '<td>'.$obj->other.'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (empty($obj->source_id) || empty($obj->source_type))
|
||||
{
|
||||
print empty($obj->source_url) ? '' : $obj->source_url; // For backward compatibility
|
||||
@ -649,7 +649,7 @@ if ($object->fetch($id) >= 0)
|
||||
else
|
||||
{
|
||||
// Date sent
|
||||
print '<td align="center">'.$obj->date_envoi.'</td>';
|
||||
print '<td class="center">'.$obj->date_envoi.'</td>';
|
||||
|
||||
print '<td class="nowrap right">';
|
||||
print $object::libStatutDest($obj->statut, 2, $obj->error_text);
|
||||
|
||||
@ -165,8 +165,8 @@ if ($result) {
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("LastMailings", $limit).'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("NbOfEMails").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateCreation").'</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>';
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
@ -184,8 +184,8 @@ if ($result) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td class="nowrap">'.$mailstatic->getNomUrl(1).'</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 align="center">'.($obj->nbemail ? $obj->nbemail : "0").'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->date_creat), 'day').'</td>';
|
||||
print '<td class="center">'.($obj->nbemail ? $obj->nbemail : "0").'</td>';
|
||||
print '<td class="right">'.$mailstatic->LibStatut($obj->statut, 5).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
|
||||
@ -228,14 +228,14 @@ if ($result)
|
||||
print '<td>'.$obj->titre.'</td>';
|
||||
// Date creation
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->datec), 'day');
|
||||
print '</td>';
|
||||
|
||||
// Nb of email
|
||||
if (!$filteremail)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$nbemail = $obj->nbemail;
|
||||
/*if ($obj->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||
{
|
||||
|
||||
@ -1475,9 +1475,10 @@ if ($action == 'create')
|
||||
{
|
||||
// Parse element/subelement (ex: project_task)
|
||||
$element = $subelement = $origin;
|
||||
$regs = array();
|
||||
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
|
||||
$element = $regs [1];
|
||||
$subelement = $regs [2];
|
||||
$element = $regs[1];
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
if ($element == 'project') {
|
||||
@ -1675,7 +1676,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Project").'</td><td>';
|
||||
$numprojet = $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
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 ' <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 '</tr>';
|
||||
}
|
||||
|
||||
@ -1544,6 +1544,7 @@ class Propal extends CommonObject
|
||||
if (isset($this->note_public)) $this->note_public = trim($this->note_public);
|
||||
if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf);
|
||||
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
|
||||
// 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_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "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 .= " tva=".(isset($this->total_tva) ? $this->total_tva : "null").",";
|
||||
$sql .= " localtax1=".(isset($this->total_localtax1) ? $this->total_localtax1 : "null").",";
|
||||
|
||||
@ -879,7 +879,7 @@ if ($resql)
|
||||
// Country
|
||||
if (!empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray = getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -890,7 +890,7 @@ if ($resql)
|
||||
{
|
||||
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 '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
@ -899,7 +899,7 @@ if ($resql)
|
||||
// Date proposal
|
||||
if (!empty($arrayfields['p.date']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->dp), 'day');
|
||||
print "</td>\n";
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
@ -910,7 +910,7 @@ if ($resql)
|
||||
{
|
||||
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>';
|
||||
}
|
||||
else
|
||||
@ -924,7 +924,7 @@ if ($resql)
|
||||
{
|
||||
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>';
|
||||
}
|
||||
else
|
||||
@ -936,7 +936,7 @@ if ($resql)
|
||||
// Availability
|
||||
if (! empty($arrayfields['ava.rowid']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$form->form_availability('', $obj->availability, 'none', 1);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
@ -274,7 +274,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
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">%</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
|
||||
@ -235,7 +235,7 @@ if ($socid > 0)
|
||||
print '<td width="160">'.$langs->trans("Date").'</td>';
|
||||
print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</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>';
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0)
|
||||
@ -246,7 +246,7 @@ if ($socid > 0)
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
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 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>';
|
||||
@ -294,7 +294,7 @@ if ($socid > 0)
|
||||
print '<td width="160">'.$langs->trans("Date").'</td>';
|
||||
print '<td width="160" align="center">'.$langs->trans("CustomerRelativeDiscountShort").'</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>';
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0)
|
||||
@ -305,7 +305,7 @@ if ($socid > 0)
|
||||
$obj = $db->fetch_object($resql);
|
||||
print '<tr class="oddeven">';
|
||||
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 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>';
|
||||
|
||||
@ -61,9 +61,9 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
|
||||
//if ($user->rights->societe->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_2 = GETPOST('amount_ttc_2');
|
||||
$amount_ttc_2 = GETPOST('amount_ttc_2', 'alpha');
|
||||
$amount_ttc_2 = price2num($amount_ttc_2);
|
||||
|
||||
$error = 0;
|
||||
@ -252,7 +252,7 @@ if ($socid > 0)
|
||||
print '<input type="hidden" name="action" value="setremise">';
|
||||
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');
|
||||
|
||||
@ -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
|
||||
$remise_all = $remise_user = 0;
|
||||
@ -342,13 +342,15 @@ if ($socid > 0)
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print load_fiche_titre($langs->trans("NewGlobalDiscount"), '', '');
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
if ($isCustomer && !$isSupplier) {
|
||||
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" />';
|
||||
}
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
print '<table class="border centpercent">';
|
||||
if ($isCustomer && $isSupplier) {
|
||||
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 "</table>";
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
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"));
|
||||
@ -511,15 +515,14 @@ if ($socid > 0)
|
||||
{
|
||||
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 '</td>';
|
||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||
{
|
||||
print '<td class="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 ' ';
|
||||
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 class="center nowrap">';
|
||||
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 '<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 '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@ -535,7 +538,9 @@ if ($socid > 0)
|
||||
}
|
||||
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);
|
||||
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')
|
||||
);
|
||||
$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
|
||||
@ -672,9 +677,8 @@ if ($socid > 0)
|
||||
if ($user->rights->societe->creer || $user->rights->facture->creer)
|
||||
{
|
||||
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 ' ';
|
||||
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 '<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 '<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 '</td>';
|
||||
}
|
||||
else print '<td> </td>';
|
||||
@ -690,7 +694,9 @@ if ($socid > 0)
|
||||
}
|
||||
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);
|
||||
print "</table>";
|
||||
@ -701,9 +707,9 @@ if ($socid > 0)
|
||||
$amount1 = price2num($showconfirminfo['amount_ttc'] / 2, 'MT');
|
||||
$amount2 = ($showconfirminfo['amount_ttc'] - $amount1);
|
||||
$formquestion = array(
|
||||
'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_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
'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_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5')
|
||||
);
|
||||
$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);
|
||||
@ -738,7 +744,7 @@ if ($socid > 0)
|
||||
|
||||
// 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 .= " 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 .= " f.rowid as invoiceid, f.ref,";
|
||||
$sql .= " fa.ref as invoice_source_ref, fa.type as type";
|
||||
@ -890,7 +896,9 @@ if ($socid > 0)
|
||||
}
|
||||
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>";
|
||||
@ -1054,7 +1062,7 @@ if ($socid > 0)
|
||||
{
|
||||
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 '</td>';
|
||||
print '<td> </td>';
|
||||
@ -1064,7 +1072,9 @@ if ($socid > 0)
|
||||
}
|
||||
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>";
|
||||
|
||||
@ -1642,7 +1642,7 @@ if ($action == 'create' && $usercancreate)
|
||||
});
|
||||
</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 '</tr>'."\n";
|
||||
@ -1734,7 +1734,7 @@ if ($action == 'create' && $usercancreate)
|
||||
print '<tr>';
|
||||
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);
|
||||
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="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 '</tr>';
|
||||
}
|
||||
|
||||
@ -1020,7 +1020,7 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -1029,7 +1029,7 @@ if ($resql)
|
||||
// Type ent
|
||||
if (! empty($arrayfields['typent.code']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1);
|
||||
print $typenArray[$obj->typent_code];
|
||||
print '</td>';
|
||||
@ -1039,7 +1039,7 @@ if ($resql)
|
||||
// Order date
|
||||
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 '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1047,7 +1047,7 @@ if ($resql)
|
||||
// Plannned date of delivery
|
||||
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 '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -1116,7 +1116,7 @@ if ($resql)
|
||||
// Billed
|
||||
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']++;
|
||||
}
|
||||
|
||||
|
||||
@ -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>';
|
||||
|
||||
// Checkbox
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">';
|
||||
print '</td>';
|
||||
|
||||
|
||||
@ -301,7 +301,7 @@ print '<br><br>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
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">%</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
|
||||
@ -93,7 +93,6 @@ $search_req_nb = GETPOST("req_nb", 'alpha');
|
||||
$search_num_releve = GETPOST("search_num_releve", 'alpha');
|
||||
$search_conciliated = GETPOST("search_conciliated", 'int');
|
||||
$num_releve = GETPOST("num_releve", "alpha");
|
||||
$cat = GETPOST("cat");
|
||||
if (empty($dateop)) $dateop = -1;
|
||||
|
||||
$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();
|
||||
|
||||
$buttonreconcile = '';
|
||||
$morehtmlref = '';
|
||||
|
||||
if ($id > 0 || !empty($ref))
|
||||
{
|
||||
@ -458,9 +458,9 @@ if ($id > 0 || !empty($ref))
|
||||
if ($user->rights->banque->consolidate) {
|
||||
$newparam = $param;
|
||||
$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&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&sortorder=asc,asc,asc&search_conciliated=0'.$newparam.'">'.$langs->trans("Conciliate").'</a>';
|
||||
} 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>';
|
||||
/*if (! empty($conf->accounting->enabled))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $langs->trans("AccountAccounting");
|
||||
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>';
|
||||
/*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 '</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="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td></tr>';
|
||||
@ -1101,7 +1101,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" id="selectAll" />';
|
||||
print ' <script type="text/javascript">
|
||||
$("input#selectAll").change(function() {
|
||||
|
||||
@ -492,11 +492,11 @@ if ($action == 'create')
|
||||
$content = $object->code_guichet;
|
||||
} elseif ($val == 'BankAccountNumber') {
|
||||
$name = 'number';
|
||||
$sizecss = 'minwidth200';
|
||||
$sizecss = 'minwidth200';
|
||||
$content = $object->number;
|
||||
} elseif ($val == 'BankAccountNumberKey') {
|
||||
$name = 'cle_rib';
|
||||
$sizecss = 'minwidth50';
|
||||
$sizecss = 'minwidth50';
|
||||
$content = $object->cle_rib;
|
||||
}
|
||||
|
||||
@ -923,7 +923,7 @@ else
|
||||
$cats = $c->containing($object->id, Categorie::TYPE_ACCOUNT);
|
||||
if (is_array($cats))
|
||||
{
|
||||
foreach($cats as $cat) {
|
||||
foreach ($cats as $cat) {
|
||||
$arrayselected[] = $cat->id;
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ if ($action == "create" || $action == "start")
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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 '</td>';
|
||||
print '<td align="center" class="hide0" colspan="'.count($arrayofpaymentmode).'">';
|
||||
@ -422,7 +422,7 @@ if ($action == "create" || $action == "start")
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
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 '</td>';
|
||||
$i = 0;
|
||||
@ -439,7 +439,7 @@ if ($action == "create" || $action == "start")
|
||||
print '<tr>';
|
||||
// Initial amount
|
||||
print '<td>'.$langs->trans("NbOfInvoices").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '</td>';
|
||||
// Amount per payment type
|
||||
$i = 0;
|
||||
@ -457,7 +457,7 @@ if ($action == "create" || $action == "start")
|
||||
print '<tr>';
|
||||
// Initial amount
|
||||
print '<td>'.$langs->trans("TheoricalAmount").'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print price($initialbalanceforterminal[$terminalid]['cash']).'<br>';
|
||||
print '</td>';
|
||||
// Amount per payment type
|
||||
@ -476,7 +476,7 @@ if ($action == "create" || $action == "start")
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("RealAmount").'</td>';
|
||||
// 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 '</td>';
|
||||
// Amount per payment type
|
||||
@ -489,7 +489,7 @@ if ($action == "create" || $action == "start")
|
||||
$i++;
|
||||
}
|
||||
// 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="add" class="button" value="'.$langs->trans("Save").'">';
|
||||
print '</td>';
|
||||
|
||||
@ -198,7 +198,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
$payment_sc_static->ref = $obj->pid;
|
||||
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
|
||||
// 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
|
||||
print '<td>';
|
||||
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";
|
||||
|
||||
// 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
|
||||
print '<td>';
|
||||
@ -439,7 +439,7 @@ while ($j < $numlt)
|
||||
$tva_static->ref = $obj->rowid;
|
||||
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 "</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";
|
||||
|
||||
// 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
|
||||
print '<td>';
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
* 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)
|
||||
{
|
||||
$object->fetch($id);
|
||||
if ($object->statut == 0)
|
||||
if ($object->statut == Deplacement::STATUS_DRAFT)
|
||||
{
|
||||
$result = $object->setStatut(1);
|
||||
if ($result > 0)
|
||||
@ -81,9 +81,9 @@ if ($action == 'validate' && $user->rights->deplacement->creer)
|
||||
elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer)
|
||||
{
|
||||
$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)
|
||||
{
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
@ -116,14 +116,14 @@ elseif ($action == 'add' && $user->rights->deplacement->creer)
|
||||
{
|
||||
$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->type = GETPOST('type', 'alpha');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->fk_user = GETPOST('fk_user', 'int');
|
||||
$object->type = GETPOST('type', 'alpha');
|
||||
$object->socid = (int) GETPOST('socid', 'int');
|
||||
$object->fk_user = (int) GETPOST('fk_user', 'int');
|
||||
$object->note_private = GETPOST('note_private', 'alpha');
|
||||
$object->note_public = GETPOST('note_public', 'alpha');
|
||||
$object->statut = 0;
|
||||
$object->statut = Deplacement::STATUS_DRAFT;
|
||||
|
||||
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->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount
|
||||
$object->type = GETPOST('type', 'alpha');
|
||||
$object->socid = GETPOST('socid', 'int');
|
||||
$object->fk_user = GETPOST('fk_user', 'int');
|
||||
$object->socid = (int) GETPOST('socid', 'int');
|
||||
$object->fk_user = (int) GETPOST('fk_user', 'int');
|
||||
$object->note_private = GETPOST('note_private', 'alpha');
|
||||
$object->note_public = GETPOST('note_public', 'alpha');
|
||||
|
||||
@ -523,7 +523,7 @@ elseif ($id)
|
||||
|
||||
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)
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* 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
|
||||
* 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 $km;
|
||||
/**
|
||||
* @var string km value formatted
|
||||
*/
|
||||
public $km;
|
||||
|
||||
/**
|
||||
* @var int Thirdparty id
|
||||
*/
|
||||
public $socid;
|
||||
public $statut; // 0=draft, 1=validated
|
||||
|
||||
/**
|
||||
* @var int Status 0=draft, 1=validated, 2=Refunded
|
||||
*/
|
||||
public $statut;
|
||||
public $extraparams=array();
|
||||
|
||||
public $statuts=array();
|
||||
public $statuts_short=array();
|
||||
|
||||
/**
|
||||
* Draft status
|
||||
*/
|
||||
const STATUS_DRAFT = 0;
|
||||
|
||||
/**
|
||||
* Validated status
|
||||
*/
|
||||
const STATUS_VALIDATED = 1;
|
||||
|
||||
/**
|
||||
* Refunded status
|
||||
*/
|
||||
const STATUS_REFUNDED = 2;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@ -172,7 +172,7 @@ if ($resql)
|
||||
// Type
|
||||
print '<td>'.$langs->trans($obj->type).'</td>';
|
||||
// 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
|
||||
print '<td>';
|
||||
$userstatic->id = $obj->fk_user;
|
||||
|
||||
@ -255,10 +255,10 @@ print '<br><br>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="border centpercent">';
|
||||
print '<tr height="24">';
|
||||
print '<td align="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Number").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td align="center">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Year").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Number").'</td>';
|
||||
print '<td class="center">'.$langs->trans("AmountTotal").'</td>';
|
||||
print '<td class="center">'.$langs->trans("AmountAverage").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$oldyear=0;
|
||||
|
||||
@ -2801,7 +2801,7 @@ if ($action == 'create')
|
||||
});
|
||||
</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 '</tr>'."\n";
|
||||
}
|
||||
@ -3008,7 +3008,7 @@ if ($action == 'create')
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
|
||||
$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);
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
@ -3016,7 +3016,7 @@ if ($action == 'create')
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_situation" value="0" disabled> ';
|
||||
$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);
|
||||
print $desc;
|
||||
print '</div></div>';
|
||||
@ -3025,7 +3025,7 @@ if ($action == 'create')
|
||||
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
|
||||
$tmp = '<input type="radio" name="type" id="radio_replacement" value="0" disabled> ';
|
||||
$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);
|
||||
print $desc;
|
||||
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> ';
|
||||
else $tmp = '<input type="radio" name="type" id="radio_creditnote" value="2" > ';
|
||||
$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);
|
||||
print $desc;
|
||||
print '</div></div>'."\n";
|
||||
@ -3211,7 +3211,6 @@ if ($action == 'create')
|
||||
$rwStyle = '';
|
||||
}
|
||||
|
||||
|
||||
$retained_warranty = GETPOST('retained_warranty', 'int');
|
||||
$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">';
|
||||
@ -3260,7 +3259,7 @@ if ($action == 'create')
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
$numprojet = $formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1);
|
||||
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="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>';
|
||||
}
|
||||
|
||||
@ -3909,9 +3908,14 @@ elseif ($id > 0 || !empty($ref))
|
||||
|
||||
if ($object->fk_fac_rec_source > 0)
|
||||
{
|
||||
$tmptemplate = new FactureRec($db);
|
||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||
if ($result > 0) print '<span class="opacitymedium">. '.$langs->trans("GeneratedFromTemplate", $tmptemplate->ref).'</span>';
|
||||
$tmptemplate = new FactureRec($db);
|
||||
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
|
||||
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>';
|
||||
|
||||
@ -4378,7 +4382,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans('ListOfSituationInvoices').'</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>';
|
||||
print '<td class="right">'.$langs->trans('AmountHT').'</td>';
|
||||
print '<td class="right">'.$langs->trans('AmountTTC').'</td>';
|
||||
@ -4419,7 +4423,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$object->getNomUrl(1).'</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>';
|
||||
print '<td class="right">'.price($object->total_ht).'</td>';
|
||||
print '<td class="right">'.price($object->total_ttc).'</td>';
|
||||
@ -4469,7 +4473,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$next_invoice->getNomUrl(1).'</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>';
|
||||
print '<td class="right">'.price($next_invoice->total_ht).'</td>';
|
||||
print '<td class="right">'.price($next_invoice->total_ttc).'</td>';
|
||||
@ -4566,7 +4570,7 @@ elseif ($id > 0 || !empty($ref))
|
||||
print '</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)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=deletepaiement&paiement_id='.$objp->rowid.'">';
|
||||
|
||||
@ -564,22 +564,22 @@ if ($resql)
|
||||
}
|
||||
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 (!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 (!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 (!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 '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
@ -587,7 +587,7 @@ if ($resql)
|
||||
// Date last generation
|
||||
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 '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
@ -595,7 +595,7 @@ if ($resql)
|
||||
// Date next generation
|
||||
if (!empty($arrayfields['f.date_when']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
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>');
|
||||
if (!$invoicerectmp->isMaxNbGenReached())
|
||||
@ -612,14 +612,14 @@ if ($resql)
|
||||
}
|
||||
if (!empty($arrayfields['f.datec']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->datec), 'dayhour');
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
if (!empty($arrayfields['f.tms']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->tms), 'dayhour');
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
@ -634,13 +634,13 @@ if ($resql)
|
||||
print $hookmanager->resPrint;
|
||||
// Status
|
||||
if (!empty($arrayfields['status']['checked'])) {
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $invoicerectmp->getLibStatut(3, 0);
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Action column
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($user->rights->facture->creer && empty($invoicerectmp->suspended))
|
||||
{
|
||||
if ($invoicerectmp->isMaxNbGenReached())
|
||||
|
||||
@ -1166,7 +1166,7 @@ if ($resql)
|
||||
// Country
|
||||
if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$tmparray=getCountry($obj->fk_pays, 'all');
|
||||
print $tmparray['label'];
|
||||
print '</td>';
|
||||
@ -1175,7 +1175,7 @@ if ($resql)
|
||||
// Type ent
|
||||
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);
|
||||
print $typenArray[$obj->typent_code];
|
||||
print '</td>';
|
||||
@ -1184,7 +1184,7 @@ if ($resql)
|
||||
// Staff
|
||||
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);
|
||||
print $staffArray[$obj->staff_code];
|
||||
print '</td>';
|
||||
|
||||
@ -587,11 +587,11 @@ if ($object->id > 0)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="left">'.$langs->trans("DateRequest").'</td>';
|
||||
print '<td align="center">'.$langs->trans("User").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="center">'.$langs->trans("WithdrawalReceipt").'</td>';
|
||||
print '<td class="center">'.$langs->trans("User").'</td>';
|
||||
print '<td class="center">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="center">'.$langs->trans("WithdrawalReceipt").'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td align="center">'.$langs->trans("DateProcess").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateProcess").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -620,11 +620,11 @@ if ($object->id > 0)
|
||||
print '<tr class="oddeven">';
|
||||
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">'.price($obj->amount).'</td>';
|
||||
print '<td class="center">'.price($obj->amount).'</td>';
|
||||
print '<td align="center">-</td>';
|
||||
print '<td> </td>';
|
||||
|
||||
print '<td align="center">'.$langs->trans("OrderWaiting").'</td>';
|
||||
print '<td class="center">'.$langs->trans("OrderWaiting").'</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&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">'.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)
|
||||
{
|
||||
$withdrawreceipt = new BonPrelevement($db);
|
||||
@ -686,7 +686,7 @@ if ($object->id > 0)
|
||||
|
||||
print '<td> </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> </td>';
|
||||
|
||||
|
||||
@ -276,7 +276,7 @@ print '<br><br>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
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">%</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTotal").'</td>';
|
||||
|
||||
@ -667,10 +667,10 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
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->sumpaid).'</td>';
|
||||
print '<td align="center">'.$chargestatic->getLibStatut(3).'</td>';
|
||||
print '<td class="center">'.$chargestatic->getLibStatut(3).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
$tot_ttc += $obj->amount;
|
||||
|
||||
@ -584,8 +584,8 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$arraytitle.'</td>';
|
||||
print '<td align="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td align="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
print '<td class="center">'.$langs->trans('Date').'</td>';
|
||||
print '<td class="center">'.$langs->trans('DateMaxPayment').'</td>';
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
print '<td>'.$langs->trans('Currency').'</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";
|
||||
|
||||
// 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
|
||||
if ($objp->dlr > 0)
|
||||
@ -666,7 +666,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
}
|
||||
|
||||
// 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
|
||||
if (!empty($conf->multicurrency->enabled))
|
||||
|
||||
@ -502,7 +502,7 @@ if ($action == 'new')
|
||||
print '<td class="right">'.price($value["amount"], 0, $langs, 1, -1, -1, $conf->currency).'</td>';
|
||||
|
||||
// Link to payment
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$paymentstatic->id = $value["paymentid"];
|
||||
$paymentstatic->ref = $value["paymentid"];
|
||||
if ($paymentstatic->id)
|
||||
@ -515,7 +515,7 @@ if ($action == 'new')
|
||||
}
|
||||
print '</td>';
|
||||
// Link to bank transaction
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$accountlinestatic->rowid = $value["id"];
|
||||
if ($accountlinestatic->rowid)
|
||||
{
|
||||
@ -527,7 +527,7 @@ if ($action == 'new')
|
||||
}
|
||||
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 '</td>';
|
||||
print '</tr>';
|
||||
@ -685,14 +685,14 @@ else
|
||||
while ($objp = $db->fetch_object($resql))
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td align="center">'.$i.'</td>';
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation
|
||||
print '<td align="center">'.($objp->num_chq ? $objp->num_chq : ' ').'</td>';
|
||||
print '<td class="center">'.$i.'</td>';
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->date), 'day').'</td>'; // Date operation
|
||||
print '<td class="center">'.($objp->num_chq ? $objp->num_chq : ' ').'</td>';
|
||||
print '<td>'.dol_trunc($objp->emetteur, 24).'</td>';
|
||||
print '<td>'.dol_trunc($objp->banque, 24).'</td>';
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
// Link to payment
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$paymentstatic->id = $objp->pid;
|
||||
$paymentstatic->ref = $objp->pid;
|
||||
if ($paymentstatic->id)
|
||||
@ -705,7 +705,7 @@ else
|
||||
}
|
||||
print '</td>';
|
||||
// Link to bank transaction
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$accountlinestatic->rowid = $objp->rowid;
|
||||
if ($accountlinestatic->rowid)
|
||||
{
|
||||
|
||||
@ -197,7 +197,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
// 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
|
||||
print '<td>';
|
||||
|
||||
@ -306,7 +306,7 @@ if ($resql)
|
||||
// Date
|
||||
$dateformatforpayment = 'day';
|
||||
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']++;
|
||||
|
||||
// Thirdparty
|
||||
|
||||
@ -121,7 +121,7 @@ if ($resql)
|
||||
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 class="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
|
||||
if ($objp->statut == 0)
|
||||
{
|
||||
|
||||
@ -267,7 +267,7 @@ if ($action == 'create')
|
||||
print '<td class="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AlreadyPaid").'</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";
|
||||
|
||||
$total = 0;
|
||||
@ -294,7 +294,7 @@ if ($action == 'create')
|
||||
|
||||
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($sumpaid < $objp->amount)
|
||||
{
|
||||
$namef = "amount_".$objp->id;
|
||||
|
||||
@ -241,7 +241,7 @@ if ($resql)
|
||||
print '<td>'.$langs->trans('Type').'</td>';
|
||||
print '<td>'.$langs->trans('Label').'</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 "</tr>\n";
|
||||
|
||||
@ -267,7 +267,7 @@ if ($resql)
|
||||
// Expected to pay
|
||||
print '<td class="right">'.price($objp->sc_amount).'</td>';
|
||||
// Status
|
||||
print '<td align="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>';
|
||||
print '<td class="center">'.$socialcontrib->getLibStatut(4, $objp->amount).'</td>';
|
||||
// Amount payed
|
||||
print '<td class="right">'.price($objp->amount).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
@ -156,7 +156,7 @@ if ($result)
|
||||
|
||||
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";
|
||||
|
||||
|
||||
@ -339,7 +339,7 @@ if ($result)
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<table class="noborder centpercent">';
|
||||
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>';
|
||||
|
||||
while ($i < min($num,$limit))
|
||||
@ -355,7 +355,7 @@ if ($result)
|
||||
print $bprev->getNomUrl(1);
|
||||
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";
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ if ($result)
|
||||
print '<td class="right">'.price($obj->amount_requested)."</td>\n";
|
||||
|
||||
// Status of requests
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
|
||||
if ($obj->statut == 0)
|
||||
{
|
||||
|
||||
@ -212,8 +212,8 @@ if ($resql)
|
||||
print '<td class="right">'.price($obj->amount)."</td>\n";
|
||||
print '<td>'.$rej->motifs[$obj->motif].'</td>';
|
||||
|
||||
print '<td align="center">'.yn($obj->afacturer).'</td>';
|
||||
print '<td align="center">'.$obj->fk_facture.'</td>';
|
||||
print '<td class="center">'.yn($obj->afacturer).'</td>';
|
||||
print '<td class="center">'.$obj->fk_facture.'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$total += $obj->amount;
|
||||
|
||||
@ -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">'.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";
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td>';
|
||||
print '<td align="center">'.$nbtotal.'</td><td> </td><td class="right">';
|
||||
print '<td class="center">'.$nbtotal.'</td><td> </td><td class="right">';
|
||||
print price($total);
|
||||
print '</td><td class="right"> </td>';
|
||||
print "</tr></table>";
|
||||
|
||||
@ -277,7 +277,7 @@ if ($resql)
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
// Date end period
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->periode)
|
||||
{
|
||||
print '<a href="list.php?year='.strftime("%Y", $db->jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode), 'day').'</a>';
|
||||
|
||||
@ -170,7 +170,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
// Ref payment
|
||||
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
|
||||
// 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
|
||||
print '<td>';
|
||||
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;
|
||||
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 "</tr>\n";
|
||||
|
||||
@ -373,7 +373,7 @@ while ($j < $numlt)
|
||||
$tva_static->ref = $obj->rowid;
|
||||
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 "</tr>\n";
|
||||
|
||||
@ -455,7 +455,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read))
|
||||
$sal_static->ref = $obj->rowid;
|
||||
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 "</tr>\n";
|
||||
|
||||
|
||||
@ -257,7 +257,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
|
||||
$sql = "SELECT fd.tva_tx AS vatrate,";
|
||||
$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++) {
|
||||
$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 {
|
||||
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++) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
@ -335,7 +338,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
|
||||
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
||||
$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++) {
|
||||
$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 {
|
||||
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++) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
|
||||
@ -426,7 +426,7 @@ if (count($amount)) {
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (! empty($conf->propal->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a> ';
|
||||
}
|
||||
|
||||
@ -602,7 +602,7 @@ if (count($amount)) {
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if (! empty($conf->propal->enabled) && $key>0) {
|
||||
print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"), "stats").'</a> ';
|
||||
}
|
||||
|
||||
@ -43,11 +43,16 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
|
||||
// Load translation files required by the page
|
||||
$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
|
||||
$year = GETPOST("year", "int");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y", dol_now());
|
||||
$year_current = $current_date['year'];
|
||||
$year_start = $year_current;
|
||||
} else {
|
||||
$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_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
|
||||
{
|
||||
$q = GETPOST("q");
|
||||
$q = GETPOST("q", "int");
|
||||
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); }
|
||||
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) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
|
||||
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
|
||||
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
|
||||
$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
|
||||
@ -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");
|
||||
|
||||
//$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))
|
||||
{
|
||||
$description .= '<br>'
|
||||
|
||||
@ -35,12 +35,15 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
|
||||
// Load translation files required by the page
|
||||
$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
|
||||
$year = GETPOST("year", "int");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y", dol_now());
|
||||
if ($conf->global->SOCIETE_FISCAL_MONTH_START > date('m')) $year_current--;
|
||||
$year_current = $current_date['year'];
|
||||
$year_start = $year_current;
|
||||
} else {
|
||||
$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_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
|
||||
{
|
||||
$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); }
|
||||
else
|
||||
{
|
||||
$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;
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
|
||||
$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
|
||||
|
||||
@ -44,11 +44,15 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
|
||||
// Load translation files required by the page
|
||||
$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
|
||||
$year = GETPOST("year", "int");
|
||||
if (empty($year))
|
||||
{
|
||||
$year_current = strftime("%Y", dol_now());
|
||||
$year_current = $current_date['year'];
|
||||
$year_start = $year_current;
|
||||
} else {
|
||||
$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_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
|
||||
{
|
||||
$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); }
|
||||
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) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1;
|
||||
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1;
|
||||
elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1;
|
||||
if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter
|
||||
$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
|
||||
|
||||
@ -250,11 +250,11 @@ $dolibarr_main_prod='0';
|
||||
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
|
||||
|
||||
// $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.
|
||||
// Default value: ''
|
||||
// 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='';
|
||||
|
||||
|
||||
@ -896,7 +896,7 @@ while ($i < min($num, $limit))
|
||||
// No EMail
|
||||
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 (! empty($conf->socialnetworks->enabled)) {
|
||||
|
||||
@ -44,6 +44,7 @@ if ($cancel)
|
||||
$action = '';
|
||||
}
|
||||
|
||||
|
||||
// Action to add record
|
||||
if ($action == 'add' && !empty($permissiontoadd))
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user