Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
1c2c3c36ad
106 changed files with 1111 additions and 584 deletions
61
build/docker-dev/Dockerfile
Normal file
61
build/docker-dev/Dockerfile
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
FROM php:8.1-apache-bullseye
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
34
build/docker-dev/README.md
Normal file
34
build/docker-dev/README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
62
build/docker-dev/docker-compose.yml
Normal file
62
build/docker-dev/docker-compose.yml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
version: '3'
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
24
build/docker-dev/docker-run.sh
Executable file
24
build/docker-dev/docker-run.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# Script used by the Dockerfile.
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
|
||||
usermod -u "${HOST_USER_ID}" www-data
|
||||
groupmod -g "${HOST_USER_ID}" www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
echo "[docker-run] => update '${PHP_INI_DIR}/conf.d/dolibarr-php.ini'"
|
||||
cat <<EOF > "${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
|
||||
exec apache2-foreground
|
||||
36
build/docker/.github/workflows/build.yml
vendored
Normal file
36
build/docker/.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '0 0 * * 6'
|
||||
|
||||
jobs:
|
||||
build-docker-images:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- env:
|
||||
DOCKER_BUILD: 1
|
||||
DOCKER_PUSH: 1
|
||||
run: |
|
||||
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
||||
./update.sh
|
||||
|
||||
update-readme:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
docker run --rm -t \
|
||||
-v $(pwd):/src \
|
||||
-e DOCKER_USER=${{ secrets.DOCKER_HUB_USERNAME }} \
|
||||
-e DOCKER_PASS=${{ secrets.DOCKER_HUB_PASSWORD }} \
|
||||
-e PUSHRM_PROVIDER=dockerhub \
|
||||
-e PUSHRM_FILE=/src/README.md \
|
||||
-e PUSHRM_SHORT='Docker image for Dolibarr with auto installer on first boot.' \
|
||||
-e PUSHRM_TARGET=docker.io/tuxgasy/dolibarr \
|
||||
-e PUSHRM_DEBUG=1 \
|
||||
chko/docker-pushrm:1
|
||||
27
build/docker/.github/workflows/test.yml
vendored
Normal file
27
build/docker/.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
check-update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: |
|
||||
./update.sh
|
||||
git diff --exit-code
|
||||
|
||||
check-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- env:
|
||||
DOLI_INSTALL_AUTO: 0
|
||||
run: |
|
||||
./update.sh
|
||||
docker build -t tuxgasy/dolibarr:develop images/develop
|
||||
docker run -d -p 127.0.0.1:80:80 --name dolibarr tuxgasy/dolibarr:develop
|
||||
docker ps | grep -q dolibarr
|
||||
3
build/docker/.gitignore
vendored
Normal file
3
build/docker/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.idea/
|
||||
.volumes/
|
||||
docker-compose-links/
|
||||
|
|
@ -1,61 +1,43 @@
|
|||
FROM php:8.1-apache-bullseye
|
||||
FROM php:8.2-apache-bookworm
|
||||
|
||||
LABEL maintainer="Yann Le Doaré <services@linuxconsole.org>"
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
ENV PHP_INI_UPLOAD_MAX_FILESIZE 2M
|
||||
ENV PHP_INI_POST_MAX_SIZE 8M
|
||||
ENV PHP_INI_ALLOW_URL_FOPEN 0
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get dist-upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libc-client-dev \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libpng-dev \
|
||||
libpq-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
postgresql-client \
|
||||
cron \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
&& docker-php-ext-configure pgsql -with-pgsql \
|
||||
&& docker-php-ext-install pdo_pgsql pgsql \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/$(gcc -dumpmachine)/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap \
|
||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
||||
&& docker-php-ext-install imap \
|
||||
&& mv ${PHP_INI_DIR}/php.ini-production ${PHP_INI_DIR}/php.ini \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
|
|
|
|||
|
|
@ -1,34 +1,6 @@
|
|||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
export HOST_USER_ID=$(id -u)
|
||||
export MYSQL_ROOT_PWD=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
docker-compose up -d
|
||||
|
|
|
|||
|
|
@ -1,62 +1,38 @@
|
|||
version: '3'
|
||||
# This docker-compose.yml file is used to build and test quickly
|
||||
# a specific version of Dolibarr
|
||||
#
|
||||
# Before build, define the variable DOLI_VERSION as following:
|
||||
# $ export DOLI_VERSION=4.0.4
|
||||
# And then, you can run :
|
||||
# $ docker-compose up
|
||||
#
|
||||
# More information about Docker-compose : https://docs.docker.com/compose/
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
container_name: dolibarr-mariadb-dev
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||
MYSQL_DATABASE: "dolibarr-prod"
|
||||
|
||||
web:
|
||||
container_name: dolibarr-web-dev
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/www/html/documents
|
||||
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
environment:
|
||||
WWW_USER_ID: 1000
|
||||
WWW_GROUP_ID: 1000
|
||||
DOLI_ROOT_PASSWORD: $MYSQL_ROOT_PWD
|
||||
DOLI_DATABASE: "dolibarr-prod"
|
||||
DOLI_DB_SERVER: "mariadb"
|
||||
ports:
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
- "8080:80"
|
||||
|
|
|
|||
|
|
@ -21,4 +21,6 @@ date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
|||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
|
||||
cp /var/www/html/install/install.forced.docker.php /var/www/html/install/install.forced.php
|
||||
|
||||
exec apache2-foreground
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2016-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -252,7 +252,7 @@ if ($type == 'sub') {
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
|
||||
llxHeader('', $title_page, $help_url);
|
||||
llxHeader('', $title_page, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-'.(($type == 'sub') ? 'sub' : '').'balance');
|
||||
|
||||
|
||||
if ($action != 'export_csv') {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -352,7 +352,7 @@ $formaccounting = new FormAccounting($db);
|
|||
|
||||
$title = $langs->trans("CreateMvts");
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
llxHeader('', $title, $help_url);
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-card');
|
||||
|
||||
// Confirmation to delete the command
|
||||
if ($action == 'delete') {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 Progiseize <a.bisotti@progiseize.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -781,7 +781,7 @@ $arrayofselected = is_array($toselect) ? $toselect : array();
|
|||
// --------------------------------------------------------------------
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting#Exports|FR:Module_Comptabilité_en_Partie_Double#Exports';
|
||||
|
||||
llxHeader('', $title_page, $help_url);
|
||||
llxHeader('', $title_page, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-export');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inoveasya.solutions>
|
||||
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 Progiseize <a.bisotti@progiseize.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2022 Progiseize <a.bisotti@progiseiea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -734,7 +734,7 @@ $arrayofselected = is_array($toselect) ? $toselect : array();
|
|||
// Output page
|
||||
// --------------------------------------------------------------------
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
llxHeader('', $title_page, $help_url);
|
||||
llxHeader('', $title_page, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-journal');
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
/* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2020 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -561,7 +561,7 @@ if ($type == 'sub') {
|
|||
}
|
||||
$title_page .= ')';
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double';
|
||||
llxHeader('', $title_page, $help_url);
|
||||
llxHeader('', $title_page, $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-consultation page-'.(($type == 'sub') ? 'sub' : '').'ledger');
|
||||
|
||||
// List
|
||||
$nbtotalofrecords = '';
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
|
|||
*/
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-card');
|
||||
|
||||
if ($cancel == $langs->trans("Cancel")) {
|
||||
$action = '';
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ if ($action == 'validatehistory') {
|
|||
*/
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("CustomersVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-index');
|
||||
|
||||
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
|
||||
$textnextyear = ' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
|
||||
llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-lines');
|
||||
|
||||
print '<script type="text/javascript">
|
||||
$(function () {
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("CustomersVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-list');
|
||||
|
||||
if (empty($chartaccountcode)) {
|
||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
|
|
@ -90,7 +90,7 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
|
|||
*/
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-card');
|
||||
|
||||
if ($cancel == $langs->trans("Cancel")) {
|
||||
$action = '';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -179,7 +179,7 @@ if ($action == 'validatehistory') {
|
|||
*/
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-list');
|
||||
|
||||
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
|
||||
$textnextyear = ' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -170,7 +170,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url);
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-lines');
|
||||
|
||||
print '<script type="text/javascript">
|
||||
$(function () {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -225,7 +225,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-list');
|
||||
|
||||
if (empty($chartaccountcode)) {
|
||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ if (GETPOST('addbox')) {
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
|
||||
|
||||
llxHeader('', $langs->trans("AccountancyArea"), $help_url);
|
||||
llxHeader('', $langs->trans("AccountancyArea"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy page-index');
|
||||
|
||||
$resultboxes = FormOther::getBoxesArea($user, "27"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@
|
|||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2022 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2022 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -1089,8 +1089,8 @@ if (empty($action) || $action == 'view') {
|
|||
$variousstatic = new PaymentVarious($db);
|
||||
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Génération_des_écritures_en_comptabilité';
|
||||
llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-bankjournal');
|
||||
|
||||
$nom = $title;
|
||||
$builddate = dol_now();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
|
|
@ -556,8 +556,8 @@ if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 !
|
|||
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Génération_des_écritures_en_comptabilité';
|
||||
llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-expensereportsjournal');
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@
|
|||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018 Eric Seigne <eric.seigne@cap-rel.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -921,8 +921,8 @@ if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 !
|
|||
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Génération_des_écritures_en_comptabilité';
|
||||
llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-purchasesjournal');
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2013-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -982,8 +982,8 @@ if ($action == 'exportcsv' && !$error) { // ISO and not UTF8 !
|
|||
|
||||
if (empty($action) || $action == 'view') {
|
||||
$title = $langs->trans("GenerationOfAccountingEntries").' - '.$accountingjournalstatic->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Génération_des_écritures_en_comptabilité';
|
||||
llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-sellsjournal');
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
/* Copyright (C) 2021-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -196,8 +196,8 @@ if ($object->nature == 2) {
|
|||
}
|
||||
|
||||
$title = $langs->trans("GenerationOfAccountingEntries") . ' - ' . $object->getNomUrl(0, 2, 1, '', 1);
|
||||
|
||||
llxHeader('', dol_string_nohtmltag($title));
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Génération_des_écritures_en_comptabilité';
|
||||
llxHeader('', dol_string_nohtmltag($title), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-generation page-variousjournal');
|
||||
|
||||
$nom = $title;
|
||||
$nomlink = '';
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) {
|
|||
*/
|
||||
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url);
|
||||
llxHeader("", $langs->trans('FicheVentilation'), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-card');
|
||||
|
||||
if ($cancel == $langs->trans("Cancel")) {
|
||||
$action = '';
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ if ($action == 'validatehistory') {
|
|||
*/
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-index');
|
||||
|
||||
$textprevyear = '<a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current - 1).'">'.img_previous().'</a>';
|
||||
$textnextyear = ' <a href="'.$_SERVER["PHP_SELF"].'?year='.($year_current + 1).'">'.img_next().'</a>';
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
|
||||
llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-lines');
|
||||
|
||||
print '<script type="text/javascript">
|
||||
$(function () {
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ $formother = new FormOther($db);
|
|||
|
||||
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
|
||||
|
||||
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url);
|
||||
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-list');
|
||||
|
||||
if (empty($chartaccountcode)) {
|
||||
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
|
||||
|
|
|
|||
|
|
@ -206,7 +206,6 @@ class AdherentStats extends Stats
|
|||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$totalstatus = array(
|
||||
'label' => 'Total',
|
||||
'members_draft' => 0,
|
||||
'members_pending' => 0,
|
||||
'members_uptodate' => 0,
|
||||
|
|
@ -286,7 +285,6 @@ class AdherentStats extends Stats
|
|||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
$totalstatus = array(
|
||||
'label' => 'Total',
|
||||
'members_draft' => 0,
|
||||
'members_pending' => 0,
|
||||
'members_uptodate' => 0,
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ llxHeader('', $langs->trans("Boxes"), '', '', 0, 0, '', '', '', 'mod-admin page-
|
|||
print load_fiche_titre($langs->trans("Boxes"), '', 'title_setup');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."</span><br>\n";
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
* Search for the default active boxes for each possible position
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ print load_fiche_titre($langs->trans("OtherSetup"), '', 'title_setup');
|
|||
|
||||
print '<span class="opacitymedium">'.$langs->trans("ConstDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$param = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ print load_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"), '', 'tit
|
|||
print '<span class="opacitymedium">'.$langs->transnoentities("DelaysOfToleranceDesc", img_warning('default', '', 'pictowarning nopaddingleft'));
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown", DOL_URL_ROOT.'/admin/modules.php')."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '<form method="post" action="'.$_SERVER['PHP_SELF'].'" name="form_index">';
|
||||
|
|
|
|||
|
|
@ -2545,6 +2545,7 @@ if ($id > 0) {
|
|||
print '<span class="opacitymedium">'.$langs->trans("DictionaryDesc");
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
||||
print '</span><br>';
|
||||
print "<br>\n";
|
||||
|
||||
$lastlineisempty = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ print load_fiche_titre($langs->trans("SmsSetup"), '', 'title_setup');
|
|||
|
||||
print '<span class="opacitymedium">'.$langs->trans("SmsDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
// List of sending methods
|
||||
$listofmethods = (is_array($conf->modules_parts['sms']) ? $conf->modules_parts['sms'] : array());
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ if (empty($dolibarr_main_restrict_os_commands)) {
|
|||
} else {
|
||||
print $dolibarr_main_restrict_os_commands;
|
||||
}
|
||||
print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump, clamdscan').')</span>';
|
||||
print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", 'mysqldump, mysql, pg_dump, pg_restore, mariadb, mariadb-dump, clamdscan').')</span>';
|
||||
print '<br>';
|
||||
|
||||
if (!getDolGlobalString('SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF')) {
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
|||
print '<input type="hidden" name="token" value="'.newToken().'" />';
|
||||
print '<input type="hidden" name="action" value="purge" />';
|
||||
|
||||
print '<div class="divsection wordbreak">';
|
||||
print '<table class="border centpercent">';
|
||||
|
||||
print '<tr class="border"><td style="padding: 4px">';
|
||||
|
|
@ -123,6 +124,7 @@ if (getDolGlobalInt('MAIN_PURGE_ACCEPT_NBSECONDSOLD')) {
|
|||
print 'NbSecondsOld = <input class="width50 right" type="text" name="nbsecondsold" value="'.$nbsecondsold.'">';
|
||||
}
|
||||
print '</td></tr></table>';
|
||||
print '</div>';
|
||||
|
||||
//if ($choice != 'confirm_allfiles')
|
||||
//{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2024 Jose MARTINEZ <jose.martinez@pichinov.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -19,7 +20,7 @@ use Luracast\Restler\RestException;
|
|||
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/api_members.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/api_products.class.php';
|
||||
|
|
@ -125,7 +126,7 @@ class Categories extends DolibarrApi
|
|||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
|
||||
* @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
|
||||
* @return array Array of category objects
|
||||
|
|
@ -295,7 +296,7 @@ class Categories extends DolibarrApi
|
|||
* Get the list of categories linked to an object
|
||||
*
|
||||
* @param int $id Object ID
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project')
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project', 'actioncomm')
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
|
|
@ -315,7 +316,8 @@ class Categories extends DolibarrApi
|
|||
Categorie::TYPE_SUPPLIER,
|
||||
Categorie::TYPE_MEMBER,
|
||||
Categorie::TYPE_PROJECT,
|
||||
Categorie::TYPE_KNOWLEDGEMANAGEMENT
|
||||
Categorie::TYPE_KNOWLEDGEMANAGEMENT,
|
||||
Categorie::TYPE_ACTIONCOMM
|
||||
])) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
|
|
@ -334,6 +336,8 @@ class Categories extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
} elseif ($type == Categorie::TYPE_KNOWLEDGEMANAGEMENT && !DolibarrApiAccess::$user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')) {
|
||||
throw new RestException(403);
|
||||
} elseif ($type == Categorie::TYPE_ACTIONCOMM && !DolibarrApiAccess::$user->hasRight('agenda', 'allactions', 'read')) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
|
||||
$categories = $this->category->getListForItem($id, $type, $sortfield, $sortorder, $limit, $page);
|
||||
|
|
@ -348,7 +352,7 @@ class Categories extends DolibarrApi
|
|||
* Link an object to a category by id
|
||||
*
|
||||
* @param int $id ID of category
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')
|
||||
* @param int $object_id ID of object
|
||||
*
|
||||
* @return array
|
||||
|
|
@ -396,6 +400,11 @@ class Categories extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
}
|
||||
$object = new Adherent($this->db);
|
||||
} elseif ($type === Categorie::TYPE_ACTIONCOMM) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('agenda', 'allactions', 'read')) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
$object = new ActionComm($this->db);
|
||||
} else {
|
||||
throw new RestException(400, "this type is not recognized yet.");
|
||||
}
|
||||
|
|
@ -472,11 +481,16 @@ class Categories extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
}
|
||||
$object = new Adherent($this->db);
|
||||
} elseif ($type === Categorie::TYPE_ACTIONCOMM) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('agenda', 'allactions', 'read')) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
$object = new ActionComm($this->db);
|
||||
} else {
|
||||
throw new RestException(400, "this type is not recognized yet.");
|
||||
}
|
||||
|
||||
$result = $object->fetch('', $object_ref);
|
||||
$result = $object->fetch(0, $object_ref);
|
||||
if ($result > 0) {
|
||||
$result = $this->category->add_type($object, $type);
|
||||
if ($result < 0) {
|
||||
|
|
@ -500,7 +514,7 @@ class Categories extends DolibarrApi
|
|||
* Unlink an object from a category by id
|
||||
*
|
||||
* @param int $id ID of category
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')
|
||||
* @param int $object_id ID of the object
|
||||
*
|
||||
* @return array
|
||||
|
|
@ -548,6 +562,11 @@ class Categories extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
}
|
||||
$object = new Adherent($this->db);
|
||||
} elseif ($type === Categorie::TYPE_ACTIONCOMM) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('agenda', 'allactions', 'read')) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
$object = new ActionComm($this->db);
|
||||
} else {
|
||||
throw new RestException(400, "this type is not recognized yet.");
|
||||
}
|
||||
|
|
@ -574,7 +593,7 @@ class Categories extends DolibarrApi
|
|||
* Unlink an object from a category by ref
|
||||
*
|
||||
* @param int $id ID of category
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact')
|
||||
* @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'actioncomm')
|
||||
* @param string $object_ref Reference of the object
|
||||
*
|
||||
* @return array
|
||||
|
|
@ -622,11 +641,16 @@ class Categories extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
}
|
||||
$object = new Adherent($this->db);
|
||||
} elseif ($type === Categorie::TYPE_ACTIONCOMM) {
|
||||
if (!DolibarrApiAccess::$user->hasRight('agenda', 'allactions', 'read')) {
|
||||
throw new RestException(403);
|
||||
}
|
||||
$object = new ActionComm($this->db);
|
||||
} else {
|
||||
throw new RestException(400, "this type is not recognized yet.");
|
||||
}
|
||||
|
||||
$result = $object->fetch('', (string) $object_ref);
|
||||
$result = $object->fetch(0, (string) $object_ref);
|
||||
if ($result > 0) {
|
||||
$result = $this->category->del_type($object, $type);
|
||||
if ($result < 0) {
|
||||
|
|
@ -774,6 +798,7 @@ class Categories extends DolibarrApi
|
|||
} elseif ($type == 'project') {
|
||||
$objects_api = new Projects();
|
||||
}
|
||||
|
||||
if (is_object($objects_api)) {
|
||||
foreach ($objects as $obj) {
|
||||
$cleaned_objects[] = $objects_api->_cleanObjectDatas($obj);
|
||||
|
|
|
|||
|
|
@ -1061,7 +1061,7 @@ while ($i < $imaxinloop) {
|
|||
if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && empty($arraylist[$labeltype])) {
|
||||
$labeltype = 'AC_OTH';
|
||||
}
|
||||
if (preg_match('/^TICKET_MSG/', $actionstatic->code)) {
|
||||
if (!empty($actionstatic->code) && preg_match('/^TICKET_MSG/', $actionstatic->code)) {
|
||||
$labeltype = $langs->trans("Message");
|
||||
} else {
|
||||
if (!empty($arraylist[$labeltype])) {
|
||||
|
|
|
|||
|
|
@ -1034,14 +1034,20 @@ if ($action == 'create') {
|
|||
print $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string');
|
||||
$email = CMailFile::getValidAddress($object->email_errorsto, 2);
|
||||
if ($action != 'editemail_errorsto') {
|
||||
if ($email && !isValidEmail($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadEMail", $email));
|
||||
} elseif ($email && !isValidMailDomain($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadMXDomain", $email));
|
||||
$emailarray = CMailFile::getArrayAddress($object->email_errorsto);
|
||||
foreach ($emailarray as $email => $name) {
|
||||
if ($name != $email) {
|
||||
print dol_escape_htmltag($name).' <'.$email;
|
||||
print '>';
|
||||
if ($email && !isValidEmail($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadEMail", $email));
|
||||
} elseif ($email && !isValidMailDomain($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadMXDomain", $email));
|
||||
}
|
||||
} else {
|
||||
print dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
|
@ -1081,9 +1087,9 @@ if ($action == 'create') {
|
|||
$nbemail = ($object->nbemail ? $object->nbemail : 0);
|
||||
if (is_numeric($nbemail)) {
|
||||
$text = '';
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < $nbemail) && ($object->statut == 1 || ($object->statut == 2 && $nbtry < $nbemail))) {
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < $nbemail) && ($object->status == 1 || ($object->status == 2 && $nbtry < $nbemail))) {
|
||||
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
|
||||
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalInt('MAILING_LIMIT_SENDBYWEB'));
|
||||
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
|
||||
} else {
|
||||
$text .= $langs->trans('SendingFromWebInterfaceIsNotAllowed');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,14 +90,21 @@ if (version_compare(phpversion(), '7.0', '>=')) {
|
|||
if (!$user->hasRight('mailing', 'lire') || (!getDolGlobalString('EXTERNAL_USERS_ARE_AUTHORIZED') && $user->socid > 0)) {
|
||||
accessforbidden();
|
||||
}
|
||||
//$result = restrictedArea($user, 'mailing');
|
||||
if (empty($action) && empty($object->id)) {
|
||||
accessforbidden('Object not found');
|
||||
}
|
||||
|
||||
$permissiontoread = $user->hasRight('maling', 'lire');
|
||||
$permissiontocreate = $user->hasRight('mailing', 'creer');
|
||||
$permissiontovalidatesend = $user->hasRight('mailing', 'valider');
|
||||
$permissiontodelete = $user->hasRight('mailing', 'supprimer');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'add' && $user->hasRight('mailing', 'creer')) { // Add recipients
|
||||
if ($action == 'add' && $permissiontocreate) { // Add recipients
|
||||
$module = GETPOST("module", 'alpha');
|
||||
$result = -1;
|
||||
|
||||
|
|
@ -146,7 +153,7 @@ if ($action == 'add' && $user->hasRight('mailing', 'creer')) { // Add recipient
|
|||
}
|
||||
}
|
||||
|
||||
if (GETPOSTINT('clearlist') && $user->hasRight('mailing', 'creer')) {
|
||||
if (GETPOSTINT('clearlist') && $permissiontocreate) {
|
||||
// Loading Class
|
||||
$obj = new MailingTargets($db);
|
||||
$obj->clear_target($id);
|
||||
|
|
@ -156,7 +163,7 @@ if (GETPOSTINT('clearlist') && $user->hasRight('mailing', 'creer')) {
|
|||
*/
|
||||
}
|
||||
|
||||
if (GETPOSTINT('exportcsv') && $user->hasRight('mailing', 'lire')) {
|
||||
if (GETPOSTINT('exportcsv') && $permissiontoread) {
|
||||
$completefilename = 'targets_emailing'.$object->id.'_'.dol_print_date(dol_now(), 'dayhourlog').'.csv';
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment;filename='.$completefilename);
|
||||
|
|
@ -195,7 +202,7 @@ if (GETPOSTINT('exportcsv') && $user->hasRight('mailing', 'lire')) {
|
|||
exit;
|
||||
}
|
||||
|
||||
if ($action == 'delete' && $user->hasRight('mailing', 'creer')) {
|
||||
if ($action == 'delete' && $permissiontocreate) {
|
||||
// Ici, rowid indique le destinataire et id le mailing
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE rowid = ".((int) $rowid);
|
||||
$resql = $db->query($sql);
|
||||
|
|
@ -252,7 +259,7 @@ if ($action == 'settitle' || $action == 'setemail_from' || $action == 'setreplyt
|
|||
$mesg = $object->error;
|
||||
}
|
||||
|
||||
setEventMessages($mesg, null, 'errors');
|
||||
setEventMessages($mesg, $mesgs, 'errors');
|
||||
$action = "";
|
||||
}
|
||||
|
||||
|
|
@ -301,6 +308,7 @@ if ($object->fetch($id) >= 0) {
|
|||
|
||||
print '<table class="border centpercent tableforfield">';
|
||||
|
||||
// From
|
||||
print '<tr><td class="titlefield">'.$langs->trans("MailFrom").'</td><td>';
|
||||
$emailarray = CMailFile::getArrayAddress($object->email_from);
|
||||
foreach ($emailarray as $email => $name) {
|
||||
|
|
@ -327,9 +335,12 @@ if ($object->fetch($id) >= 0) {
|
|||
if ($name != $email) {
|
||||
print dol_escape_htmltag($name).' <'.$email;
|
||||
print '>';
|
||||
if (!isValidEmail($email)) {
|
||||
if ($email && !isValidEmail($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadEMail", $email));
|
||||
} elseif ($email && !isValidMailDomain($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadMXDomain", $email));
|
||||
}
|
||||
} else {
|
||||
print dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
|
||||
|
|
@ -338,6 +349,25 @@ if ($object->fetch($id) >= 0) {
|
|||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Reply to
|
||||
if ($object->messtype != 'sms') {
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("MailReply", 'email_replyto', $object->email_replyto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string');
|
||||
print '</td><td>';
|
||||
print $form->editfieldval("MailReply", 'email_replyto', $object->email_replyto, $object, $user->hasRight('mailing', 'creer') && $object->status < $object::STATUS_SENTCOMPLETELY, 'string');
|
||||
$email = CMailFile::getValidAddress($object->email_replyto, 2);
|
||||
if ($action != 'editemail_replyto') {
|
||||
if ($email && !isValidEmail($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadEMail", $email));
|
||||
} elseif ($email && !isValidMailDomain($email)) {
|
||||
$langs->load("errors");
|
||||
print img_warning($langs->trans("ErrorBadMXDomain", $email));
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
|
@ -354,7 +384,7 @@ if ($object->fetch($id) >= 0) {
|
|||
$nbemail = ($object->nbemail ? $object->nbemail : 0);
|
||||
if (is_numeric($nbemail)) {
|
||||
$text = '';
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) && ($object->status == 1 || ($object->status == 2 && $nbtry < $nbemail))) {
|
||||
if ((getDolGlobalString('MAILING_LIMIT_SENDBYWEB') && getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') < $nbemail) && ($object->status == 1 || ($object->status == 2 && $nbtry < $nbemail))) {
|
||||
if (getDolGlobalInt('MAILING_LIMIT_SENDBYWEB') > 0) {
|
||||
$text .= $langs->trans('LimitSendingEmailing', getDolGlobalString('MAILING_LIMIT_SENDBYWEB'));
|
||||
} else {
|
||||
|
|
@ -376,19 +406,24 @@ if ($object->fetch($id) >= 0) {
|
|||
print '<tr><td>';
|
||||
print $langs->trans("MAIN_MAIL_SENDMODE");
|
||||
print '</td><td>';
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
|
||||
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')];
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_SENDMODE')) {
|
||||
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE')];
|
||||
} else {
|
||||
$text = $listofmethods['mail'];
|
||||
}
|
||||
print $text;
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'mail') {
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING').')</span>';
|
||||
if ($object->messtype != 'sms') {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') && getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
|
||||
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING')];
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_SENDMODE')) {
|
||||
$text = $listofmethods[getDolGlobalString('MAIN_MAIL_SENDMODE')];
|
||||
} else {
|
||||
$text = $listofmethods['mail'];
|
||||
}
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_SENDMODE') != 'mail' && getDolGlobalString('MAIN_MAIL_SMTP_SERVER')) {
|
||||
print $text;
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'default') {
|
||||
if (getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING') != 'mail') {
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER_EMAILING', getDolGlobalString('MAIN_MAIL_SMTP_SERVER')).')</span>';
|
||||
}
|
||||
} elseif (getDolGlobalString('MAIN_MAIL_SENDMODE') != 'mail' && getDolGlobalString('MAIN_MAIL_SMTP_SERVER')) {
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER').')</span>';
|
||||
}
|
||||
} else {
|
||||
print 'SMS ';
|
||||
print ' <span class="opacitymedium">('.getDolGlobalString('MAIN_MAIL_SMTP_SERVER').')</span>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
|
|
@ -3667,14 +3667,14 @@ class Propal extends CommonObject
|
|||
}
|
||||
$datas['customer'] = '<br><b>'.$langs->trans('Customer').':</b> '.$this->thirdparty->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
if (!empty($this->ref_client)) {
|
||||
$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
|
||||
if (!empty($this->ref_customer)) {
|
||||
$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_customer;
|
||||
}
|
||||
if (!$nofetch) {
|
||||
$langs->load('project');
|
||||
if (empty($this->project)) {
|
||||
if (is_null($this->project) || (is_object($this->project) && $this->project->isEmpty())) {
|
||||
$res = $this->fetch_project();
|
||||
if ($res > 0 && !empty($this->project) && $this->project instanceof Project) {
|
||||
if ($res > 0 && $this->project instanceof Project) {
|
||||
$datas['project'] = '<br><b>'.$langs->trans('Project').':</b> '.$this->project->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3755,9 +3755,9 @@ class Commande extends CommonOrder
|
|||
$datas['RefCustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '.(empty($this->ref_customer) ? (empty($this->ref_client) ? '' : $this->ref_client) : $this->ref_customer);
|
||||
if (!$nofetch) {
|
||||
$langs->load('project');
|
||||
if (empty($this->project)) {
|
||||
if (is_null($this->project) || (is_object($this->project) && $this->project->isEmpty())) {
|
||||
$res = $this->fetch_project();
|
||||
if ($res > 0 && !empty($this->project) && $this->project instanceof Project) {
|
||||
if ($res > 0 && $this->project instanceof Project) {
|
||||
$datas['project'] = '<br><b>'.$langs->trans('Project').':</b> '.$this->project->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
* Copyright (C) 2021-2024 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Noé Cendrier <noe.cendrier@altairis.fr>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.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
|
||||
|
|
@ -1527,9 +1528,6 @@ if (empty($reshook)) {
|
|||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1923,12 +1923,12 @@ class Facture extends CommonInvoice
|
|||
$datas['picto'] .= ' '.$this->getLibType(1);
|
||||
|
||||
// Complete datas
|
||||
if (!empty($params['fromajaxtooltip']) && !isset($this->alreadypaid)) {
|
||||
// Load the alreadypaid field
|
||||
$this->alreadypaid = $this->getSommePaiement(0);
|
||||
if (!empty($params['fromajaxtooltip']) && !isset($this->totalpaid)) {
|
||||
// Load the totalpaid field
|
||||
$this->totalpaid = $this->getSommePaiement(0);
|
||||
}
|
||||
if (isset($this->status) && isset($this->alreadypaid)) {
|
||||
$datas['picto'] .= ' '.$this->getLibStatut(5, $this->alreadypaid);
|
||||
if (isset($this->status) && isset($this->totalpaid)) {
|
||||
$datas['picto'] .= ' '.$this->getLibStatut(5, $this->totalpaid);
|
||||
}
|
||||
if ($moretitle) {
|
||||
$datas['picto'] .= ' - '.$moretitle;
|
||||
|
|
|
|||
|
|
@ -678,7 +678,7 @@ if (isModEnabled('salaries') && ($modecompta == 'CREANCES-DETTES' || $modecompta
|
|||
* Expense reports
|
||||
*/
|
||||
|
||||
if (!isModEnabled('expensereport') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
if (isModEnabled('expensereport') && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) {
|
||||
$langs->load('trips');
|
||||
|
||||
if ($modecompta == 'CREANCES-DETTES') {
|
||||
|
|
|
|||
|
|
@ -306,8 +306,9 @@ $dolibarr_main_prod='1';
|
|||
// Default value: 'mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump'
|
||||
// Examples:
|
||||
// $dolibarr_main_restrict_os_commands='mysqldump, /usr/local/bin/otherdumptool';
|
||||
// $dolibarr_main_restrict_os_commands='mariadb-dump, mariadb, mysqldump, mysql, pg_dump, pg_restore, clamdscan, clamdscan.exe';
|
||||
//
|
||||
$dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore, mariadb, mariadb-dump';
|
||||
$dolibarr_main_restrict_os_commands='mariadb-dump, mariadb, mysqldump, mysql, pg_dump, pg_restore, clamdscan, clamdscan.exe';
|
||||
|
||||
// dolibarr_main_disabled_modules
|
||||
// ==================================
|
||||
|
|
|
|||
|
|
@ -2086,9 +2086,9 @@ class Contrat extends CommonObject
|
|||
$datas['refcustomer'] = '<br><b>'.$langs->trans('RefCustomer').':</b> '. $this->ref_customer;
|
||||
if (!$nofetch) {
|
||||
$langs->load('project');
|
||||
if (empty($this->project)) {
|
||||
if (is_null($this->project) || (is_object($this->project) && $this->project->isEmpty())) {
|
||||
$res = $this->fetch_project();
|
||||
if ($res > 0 && !empty($this->project) && $this->project instanceof Project) {
|
||||
if ($res > 0 && $this->project instanceof Project) {
|
||||
$datas['project'] = '<br><b>'.$langs->trans('Project').':</b> '.$this->project->getNomUrl(1, '', 0, 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,10 +285,11 @@ if (isModEnabled('contract') && $user->hasRight('contrat', 'lire')) {
|
|||
$staticcompany->id = $obj->socid;
|
||||
$staticcompany->name = $obj->name;
|
||||
$staticcompany->name_alias = $obj->name_alias;
|
||||
$staticcompany->photo = 1;
|
||||
$staticcompany->logo = $obj->logo;
|
||||
$staticcompany->code_client = $obj->code_client;
|
||||
$staticcompany->code_fournisseur = $obj->code_fournisseur;
|
||||
$staticcompany->code_compta = $obj->code_compta;
|
||||
$staticcompany->code_compta_client = $obj->code_compta;
|
||||
$staticcompany->code_compta_fournisseur = $obj->code_compta_fournisseur;
|
||||
$staticcompany->client = $obj->client;
|
||||
$staticcompany->fournisseur = $obj->fournisseur;
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class box_accountancy_suspense_account extends ModeleBoxes
|
|||
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => '',
|
||||
'text' => $langs->trans("NumberOfLinesInSuspenseAccount").':'
|
||||
'text' => $langs->trans("NumberOfLinesInSuspenseAccount")
|
||||
);
|
||||
|
||||
$this->info_box_contents[0][1] = array(
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ class box_graph_nb_ticket_last_x_days extends ModeleBoxes
|
|||
$minimumdatec = dol_time_plus_duree($minimumdatec, $intervaltoadd, 'd');
|
||||
$minimumdatecformated = dol_print_date($minimumdatec, 'dayrfc');
|
||||
}
|
||||
$dataseries[] = array('label' => dol_print_date($objp->datec, 'day'), 'data' => $objp->nb);
|
||||
$dataseries[] = array('label' => dol_print_date($this->db->jdate($objp->datec), 'day'), 'data' => $objp->nb);
|
||||
$minimumdatec = dol_time_plus_duree($minimumdatec, $intervaltoadd, 'd');
|
||||
$minimumdatecformated = dol_print_date($minimumdatec, 'dayrfc');
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -934,6 +934,16 @@ abstract class CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* isEmpty We consider CommonObject isEmpty if this->id is empty
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
return (empty($this->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* setErrorsFromObject
|
||||
*
|
||||
|
|
@ -9280,45 +9290,19 @@ abstract class CommonObject
|
|||
}
|
||||
|
||||
/**
|
||||
* getDataToShowPhoto
|
||||
* Function used to get the logos or photos of an object
|
||||
*
|
||||
* @param string $modulepart Module part
|
||||
* @param string $imagesize Image size
|
||||
* @param string $imagesize Image size ('', 'mini' or 'small')
|
||||
* @return array{dir:string,file:string,originalfile:string,altfile:string,email:string,capture:string} Array of data to show photo
|
||||
*/
|
||||
public function getDataToShowPhoto($modulepart, $imagesize)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$file = '';
|
||||
$originalfile = '';
|
||||
$newmodulepart = $modulepart;
|
||||
if ($modulepart == 'unknown' && !empty($this->module)) {
|
||||
$newmodulepart = $this->module;
|
||||
}
|
||||
|
||||
$id = $this->id;
|
||||
$dir = $conf->$newmodulepart->dir_output ?? '';
|
||||
if (!empty($this->photo)) {
|
||||
if (dolIsAllowedForPreview($this->photo)) {
|
||||
if ((string) $imagesize == 'mini') {
|
||||
$file = get_exdir(0, 0, 0, 0, $this, $newmodulepart) . 'photos/' . dol_sanitizeFileName(getImageFileNameForSize($this->photo, '_mini'));
|
||||
} elseif ((string) $imagesize == 'small') {
|
||||
$file = get_exdir(0, 0, 0, 0, $this, $newmodulepart) . 'photos/' . dol_sanitizeFileName(getImageFileNameForSize($this->photo, '_small'));
|
||||
} else {
|
||||
$file = get_exdir(0, 0, 0, 0, $this, $newmodulepart) . 'photos/' . dol_sanitizeFileName($this->photo);
|
||||
}
|
||||
$originalfile = get_exdir(0, 0, 0, 0, $this, $newmodulepart) . 'photos/' . dol_sanitizeFileName($this->photo);
|
||||
}
|
||||
}
|
||||
|
||||
$altfile = '';
|
||||
$email = empty($this->email) ? '' : $this->email;
|
||||
$capture = '';
|
||||
|
||||
return array('dir' => $dir, 'file' => $file, 'originalfile' => $originalfile, 'altfile' => $altfile, 'email' => $email, 'capture' => $capture);
|
||||
// See getDataToShowPhoto() implemented by Product for example.
|
||||
return array('dir' => '', 'file' => '', 'originalfile' => '', 'altfile' => '', 'email' => '', 'capture' => '');
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Show photos of an object (nbmax maximum), into several columns
|
||||
|
|
@ -9491,8 +9475,8 @@ abstract class CommonObject
|
|||
}
|
||||
if ($showaction) {
|
||||
$return .= '<br>';
|
||||
// If $photo_vignette set, we add link to generate thumbs if file is an image and ->imgWidth or->imgHeight higher than limits
|
||||
if ($photo_vignette && (image_format_supported($photo) > 0) && ((isset($this->imgWidth) && $this->imgWidth > $maxWidth) || (isset($this->imgHeight) && $this->imgHeight > $maxHeight))) {
|
||||
// If $photo_vignette set, we add a link to generate thumbs if file is an image and width or height higher than limits
|
||||
if ($photo_vignette && (image_format_supported($photo) > 0) && ((isset($imgarray['width']) && $imgarray['width'] > $maxWidth) || (isset($imgarray['width']) && $imgarray['width'] > $maxHeight))) {
|
||||
$return .= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=addthumb&token='.newToken().'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
}
|
||||
// Special case for product
|
||||
|
|
|
|||
|
|
@ -2134,7 +2134,7 @@ class Form
|
|||
* @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty.
|
||||
* @param string $morecss More css
|
||||
* @param int<0,1> $notdisabled Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on).
|
||||
* @param int<0,2> $outputmode 0=HTML select string, 1=Array
|
||||
* @param int<0,2> $outputmode 0=HTML select string, 1=Array, 2=Detailed array
|
||||
* @param bool $multiple add [] in the name of element and add 'multiple' attribute
|
||||
* @param int<0,1> $forcecombo Force the component to be a simple combo box without ajax
|
||||
* @return string|array<int,string|array{id:int,label:string,labelhtml:string,color:string,picto:string}> HTML select string
|
||||
|
|
@ -2175,6 +2175,8 @@ class Form
|
|||
$includeUsers = implode(",", $user->getAllChildIds(1));
|
||||
}
|
||||
|
||||
$num = 0;
|
||||
|
||||
$out = '';
|
||||
$outarray = array();
|
||||
$outarray2 = array();
|
||||
|
|
@ -2388,6 +2390,8 @@ class Form
|
|||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$this->num = $num;
|
||||
|
||||
if ($outputmode == 2) {
|
||||
return $outarray2;
|
||||
} elseif ($outputmode) {
|
||||
|
|
|
|||
|
|
@ -325,20 +325,20 @@ class FormProjets extends Form
|
|||
/**
|
||||
* Output a combo list with tasks qualified for a third party
|
||||
*
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id task preselected
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
|
||||
* @param int $discard_closed Discard closed projects (0=Keep, 1=hide completely, 2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param string $morecss More css added to the select component
|
||||
* @param string $projectsListId ''=Automatic filter on project allowed. List of id=Filter on project ids.
|
||||
* @param string $showmore 'all' = Show project info, 'progress' = Show task progression, ''=Show nothing more
|
||||
* @param User $usertofilter User object to use for filtering
|
||||
* @param int $nooutput 1=Return string, do not send to output
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param int $selected Id task preselected
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param int $maxlength Maximum length of label
|
||||
* @param int $option_only Return only html options lines without the select tag
|
||||
* @param string $show_empty Add an empty line ('1' or string to show for empty line)
|
||||
* @param int $discard_closed Discard closed projects (0=Keep, 1=hide completely, 2=Disable)
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int $disabled Disabled
|
||||
* @param string $morecss More css added to the select component
|
||||
* @param string $projectsListId ''=Automatic filter on project allowed. List of id=Filter on project ids.
|
||||
* @param string $showmore 'all' = Show project info, 'progress' = Show task progression, ''=Show nothing more
|
||||
* @param User $usertofilter User object to use for filtering
|
||||
* @param int $nooutput 1=Return string, do not send to output
|
||||
*
|
||||
* @return int|string Nbr of tasks if OK, <0 if KO. If nooutput=1: Return a HTML select string.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -304,6 +304,41 @@ function societe_prepare_head(Societe $object)
|
|||
}
|
||||
}
|
||||
|
||||
// Notifications
|
||||
if (isModEnabled('ticket') && $user->hasRight("ticket", "read")) {
|
||||
//$langs->load('ticket');
|
||||
$nbTicket = 0;
|
||||
// Enable caching of thirdparty count notifications
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
||||
$cachekey = 'count_ticket_thirdparty_'.$object->id;
|
||||
$nbticketretreived = dol_getcache($cachekey);
|
||||
if (!is_null($nbticketretreived)) {
|
||||
$nbTicket = $nbticketretreived;
|
||||
} else {
|
||||
// List of notifications enabled for contacts of the third party
|
||||
$sql = "SELECT COUNT(t.rowid) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."ticket as t";
|
||||
$sql .= " WHERE t.fk_soc = ".((int) $object->id);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
$nbTicket = $obj->nb;
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
dol_setcache($cachekey, $nbTicket, 120); // If setting cache fails, this is not a problem, so we do not test result.
|
||||
}
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/list.php?socid='.urlencode((string) ($object->id));
|
||||
$head[$h][1] = $langs->trans("Tickets");
|
||||
if ($nbTicket > 0) {
|
||||
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbTicket.'</span>';
|
||||
}
|
||||
$head[$h][2] = 'ticket';
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -632,7 +633,8 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small',
|
|||
}
|
||||
|
||||
// Before PHP8, img was a resource, With PHP8, it is a GdImage
|
||||
if (!is_resource($img) && class_exists('GdImage') && !($img instanceof GdImage)) {
|
||||
// if (!is_resource($img) && class_exists('GdImage') && !($img instanceof GdImage)) {
|
||||
if (is_null($img) || $img === false) {
|
||||
dol_syslog('Failed to detect type of image. We found infoImg[2]='.$infoImg[2], LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1407,9 +1407,9 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
|||
|
||||
$restrictBefore = null;
|
||||
|
||||
if (getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
if (getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm');
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), -1 * getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS'), 'm');
|
||||
}
|
||||
|
||||
//dol_syslog('projectLinesPerDay inc='.$inc.' preselectedday='.$preselectedday.' task parent id='.$parent.' level='.$level." count(lines)=".$numlines." count(lineswithoutlevel0)=".count($lineswithoutlevel0));
|
||||
|
|
@ -1806,9 +1806,9 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
|
||||
$restrictBefore = null;
|
||||
|
||||
if (getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
if (getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm');
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), -1 * getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS'), 'm');
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $numlines; $i++) {
|
||||
|
|
@ -2172,9 +2172,11 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
|||
* @param array $isavailable Array with data that say if user is available for several days for morning and afternoon
|
||||
* @param int $oldprojectforbreak Old project id of last project break
|
||||
* @param array $TWeek Array of week numbers
|
||||
* @param array $arrayfields Array of additional column
|
||||
* @param Extrafields $extrafields Object extrafields
|
||||
* @return array Array with time spent for $fuser for each day of week on tasks in $lines and subtasks
|
||||
*/
|
||||
function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array())
|
||||
function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mine, $restricteditformytask, &$isavailable, $oldprojectforbreak = 0, $TWeek = array(), $arrayfields = array(), $extrafields = null)
|
||||
{
|
||||
global $conf, $db, $user, $langs;
|
||||
global $form, $formother, $projectstatic, $taskstatic, $thirdpartystatic;
|
||||
|
|
@ -2203,9 +2205,9 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
|
||||
$restrictBefore = null;
|
||||
|
||||
if (getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
if (getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), - $conf->global->PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS, 'm');
|
||||
$restrictBefore = dol_time_plus_duree(dol_now(), -1 * getDolGlobalInt('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS'), 'm');
|
||||
}
|
||||
|
||||
for ($i = 0; $i < $numlines; $i++) {
|
||||
|
|
@ -2307,40 +2309,46 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &
|
|||
print "</td>\n";
|
||||
|
||||
// Planned Workload
|
||||
print '<td class="leftborder plannedworkload right">';
|
||||
if ($lines[$i]->planned_workload) {
|
||||
print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td class="leftborder plannedworkload right">';
|
||||
if ($lines[$i]->planned_workload) {
|
||||
print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Progress declared %
|
||||
print '<td class="right">';
|
||||
print $formother->select_percent($lines[$i]->progress, $lines[$i]->id.'progress');
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="right">';
|
||||
print $formother->select_percent($lines[$i]->progress, $lines[$i]->id.'progress');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Time spent by everybody
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration_effective is a denormalised field = summ of time spent by everybody for task. What we need is time consumed by user
|
||||
if ($lines[$i]->duration_effective) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration_effective, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration_effective is a denormalised field = summ of time spent by everybody for task. What we need is time consumed by user
|
||||
if ($lines[$i]->duration_effective) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
|
||||
print convertSecondToTime($lines[$i]->duration_effective, 'allhourmin');
|
||||
print '</a>';
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
// Time spent by user
|
||||
print '<td class="right">';
|
||||
$tmptimespent = $taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) {
|
||||
print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
} else {
|
||||
print '--:--';
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
$disabledproject = 1;
|
||||
$disabledtask = 1;
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||
// Load translation files required by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->contrat->multidir_output[$object->entity]) {
|
||||
if ($conf->contract->multidir_output[$object->entity]) {
|
||||
// If $object is id instead of object
|
||||
if (!is_object($object)) {
|
||||
$id = $object;
|
||||
|
|
@ -243,7 +243,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$dir = $conf->contrat->multidir_output[$object->entity];
|
||||
$dir = $conf->contract->multidir_output[$object->entity];
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
if (!preg_match('/specimen/i', $objectref)) {
|
||||
$dir .= "/".$objectref;
|
||||
|
|
@ -283,8 +283,8 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||
//print "file=".$file;
|
||||
//print "conf->contrat->dir_temp=".$conf->contrat->dir_temp;
|
||||
|
||||
dol_mkdir($conf->contrat->dir_temp);
|
||||
if (!is_writable($conf->contrat->dir_temp)) {
|
||||
dol_mkdir($conf->contract->dir_temp);
|
||||
if (!is_writable($conf->contract->dir_temp)) {
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->contrat->dir_temp);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
|
|
@ -483,7 +483,6 @@ class doc_generic_contract_odt extends ModelePDFContract
|
|||
return 1; // Success
|
||||
} else {
|
||||
$this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
$this->option_freetext = 1; // Support add of a personalised text
|
||||
$this->option_draft_watermark = 0; // Support add of a watermark on drafts
|
||||
|
||||
// Recupere emetteur
|
||||
// Get source company
|
||||
$this->emetteur = $mysoc;
|
||||
if (!$this->emetteur->country_code) {
|
||||
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
|
||||
|
|
@ -227,10 +227,10 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
$sav_charset_output = $outputlangs->charset_output;
|
||||
$outputlangs->charset_output = 'UTF-8';
|
||||
|
||||
// Load traductions files required by page
|
||||
// Load translation files required by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->expedition->dir_output."/sending") {
|
||||
if ($conf->expedition->multidir_output[$object->entity]."/sending") {
|
||||
// If $object is id instead of object
|
||||
if (!is_object($object)) {
|
||||
$id = $object;
|
||||
|
|
@ -244,7 +244,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
|
||||
$object->fetch_thirdparty();
|
||||
|
||||
$dir = $conf->expedition->dir_output."/sending";
|
||||
$dir = $conf->expedition->multidir_output[$object->entity]."/sending";
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
if (!preg_match('/specimen/i', $objectref)) {
|
||||
$dir .= "/".$objectref;
|
||||
|
|
@ -451,21 +451,25 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
// Call the ODTSubstitution hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
foreach ($tmparray as $key => $value) {
|
||||
try {
|
||||
if (preg_match('/logo$/', $key)) { // Image
|
||||
if (preg_match('/logo$/', $key)) {
|
||||
// Image
|
||||
if (file_exists($value)) {
|
||||
$odfHandler->setImage($key, $value);
|
||||
} else {
|
||||
$odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
|
||||
}
|
||||
} else { // Text
|
||||
} else {
|
||||
// Text
|
||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||
}
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
// Replace tags of lines
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
|
|
@ -476,8 +480,10 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines) {
|
||||
$linenumber = 0;
|
||||
foreach ($object->lines as $line) {
|
||||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
|
||||
$linenumber++;
|
||||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
|
||||
// Call the ODTSubstitutionLine hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);
|
||||
|
|
@ -532,6 +538,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
|
||||
$reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
|
|
@ -544,7 +551,6 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||
return 1; // Success
|
||||
} else {
|
||||
$this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,12 +87,12 @@ class ImportCsv extends ModeleImports
|
|||
*/
|
||||
public function __construct($db, $datatoimport)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
parent::__construct();
|
||||
$this->db = $db;
|
||||
|
||||
$this->separator = (GETPOST('separator') ? GETPOST('separator') : (!getDolGlobalString('IMPORT_CSV_SEPARATOR_TO_USE') ? ',' : $conf->global->IMPORT_CSV_SEPARATOR_TO_USE));
|
||||
$this->separator = (GETPOST('separator') ? GETPOST('separator') : getDolGlobalString('IMPORT_CSV_SEPARATOR_TO_USE', ','));
|
||||
$this->enclosure = '"';
|
||||
$this->escape = '"';
|
||||
|
||||
|
|
@ -102,6 +102,14 @@ class ImportCsv extends ModeleImports
|
|||
$this->extension = 'csv'; // Extension for generated file by this driver
|
||||
$this->picto = 'mime/other'; // Picto
|
||||
$this->version = '1.34'; // Driver version
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
if (versioncompare($this->phpmin, versionphparray()) > 0) {
|
||||
dol_syslog("Module need a higher PHP version");
|
||||
$this->error = "Module need a higher PHP version";
|
||||
return;
|
||||
}
|
||||
|
||||
// If driver use an external library, put its name here
|
||||
$this->label_lib = 'Dolibarr';
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class ImportXlsx extends ModeleImports
|
|||
*/
|
||||
public function __construct($db, $datatoimport)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
|
||||
parent::__construct();
|
||||
$this->db = $db;
|
||||
|
|
@ -106,6 +106,14 @@ class ImportXlsx extends ModeleImports
|
|||
$this->extension = 'xlsx'; // Extension for generated file by this driver
|
||||
$this->picto = 'mime/xls'; // Picto (This is not used by the example file code as Mime type, too bad ...)
|
||||
$this->version = '1.0'; // Driver version
|
||||
$this->phpmin = array(7, 1); // Minimum version of PHP required by module
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
if (versioncompare($this->phpmin, versionphparray()) > 0) {
|
||||
dol_syslog("Module need a higher PHP version");
|
||||
$this->error = "Module need a higher PHP version";
|
||||
return;
|
||||
}
|
||||
|
||||
// If driver use an external library, put its name here
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/phpoffice/phpspreadsheet/src/autoloader.php';
|
||||
|
|
|
|||
|
|
@ -71,9 +71,23 @@ class ModeleImports
|
|||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
public $label_lib; // Label of external lib used by driver
|
||||
/**
|
||||
* PHP minimal version required by driver
|
||||
* @var array{0:int,1:int}
|
||||
*/
|
||||
public $phpmin = array();
|
||||
|
||||
public $version_lib; // Version of external lib used by driver
|
||||
/**
|
||||
* Label of external lib used by driver
|
||||
* @var string
|
||||
*/
|
||||
public $label_lib;
|
||||
|
||||
/**
|
||||
* Version of external lib used by driver
|
||||
* @var string
|
||||
*/
|
||||
public $version_lib;
|
||||
|
||||
// Array of all drivers
|
||||
public $driverlabel = array();
|
||||
|
|
@ -82,6 +96,8 @@ class ModeleImports
|
|||
|
||||
public $driverversion = array();
|
||||
|
||||
public $drivererror = array();
|
||||
|
||||
public $liblabel = array();
|
||||
|
||||
public $libversion = array();
|
||||
|
|
@ -225,10 +241,10 @@ class ModeleImports
|
|||
$dir = DOL_DOCUMENT_ROOT."/core/modules/import/";
|
||||
$handle = opendir($dir);
|
||||
|
||||
// Recherche des fichiers drivers imports disponibles
|
||||
$i = 0;
|
||||
// Search list ov drivers available and qualified
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
$reg = array();
|
||||
if (preg_match("/^import_(.*)\.modules\.php/i", $file, $reg)) {
|
||||
$moduleid = $reg[1];
|
||||
|
||||
|
|
@ -245,11 +261,10 @@ class ModeleImports
|
|||
$this->driverlabel[$module->id] = $module->getDriverLabel('');
|
||||
$this->driverdesc[$module->id] = $module->getDriverDesc('');
|
||||
$this->driverversion[$module->id] = $module->getDriverVersion('');
|
||||
$this->drivererror[$module->id] = $module->error ? $module->error : '';
|
||||
// If use an external lib
|
||||
$this->liblabel[$module->id] = $module->getLibLabel('');
|
||||
$this->liblabel[$module->id] = ($module->error ? '<span class="error">'.$module->error.'</span>' : $module->getLibLabel(''));
|
||||
$this->libversion[$module->id] = $module->getLibVersion('');
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class modMultiCurrency extends DolibarrModules
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $langs, $conf;
|
||||
global $conf;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
|
|
|
|||
|
|
@ -127,11 +127,11 @@ class modOpenSurvey extends DolibarrModules
|
|||
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
|
||||
'mainmenu' => 'tools',
|
||||
'leftmenu' => 'opensurvey',
|
||||
'url' => '/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',
|
||||
'url' => '/opensurvey/list.php?mainmenu=tools&leftmenu=opensurvey',
|
||||
'langs' => 'opensurvey',
|
||||
'position' => 200,
|
||||
'enabled' => '$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->rights->opensurvey->read',
|
||||
'enabled' => 'isModEnabled("opensurvey")', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->hasRight("opensurvey", "read")',
|
||||
'target' => '',
|
||||
'user' => 0,
|
||||
);
|
||||
|
|
@ -146,8 +146,8 @@ class modOpenSurvey extends DolibarrModules
|
|||
'url' => '/opensurvey/wizard/index.php',
|
||||
'langs' => 'opensurvey',
|
||||
'position' => 210,
|
||||
'enabled' => '$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->rights->opensurvey->write',
|
||||
'enabled' => 'isModEnabled("opensurvey")', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->hasRight("opensurvey", "write")',
|
||||
'target' => '',
|
||||
'user' => 0,
|
||||
);
|
||||
|
|
@ -162,8 +162,8 @@ class modOpenSurvey extends DolibarrModules
|
|||
'url' => '/opensurvey/list.php',
|
||||
'langs' => 'opensurvey',
|
||||
'position' => 220,
|
||||
'enabled' => '$conf->opensurvey->enabled', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->rights->opensurvey->read',
|
||||
'enabled' => 'isModEnabled("opensurvey")', // Define condition to show or hide menu entry. Use '$conf->NewsSubmitter->enabled' if entry must be visible if module is enabled.
|
||||
'perms' => '$user->hasRight("opensurvey", "read")',
|
||||
'target' => '',
|
||||
'user' => 0,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -125,10 +125,11 @@ class modTicket extends DolibarrModules
|
|||
15 => array('TICKET_SHOW_COMPANY_FOOTER', 'chaine', getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER'), 'Enable footer on ticket public page', 0)
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
$this->tabs = array(
|
||||
'thirdparty:+ticket:Tickets:ticket:$user->hasRight("ticket","read"):/ticket/list.php?socid=__ID__',
|
||||
);
|
||||
*/
|
||||
|
||||
// Dictionaries
|
||||
if (!isset($conf->ticket->enabled)) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -171,7 +171,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||
|
||||
// Show Draft Watermark
|
||||
if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('PROPALE_DRAFT_WATERMARK')) {
|
||||
if ($object->status == $object::STATUS_DRAFT && getDolGlobalString('PROPALE_DRAFT_WATERMARK')) {
|
||||
$this->watermark = getDolGlobalString('PROPALE_DRAFT_WATERMARK');
|
||||
}
|
||||
|
||||
|
|
@ -1582,7 +1582,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$pdf->SetTextColor(0, 0, 60);
|
||||
$title = $outputlangs->transnoentities("PdfCommercialProposalTitle");
|
||||
$title .= ' '.$outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == $object::STATUS_DRAFT) {
|
||||
if ($object->status == $object::STATUS_DRAFT) {
|
||||
$pdf->SetTextColor(128, 0, 0);
|
||||
$title .= ' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
|
|
@ -1596,7 +1596,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$pdf->SetXY($posx, $posy);
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref);
|
||||
if ($object->statut == $object::STATUS_DRAFT) {
|
||||
if ($object->status == $object::STATUS_DRAFT) {
|
||||
$pdf->SetTextColor(128, 0, 0);
|
||||
$textref .= ' - '.$outputlangs->transnoentities("NotValidated");
|
||||
}
|
||||
|
|
@ -1606,7 +1606,7 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$posy += 3;
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
|
||||
$ref_customer = $object->ref_customer ?? $object->ref_client;
|
||||
$ref_customer = $object->ref_customer ?: $object->ref_client;
|
||||
if ($ref_customer) {
|
||||
$posy += 4;
|
||||
$pdf->SetXY($posx, $posy);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -311,11 +311,11 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||
|
||||
// Make substitution
|
||||
$substitutionarray = array(
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_tva
|
||||
'__FROM_NAME__' => $this->emetteur->name,
|
||||
'__FROM_EMAIL__' => $this->emetteur->email,
|
||||
'__TOTAL_TTC__' => $object->total_ttc,
|
||||
'__TOTAL_HT__' => $object->total_ht,
|
||||
'__TOTAL_VAT__' => $object->total_tva
|
||||
);
|
||||
complete_substitutions_array($substitutionarray, $langs, $object);
|
||||
|
||||
|
|
@ -336,10 +336,10 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||
$odfHandler = new Odf(
|
||||
$srctemplatepath,
|
||||
array(
|
||||
'PATH_TO_TMP' => $conf->reception->dir_temp,
|
||||
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
|
||||
'DELIMITER_LEFT' => '{',
|
||||
'DELIMITER_RIGHT' => '}'
|
||||
'PATH_TO_TMP' => $conf->reception->dir_temp,
|
||||
'ZIP_PROXY' => 'PclZipProxy', // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
|
||||
'DELIMITER_LEFT' => '{',
|
||||
'DELIMITER_RIGHT' => '}'
|
||||
)
|
||||
);
|
||||
} catch (Exception $e) {
|
||||
|
|
@ -350,8 +350,6 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||
// After construction $odfHandler->contentXml contains content and
|
||||
// [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by
|
||||
// [!-- BEGIN lines --]*[!-- END lines --]
|
||||
//print html_entity_decode($odfHandler->__toString());
|
||||
//print exit;
|
||||
|
||||
|
||||
// Make substitutions into odt of freetext
|
||||
|
|
@ -397,44 +395,39 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||
}
|
||||
}
|
||||
// Replace tags of lines
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
$listlines = $odfHandler->setSegment('lines');
|
||||
} catch (OdfExceptionSegmentNotFound $e) {
|
||||
// We may arrive here if tags for lines not present into template
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (OdfException $e) {
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines) {
|
||||
$linenumber = 0;
|
||||
foreach ($object->lines as $line) {
|
||||
$linenumber++;
|
||||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
|
||||
// Call the ODTSubstitutionLine hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
$listlines = $odfHandler->setSegment('lines');
|
||||
} catch (OdfExceptionSegmentNotFound $e) {
|
||||
// We may arrive here if tags for lines not present into template
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines) {
|
||||
$linenumber = 0;
|
||||
foreach ($object->lines as $line) {
|
||||
$linenumber++;
|
||||
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs);
|
||||
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
|
||||
// Call the ODTSubstitutionLine hook
|
||||
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray, 'line'=>$line);
|
||||
$reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
$listlines->merge();
|
||||
}
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
$listlines->merge();
|
||||
}
|
||||
try {
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
} catch (OdfException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
return -1;
|
||||
}
|
||||
} catch (OdfException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Replace labels translated
|
||||
|
|
@ -481,7 +474,6 @@ class doc_generic_reception_odt extends ModelePdfReception
|
|||
return 1; // Success
|
||||
} else {
|
||||
$this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2011 Laurent Destailleur <ely@users.sourceforge.net>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -327,44 +327,39 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||
}
|
||||
}
|
||||
if ((is_array($contact_arrray) && count($contact_arrray) > 0)) {
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
$foundtagforlines = 1;
|
||||
try {
|
||||
$listlines = $odfHandler->setSegment('companycontacts');
|
||||
} catch (OdfExceptionSegmentNotFound $e) {
|
||||
// We may arrive here if tags for lines not present into template
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (OdfException $e) {
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines) {
|
||||
foreach ($contact_arrray as $array_key => $contact_id) {
|
||||
$res_contact = $contactstatic->fetch($contact_id);
|
||||
if ((int) $res_contact > 0) {
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (OdfException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
$listlines = $odfHandler->setSegment('companycontacts');
|
||||
} catch (OdfExceptionSegmentNotFound $e) {
|
||||
// We may arrive here if tags for lines not present into template
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines) {
|
||||
foreach ($contact_arrray as $array_key => $contact_id) {
|
||||
$res_contact = $contactstatic->fetch($contact_id);
|
||||
if ((int) $res_contact > 0) {
|
||||
$tmparray = $this->get_substitutionarray_contact($contactstatic, $outputlangs, 'contact');
|
||||
foreach ($tmparray as $key => $val) {
|
||||
try {
|
||||
$listlines->setVars($key, $val, true, 'UTF-8');
|
||||
} catch (SegmentException $e) {
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
$listlines->merge();
|
||||
} else {
|
||||
$this->error = $contactstatic->error;
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
}
|
||||
$listlines->merge();
|
||||
} else {
|
||||
$this->error = $contactstatic->error;
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
}
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
}
|
||||
} catch (OdfException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
//return -1;
|
||||
try {
|
||||
$odfHandler->mergeSegment($listlines);
|
||||
} catch (OdfException $e) {
|
||||
$this->error = $e->getMessage();
|
||||
dol_syslog($this->error, LOG_WARNING);
|
||||
//return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ if ($permission) {
|
|||
if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) {
|
||||
$tmpobject = $objectsrc;
|
||||
}
|
||||
$formcompany->selectTypeContact($tmpobject, '', 'type', 'internal', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth400'); ?></div>
|
||||
$formcompany->selectTypeContact($tmpobject, '', 'type', 'internal', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth200'); ?></div>
|
||||
<div class="tagtd"> </div>
|
||||
<div class="tagtd center"><input type="submit" class="button small" value="<?php echo $langs->trans("Add"); ?>"></div>
|
||||
</form>
|
||||
|
|
@ -186,7 +186,7 @@ if ($permission) {
|
|||
if (($object->element == 'shipping' || $object->element == 'reception') && is_object($objectsrc)) {
|
||||
$tmpobject = $objectsrc;
|
||||
}
|
||||
$formcompany->selectTypeContact($tmpobject, $preselectedtypeofcontact, 'typecontact', 'external', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth400'); ?>
|
||||
$formcompany->selectTypeContact($tmpobject, $preselectedtypeofcontact, 'typecontact', 'external', 'position', 0, 'minwidth150imp widthcentpercentminusx maxwidth200'); ?>
|
||||
</div>
|
||||
<div class="tagtd noborderbottom"> </div>
|
||||
<div class="tagtd center noborderbottom">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr
|
|||
if (empty($search_options_pattern)) {
|
||||
$search_options_pattern = 'search_options_';
|
||||
}
|
||||
|
||||
if (empty($extrafieldsobjectkey) && is_object($object)) {
|
||||
$extrafieldsobjectkey = $object->table_element;
|
||||
}
|
||||
foreach ($search_array_options as $key => $val) {
|
||||
$crit = $val;
|
||||
$tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key);
|
||||
|
|
@ -37,6 +39,12 @@ if (!empty($search_array_options) && is_array($search_array_options)) { // $extr
|
|||
$param .= '&'.$search_options_pattern.$tmpkey.'[]='.urlencode($val2);
|
||||
}
|
||||
} else {
|
||||
// test if we have checkbox type , we add the _multiselect needed into param
|
||||
$tmpkey = preg_replace('/'.$search_options_pattern.'/', '', $key);
|
||||
if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$tmpkey], array('checkbox', 'chkbxlst'))) {
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'_multiselect='.urlencode($val);
|
||||
}
|
||||
|
||||
$param .= '&'.$search_options_pattern.$tmpkey.'='.urlencode($val);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2017-2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -47,7 +48,7 @@ if (isset($_SERVER["HTTP_USER_AGENT"]) && is_object($conf) && empty($conf->brows
|
|||
}
|
||||
}
|
||||
// Define $website
|
||||
if (!is_object($website)) {
|
||||
if (is_null($website)) {
|
||||
$website = new Website($db);
|
||||
$website->fetch(0, $websitekey);
|
||||
}
|
||||
|
|
@ -58,14 +59,14 @@ if (empty($pageid) && !empty($websitepagefile)) {
|
|||
$pageid = $website->fk_default_home;
|
||||
}
|
||||
}
|
||||
if (!is_object($websitepage)) {
|
||||
if (is_null($websitepage)) {
|
||||
$websitepage = new WebsitePage($db);
|
||||
}
|
||||
// Define $weblangs
|
||||
if (!is_object($weblangs)) {
|
||||
if (is_null($weblangs)) {
|
||||
$weblangs = new Translate('', $conf);
|
||||
}
|
||||
if (!is_object($pagelangs)) {
|
||||
if (is_null($pagelangs)) {
|
||||
$pagelangs = new Translate('', $conf);
|
||||
}
|
||||
if (!empty($pageid) && $pageid > 0) {
|
||||
|
|
|
|||
|
|
@ -520,7 +520,7 @@ class Cronjob extends CommonObject
|
|||
* @param int $offset Offset ppage
|
||||
* @param int $status Display active or not
|
||||
* @param string|array $filter Filter USF.
|
||||
* @param int $processing Processing or not
|
||||
* @param int $processing Processing or not (-1=all, 0=not in progress, 1=in progress)
|
||||
* @return int if KO: <0 || if OK: >0
|
||||
*/
|
||||
public function fetchAll(string $sortorder = 'DESC', string $sortfield = 't.rowid', int $limit = 0, int $offset = 0, int $status = 1, $filter = '', int $processing = -1)
|
||||
|
|
|
|||
|
|
@ -2056,7 +2056,7 @@ class EmailCollector extends CommonObject
|
|||
}*/
|
||||
} elseif (preg_match('/<(.*@.*)>/', $reference, $reg)) {
|
||||
// This is an external reference, we check if we have it in our database
|
||||
if (!is_object($objectemail) && isModEnabled('ticket')) {
|
||||
if (is_null($objectemail) && isModEnabled('ticket')) {
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."ticket";
|
||||
$sql .= " WHERE email_msgid = '".$this->db->escape($reg[1])."' OR origin_references like '%".$this->db->escape($this->db->escapeforlike($reg[1]))."%'";
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
|
|||
|
|
@ -677,7 +677,6 @@ if (!empty($extrafields->attributes[$object->table_element]['label']) && is_arra
|
|||
}
|
||||
if ($search_all) {
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expeditiondet as ed ON e.rowid=ed.fk_expedition';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'commandedet as pd ON pd.rowid=ed.fk_elementdet';
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)";
|
||||
|
|
|
|||
|
|
@ -465,20 +465,25 @@ if ($step == 2 && $datatoimport) {
|
|||
foreach ($list as $key) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="16">'.img_picto_common($key, $objmodelimport->getPictoForKey($key)).'</td>';
|
||||
$text = $objmodelimport->getDriverDescForKey($key);
|
||||
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
|
||||
print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).'</td>';
|
||||
$htmltext = $objmodelimport->getDriverDescForKey($key);
|
||||
print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $htmltext).'</td>';
|
||||
print '<td style="text-align:center">';
|
||||
$filename = $langs->transnoentitiesnoconv("ExampleOfImportFile").'_'.$datatoimport.'.'.$key;
|
||||
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'&output=file&file='.urlencode($filename).'" target="_blank" rel="noopener noreferrer">';
|
||||
print img_picto('', 'download', 'class="paddingright opacitymedium"');
|
||||
print $langs->trans("DownloadEmptyExampleShort");
|
||||
print '</a>';
|
||||
print $form->textwithpicto('', $langs->trans("DownloadEmptyExample").'.<br>'.$langs->trans("StarAreMandatory"));
|
||||
if (empty($objmodelimport->drivererror[$key])) {
|
||||
$filename = $langs->transnoentitiesnoconv("ExampleOfImportFile").'_'.$datatoimport.'.'.$key;
|
||||
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'&output=file&file='.urlencode($filename).'" target="_blank" rel="noopener noreferrer">';
|
||||
print img_picto('', 'download', 'class="paddingright opacitymedium"');
|
||||
print $langs->trans("DownloadEmptyExampleShort");
|
||||
print '</a>';
|
||||
print $form->textwithpicto('', $langs->trans("DownloadEmptyExample").'.<br>'.$langs->trans("StarAreMandatory"));
|
||||
} else {
|
||||
print dolPrintHtml($objmodelimport->drivererror[$key]);
|
||||
}
|
||||
print '</td>';
|
||||
// Action button
|
||||
print '<td style="text-align:right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=3&format='.$key.$param.'">'.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15"').'</a>';
|
||||
if (empty($objmodelimport->drivererror[$key])) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/imports/import.php?step=3&format='.$key.$param.'">'.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15"').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) >
|
|||
$includeconferror = 'ErrorBadFormatForConfFile';
|
||||
}
|
||||
}
|
||||
|
||||
$conf->global->MAIN_ENABLE_LOG_TO_HTML = 1;
|
||||
|
||||
// Define prefix
|
||||
|
|
|
|||
74
htdocs/install/install.forced.docker.php
Normal file
74
htdocs/install/install.forced.docker.php
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 Yann Le Doaré <services@linuxconsole.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @var boolean $force_install_nophpinfo Hide PHP information */
|
||||
$force_install_nophpinfo = true;
|
||||
|
||||
/** @var int $force_install_noedit 1 = Lock and hide environment variables, 2 = Lock all set variables */
|
||||
$force_install_noedit = 2;
|
||||
|
||||
/** @var string $force_install_message Information message */
|
||||
$force_install_message = 'Welcome to your Dolibarr Docker install';
|
||||
|
||||
/** @var string $force_install_main_data_root Data root absolute path (documents folder) */
|
||||
$force_install_main_data_root = null;
|
||||
|
||||
/** @var boolean $force_install_mainforcehttps Force HTTPS */
|
||||
$force_install_mainforcehttps = true;
|
||||
|
||||
/** @var string $force_install_database Database name */
|
||||
$force_install_database = getenv('DOLI_DATABASE', true) ?: getenv('DOLI_DATABASE');
|
||||
|
||||
/** @var string $force_install_type Database driver (mysql|mysqli|pgsql|mssql|sqlite|sqlite3) */
|
||||
$force_install_type = 'mysqli';
|
||||
|
||||
/** @var string $force_install_dbserver Database server host */
|
||||
$force_install_dbserver = getenv('DOLI_DB_SERVER', true) ?: getenv('DOLI_DB_SERVER');
|
||||
|
||||
/** @var int $force_install_port Database server port */
|
||||
$force_install_port = 3306;
|
||||
|
||||
/** @var string $force_install_prefix Database tables prefix */
|
||||
$force_install_prefix = 'llx_';
|
||||
|
||||
/** @var bool $force_install_createdatabase Force database creation */
|
||||
$force_install_createdatabase = false;
|
||||
|
||||
/** @var string $force_install_databaselogin Database username */
|
||||
$force_install_databaselogin = 'root';
|
||||
|
||||
/** @var string $force_install_databasepass Database password */
|
||||
$force_install_databasepass = getenv('DOLI_ROOT_PASSWORD', true) ?: getenv('DOLI_ROOT_PASSWORD');
|
||||
|
||||
/** @var bool $force_install_createuser Force database user creation */
|
||||
$force_install_createuser = false;
|
||||
|
||||
/** @var string $force_install_databaserootlogin Database root username */
|
||||
$force_install_databaserootlogin = 'root';
|
||||
|
||||
/** @var string $force_install_databaserootpass Database root password */
|
||||
$force_install_databaserootpass = getenv('DOLI_ROOT_PASSWORD', true) ?: getenv('DOLI_ROOT_PASSWORD');
|
||||
|
||||
/** @var string $force_install_dolibarrlogin Dolibarr super-administrator username */
|
||||
$force_install_dolibarrlogin = 'admin';
|
||||
|
||||
/** @var bool $force_install_lockinstall Force install locking */
|
||||
$force_install_lockinstall = true;
|
||||
|
||||
/** @var string $force_install_module Enable module(s) (Comma separated class names list) */
|
||||
$force_install_module = 'modSociete,modFournisseur,modFacture';
|
||||
|
|
@ -80,31 +80,47 @@ $actiondone = 1;
|
|||
|
||||
print '<h3>'.$langs->trans("Repair").'</h3>';
|
||||
|
||||
print 'Option standard (\'test\' or \'confirmed\') is '.(GETPOST('standard', 'alpha') ? GETPOST('standard', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Disable modules
|
||||
print 'Option force_disable_of_modules_not_found (\'test\' or \'confirmed\') is '.(GETPOST('force_disable_of_modules_not_found', 'alpha') ? GETPOST('force_disable_of_modules_not_found', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Files
|
||||
print 'Option restore_thirdparties_logos (\'test\' or \'confirmed\') is '.(GETPOST('restore_thirdparties_logos', 'alpha') ? GETPOST('restore_thirdparties_logos', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option restore_user_pictures (\'test\' or \'confirmed\') is '.(GETPOST('restore_user_pictures', 'alpha') ? GETPOST('restore_user_pictures', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option rebuild_product_thumbs (\'test\' or \'confirmed\') is '.(GETPOST('rebuild_product_thumbs', 'alpha') ? GETPOST('rebuild_product_thumbs', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Clean tables and data
|
||||
print 'Option clean_linked_elements (\'test\' or \'confirmed\') is '.(GETPOST('clean_linked_elements', 'alpha') ? GETPOST('clean_linked_elements', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_menus (\'test\' or \'confirmed\') is '.(GETPOST('clean_menus', 'alpha') ? GETPOST('clean_menus', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_orphelin_dir (\'test\' or \'confirmed\') is '.(GETPOST('clean_orphelin_dir', 'alpha') ? GETPOST('clean_orphelin_dir', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_product_stock_batch (\'test\' or \'confirmed\') is '.(GETPOST('clean_product_stock_batch', 'alpha') ? GETPOST('clean_product_stock_batch', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_perm_table (\'test\' or \'confirmed\') is '.(GETPOST('clean_perm_table', 'alpha') ? GETPOST('clean_perm_table', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option repair_link_dispatch_lines_supplier_order_lines, (\'test\' or \'confirmed\') is '.(GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha') ? GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Init data
|
||||
print 'Option set_empty_time_spent_amount (\'test\' or \'confirmed\') is '.(GETPOST('set_empty_time_spent_amount', 'alpha') ? GETPOST('set_empty_time_spent_amount', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Structure
|
||||
print 'Option force_utf8_on_tables (force utf8 + row=dynamic), for mysql/mariadb only (\'test\' or \'confirmed\') is '.(GETPOST('force_utf8_on_tables', 'alpha') ? GETPOST('force_utf8_on_tables', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print "Option force_utf8mb4_on_tables (force utf8mb4 + row=dynamic, EXPERIMENTAL!), for mysql/mariadb only ('test' or 'confirmed') is ".(GETPOST('force_utf8mb4_on_tables', 'alpha') ? GETPOST('force_utf8mb4_on_tables', 'alpha') : 'undefined')."<br>\n";
|
||||
print "Option force_collation_from_conf_on_tables (force ".$conf->db->character_set."/".$conf->db->dolibarr_main_db_collation." + row=dynamic), for mysql/mariadb only ('test' or 'confirmed') is ".(GETPOST('force_collation_from_conf_on_tables', 'alpha') ? GETPOST('force_collation_from_conf_on_tables', 'alpha') : 'undefined')."<br>\n";
|
||||
// Rebuild sequence
|
||||
print 'Option rebuild_sequences, for postgresql only (\'test\' or \'confirmed\') is '.(GETPOST('rebuild_sequences', 'alpha') ? GETPOST('rebuild_sequences', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print '<div class="warning" style="padding-top: 10px">';
|
||||
print $langs->trans("SetAtLeastOneOptionAsUrlParameter");
|
||||
print '</div>';
|
||||
|
||||
//print 'You must set one of the following option with a parameter value that is "test" or "confirmed" on the URL<br>';
|
||||
//print $langs->trans("Example").': '.DOL_MAIN_URL_ROOT.'/install/repair.php?standard=confirmed<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
|
||||
print 'Option standard is '.(GETPOST('standard', 'alpha') ? GETPOST('standard', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Disable modules
|
||||
print 'Option force_disable_of_modules_not_found is '.(GETPOST('force_disable_of_modules_not_found', 'alpha') ? GETPOST('force_disable_of_modules_not_found', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Files
|
||||
print 'Option restore_thirdparties_logos is '.(GETPOST('restore_thirdparties_logos', 'alpha') ? GETPOST('restore_thirdparties_logos', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option restore_user_pictures is '.(GETPOST('restore_user_pictures', 'alpha') ? GETPOST('restore_user_pictures', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option rebuild_product_thumbs is '.(GETPOST('rebuild_product_thumbs', 'alpha') ? GETPOST('rebuild_product_thumbs', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Clean tables and data
|
||||
print 'Option clean_linked_elements is '.(GETPOST('clean_linked_elements', 'alpha') ? GETPOST('clean_linked_elements', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_menus is '.(GETPOST('clean_menus', 'alpha') ? GETPOST('clean_menus', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_orphelin_dir is '.(GETPOST('clean_orphelin_dir', 'alpha') ? GETPOST('clean_orphelin_dir', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_product_stock_batch is '.(GETPOST('clean_product_stock_batch', 'alpha') ? GETPOST('clean_product_stock_batch', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option clean_perm_table is '.(GETPOST('clean_perm_table', 'alpha') ? GETPOST('clean_perm_table', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print 'Option repair_link_dispatch_lines_supplier_order_lines, is '.(GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha') ? GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Init data
|
||||
print 'Option set_empty_time_spent_amount is '.(GETPOST('set_empty_time_spent_amount', 'alpha') ? GETPOST('set_empty_time_spent_amount', 'alpha') : 'undefined').'<br>'."\n";
|
||||
// Structure
|
||||
print 'Option force_utf8_on_tables (force utf8 + row=dynamic), for mysql/mariadb only, is '.(GETPOST('force_utf8_on_tables', 'alpha') ? GETPOST('force_utf8_on_tables', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print '<span class="valignmiddle">'."Option force_utf8mb4_on_tables (force utf8mb4 + row=dynamic, EXPERIMENTAL!), for mysql/mariadb only, is ".(GETPOST('force_utf8mb4_on_tables', 'alpha') ? GETPOST('force_utf8mb4_on_tables', 'alpha') : 'undefined');
|
||||
print '</span>';
|
||||
if ($dolibarr_main_db_character_set != 'utf8mb4') {
|
||||
print '<img src="../theme/eldy/img/warning.png" class="pictofortooltip valignmiddle" title="If you switch to utf8mb4, you must also check the value for $dolibarr_main_db_character_set and $dolibarr_main_db_collation into conf/conf.php file.">';
|
||||
}
|
||||
print "<br>\n";
|
||||
print "Option force_collation_from_conf_on_tables (force ".$conf->db->character_set."/".$conf->db->dolibarr_main_db_collation." + row=dynamic), for mysql/mariadb only is ".(GETPOST('force_collation_from_conf_on_tables', 'alpha') ? GETPOST('force_collation_from_conf_on_tables', 'alpha') : 'undefined')."<br>\n";
|
||||
|
||||
// Rebuild sequence
|
||||
print 'Option rebuild_sequences, for postgresql only, is '.(GETPOST('rebuild_sequences', 'alpha') ? GETPOST('rebuild_sequences', 'alpha') : 'undefined').'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
print '<hr>';
|
||||
|
||||
print '<table cellspacing="0" cellpadding="1" class="centpercent">';
|
||||
$error = 0;
|
||||
|
||||
// If password is encoded, we decode it
|
||||
|
|
@ -1724,10 +1740,6 @@ if ($oneoptionset) {
|
|||
print '<div class="center" style="padding-top: 10px"><a href="../index.php?mainmenu=home&leftmenu=home'.(GETPOSTISSET("login") ? '&username='.urlencode(GETPOST("login")) : '').'">';
|
||||
print $langs->trans("GoToDolibarr");
|
||||
print '</a></div>';
|
||||
} else {
|
||||
print '<div class="center warning" style="padding-top: 10px">';
|
||||
print $langs->trans("SetAtLeastOneOptionAsUrlParameter");
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("--- repair: end");
|
||||
|
|
|
|||
|
|
@ -933,7 +933,7 @@ function write_conf_file($conffile)
|
|||
fwrite($fp, '$dolibarr_main_force_https=\''.dol_escape_php($main_force_https, 1).'\';');
|
||||
fwrite($fp, "\n");
|
||||
|
||||
fwrite($fp, '$dolibarr_main_restrict_os_commands=\'mariadb-dump, mariadb, mysqldump, mysql, pg_dump, pgrestore, clamdscan, clamscan.exe\';');
|
||||
fwrite($fp, '$dolibarr_main_restrict_os_commands=\'mariadb-dump, mariadb, mysqldump, mysql, pg_dump, pg_restore, clamdscan, clamdscan.exe\';');
|
||||
fwrite($fp, "\n");
|
||||
|
||||
fwrite($fp, '$dolibarr_nocsrfcheck=\'0\';');
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ KeepDefaultValuesDeb=You used the Dolibarr setup wizard from a Linux package (Ub
|
|||
KeepDefaultValuesMamp=You used the Dolibarr setup wizard from DoliMamp, so the values proposed here are already optimized. Change them only if you know what you are doing.
|
||||
KeepDefaultValuesProxmox=You used the Dolibarr setup wizard from a Proxmox virtual appliance, so the values proposed here are already optimized. Change them only if you know what you are doing.
|
||||
UpgradeExternalModule=Run dedicated upgrade process of external module
|
||||
SetAtLeastOneOptionAsUrlParameter=Set at least one option as a parameter in URL. For example: '...repair.php?standard=confirmed'
|
||||
SetAtLeastOneOptionAsUrlParameter=Set at least one option as a parameter in URL with value 'test' or 'confirmed'. For example: '...repair.php?standard=confirmed'
|
||||
NothingToDelete=Nothing to clean/delete
|
||||
NothingToDo=Nothing to do
|
||||
#########
|
||||
|
|
@ -211,7 +211,7 @@ YouTryInstallDisabledByFileLock=The application tried to self-upgrade, but the i
|
|||
YouTryUpgradeDisabledByMissingFileUnLock=The application tried to self-upgrade, but the upgrade process is currently not allowed.<br>
|
||||
ClickHereToGoToApp=Click here to go to your application
|
||||
ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory.
|
||||
ClickOnLinkOrCreateUnlockFileManualy=If an upgrade is in progress, please wait... If not, you must remove the file install.lock or create a file upgrade.unlock into the Dolibarr documents directory.
|
||||
ClickOnLinkOrCreateUnlockFileManualy=If an upgrade is in progress, please wait... If not, you must remove the file install.lock (or create a file upgrade.unlock for upgrade) into the Dolibarr documents directory.
|
||||
Loaded=Loaded
|
||||
FunctionTest=Function test
|
||||
NodoUpgradeAfterDB=No action requested by external modules after upgrade of database
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ TextPreviousMonthOfInvoice=Previous month (text) of invoice date
|
|||
NextMonthOfInvoice=Following month (number 1-12) of invoice date
|
||||
TextNextMonthOfInvoice=Following month (text) of invoice date
|
||||
PreviousMonth=Previous month
|
||||
PreviousYear=Previous year
|
||||
NextMonth=Next month
|
||||
NextYear=Next year
|
||||
CurrentMonth=Current month
|
||||
ZipFileGeneratedInto=Zip file generated into <b>%s</b>.
|
||||
DocFileGeneratedInto=Doc file generated into <b>%s</b>.
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ $erreur = false;
|
|||
$erreurNb = 0;
|
||||
$choixdate = '';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
|
@ -337,7 +338,7 @@ if (issetAndNoEmpty('anneeapres_x') || issetAndNoEmpty('anneeapres')) {
|
|||
|
||||
// valeurs du nombre de jour dans le mois et du premier jour du mois
|
||||
$nbrejourmois = idate("t", dol_get_first_day((int) $_SESSION["annee"], (int) $_SESSION["mois"]));
|
||||
$premierjourmois = dol_print_date(dol_get_first_day((int) $_SESSION["annee"], (int) $_SESSION["mois"]), "%w") - 1;
|
||||
$premierjourmois = (int) dol_print_date(dol_get_first_day((int) $_SESSION["annee"], (int) $_SESSION["mois"]), "%w") - 1;
|
||||
//var_dump(dol_get_first_day((int) $_SESSION["annee"], (int) $_SESSION["mois"]));
|
||||
//var_dump($premierjourmois);
|
||||
|
||||
|
|
|
|||
|
|
@ -1759,7 +1759,7 @@ class Products extends DolibarrApi
|
|||
throw new RestException(403);
|
||||
}
|
||||
|
||||
$result = $this->product->fetch('', $ref);
|
||||
$result = $this->product->fetch(0, $ref);
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Product not found');
|
||||
}
|
||||
|
|
@ -1881,7 +1881,7 @@ class Products extends DolibarrApi
|
|||
}
|
||||
}
|
||||
|
||||
$result = $this->product->fetch('', trim($ref));
|
||||
$result = $this->product->fetch(0, trim($ref));
|
||||
if (!$result) {
|
||||
throw new RestException(404, 'Product not found');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,8 +57,22 @@ class Productlot extends CommonObject
|
|||
public $stats_contrat;
|
||||
public $stats_facture;
|
||||
public $stats_commande_fournisseur;
|
||||
|
||||
/**
|
||||
* @var array{customers:int,nb:int,rows:int,qty:int} stats_expedition
|
||||
*/
|
||||
public $stats_expedition;
|
||||
|
||||
/**
|
||||
* @var array{customers:int,nb:int,rows:int,qty:int} stats_expedition
|
||||
*/
|
||||
public $stats_reception;
|
||||
|
||||
/**
|
||||
* @var array{customers:int,nb:int,rows:int,qty:int} stats_expedition
|
||||
*/
|
||||
public $stats_supplier_order;
|
||||
|
||||
public $stats_mo;
|
||||
public $stats_bom;
|
||||
public $stats_mrptoconsume;
|
||||
|
|
@ -131,10 +145,30 @@ class Productlot extends CommonObject
|
|||
* @var string batch ref
|
||||
*/
|
||||
public $batch;
|
||||
|
||||
/**
|
||||
* @var int|string eatby
|
||||
*/
|
||||
public $eatby = '';
|
||||
|
||||
/**
|
||||
* @var int|string sellby
|
||||
*/
|
||||
public $sellby = '';
|
||||
|
||||
/**
|
||||
* @var int|string eal_date
|
||||
*/
|
||||
public $eol_date = '';
|
||||
|
||||
/**
|
||||
* @var int|string manufacturing_date
|
||||
*/
|
||||
public $manufacturing_date = '';
|
||||
|
||||
/**
|
||||
* @var int|string scrapping_date
|
||||
*/
|
||||
public $scrapping_date = '';
|
||||
//public $commissionning_date = '';
|
||||
public $qc_frequency = '';
|
||||
|
|
@ -156,8 +190,6 @@ class Productlot extends CommonObject
|
|||
*/
|
||||
public $import_key;
|
||||
|
||||
public $stats_supplier_order = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
@ -1095,11 +1127,11 @@ class Productlot extends CommonObject
|
|||
$datas['picto'] = img_picto('', $this->picto).' <u class="paddingrightonly">'.$langs->trans("Batch").'</u>';
|
||||
//$datas['divopen'] = '<div width="100%">';
|
||||
$datas['batch'] = '<br><b>'.$langs->trans('Batch').':</b> '.$this->batch;
|
||||
if ($this->eatby && !getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
|
||||
$datas['eatby'] = '<br><b>'.$langs->trans('EatByDate').':</b> '.dol_print_date($this->db->jdate($this->eatby), 'day');
|
||||
if (isDolTms($this->eatby) && !getDolGlobalString('PRODUCT_DISABLE_EATBY')) {
|
||||
$datas['eatby'] = '<br><b>'.$langs->trans('EatByDate').':</b> '.dol_print_date($this->eatby, 'day');
|
||||
}
|
||||
if ($this->sellby && !getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
|
||||
$datas['sellby'] = '<br><b>'.$langs->trans('SellByDate').':</b> '.dol_print_date($this->db->jdate($this->sellby), 'day');
|
||||
if (isDolTms($this->sellby) && !getDolGlobalString('PRODUCT_DISABLE_SELLBY')) {
|
||||
$datas['sellby'] = '<br><b>'.$langs->trans('SellByDate').':</b> '.dol_print_date($this->sellby, 'day');
|
||||
}
|
||||
//$datas['divclose'] = '</div>';
|
||||
|
||||
|
|
@ -1217,7 +1249,7 @@ class Productlot extends CommonObject
|
|||
|
||||
$this->entity = $conf->entity;
|
||||
$this->fk_product = 0;
|
||||
$this->batch = '';
|
||||
$this->batch = 'ABCD123456';
|
||||
$this->eatby = $now - 100000;
|
||||
$this->sellby = $now - 100000;
|
||||
$this->datec = $now - 3600;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ $mode = GETPOST("mode", 'alpha');
|
|||
$id = GETPOSTINT('id');
|
||||
$taskid = GETPOSTINT('taskid');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'perdaycard';
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'timespent';
|
||||
|
||||
$mine = 0;
|
||||
if ($mode == 'mine') {
|
||||
|
|
@ -435,7 +435,7 @@ $nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".
|
|||
$nav .= dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "%a").' ';
|
||||
$nav .= ' <span id="month_name">'.dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "day")." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, ($conf->dol_optimize_smallscreen ? 0 : 1)).' ';
|
||||
$nav .= ' <button type="submit" name="button_search_x" value="x" class="bordertransp nobordertransp button_search"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
|
|
@ -508,14 +508,21 @@ $moreforfilter = '';
|
|||
}*/
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierarchyme';
|
||||
if (!$user->hasRight('user', 'user', 'lire')) {
|
||||
$includeonly = array($user->id);
|
||||
}
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
$selecteduser = $search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id;
|
||||
$moreforfiltertmp = $form->select_dolusers($selecteduser, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
if ($form->num > 1 || empty($conf->dol_optimize_smallscreen)) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"');
|
||||
$moreforfilter .= $moreforfiltertmp;
|
||||
$moreforfilter .= '</div>';
|
||||
} else {
|
||||
$moreforfilter .= '<input type="hidden" name="search_usertoprocessid" value="'.$selecteduser.'">';
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
|
@ -604,7 +611,7 @@ $extrafieldsobjectkey = 'projet_task';
|
|||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$form->textwithpicto($langs->trans("PlannedWorkloadShort"), $langs->trans("PlannedWorkload")).'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="right minwidth75 maxwidth100 title="'.dol_escape_htmltag($langs->trans("ProgressDeclared")).'">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
|
|
@ -621,7 +628,7 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
|||
print '<th class="center leftborder">'.$langs->trans("HourStart").'</td>';
|
||||
|
||||
// By default, we can edit only tasks we are assigned to
|
||||
$restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)) ? 2 : $conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED);
|
||||
$restrictviewformytask = getDolGlobalInt('PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED', 2);
|
||||
|
||||
$numendworkingday = 0;
|
||||
$numstartworkingday = 0;
|
||||
|
|
@ -679,7 +686,7 @@ print "</tr>\n";
|
|||
$colspan = 2 + (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT') ? 0 : 2);
|
||||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<tr class="liste_total hideonsmartphone">';
|
||||
print '<td class="liste_total" colspan="'.($colspan - 1 + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ $mode = GETPOST("mode", 'alpha');
|
|||
$id = GETPOSTINT('id');
|
||||
$taskid = GETPOSTINT('taskid');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'perweekcard';
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'timespent';
|
||||
|
||||
$mine = 0;
|
||||
if ($mode == 'mine') {
|
||||
|
|
@ -155,6 +155,7 @@ $error = 0;
|
|||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters = array('id' => $id, 'taskid' => $taskid, 'projectid' => $projectid, 'TWeek' => $TWeek, 'TFirstDays' => $TFirstDays, 'TLastDays' => $TLastDays);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
|
|
@ -445,7 +446,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
|||
$nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n";
|
||||
$nav .= ' <span id="month_name">'.dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%Y").", ".$langs->trans(date('F', mktime(0, 0, 0, $month, 10)))." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, ($conf->dol_optimize_smallscreen ? 0 : 1)).' ';
|
||||
$nav .= ' <button type="submit" name="submitdateselect" value="x" class="bordertransp nobordertransp button_search_x"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
|
|
@ -494,7 +495,7 @@ if ($usertoprocess->id != $user->id) {
|
|||
}
|
||||
print '<div class="taskiddiv inline-block">';
|
||||
print img_picto('', 'projecttask', 'class="pictofixedwidth"');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, 'widthcentpercentminusx');
|
||||
$formproject->selectTasks($socid ? $socid : -1, $taskid, 'taskid', 32, 0, '-- '.$langs->trans("ChooseANotYetAssignedTask").' --', 1, 0, 0, 'widthcentpercentminusx', '', 'all', $usertoprocess);
|
||||
print '</div>';
|
||||
print ' ';
|
||||
print $formcompany->selectTypeContact($object, '', 'type', 'internal', 'position', 0, 'maxwidth150onsmartphone');
|
||||
|
|
@ -517,14 +518,21 @@ if (isModEnabled("categorie")) {
|
|||
}*/
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierarchyme';
|
||||
if (!$user->hasRight('user', 'user', 'lire')) {
|
||||
$includeonly = array($user->id);
|
||||
}
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
$selecteduser = $search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id;
|
||||
$moreforfiltertmp = $form->select_dolusers($selecteduser, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
if ($form->num > 1 || empty($conf->dol_optimize_smallscreen)) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"');
|
||||
$moreforfilter .= $moreforfiltertmp;
|
||||
$moreforfilter .= '</div>';
|
||||
} else {
|
||||
$moreforfilter .= '<input type="hidden" name="search_usertoprocessid" value="'.$selecteduser.'">';
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
|
@ -547,6 +555,24 @@ if (!empty($moreforfilter)) {
|
|||
print '</div>';
|
||||
}
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
|
||||
// This must be after the $selectedfields
|
||||
$addcolspan = 0;
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
$addcolspan++;
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
$addcolspan++;
|
||||
}
|
||||
foreach ($arrayfields as $key => $val) {
|
||||
if ($val['checked'] && substr($key, 0, 5) == 'efpt.') {
|
||||
$addcolspan++;
|
||||
}
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'" id="tablelines3">'."\n";
|
||||
|
|
@ -559,15 +585,21 @@ if (getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
|
|||
print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
|
||||
}
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_titre right"><input type="text" size="4" name="search_declared_progress" value="'.dol_escape_htmltag($search_declared_progress).'"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
foreach ($TWeek as $week_number) {
|
||||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre nowrap" align="right">';
|
||||
print '<td class="liste_titre nowrap right">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
|
|
@ -581,26 +613,31 @@ if (getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
|
|||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans("Task").'</td>';
|
||||
print '<td align="right" class="leftborder plannedworkload maxwidth75">'.$langs->trans("PlannedWorkload").'</td>';
|
||||
print '<td align="right" class="maxwidth75">'.$langs->trans("ProgressDeclared").'</td>';
|
||||
/*print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpent").'</td>';
|
||||
if ($usertoprocess->id == $user->id) print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByYou").'</td>';
|
||||
else print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentByUser").'</td>';*/
|
||||
print '<td class="right maxwidth100">'.$langs->trans("TimeSpentSmall").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td align="right" class="maxwidth75">'.$langs->trans("TimeSpentSmall").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</td>';
|
||||
|
||||
foreach ($TWeek as $week_number) {
|
||||
print '<td width="6%" class="center bold hide">'.$langs->trans("Week").' '.$week_number.'<br>('.$TFirstDays[$week_number].'...'.$TLastDays[$week_number].')</td>';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td align="right" class="leftborder plannedworkload maxwidth75">'.$form->textwithpicto($langs->trans("PlannedWorkloadShort"), $langs->trans("PlannedWorkload")).'</td>';
|
||||
}
|
||||
print '<td></td>';
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="right maxwidth75">'.$langs->trans("ProgressDeclared").'</td>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="right maxwidth100">'.$langs->trans("TimeSpentSmall").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '<td class="right maxwidth75">'.$langs->trans("TimeSpentSmall").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</td>';
|
||||
}
|
||||
foreach ($TWeek as $week_number) {
|
||||
print '<td width="6%" class="center bold hide">'.$langs->trans("WeekShort").' '.$week_number.'<br>('.$TFirstDays[$week_number].'...'.$TLastDays[$week_number].')</td>';
|
||||
}
|
||||
|
||||
//print '<td></td>';
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$colspan = 5;
|
||||
$colspan = 1;
|
||||
|
||||
|
||||
// Get if user is available or not for each day
|
||||
|
|
@ -608,7 +645,7 @@ $isavailable = array();
|
|||
// TODO See code into perweek.php to initialize isavailable array
|
||||
|
||||
// By default, we can edit only tasks we are assigned to
|
||||
$restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)) ? 2 : $conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED);
|
||||
$restrictviewformytask = getDolGlobalInt('PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED', 2);
|
||||
if (count($tasksarray) > 0) {
|
||||
//var_dump($tasksarray); // contains only selected tasks
|
||||
//var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter)
|
||||
|
|
@ -616,7 +653,7 @@ if (count($tasksarray) > 0) {
|
|||
|
||||
$j = 0;
|
||||
$level = 0;
|
||||
$totalforvisibletasks = projectLinesPerMonth($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable, 0, $TWeek);
|
||||
$totalforvisibletasks = projectLinesPerMonth($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable, 0, $TWeek, $arrayfields);
|
||||
//var_dump($totalforvisibletasks);
|
||||
|
||||
// Show total for all other tasks
|
||||
|
|
@ -659,6 +696,16 @@ if (count($tasksarray) > 0) {
|
|||
print '<td colspan="'.$colspan.'" class="opacitymedium">';
|
||||
print $langs->trans("OtherFilteredTasks");
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
foreach ($TWeek as $weekNb) {
|
||||
print '<td class="center hide">';
|
||||
|
||||
|
|
@ -676,10 +723,14 @@ if (count($tasksarray) > 0) {
|
|||
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="'.$colspan.'">';
|
||||
print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>';
|
||||
print '</td>';
|
||||
if (!empty($arrayfields['timeconsumed']['checked'])) {
|
||||
print '<td class="liste_total"></td>';
|
||||
print '<td class="liste_total"></td>';
|
||||
}
|
||||
|
||||
foreach ($TWeek as $weekNb) {
|
||||
print '<td class="liste_total hide'.$weekNb.'" align="center"><div class="totalDay'.$weekNb.'">'.convertSecondToTime($totalforvisibletasks[$weekNb], 'allhourmin').'</div></td>';
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ $mode = GETPOST("mode", 'alpha');
|
|||
$id = GETPOSTINT('id');
|
||||
$taskid = GETPOSTINT('taskid');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'perweekcard';
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'timespent';
|
||||
|
||||
$mine = 0;
|
||||
if ($mode == 'mine') {
|
||||
|
|
@ -448,7 +448,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
|||
$nav = '<a class="inline-block valignmiddle" href="?year='.$prev_year."&month=".$prev_month."&day=".$prev_day.$param.'">'.img_previous($langs->trans("Previous"))."</a>\n";
|
||||
$nav .= ' <span id="month_name">'.dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("WeekShort")." ".$week." </span>\n";
|
||||
$nav .= '<a class="inline-block valignmiddle" href="?year='.$next_year."&month=".$next_month."&day=".$next_day.$param.'">'.img_next($langs->trans("Next"))."</a>\n";
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, 1).' ';
|
||||
$nav .= ' '.$form->selectDate(-1, '', 0, 0, 2, "addtime", 1, ($conf->dol_optimize_smallscreen ? 0 : 1)).' ';
|
||||
$nav .= ' <button type="submit" name="submitdateselect" value="x" class="nobordertransp button_search_x"><span class="fa fa-search"></span></button>';
|
||||
|
||||
$picto = 'clock';
|
||||
|
|
@ -556,14 +556,21 @@ $moreforfilter = '';
|
|||
}*/
|
||||
|
||||
// If the user can view user other than himself
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$includeonly = 'hierarchyme';
|
||||
if (!$user->hasRight('user', 'user', 'lire')) {
|
||||
$includeonly = array($user->id);
|
||||
}
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"').$form->select_dolusers($search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
$moreforfilter .= '</div>';
|
||||
$selecteduser = $search_usertoprocessid ? $search_usertoprocessid : $usertoprocess->id;
|
||||
$moreforfiltertmp = $form->select_dolusers($selecteduser, 'search_usertoprocessid', 0, null, 0, $includeonly, null, 0, 0, 0, '', 0, '', 'maxwidth200');
|
||||
if ($form->num > 1 || empty($conf->dol_optimize_smallscreen)) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
$moreforfilter .= '<div class="inline-block hideonsmartphone"></div>';
|
||||
$moreforfilter .= img_picto($langs->trans('Filter').' '.$langs->trans('User'), 'user', 'class="paddingright pictofixedwidth"');
|
||||
$moreforfilter .= $moreforfiltertmp;
|
||||
$moreforfilter .= '</div>';
|
||||
} else {
|
||||
$moreforfilter .= '<input type="hidden" name="search_usertoprocessid" value="'.$selecteduser.'">';
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT')) {
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
|
@ -654,7 +661,7 @@ $extrafieldsobjectkey = 'projet_task';
|
|||
$extrafieldsobjectprefix = 'efpt.';
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) {
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$langs->trans("PlannedWorkload").'</th>';
|
||||
print '<th class="leftborder plannedworkload minwidth75 maxwidth100 right" title="'.dol_escape_htmltag($langs->trans("PlannedWorkload")).'">'.$form->textwithpicto($langs->trans("PlannedWorkloadShort"), $langs->trans("PlannedWorkload")).'</th>';
|
||||
}
|
||||
if (!empty($arrayfields['t.progress']['checked'])) {
|
||||
print '<th class="right minwidth75 maxwidth100" title="'.dol_escape_htmltag($langs->trans("ProgressDeclared")).'">'.$langs->trans("ProgressDeclared").'</th>';
|
||||
|
|
@ -663,11 +670,10 @@ if (!empty($arrayfields['timeconsumed']['checked'])) {
|
|||
print '<th class="right maxwidth100">'.$langs->trans("TimeSpentSmall").'<br>';
|
||||
print '<span class="nowraponall">';
|
||||
print '<span class="opacitymedium nopadding userimg"><img alt="Photo" class="photouserphoto userphoto" src="'.DOL_URL_ROOT.'/theme/common/everybody.png"></span>';
|
||||
//print '<span class="nopadding userimg"><div class="valignmiddle userphoto inline-block center marginrightonlyshort">'.img_object('', 'user', 'class=""', 0, 0, $notooltip ? 0 : 1).'</div></span>';
|
||||
print '<span class="opacitymedium paddingleft">'.$langs->trans("EverybodySmall").'</span>';
|
||||
print '</span>';
|
||||
print '</th>';
|
||||
print '<th class="right maxwidth75 maxwidth100">'.$langs->trans("TimeSpentSmall").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
print '<th class="right maxwidth75">'.$langs->trans("TimeSpentSmall").($usertoprocess->firstname ? '<br><span class="nowraponall">'.$usertoprocess->getNomUrl(-2).'<span class="opacitymedium paddingleft">'.dol_trunc($usertoprocess->firstname, 10).'</span></span>' : '').'</th>';
|
||||
}
|
||||
for ($idw = 0; $idw < 7; $idw++) {
|
||||
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0
|
||||
|
|
@ -692,16 +698,17 @@ for ($idw = 0; $idw < 7; $idw++) {
|
|||
print dol_print_date($dayinloopfromfirstdaytoshow, '%a');
|
||||
print '<br>'.dol_print_date($dayinloopfromfirstdaytoshow, 'dayreduceformat').'</th>';
|
||||
}
|
||||
|
||||
//print '<td></td>';
|
||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$colspan = 1 + (!getDolGlobalString('PROJECT_TIMESHEET_DISABLEBREAK_ON_PROJECT') ? 0 : 2);
|
||||
|
||||
// Show lines with total
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<tr class="liste_total hideonsmartphone">';
|
||||
print '<td class="liste_total" colspan="'.($colspan + $addcolspan).'">';
|
||||
print $langs->trans("Total");
|
||||
print '<span class="opacitymediumbycolor"> - '.$langs->trans("ExpectedWorkedHours").': <strong>'.price($usertoprocess->weeklyhours, 1, $langs, 0, 0).'</strong></span>';
|
||||
|
|
@ -735,7 +742,8 @@ if ($conf->use_javascript_ajax) {
|
|||
|
||||
|
||||
// By default, we can edit only tasks we are assigned to
|
||||
$restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)) ? 2 : $conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED);
|
||||
$restrictviewformytask = getDolGlobalInt('PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED', 2);
|
||||
|
||||
if (count($tasksarray) > 0) {
|
||||
//var_dump($tasksarray); // contains only selected tasks
|
||||
//var_dump($tasksarraywithoutfilter); // contains all tasks (if there is a filter, not defined if no filter)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.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
|
||||
|
|
@ -1351,7 +1352,7 @@ while ($i < $imaxinloop) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 't.planned_workload';
|
||||
}
|
||||
if (!isset($totalarray['val']['planned_workload'])) {
|
||||
if (!isset($totalarray['val']['t.planned_workload'])) {
|
||||
$totalarray['val']['t.planned_workload'] = 0;
|
||||
}
|
||||
$totalarray['val']['t.planned_workload'] += $obj->planned_workload;
|
||||
|
|
|
|||
|
|
@ -415,9 +415,9 @@ if (empty($reshook)) {
|
|||
$sellbydate = str_replace('/', '-', $sellby);
|
||||
|
||||
if (getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION') || getDolGlobalString('STOCK_CALCULATE_ON_RECEPTION_CLOSE')) {
|
||||
$ret = $object->addline($entrepot_id, GETPOSTINT($idl), GETPOSTINT($qty), $array_options[$i], GETPOSTINT($comment), strtotime($eatbydate), strtotime($sellbydate), GETPOSTINT($batch), GETPOSTFLOAT($cost_price, 'MU'));
|
||||
$ret = $object->addline($entrepot_id, GETPOSTINT($idl), price2num(GETPOST($qty), 'MS'), $array_options[$i], GETPOST($comment), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch), GETPOSTFLOAT($cost_price, 'MU'));
|
||||
} else {
|
||||
$ret = $object->addline($entrepot_id, GETPOSTINT($idl), GETPOSTINT($qty), $array_options[$i], GETPOSTINT($comment), strtotime($eatbydate), strtotime($sellbydate), GETPOSTINT($batch));
|
||||
$ret = $object->addline($entrepot_id, GETPOSTINT($idl), price2num(GETPOST($qty), 'MS'), $array_options[$i], GETPOST($comment), strtotime($eatbydate), strtotime($sellbydate), GETPOST($batch));
|
||||
}
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
@ -1007,7 +1007,7 @@ if ($action == 'create') {
|
|||
$dDLUO = dol_mktime(12, 0, 0, GETPOSTINT('dluo_'.$paramSuffix.'month'), GETPOSTINT('dluo_'.$paramSuffix.'day'), GETPOSTINT('dluo_'.$paramSuffix.'year'));
|
||||
$dDLC = dol_mktime(12, 0, 0, GETPOSTINT('dlc_'.$paramSuffix.'month'), GETPOSTINT('dlc_'.$paramSuffix.'day'), GETPOSTINT('dlc_'.$paramSuffix.'year'));
|
||||
$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
|
||||
$dispatchLines[$numAsked] = array('paramSuffix' => $paramSuffix, 'prod' => GETPOSTINT($prod), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOSTINT($ent), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOSTINT($fk_commandefourndet), 'DLC' => $dDLC, 'DLUO' => $dDLUO, 'lot' => GETPOSTINT($lot));
|
||||
$dispatchLines[$numAsked] = array('paramSuffix' => $paramSuffix, 'prod' => GETPOSTINT($prod), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOSTINT($ent), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOSTINT($fk_commandefourndet), 'DLC' => $dDLC, 'DLUO' => $dDLUO, 'lot' => GETPOST($lot));
|
||||
}
|
||||
|
||||
// If create form is coming from same page, it means that post was sent but an error occurred
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ a.butStatus {
|
|||
padding-right: 5px;
|
||||
background-color: transparent;
|
||||
color: var(--colortext) !important;
|
||||
border: 2px solid var( --butactionbg) !important;
|
||||
border: 1px solid #888 !important;
|
||||
margin: 0 0.45em !important;
|
||||
}
|
||||
|
||||
|
|
@ -1977,9 +1977,6 @@ select.widthcentpercentminusxx, span.widthcentpercentminusxx:not(.select2-select
|
|||
/* Force values for small screen 570 */
|
||||
@media only screen and (max-width: 570px)
|
||||
{
|
||||
.box-flex-item {
|
||||
margin: 3px 2px 3px 2px !important;
|
||||
}
|
||||
div.refidno {
|
||||
font-size: <?php print is_numeric($fontsize) ? ((int) $fontsize + 3).'px' : $fontsize; ?> !important;
|
||||
}
|
||||
|
|
@ -4610,6 +4607,9 @@ table.tableforservicepart1 tr td {
|
|||
border-top: none !important;
|
||||
margin: 0px 0px 0px 0px !important;
|
||||
}
|
||||
.bordertopimp {
|
||||
border-top: 1px solid var(--colortopbordertitle1) !important;
|
||||
}
|
||||
table.noborder.paymenttable {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -577,6 +577,13 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
|||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 570px)
|
||||
{
|
||||
.box-flex-item {
|
||||
margin: 3px 8px 3px 8px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.info-box-module {
|
||||
min-width: 250px;
|
||||
|
|
@ -603,7 +610,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) {
|
|||
.box-flex-container {
|
||||
margin: 0 0 0 0px !important;
|
||||
width: 100% !important;
|
||||
justify-content: space-between;
|
||||
/* justify-content: space-between; */
|
||||
}
|
||||
.info-box-module {
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -706,7 +706,7 @@ a.butStatus {
|
|||
padding-right: 5px;
|
||||
background-color: transparent;
|
||||
color: var(--colortext) !important;
|
||||
border: 2px solid var( --butactionbg);
|
||||
border: 1px solid #888;
|
||||
margin: 0 0.45em !important;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1145,7 +1145,7 @@ if ($action == 'create' || $action == 'presend') {
|
|||
print '<input type="hidden" name="track_id" value="'.$track_id.'">';
|
||||
print '<input type="hidden" name="trackid" value="'.$trackid.'">';
|
||||
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
//print '<div class="underbanner clearboth"></div>';
|
||||
|
||||
// View Original message
|
||||
$actionobject->viewTicketOriginalMessage($user, $action, $object);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue