Fix filters for exports
This commit is contained in:
commit
c90a86e4a4
21
.editorconfig
Normal file
21
.editorconfig
Normal file
@ -0,0 +1,21 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
[*.css]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
[*.xml]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@ default.properties
|
||||
.buildpath
|
||||
.gitmodules
|
||||
dolibarr_install.log
|
||||
upgrade.log
|
||||
doxygen_warnings.log
|
||||
/.project
|
||||
.DS_Store
|
||||
|
||||
@ -5,12 +5,13 @@ imports:
|
||||
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
paths:
|
||||
- htdocs/*
|
||||
- scripts/*
|
||||
|
||||
tools:
|
||||
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
|
||||
@ -18,15 +19,18 @@ tools:
|
||||
enabled: true
|
||||
extensions:
|
||||
- php
|
||||
dependency_paths: { }
|
||||
dependency_paths:
|
||||
- htdocs/includes/
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
- build/*
|
||||
- dev/*
|
||||
- doc/*
|
||||
- test/*
|
||||
- htdocs/includes/*
|
||||
paths:
|
||||
- htdocs/
|
||||
- scripts/
|
||||
config:
|
||||
parameter_reference_check:
|
||||
enabled: true
|
||||
|
||||
36
.travis.yml
36
.travis.yml
@ -8,6 +8,9 @@ notifications:
|
||||
on_success: never # [always|never|change] default: change
|
||||
on_failure: change # [always|never|change] default: always
|
||||
|
||||
addons:
|
||||
postgresql: "9.3"
|
||||
|
||||
services:
|
||||
- memcached # will start memcached
|
||||
|
||||
@ -15,9 +18,15 @@ services:
|
||||
language: php
|
||||
php:
|
||||
# - "5.2" is not supported because pyrus to install PHP_Codesniffer is not available
|
||||
- "5.3"
|
||||
- "5.4"
|
||||
- "5.5"
|
||||
- 5.3
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
@ -32,10 +41,12 @@ before_script:
|
||||
# - echo Update composer
|
||||
# - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update
|
||||
- echo PHPUnit version
|
||||
- which phpunit
|
||||
- phpunit --version
|
||||
- echo Install phpcs then show installed rules
|
||||
- pyrus install pear/PHP_CodeSniffer
|
||||
- phpenv rehash
|
||||
- which phpcs
|
||||
- phpcs --version
|
||||
- phpcs -i
|
||||
- echo Create dir $(pwd)/htdocs/documents
|
||||
@ -84,6 +95,8 @@ before_script:
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
- sudo /etc/init.d/apache2 restart
|
||||
- wget http://localhost/
|
||||
- sudo cat /etc/apache2/envvars
|
||||
- sudo cat /var/log/apache2/error.log
|
||||
- cat index.html
|
||||
|
||||
|
||||
@ -91,14 +104,15 @@ before_script:
|
||||
script:
|
||||
- cd htdocs/install
|
||||
- date
|
||||
# - php upgrade.php 3.4.0 3.5.0 ignoredbversion > upgrade.log
|
||||
# - php upgrade2.php 3.4.0 3.5.0 ignoredbversion > upgrade2.log
|
||||
- php upgrade.php 3.5.0 3.6.0 ignoredbversion >> upgrade.log
|
||||
- php upgrade2.php 3.5.0 3.6.0 ignoredbversion >> upgrade2.log
|
||||
- php upgrade.php 3.6.0 3.7.0 ignoredbversion >> upgrade.log
|
||||
# - cat upgrade360370.log
|
||||
- php upgrade2.php 3.6.0 3.7.0 ignoredbversion >> upgrade2.log
|
||||
# - cat upgrade2.log
|
||||
# - php upgrade.php 3.4.0 3.5.0 ignoredbversion > upgrade340350.log
|
||||
# - php upgrade2.php 3.4.0 3.5.0 ignoredbversion > upgrade340350-2.log
|
||||
- php upgrade.php 3.5.0 3.6.0 ignoredbversion > upgrade350360.log
|
||||
- php upgrade2.php 3.5.0 3.6.0 ignoredbversion > upgrade350360-2.log
|
||||
- php upgrade.php 3.6.0 3.7.0 ignoredbversion > upgrade360370.log
|
||||
- php upgrade2.php 3.6.0 3.7.0 ignoredbversion > upgrade360370-2.log
|
||||
- php upgrade.php 3.7.0 3.8.0 ignoredbversion > upgrade370380.log
|
||||
- php upgrade2.php 3.7.0 3.8.0 ignoredbversion > upgrade370380-2.log
|
||||
# - cat upgrade370380-2.log
|
||||
- cd ../..
|
||||
- date
|
||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
|
||||
18
.tx/config
18
.tx/config
@ -146,6 +146,12 @@ source_file = htdocs/langs/en_US/holiday.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.incoterm]
|
||||
file_filter = htdocs/langs/<lang>/incoterm.lang
|
||||
source_file = htdocs/langs/en_US/incoterm.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
@ -176,6 +182,12 @@ source_file = htdocs/langs/en_US/link.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.loan]
|
||||
file_filter = htdocs/langs/<lang>/loan.lang
|
||||
source_file = htdocs/langs/en_US/loan.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.mailmanspip]
|
||||
file_filter = htdocs/langs/<lang>/mailmanspip.lang
|
||||
source_file = htdocs/langs/en_US/mailmanspip.lang
|
||||
@ -236,9 +248,9 @@ source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.printipp]
|
||||
file_filter = htdocs/langs/<lang>/printipp.lang
|
||||
source_file = htdocs/langs/en_US/printipp.lang
|
||||
[dolibarr.printing]
|
||||
file_filter = htdocs/langs/<lang>/printing.lang
|
||||
source_file = htdocs/langs/en_US/printing.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
81
CONTRIBUTING.md
Normal file
81
CONTRIBUTING.md
Normal file
@ -0,0 +1,81 @@
|
||||
How to contribute to Dolibarr
|
||||
=============================
|
||||
|
||||
Bug reports and feature requests
|
||||
--------------------------------
|
||||
** NEW **
|
||||
|
||||
Issues are now managed on [GitHub](https://github.com/Dolibarr/dolibarr/Issues).
|
||||
|
||||
1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
|
||||
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
|
||||
3. Report with as much detail as possible ([Use screenshots or even screencasts whenever possible](https://help.github.com/articles/issue-attachments)).
|
||||
|
||||
We're still figuring out how to migrate old issues to GitHub. In the meantime, they are still available at [Doliforge](https://doliforge.org/projects/dolibarr).
|
||||
|
||||
<a name=code></a>Code
|
||||
---------------------
|
||||
|
||||
### Basic workflow
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Commit and push your changes.
|
||||
5. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
### <a name=branches></a>Branches
|
||||
|
||||
Unless you're fixing a bug, all pull requests should be made against the *develop* branch.
|
||||
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it
|
||||
against the oldest version affected that's still supported.
|
||||
|
||||
We officially support versions N, N − 1 and N − 2 for N the latest version available.
|
||||
|
||||
Choose your base branch accordingly.
|
||||
|
||||
### General rules
|
||||
Please don't edit the ChangeLog file. A project manager will update it from your commit messages.
|
||||
|
||||
### Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
<pre>
|
||||
FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
CLOSE|Close #456 Short description (where #456 is number feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New Short description (In upper case to appear into ChangeLog)
|
||||
or
|
||||
Short description (when the commit is not introducing feature or closing a bug)
|
||||
|
||||
Long description (Can span accross multiple lines).
|
||||
</pre>
|
||||
|
||||
### Pull Requests
|
||||
When submitting a pull request, use same rule than Commits. With upper case keyword to appear into ChangeLog.
|
||||
|
||||
|
||||
### Resources
|
||||
[Developer documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
|
||||
Translations
|
||||
------------
|
||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/projects/p/dolibarr).
|
||||
|
||||
Join an existing translation team or create your own and translate into the interface.
|
||||
|
||||
Your translations will be available in the next major release.
|
||||
|
||||
### Resources
|
||||
[Translator documentation](http://wiki.dolibarr.org/index.php/Developer_documentation)
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
The project's documentation is maintained on the [Wiki](http://wiki.dolibarr.org/index.php).
|
||||
|
||||
*You need to create an account before being able to edit.*
|
||||
|
||||
14
COPYRIGHT
14
COPYRIGHT
@ -12,17 +12,17 @@ Dolibarr uses some external libraries released under different licenses. This is
|
||||
Component Version License GPL Compatible Usage
|
||||
-------------------------------------------------------------------------------------
|
||||
PHP libraries:
|
||||
AdoDb-Date 0.32 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
AdoDb-Date 0.33 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.3.3 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.3.3 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
FPDI 1.4.2 Apache Software License 2.0 Yes PDF templates management
|
||||
FPDF_TPL 1.2 Apache Software License 2.0 Yes PDF templates management
|
||||
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||
PHPExcel 1.7.8 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPExcel 1.8.0 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.6 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
TCPDF 6.0.093 LGPL-3+ Yes PDF generation
|
||||
TCPDF 6.2.6 LGPL-3+ Yes PDF generation
|
||||
|
||||
JS libraries:
|
||||
jQuery 1.8.2 MIT License Yes JS library
|
||||
@ -54,7 +54,10 @@ Copyright
|
||||
---------
|
||||
|
||||
Copyright (C) 2015
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
- Marcos García <marcosgdf@gmail.com>
|
||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
|
||||
Copyright (C) 2014
|
||||
- Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
@ -67,6 +70,7 @@ Copyright (C) 2014
|
||||
- Maxime Kohlhaas <mko@atm-consulting.fr>
|
||||
- Juanjo Menent <jmenent@2byte.es>
|
||||
- Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
- Frederic France <frederic.france@free.fr>
|
||||
|
||||
Copyright (C) 2013
|
||||
- Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
|
||||
34
ChangeLog
34
ChangeLog
@ -9,6 +9,39 @@ Upgrading to any other version or database system is abolutely required BEFORE t
|
||||
make a migration.
|
||||
|
||||
|
||||
***** ChangeLog for 3.8 compared to 3.7.* *****
|
||||
For users:
|
||||
- New: Add Option to not change date on cloning project
|
||||
- New: Add check list from table for extrafield type
|
||||
- New: Use new combobox.
|
||||
- New: Add hidden option MAXTABS_IN_CARD.
|
||||
- New: A default label is suggested for stock correction and transfer instead of empty string.
|
||||
- Fix / Improve : [ bug #1747 ] Remove creation of batch 'Undefined'
|
||||
- Add Weighted average price as default price for buying price for margin calculation. Add option
|
||||
MARGIN_PMP_AS_DEFAULT_BUY_PRICE to replace with first supplier price.
|
||||
- Introduce option MAIN_HTML_TITLE to start to control format of html title content.
|
||||
- Add extrafields on bank account cards.
|
||||
- Added delay between mails in Newsletter module.
|
||||
- [ task #1793 ] Create new permission to restrict commercial agent margin to logged user.
|
||||
- Add experimental module ask supplier price to request supplier quotation.
|
||||
- Add experimental module batch management.
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
- New: When a translation is not available we always jump to en_US and only en_US.
|
||||
|
||||
For developers:
|
||||
- New: Function yn can show a visual checkbox.
|
||||
- New: Introduced select2 jquery plugin.
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
- Removed hoo supplierorderdao into supplier order creation. This is a business event, so we must use the
|
||||
trigger ORDER_SUPPLIER_CREATE instead.
|
||||
- Hooks 'printLeftBlock' and 'formConfirm' are now compliant with hook development rules. They are
|
||||
"addreplace" hooks, so you must return content with "->resprints='mycontent'" and not with "return 'mycontent'"
|
||||
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
@ -114,6 +147,7 @@ For users:
|
||||
- Fix: [ bug #1535 ] Supplier invoice Extrafields are not shown
|
||||
- Fix: datepicker first day of week can be monday by setting into display setup
|
||||
- Fix: [ bug #575 ] GED doesn't works if there is "/" in a mask
|
||||
- Fix: [ task #1728 ] Deactivate RIB suggest in proposals / invoices / orders
|
||||
|
||||
For users, new experimental module (need to set feature level of instance to experimental to see them):
|
||||
- New: Module Accounting Expert to manage accountancy
|
||||
|
||||
229
README.md
229
README.md
@ -1,151 +1,166 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||
Dolibarr ERP & CRM is a modern software to manage your company or foundation activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).It's an opensource software (wrote with PHP language) designed for small and medium companies, foundation and freelances. You can freely install, use and distribute it as a standalone application or as a web application to use it from every internet access and media.
|
||||
Dolibarr ERP & CRM is a modern software to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
|
||||
|
||||
It's an Open Source software (wrote in PHP language) designed for small and medium companies, foundation and freelances.
|
||||
|
||||
You can freely use, study, modify or distribute it according to it's Free Software licence.
|
||||
|
||||
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
|
||||
See the [COPYING](COPYING) file for a full copy of the license.
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](COPYRIGHT) for a full list.
|
||||
|
||||
## INSTALL
|
||||
## INSTALLING
|
||||
|
||||
If you have no technical knowledge, and you are looking for an autoinstaller to install Dolibarr ERP/CRM in few clicks, you must download DoliWamp (the all-in-one package of Dolibarr for Windows), DoliDeb (the all-in-one package of Dolibarr for Debian or Ubuntu) or DoliRpm (the all-in-one package of Dolibarr for Fedora, Redhat, Opensuse, Mandriva or Mageia).
|
||||
### Download
|
||||
|
||||
You can download this from the download area of [Official website] (<http://www.dolibarr.org/>)
|
||||
Releases can be downloaded from [official website](http://www.dolibarr.org/).
|
||||
|
||||
If you already have installed a Web server and a Mysql database, you can install the standard version like this:
|
||||
### Simple setup
|
||||
|
||||
- Uncompress the downloaded archive.
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
|
||||
|
||||
- Copy directory "dolibarr" and all its files inside your web server root, or copy directory anywhere and set up your web server to use "dolibarr/htdocs" as root for a new web server virtual host (second choice need to be server administrator).
|
||||
|
||||
- Create an empty file "htdocs/conf/conf.php" and set permissions for your web server user (write permissions will be removed once install is finished).
|
||||
|
||||
- From your browser, call the dolibarr "install/" page.
|
||||
- DoliWamp for Windows
|
||||
- DoliDeb for Debian or Ubuntu
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Url depends on choice made on first step:
|
||||
### Advanced setup
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
You can use a Web server and a supported database (MySQL recommended) to install the standard version.
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
- Uncompress the downloaded archive
|
||||
- Copy directory "dolibarr" and all its files inside your web server root, or copy directory anywhere and set up your web server to use "dolibarr/htdocs" as root for a new web server virtual host (second choice need to be server administrator)
|
||||
- Create an empty file "htdocs/conf/conf.php" and set permissions for your web server user (write permissions will be removed once install is finished)
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
The URL will depends on choices made in the first step:
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
|
||||
or
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
|
||||
or
|
||||
|
||||
http://yourdolibarrvirtualhost/install/
|
||||
|
||||
- Follow instructions provided by installer...
|
||||
- Follow the installer instructions
|
||||
|
||||
## UPGRADING
|
||||
|
||||
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
|
||||
- If you're upgrading from version x.y.z to x.y.w (only third number differs), there is no need to run any migration process.
|
||||
- If you're upgrading from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access) and follow the upgrade process.
|
||||
|
||||
## UPGRADE
|
||||
*Note: migration process can safely be done multiple times.*
|
||||
|
||||
To upgrade Dolibarr from an old version to this one:
|
||||
## NEWS
|
||||
|
||||
- Overwrite all old files inside old 'dolibarr' directory by files provided into new version package.
|
||||
|
||||
- If you came from version x.y.z to x.y.w (only third number differ), there is no need to run any migrate process.
|
||||
|
||||
- If you came from a beta version or from any version x.y.z to any other where x or y number differs, you must call the Dolibarr "install/" page in your browser (this should be done automatically at first dolibarr access).
|
||||
See the [ChangeLog](ChangeLog) file.
|
||||
|
||||
This URL should looks like:
|
||||
## FEATURES
|
||||
|
||||
http://localhost/dolibarr/htdocs/install/
|
||||
or
|
||||
### General features
|
||||
- Users and groups with finely grained rights
|
||||
- Localization in most major languages
|
||||
- Very user friendly and easy to use
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- Works with PHP 5.3+ and MySQL 4.1+ or PostgreSQL 8.1. (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite))
|
||||
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support for country specific features:
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- ...
|
||||
|
||||
http://localhost/dolibarr/install/
|
||||
or
|
||||
### Main modules
|
||||
|
||||
http://yourdolibarrhost/install/
|
||||
|
||||
Then choose the "update" option according to your case.
|
||||
Note: Migrate process can be ran safely several times.
|
||||
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See ChangeLog file found into package.
|
||||
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN DO
|
||||
|
||||
### Main modules/features:
|
||||
|
||||
- Customers, Prospects or Suppliers directory.
|
||||
- Products and services catalog.
|
||||
- Bank accounts management.
|
||||
- Orders management.
|
||||
- Commercial proposals management.
|
||||
- Contracts management.
|
||||
- Invoices management.
|
||||
- Payments management.
|
||||
- Standing orders management.
|
||||
- Stock management.
|
||||
- Shipping management.
|
||||
- Customers, Prospects and/or Suppliers directory
|
||||
- Products and/or Services catalog
|
||||
- Bank accounts management
|
||||
- Customer and Supplier Orders management
|
||||
- Commercial proposals management
|
||||
- Contracts management
|
||||
- Invoices management
|
||||
- Projects management
|
||||
- Events management
|
||||
- Payments management
|
||||
- Standing orders management
|
||||
- Stock management
|
||||
- Shipping management
|
||||
- Interventions management
|
||||
- PDF or ODT generation for invoice, proposals, orders...
|
||||
- Agenda with ical,vcal export for third tools integration.
|
||||
- EDM (Electronic Document Management).
|
||||
- Foundations members management.
|
||||
- Employee's holidays management.
|
||||
- Mass Emailing.
|
||||
- Realize surveys.
|
||||
- Point of Sale.
|
||||
- Agenda with ical and vcal export for third party tools integration
|
||||
- Electronic Document Management (EDM)
|
||||
- Foundations members management
|
||||
- Employee's holidays management
|
||||
- Mass emailing
|
||||
- Surveys
|
||||
- Point of Sale
|
||||
- …
|
||||
|
||||
### Other modules:
|
||||
### Other modules
|
||||
|
||||
- Bookmarks management.
|
||||
- Donations management.
|
||||
- Reporting.
|
||||
- Data export/import.
|
||||
- Third parties or products categories.
|
||||
- LDAP connectivity.
|
||||
- ClickToDial integration.
|
||||
- RSS integration.
|
||||
- Can be extended with a lot of other external modules available onto DoliStore.com.
|
||||
- Bookmarks management
|
||||
- Donations management
|
||||
- Reporting
|
||||
- Data export/import
|
||||
- Thirdparties and/or products categories
|
||||
- Barcodes support
|
||||
- Margin calculations
|
||||
- LDAP connectivity
|
||||
- ClickToDial integration
|
||||
- RSS integration
|
||||
- Skype integration
|
||||
- Payment platforms integration (PayBox, PayPal)
|
||||
- …
|
||||
|
||||
### Miscellaneous:
|
||||
### Extending
|
||||
|
||||
- Multi-user, with several permissions levels for each feature.
|
||||
- Very user friendly and easy to use.
|
||||
- Highly customizable: Enable only modules you need, user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one).
|
||||
- Works with PHP 5.3+, MySql 4.1 or PostgreSQL 8.1.
|
||||
- Require PHP and Mysql or Postgresql (See exatc versions on http://wiki.dolibarr.org/index.php/Prerequisite).
|
||||
- Compatible with all Cloud solutions that match MySql, PHP or PostgreSQL prerequisites.
|
||||
- An easy to understand, maintain and code interfaces with your own system information (PHP with no heavy frameworks, trigger and hook architecture).
|
||||
- Support countries specific features:
|
||||
Spanish Tax RE and ISPF.
|
||||
French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM).
|
||||
Canadian double taxes (federal/province) and other countries using cumulative VAT.
|
||||
Tunisian tax stamp.
|
||||
Compatible with European directives (2006/112/CE ... 2010/45/UE) (http://europa.eu/legislation_summaries/taxation/l31057_en.htm)
|
||||
...
|
||||
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
|
||||
|
||||
## FUTURE
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET (TODO LIST)
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
This is features that Dolibarr does not support completely yet:
|
||||
- Double-entry bookkeeping (only bank and treasury management)
|
||||
- Multiple currencies
|
||||
- Multiple companies
|
||||
If you want to manage several companies or foundations, you must install the software several times (on same server or not) or use the MultiCompany addon module that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas)
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Webmail
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
- No double party accountancy (only bank and treasury management).
|
||||
- Dolibarr manage one currency at once (mono-currency).
|
||||
- Dolibarr manage one master activity (mono-company). If you want to manage several companies or foundations, you must install several time the software (on same server or not). Another solution is to extend Dolibarr with the addon Module MultiCompany that allows to manage several companies in one Dolibarr instance (one database but with a logical isolation of datas).
|
||||
- Tasks on module project can't have dependencies between each other.
|
||||
- Dolibarr does not contains Payroll module.
|
||||
- Dolibarr does not include any Webmail.
|
||||
- Dolibarr can't do coffee (not yet).
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](http://wiki.dolibarr.org).
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine libraries.
|
||||
|
||||
See [COPYRIGHT](COPYRIGHT) file.
|
||||
|
||||
## SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on
|
||||
|
||||
Facebook: <https://www.facebook.com/dolibarr>
|
||||
|
||||
Google+: <https://plus.google.com/+DolibarrOrg>
|
||||
|
||||
Twitter: <http://www.twitter.com/dolibarr>
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||
- [Twitter](http://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](http://https//www.linkedin.com/groups/Dolibarr-ERP-CRM-2743052?gid=2743052)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
@ -101,14 +101,38 @@ http://packages.qa.debian.org/package.html
|
||||
http://bugs.debian.org/package
|
||||
|
||||
|
||||
##### Modify severity of a bug ticket
|
||||
|
||||
- Send this email to control@bugs.debian.org and wait 10 minutes
|
||||
|
||||
severity 123 xxx
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
|
||||
To set status of a bug to "pending"
|
||||
> bts tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
|
||||
Control: tag -1 +pending
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Testing a package into unstable env
|
||||
|
||||
Check you have a mysql server available from another interface than localhost
|
||||
Check you have a mysql server available from another interface than "localhost".
|
||||
Comment line in /etc/mysql/my.cnf if required and restart mysql
|
||||
#bind-address = 127.0.0.1
|
||||
|
||||
Create a chroot called "unstable-amd64-sbuild"
|
||||
Create a chroot called "unstable-amd64-sbuild".
|
||||
Chroot env is stored into /srv/chroot directory.
|
||||
> sudo sbuild-createchroot --keyring= unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
|
||||
|
||||
Pour lister les env chroot
|
||||
@ -116,6 +140,7 @@ Pour lister les env chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
> apt-get install links mysql-client
|
||||
|
||||
@ -129,7 +154,10 @@ Pour tester un package
|
||||
> dpkg -i dolibarr*.deb ou pour avoir des traces: dpkg -D77777 -i dolibarr*.deb
|
||||
> apt-get install -f
|
||||
|
||||
Puis http://localhost/dolibarr/ (cela peut etre appeler depuis le hote).
|
||||
If there is a problem launching apache, because port is already used, change it into your chroot install with
|
||||
> vi /etc/apache2/ports.conf
|
||||
Then restart.
|
||||
Then you can call/test dolibarr with http://localhost:port/dolibarr/ (It can be also called from host).
|
||||
|
||||
|
||||
|
||||
@ -196,23 +224,6 @@ http://packages.qa.debian.org/t/tcpdf.html
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
To set status of a bug to pending
|
||||
> bts tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
Control: tag -1 +pending
|
||||
and then a text like:
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Create/Maintain dolibarr package
|
||||
|
||||
To update dolibarr debian package
|
||||
@ -251,7 +262,7 @@ x.y.z+dfsgw
|
||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||
|
||||
* Add an entry into debian/changelog
|
||||
> dch -v x.y.z+dfsg-w "My comment" will add entry.
|
||||
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
|
||||
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
Then check/modify also the user/date signature:
|
||||
@ -288,3 +299,17 @@ http://packages.qa.debian.org
|
||||
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
##### Send an unblock request
|
||||
Use this to move from unstable to testing.
|
||||
reportbug -B debian
|
||||
Choose package "release.debian.org"
|
||||
Then "unblock"
|
||||
Then name of package "dolibarr"
|
||||
Fill message, for example:
|
||||
"Please unblock package dolibarr
|
||||
A security error CVE-2014-7137 was reported and is fixed into package 3.5.5.
|
||||
Note that package 3.5.5 was prepared before the CVE was reported and include other fixes, but they are all related to stability or security (other se$
|
||||
After discussion with ..., it appears that security holes are enough to request this unblock request."
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
dolibarr (3.7.0-3) UNRELEASED; urgency=low
|
||||
dolibarr (3.8.0-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 21 Oct 2014 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 3 Mar 2015 12:00:00 +0100
|
||||
|
||||
@ -26,7 +26,7 @@ for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversio
|
||||
|
||||
|
||||
<!-- Google AdSense -->
|
||||
<center>
|
||||
<div class="center">
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "pub-1071905880519467";
|
||||
/* PUBBANDEAUDOLIBARR */
|
||||
@ -36,7 +36,7 @@ google_ad_height = 60;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||
</center>
|
||||
</div>
|
||||
<!-- End google adsense -->
|
||||
<br>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ File added into doxygen generated documentation
|
||||
</div>
|
||||
|
||||
<div id="logodol">
|
||||
<center>
|
||||
<div class="center">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td>
|
||||
@ -54,7 +54,7 @@ File added into doxygen generated documentation
|
||||
<!-- banner end --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
70
build/generate_filecheck_xml.php
Normal file
70
build/generate_filecheck_xml.php
Normal file
@ -0,0 +1,70 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file build/generate_filecheck_xml.php
|
||||
* \ingroup dev
|
||||
* \brief This script create a xml checksum file
|
||||
*/
|
||||
|
||||
$sapi_type = php_sapi_name();
|
||||
$script_file = basename(__FILE__);
|
||||
$path=dirname(__FILE__).'/';
|
||||
|
||||
// Test if batch mode
|
||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// Main
|
||||
parse_str($argv[1]);
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
|
||||
$fp = fopen($outputfile,'w');
|
||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||
fputs($fp, '<checksum_list>'."\n");
|
||||
fputs($fp, '<dolibarr_root_dir version="'.$release.'">'."\n");
|
||||
$dir_iterator = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
$iterator = new RecursiveIteratorIterator($dir_iterator);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
$newdir = str_replace(dirname(__FILE__).'/../htdocs', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
fputs($fp, '<md5file name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '</dolibarr_root_dir>'."\n");
|
||||
fputs($fp, '</checksum_list>'."\n");
|
||||
fclose($fp);
|
||||
|
||||
print "File ".$outputfile." generated\n";
|
||||
|
||||
exit(0);
|
||||
@ -207,7 +207,10 @@ else {
|
||||
my $NUM_SCRIPT;
|
||||
my $cpt=0;
|
||||
while (! $found) {
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,"ALL (1..9)","Need ".join(",",values %REQUIREMENTTARGET));
|
||||
$cpt=0;
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,"ALL (1..10)","Need ".join(",",values %REQUIREMENTTARGET));
|
||||
$cpt++;
|
||||
printf(" %2d - %-14s\n",$cpt,"Generate check file");
|
||||
foreach my $target (@LISTETARGET) {
|
||||
$cpt++;
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,$target,"Need ".$REQUIREMENTTARGET{$target});
|
||||
@ -218,7 +221,7 @@ else {
|
||||
printf(" %2d - %-14s (%s)\n",$cpt,"SF (publish)","Need ".$REQUIREMENTPUBLISH{"SF"});
|
||||
|
||||
# Ask which target to build
|
||||
print "Choose one package number or several separated with space (0 - ".$cpt."): ";
|
||||
print "Choose one target number or several separated with space (0 - ".$cpt."): ";
|
||||
$NUM_SCRIPT=<STDIN>;
|
||||
chomp($NUM_SCRIPT);
|
||||
if ($NUM_SCRIPT !~ /^[0-9\s]+$/)
|
||||
@ -235,30 +238,30 @@ else {
|
||||
if ($NUM_SCRIPT eq "98") {
|
||||
$CHOOSEDPUBLISH{"ASSO"}=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($NUM_SCRIPT eq "99") {
|
||||
$CHOOSEDPUBLISH{"SF"}=1;
|
||||
elsif ($NUM_SCRIPT eq "99") {
|
||||
$CHOOSEDPUBLISH{"SF"}=1;
|
||||
}
|
||||
elsif ($NUM_SCRIPT eq "0") {
|
||||
$CHOOSEDTARGET{"-CHKSUM"}=1;
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT' && $key ne 'ASSO' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
else {
|
||||
if ($NUM_SCRIPT eq "0") {
|
||||
foreach my $key (@LISTETARGET) {
|
||||
if ($key ne 'SNAPSHOT' && $key ne 'ASSO' && $key ne 'SF') { $CHOOSEDTARGET{$key}=1; }
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
||||
$CHOOSEDTARGET{$LISTETARGET[$num-1]}=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ($NUM_SCRIPT eq "1") {
|
||||
$CHOOSEDTARGET{"-CHKSUM"}=1
|
||||
}
|
||||
else {
|
||||
foreach my $num (split(/\s+/,$NUM_SCRIPT)) {
|
||||
$CHOOSEDTARGET{$LISTETARGET[$num-2]}=1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Test if requirement is ok
|
||||
#--------------------------
|
||||
$atleastonerpm=0;
|
||||
foreach my $target (keys %CHOOSEDTARGET) {
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target =~ /RPM/i)
|
||||
{
|
||||
if ($atleastonerpm && ($DESTI eq "$SOURCE/build"))
|
||||
@ -300,20 +303,32 @@ foreach my $target (keys %CHOOSEDTARGET) {
|
||||
|
||||
print "\n";
|
||||
|
||||
# Check if there is at least on target to build
|
||||
# Build xml check file
|
||||
#-----------------------
|
||||
if ($CHOOSEDTARGET{'-CHKSUM'})
|
||||
{
|
||||
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
|
||||
$ret=`php $SOURCE/build/generate_filecheck_xml.php release=$MAJOR.$MINOR.$BUILD`;
|
||||
print $ret."\n";
|
||||
}
|
||||
|
||||
|
||||
#print join(',',sort keys %CHOOSEDTARGET)."\n";
|
||||
|
||||
# Check if there is at least one target to build
|
||||
#----------------------------------------------
|
||||
$nboftargetok=0;
|
||||
$nboftargetneedbuildroot=0;
|
||||
$nbofpublishneedtag=0;
|
||||
foreach my $target (keys %CHOOSEDTARGET) {
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP')
|
||||
if ($target ne 'EXE' && $target ne 'EXEDOLIWAMP' && $target ne '-CHKSUM')
|
||||
{
|
||||
$nboftargetneedbuildroot++;
|
||||
}
|
||||
$nboftargetok++;
|
||||
}
|
||||
foreach my $target (keys %CHOOSEDPUBLISH) {
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH) {
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
if ($target eq 'ASSO') { $nbofpublishneedtag++; }
|
||||
if ($target eq 'SF') { $nbofpublishneedtag++; }
|
||||
@ -368,6 +383,7 @@ if ($nboftargetok) {
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.editorconfig`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
@ -376,7 +392,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
@ -439,15 +454,18 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/documents`;
|
||||
# Removed known external modules to avoir any error when packaging on test env
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||
@ -477,10 +495,11 @@ if ($nboftargetok) {
|
||||
|
||||
# Build package for each target
|
||||
#------------------------------
|
||||
foreach my $target (keys %CHOOSEDTARGET)
|
||||
foreach my $target (sort keys %CHOOSEDTARGET)
|
||||
{
|
||||
if ($CHOOSEDTARGET{$target} < 0) { next; }
|
||||
|
||||
if ($target eq '-CHKSUM') { next; }
|
||||
|
||||
print "\nBuild package for target $target\n";
|
||||
|
||||
if ($target eq 'SNAPSHOT')
|
||||
@ -982,7 +1001,7 @@ if ($nboftargetok) {
|
||||
|
||||
# Publish package for each target
|
||||
#--------------------------------
|
||||
foreach my $target (keys %CHOOSEDPUBLISH)
|
||||
foreach my $target (sort keys %CHOOSEDPUBLISH)
|
||||
{
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
|
||||
@ -1072,7 +1091,8 @@ if ($nboftargetok) {
|
||||
}
|
||||
|
||||
print "\n----- Summary -----\n";
|
||||
foreach my $target (keys %CHOOSEDTARGET) {
|
||||
foreach my $target (sort keys %CHOOSEDTARGET) {
|
||||
if ($target eq '-CHKSUM') { print "Checksum was generated"; next; }
|
||||
if ($CHOOSEDTARGET{$target} < 0) {
|
||||
print "Package $target not built (bad requirement).\n";
|
||||
} else {
|
||||
|
||||
@ -14,7 +14,7 @@ https://build.opensuse.org
|
||||
Packaging rules: http://en.opensuse.org/Portal:Packaging
|
||||
|
||||
Add attributes:
|
||||
OBS:Screenshots URL of screenshot
|
||||
OBS:Screenshots URL of screenshot http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||
OBS:QualityCategory Development|Testing|Stable|Private
|
||||
OBS:Maintained 1
|
||||
|
||||
|
||||
@ -172,8 +172,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@ -185,12 +187,13 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@ -252,8 +252,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@ -265,12 +267,13 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@ -169,8 +169,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@ -182,12 +184,13 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@ -180,8 +180,10 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/contrat
|
||||
%_datadir/dolibarr/htdocs/core
|
||||
%_datadir/dolibarr/htdocs/cron
|
||||
%_datadir/dolibarr/htdocs/don
|
||||
%_datadir/dolibarr/htdocs/ecm
|
||||
%_datadir/dolibarr/htdocs/expedition
|
||||
%_datadir/dolibarr/htdocs/expensereport
|
||||
%_datadir/dolibarr/htdocs/exports
|
||||
%_datadir/dolibarr/htdocs/externalsite
|
||||
%_datadir/dolibarr/htdocs/fichinter
|
||||
@ -193,12 +195,13 @@ done >>%{name}.lang
|
||||
%_datadir/dolibarr/htdocs/install
|
||||
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
|
||||
%_datadir/dolibarr/htdocs/livraison
|
||||
%_datadir/dolibarr/htdocs/loan
|
||||
%_datadir/dolibarr/htdocs/mailmanspip
|
||||
%_datadir/dolibarr/htdocs/margin
|
||||
%_datadir/dolibarr/htdocs/opensurvey
|
||||
%_datadir/dolibarr/htdocs/paybox
|
||||
%_datadir/dolibarr/htdocs/paypal
|
||||
%_datadir/dolibarr/htdocs/printipp
|
||||
%_datadir/dolibarr/htdocs/printing
|
||||
%_datadir/dolibarr/htdocs/product
|
||||
%_datadir/dolibarr/htdocs/projet
|
||||
%_datadir/dolibarr/htdocs/public
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
This directory contains ruleset files to use to
|
||||
develop Dolibarr EPR & CRM with Eclipse.
|
||||
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
|
||||
|
||||
Note: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
To install/upgrade phpcs:
|
||||
> sudo pear upgrade PHP_CodeSniffer
|
||||
|
||||
Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
* tab value to 4
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
|
||||
|
||||
@ -173,138 +173,44 @@
|
||||
|
||||
|
||||
|
||||
<!-- Rules from PEAR Standard -->
|
||||
<!-- Rules from PEAR Standard -->
|
||||
|
||||
<rule ref="PEAR.Classes.ClassDeclaration" />
|
||||
<rule ref="PEAR.Classes.ClassDeclaration" />
|
||||
|
||||
<!-- Check for duplicate class names -->
|
||||
<!-- <rule ref="Generic.Classes.DuplicateClassName" /> -->
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment" />
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag" />
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingCategoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingLicenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingLinkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingPackageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<rule ref="PEAR.Commenting.FileComment" />
|
||||
<rule ref="PEAR.Commenting.FileComment.WrongStyle">
|
||||
@ -317,15 +223,40 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
-->
|
||||
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Empty">
|
||||
<severity>5</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment" />
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName" />
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.WrongStyle">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingBeforeParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
@ -23,6 +23,21 @@ Replace call to serialize_val with no bugged value
|
||||
|
||||
|
||||
|
||||
FPDI:
|
||||
-----
|
||||
Replace:
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
with:
|
||||
try {
|
||||
$this->_readXref($this->_xref, $this->_findXref());
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
print $e->getMessage();
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
TCPDF:
|
||||
------
|
||||
* Removed all fonts except
|
||||
@ -47,6 +62,19 @@ In htdocs/includes/tcpdf/tcpdf.php
|
||||
* Renamed getmypid into dol_getmypid().
|
||||
|
||||
|
||||
TCPDI:
|
||||
------
|
||||
Add fpdf_tpl.php 1.2
|
||||
Add tcpdi.php
|
||||
Add tcpdi_parser.php and replace:
|
||||
require_once(dirname(__FILE__).'/include/tcpdf_filters.php');
|
||||
with:
|
||||
require_once(dirname(__FILE__).'/../tcpdf/include/tcpdf_filters.php');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
JSGANTT:
|
||||
--------
|
||||
* Replace in function JSGantt.taskLink
|
||||
|
||||
@ -70,7 +70,7 @@ $myproduct->libelle = 'libelle';
|
||||
$myproduct->price = '10';
|
||||
$myproduct->price_base_type = 'HT';
|
||||
$myproduct->tva_tx = '19.6';
|
||||
$myproduct->type = 0;
|
||||
$myproduct->type = Product::TYPE_PRODUCT;
|
||||
$myproduct->status = 1;
|
||||
$myproduct->description = 'Description';
|
||||
$myproduct->note = 'Note';
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Detect and fix files ending with bad ending chars (must be LF)"
|
||||
echo "This script detect or clean files with CR+LF into files with LF only. All source files are included, also files into includes."
|
||||
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||
fi
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/dev/generate-commande.php
|
||||
* \file dev/initdata/generate-commande.php
|
||||
* \brief Script de generation de donnees aleatoires pour les commandes
|
||||
*/
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/dev/generate-facture.php
|
||||
* \file dev/intdata/generate-facture.php
|
||||
* \brief Script de generation de donnees aleatoires pour les factures
|
||||
*/
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/dev/generate-produit.php
|
||||
* \file dev/initdata/generate-produit.php
|
||||
* \brief Script de generation de donnees aleatoires pour les produits
|
||||
*/
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/dev/generate-propale.php
|
||||
* \file dev/initdata/generate-propale.php
|
||||
* \brief Script de generation de donnees aleatoires pour les propales
|
||||
*/
|
||||
|
||||
@ -103,7 +103,8 @@ if ($resql)
|
||||
}
|
||||
}
|
||||
|
||||
$user->rights->propale->valider=1;
|
||||
$user->rights->propal->creer=1;
|
||||
$user->rights->propal->propal_advance->validate=1;
|
||||
|
||||
|
||||
if (! empty($conf->global->PROPALE_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/dev/generate-societe.php
|
||||
* \brief Script de generation de donnees aleatoires pour les societes
|
||||
* \file dev/initdata/generate-societe.php
|
||||
* \brief Script de generation de donnees aleatoires pour les societes
|
||||
*/
|
||||
|
||||
// Test si mode batch
|
||||
@ -89,7 +89,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
{
|
||||
print "Company $s\n";
|
||||
$soc = new Societe($db);
|
||||
$soc->nom = "Company num ".time()."$s";
|
||||
$soc->name = "Company num ".time()."$s";
|
||||
$soc->town = $listoftown[rand(0, count($listoftown)-1)];
|
||||
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
|
||||
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
|
||||
@ -101,7 +101,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
// Un client sur 3 a une remise de 5%
|
||||
$user_remise=rand(1,3); if ($user_remise==3) $soc->remise_percent=5;
|
||||
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
|
||||
$soc->note='Company created by the script generate-societe.php';
|
||||
$soc->note_private = 'Company created by the script generate-societe.php';
|
||||
$socid = $soc->create();
|
||||
|
||||
if ($socid >= 0)
|
||||
@ -120,7 +120,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
|
||||
}
|
||||
}
|
||||
|
||||
print "Company ".$s." created nom=".$soc->nom."\n";
|
||||
print "Company ".$s." created nom=".$soc->name."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -7427,7 +7427,7 @@ CREATE TABLE `llx_user` (
|
||||
|
||||
LOCK TABLES `llx_user` WRITE;
|
||||
/*!40000 ALTER TABLE `llx_user` DISABLE KEYS */;
|
||||
INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2012-12-12 16:54:10',NULL,NULL,'admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'SuperAdminName','Firstname','',NULL,'','','','bidon@destailleur.fr','',1,'','','',1,1,NULL,NULL,NULL,'','2014-12-21 20:52:09','2014-12-21 13:51:38',NULL,'',1,'01.jpg',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2010-07-08 09:54:48',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,'John','Doe',NULL,NULL,'09123123','','','johndoe@mycompany.com',NULL,0,'','','',1,1,NULL,NULL,NULL,'','2013-03-24 16:30:29','2010-07-08 14:12:02',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2013-02-20 18:07:21',NULL,NULL,'adupont',1,NULL,NULL,NULL,'adupont','00856ab2bbb748aa29aa335a6e3a2407',NULL,'Dupont','Alain','',NULL,'','','','toto@aa.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2013-02-20 18:48:01',NULL,NULL,'aaa',1,NULL,NULL,NULL,'aaa','47bce5c74f589f4867dbd57e9ca9f808',NULL,'aaa','','',NULL,'','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(5,'2013-01-23 17:52:37','2013-01-23 15:52:37',NULL,NULL,'bbb',0,NULL,NULL,NULL,'bbb','08f8e0260c64418510cefb2b06eee5cd',NULL,'bbb','','',NULL,'','','','','',1,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(6,'2013-02-16 20:22:40','2013-02-16 18:22:40',NULL,NULL,'aaab',2,NULL,NULL,NULL,'aaab','4c189b020ceb022e0ecc42482802e2b8',NULL,'aaab','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(7,'2013-02-16 20:48:15','2013-02-16 18:48:15',NULL,NULL,'zzz',2,NULL,NULL,NULL,'zzz','f3abb86bd34cf4d52698f14c0da1dc60',NULL,'zzz','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(9,'2013-02-16 20:50:07','2013-03-24 15:10:14',NULL,NULL,'zzzg',2,NULL,NULL,NULL,'jc28fg4h','93d789524fd223cf05eecea3f59cbe86',NULL,'zzzg','','',NULL,'','','','','fsdkkfsdf<br />\r\nfsdfsd<br />\r\n<strong>fsdfs</strong>',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,5,NULL,'','','',NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2012-12-12 16:54:10',NULL,NULL,'admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'SuperAdminName','Firstname','',NULL,'','','','bidon@destailleur.fr','',1,'','','',1,1,NULL,NULL,NULL,'','2014-12-21 20:52:09','2014-12-21 13:51:38',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2010-07-08 09:54:48',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,'John','Doe',NULL,NULL,'09123123','','','johndoe@mycompany.com',NULL,0,'','','',1,1,NULL,NULL,NULL,'','2013-03-24 16:30:29','2010-07-08 14:12:02',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2013-02-20 18:07:21',NULL,NULL,'adupont',1,NULL,NULL,NULL,'adupont','00856ab2bbb748aa29aa335a6e3a2407',NULL,'Dupont','Alain','',NULL,'','','','toto@aa.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2013-02-20 18:48:01',NULL,NULL,'aaa',1,NULL,NULL,NULL,'aaa','47bce5c74f589f4867dbd57e9ca9f808',NULL,'aaa','','',NULL,'','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(5,'2013-01-23 17:52:37','2013-01-23 15:52:37',NULL,NULL,'bbb',0,NULL,NULL,NULL,'bbb','08f8e0260c64418510cefb2b06eee5cd',NULL,'bbb','','',NULL,'','','','','',1,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(6,'2013-02-16 20:22:40','2013-02-16 18:22:40',NULL,NULL,'aaab',2,NULL,NULL,NULL,'aaab','4c189b020ceb022e0ecc42482802e2b8',NULL,'aaab','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(7,'2013-02-16 20:48:15','2013-02-16 18:48:15',NULL,NULL,'zzz',2,NULL,NULL,NULL,'zzz','f3abb86bd34cf4d52698f14c0da1dc60',NULL,'zzz','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(9,'2013-02-16 20:50:07','2013-03-24 15:10:14',NULL,NULL,'zzzg',2,NULL,NULL,NULL,'jc28fg4h','93d789524fd223cf05eecea3f59cbe86',NULL,'zzzg','','',NULL,'','','','','fsdkkfsdf<br />\r\nfsdfsd<br />\r\n<strong>fsdfs</strong>',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,5,NULL,'','','',NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);
|
||||
/*!40000 ALTER TABLE `llx_user` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapadd_sample1.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add a dc "my-domain".
|
||||
# This is the first thing to create
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapadd_sample2.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add a ou "contacts"
|
||||
# This is the second thing to create after creating the root my-domain
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapadd_sample3.txt
|
||||
# ldapadd is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to add cn records
|
||||
# This is the step to create records inside tree ou=contacts,dc=my-domain,dc=com
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapdelete_sample1.txt
|
||||
# ldapdelete is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to delete a dc "my-domain"
|
||||
# This delete the first level of LDAP tree.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapdelete_sample3.txt
|
||||
# ldapdelete is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to delete cn records
|
||||
# This is the step to delete a cn record stored inside tree ou=contacts,dc=my-domain,dc=com
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# ldapmodify_sample1.txt
|
||||
# ldapmodify is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to modify a dc "my-domain"
|
||||
#
|
||||
|
||||
9
dev/ldap/ldapsearch_sample1.txt
Normal file
9
dev/ldap/ldapsearch_sample1.txt
Normal file
@ -0,0 +1,9 @@
|
||||
# ldapsearch_sample1.txt
|
||||
# ldapsearch is into package ldap-utils on debian.
|
||||
#
|
||||
# Use this sample to search into a ldap
|
||||
#
|
||||
# ldapsearch -h hostname -x
|
||||
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
|
||||
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -W "(objectclass=*)"
|
||||
@ -174,7 +174,7 @@ $targetcontent=$sourcecontent;
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element=\'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element=\'skeleton\'/', '\$table_element=\''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
@ -252,7 +252,13 @@ foreach($property as $key => $prop)
|
||||
if ($addfield)
|
||||
{
|
||||
$varprop.="\t\t\$sql.= \" ";
|
||||
if ($prop['istime'])
|
||||
if ($prop['field']=='datec')
|
||||
{
|
||||
$varprop.='"."\'".$this->db->idate(dol_now())."\'"."';
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
{
|
||||
$varprop.='".(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
@ -268,6 +274,12 @@ foreach($property as $key => $prop)
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
elseif ($prop['field']=='fk_user_mod' || $prop['field']=='fk_user_author')
|
||||
{
|
||||
$varprop.='".$user->id."';
|
||||
if ($i < count($property)) $varprop.=",";
|
||||
$varprop.='";';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.='".(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
@ -289,11 +301,17 @@ $i=0;
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
$i++;
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id')
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && $prop['field'] != 'datec' && $prop['field'] != 'fk_user_author')
|
||||
{
|
||||
$varprop.="\t\t\$sql.= \" ";
|
||||
$varprop.=$prop['field'].'=';
|
||||
if ($prop['istime'])
|
||||
if ($prop['field']=='tms') {
|
||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
||||
$varprop.='$this->'.$prop['field'];
|
||||
$varprop.=')."\'" : "\'".$this->db->idate(dol_now())."\'").';
|
||||
$varprop.='"';
|
||||
}
|
||||
elseif ($prop['istime'])
|
||||
{
|
||||
// (dol_strlen($this->datep)!=0 ? "'".$this->db->idate($this->datep)."'" : 'null')
|
||||
$varprop.='".(dol_strlen($this->'.$prop['field'].')!=0 ? "\'".$this->db->idate(';
|
||||
@ -301,6 +319,9 @@ foreach($property as $key => $prop)
|
||||
$varprop.=')."\'" : \'null\').';
|
||||
$varprop.='"';
|
||||
}
|
||||
elseif ($prop['field']=='fk_user_mod') {
|
||||
$varprop.='".$user->id."';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.="\".";
|
||||
@ -325,6 +346,7 @@ $targetcontent=preg_replace('/\$sql\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
// Substitute select set parameters
|
||||
$varprop="\n";
|
||||
$varpropline="\n";
|
||||
$cleanparam='';
|
||||
$i=0;
|
||||
foreach($property as $key => $prop)
|
||||
@ -338,11 +360,22 @@ foreach($property as $key => $prop)
|
||||
if ($prop['istime']) $varprop.=')';
|
||||
$varprop.=";";
|
||||
$varprop.="\n";
|
||||
|
||||
$varpropline.="\t\t\t\t\$line->".$prop['field']." = ";
|
||||
if ($prop['istime']) $varpropline.='$this->db->jdate(';
|
||||
$varpropline.='$obj->'.$prop['field'];
|
||||
if ($prop['istime']) $varpropline.=')';
|
||||
$varpropline.=";";
|
||||
$varpropline.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/\$this->prop1 = \$obj->field1;/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$this->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
//Substirute fetchAll
|
||||
$targetcontent=preg_replace('/\$line->prop1 = \$obj->field1;/', $varpropline, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$line->prop2 = \$obj->field2;/', '', $targetcontent);
|
||||
|
||||
|
||||
// Substitute initasspecimen parameters
|
||||
$varprop="\n";
|
||||
|
||||
@ -57,7 +57,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->name = preg_replace('/^mod/i','',get_class($this));
|
||||
// Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->description = "Description of module MyModule";
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or 'dolibarr_deprecated' or version
|
||||
$this->version = '1.0';
|
||||
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -41,6 +42,8 @@ class Skeleton_Class extends CommonObject
|
||||
var $element='skeleton'; //!< Id that identify managed objects
|
||||
var $table_element='skeleton'; //!< Name of table without prefix where object is stored
|
||||
|
||||
var $lines=array();
|
||||
|
||||
var $id;
|
||||
var $prop1;
|
||||
var $prop2;
|
||||
@ -103,11 +106,11 @@ class Skeleton_Class extends CommonObject
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
// want this action to call a trigger.
|
||||
|
||||
//// Call triggers
|
||||
//$result=$this->call_trigger('MYOBJECT_CREATE',$user);
|
||||
//if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
|
||||
//if ($result < 0) $error++;
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
@ -115,11 +118,6 @@ class Skeleton_Class extends CommonObject
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1*$error;
|
||||
}
|
||||
@ -136,7 +134,7 @@ class Skeleton_Class extends CommonObject
|
||||
*
|
||||
* @param int $id Id object
|
||||
* @param string $ref Ref
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
function fetch($id,$ref='')
|
||||
{
|
||||
@ -154,7 +152,8 @@ class Skeleton_Class extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
if ($this->db->num_rows($resql))
|
||||
$numrows = $this->db->num_rows($resql);
|
||||
if ($numrows)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
@ -165,7 +164,7 @@ class Skeleton_Class extends CommonObject
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
return 1;
|
||||
return ($numrows?1:0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -174,6 +173,69 @@ class Skeleton_Class extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load object in memory from the database
|
||||
*
|
||||
* @param string $sortorder Sort Order
|
||||
* @param string $sortfield Sort field
|
||||
* @param int $limit offset limit
|
||||
* @param int $offset offset limit
|
||||
* @param array $filter filter array
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function fetchAll($sortorder, $sortfield, $limit, $offset, $filter = array())
|
||||
{
|
||||
global $langs;
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
//...
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
|
||||
// Manage filter
|
||||
$sqlwhere=array();
|
||||
if (count($filter)>0) {
|
||||
foreach ( $filter as $key => $value ) {
|
||||
//$sqlwhere []= ' AND '. $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||
}
|
||||
}
|
||||
if (count($sqlwhere)>0) {
|
||||
$sql.= ' WHERE '.implode(' AND ', $sqlwhere);
|
||||
}
|
||||
$sql .= " ORDER BY " . $sortfield . " " . $sortorder . " " . $this->db->plimit($limit + 1, $offset);
|
||||
|
||||
$this->lines = array ();
|
||||
|
||||
dol_syslog(get_class($this)."::fetchAll", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
$line=new Skeleton_ClassLine();
|
||||
|
||||
$line->id = $obj->rowid;
|
||||
$line->prop1 = $obj->field1;
|
||||
$line->prop2 = $obj->field2;
|
||||
|
||||
$this->lines[]=$line;
|
||||
//...
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
return $num;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error="Error ".$this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::fetchAll ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update object into database
|
||||
@ -367,3 +429,10 @@ class Skeleton_Class extends CommonObject
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Skeleton_ClassLine
|
||||
{
|
||||
var $id;
|
||||
var $prop1;
|
||||
var $prop2;
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ if ($action == 'create')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -304,7 +304,7 @@ if (($id || $ref) && $action == 'edit')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<center>
|
||||
<div class="center">
|
||||
|
||||
<div class="login_table" align="center">
|
||||
|
||||
<!-- <tr><td colspan="2" valign="middle"> -->
|
||||
<div id="login_line1" align="center">
|
||||
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center">
|
||||
|
||||
<table class="none" summary="Login pass" cellpadding="2" align="center">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
</table>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
</div> <!-- end div left -->
|
||||
|
||||
<!-- </td>
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -40,8 +40,18 @@ class autoTranslator
|
||||
const DIR_SEPARATOR = '/';
|
||||
|
||||
|
||||
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $_destlang Destination lang
|
||||
* @param string $_refLang Ref lang
|
||||
* @param string $_langDir Dir lang
|
||||
* @param string $_limittofile Limit to file
|
||||
* @param string $_apikey Api key
|
||||
* @return void
|
||||
*/
|
||||
function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
|
||||
{
|
||||
|
||||
// Set enviorment variables
|
||||
$this->_destlang = $_destlang;
|
||||
|
||||
@ -164,8 +164,11 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '"></center';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -214,9 +217,11 @@ else if ($id)
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -142,33 +142,35 @@ print "<br>\n";
|
||||
*/
|
||||
|
||||
$num = count($list);
|
||||
if ($num) {
|
||||
if ($num)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||
print "</tr>\n";
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1) print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '<br><div style="text-align:center"><input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Modify')) . '" name="button"></div>';
|
||||
|
||||
print '</form>';
|
||||
print "</table>\n";
|
||||
|
||||
print '<br /><div align="center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -200,8 +200,11 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -251,9 +254,11 @@ else if ($id)
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -120,6 +120,9 @@ if ($result) {
|
||||
$i = 0;
|
||||
print_barre_liste($langs->trans("ImportAccount"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="action" value="import">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>' . $langs->trans("accountingaccount") . '</td>';
|
||||
print '<td>' . $langs->trans("label") . '</td>';
|
||||
@ -132,9 +135,6 @@ if ($result) {
|
||||
$form = new Form($db);
|
||||
$htmlacc = new FormVentilation($db);
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="action" value="import">';
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
@ -181,7 +181,6 @@ print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
|
||||
print "</td></tr>\n";
|
||||
print '<tr '.$bc[true].'><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"'.($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeVirtual').'</td>';
|
||||
print '<td colspan="2">'.nl2br($langs->trans('OptionModeVirtualDesc'))."</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -285,10 +284,10 @@ if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print '<br /><br /><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
|
||||
print '</form>';
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -112,10 +112,10 @@ foreach ( $list as $key ) {
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
print "</table>\n";
|
||||
|
||||
print '<br /><div style="text-align:center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';
|
||||
print '</form>';
|
||||
|
||||
print '<br />';
|
||||
|
||||
@ -163,7 +163,6 @@ $db->free($resql);
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -358,7 +358,8 @@ else
|
||||
print '<td><input type="submit" class="button" value="' . $langs->trans("Save") . '"></td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print "</table>";
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
/**
|
||||
* Class to manage accounting accounts
|
||||
*/
|
||||
class AccountingAccount
|
||||
class AccountingAccount extends CommonObject
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
@ -125,6 +125,7 @@ class AccountingAccount
|
||||
{
|
||||
global $conf;
|
||||
$error = 0;
|
||||
$now = dol_now();
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
@ -439,4 +440,4 @@ class AccountingAccount
|
||||
return - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
/**
|
||||
* Class to manage accountancy book keeping
|
||||
*/
|
||||
class BookKeeping
|
||||
class BookKeeping extends CommonObject
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
@ -701,4 +701,4 @@ class BookKeepingLine
|
||||
var $fk_user_author;
|
||||
var $code_journal;
|
||||
var $piece_num;
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
|
||||
@ -40,7 +40,7 @@ $id = GETPOST('id');
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
@ -51,7 +51,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||
$sql .= " WHERE rowid = " . $id;
|
||||
|
||||
|
||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql) {
|
||||
@ -60,7 +60,7 @@ if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
||||
} else {
|
||||
header("Location: ./lines.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
llxHeader("", "", "FicheVentilation");
|
||||
@ -85,38 +85,38 @@ if (! empty($id)) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accountingaccount as aa ON l.fk_code_ventilation = aa.rowid";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = l.fk_facture";
|
||||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
|
||||
|
||||
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
|
||||
dol_syslog("/accounting/customer/card.php sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
||||
|
||||
if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
|
||||
if ($num_lines) {
|
||||
|
||||
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/accountancy/customer/lines.php">'.$langs->trans("Back").'</a>';
|
||||
print_fiche_titre($langs->trans('CustomersVentilation'),$linkback,'setup');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
// Ref facture
|
||||
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
|
||||
$facture_static->ref = $objp->facnumber;
|
||||
$facture_static->id = $objp->facid;
|
||||
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
print '<tr><td width="20%">' . $langs->trans("Line") . '</td>';
|
||||
print '<td>' . nl2br($objp->description) . '</td></tr>';
|
||||
print '<tr><td width="20%">' . $langs->trans("Account") . '</td><td>';
|
||||
@ -125,10 +125,13 @@ if (! empty($id)) {
|
||||
print $formventilation->select_account($objp->fk_code_ventilation, 'codeventil', 1);
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><div align="center"><input class="button" type="submit" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '"></div>';
|
||||
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
print "Error";
|
||||
@ -141,4 +144,4 @@ if (! empty($id)) {
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -251,4 +251,4 @@ if ($result) {
|
||||
}
|
||||
|
||||
$db->close();
|
||||
llxFooter();
|
||||
llxFooter();
|
||||
|
||||
@ -167,7 +167,10 @@ if ($result) {
|
||||
}
|
||||
$links = $object->get_url($obj->rowid);
|
||||
|
||||
|
||||
// get_url may return -1 which is not traversable
|
||||
if (is_array($links))
|
||||
{
|
||||
|
||||
foreach ( $links as $key => $val )
|
||||
{
|
||||
$tabtype[$obj->rowid] = $links[$key]['type'];
|
||||
@ -249,11 +252,14 @@ if ($result) {
|
||||
$tabtp [$obj->rowid] [$accountancy_account_salary] += $obj->amount;
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$tabbq[$obj->rowid][$compta_bank] += $obj->amount;
|
||||
|
||||
// if($obj->socid)$tabtp[$obj->rowid][$compta_soc] += $obj->amount;
|
||||
|
||||
$i ++;
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
@ -417,7 +423,7 @@ if ($action == 'export_csv')
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
$sep = ";";
|
||||
|
||||
|
||||
foreach ( $tabpay as $key => $val ) {
|
||||
$date = dol_print_date($db->jdate($val["date"]), '%d%m%Y');
|
||||
|
||||
@ -502,7 +508,7 @@ if ($action == 'export_csv')
|
||||
// Third party
|
||||
if (is_array ( $tabtp[$key]))
|
||||
{
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
foreach ( $tabtp[$key] as $k => $mt )
|
||||
{
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
@ -516,7 +522,7 @@ if ($action == 'export_csv')
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
foreach ( $tabbq[$key] as $k => $mt )
|
||||
{
|
||||
if (1)
|
||||
@ -589,7 +595,7 @@ else
|
||||
|
||||
print '</div>';
|
||||
// End report
|
||||
|
||||
|
||||
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
|
||||
|
||||
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writeBookKeeping();" />';
|
||||
|
||||
@ -240,7 +240,7 @@ if ($action == 'writebookkeeping') {
|
||||
* View
|
||||
*/
|
||||
|
||||
$companystatic = new Societe($db);
|
||||
$companystatic = new Fournisseur($db);
|
||||
|
||||
// Export
|
||||
if ($action == 'export_csv')
|
||||
@ -249,7 +249,11 @@ if ($action == 'export_csv')
|
||||
$purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment;filename=journal_achats.csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv";
|
||||
else
|
||||
$filename="journal_achats.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
@ -408,7 +412,6 @@ if ($action == 'export_csv')
|
||||
$r = '';
|
||||
|
||||
$invoicestatic = new FactureFournisseur($db);
|
||||
$companystatic = new Fournisseur($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
$invoicestatic->id = $key;
|
||||
@ -471,4 +474,4 @@ if ($action == 'export_csv')
|
||||
// End of page
|
||||
llxFooter();
|
||||
}
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.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
|
||||
@ -59,6 +60,8 @@ if ($user->societe_id > 0)
|
||||
|
||||
$action = GETPOST('action');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -100,9 +103,9 @@ if (! empty($conf->multicompany->enabled)) {
|
||||
}
|
||||
$sql .= " AND f.fk_statut > 0";
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
|
||||
$sql .= " AND f.type IN (0,1,2)";
|
||||
$sql .= " AND f.type IN (0,1,2,5)";
|
||||
else
|
||||
$sql .= " AND f.type IN (0,1,2,3)";
|
||||
$sql .= " AND f.type IN (0,1,2,3,5)";
|
||||
$sql .= " AND fd.product_type IN (0,1)";
|
||||
if ($date_start && $date_end)
|
||||
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
|
||||
@ -136,6 +139,16 @@ if ($result) {
|
||||
$cpttva = (! empty($conf->global->ACCOUNTING_VAT_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_ACCOUNT : $langs->trans("CodeNotDef");
|
||||
$compta_tva = (! empty($obj->account_tva) ? $obj->account_tva : $cpttva);
|
||||
|
||||
// Situation invoices handling
|
||||
$line = new FactureLigne($db);
|
||||
$line->fetch($obj->id);
|
||||
$prev_progress = $line->get_prev_progress();
|
||||
if ($obj->situation_percent == 0) { // Avoid divide by 0
|
||||
$situation_ratio = 0;
|
||||
} else {
|
||||
$situation_ratio = ($obj->situation_percent - $prev_progress) / $obj->situation_percent;
|
||||
}
|
||||
|
||||
// Invoice lines
|
||||
$tabfac[$obj->rowid]["date"] = $obj->df;
|
||||
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
|
||||
@ -148,9 +161,9 @@ if ($result) {
|
||||
$tabht[$obj->rowid][$compta_prod] = 0;
|
||||
if (! isset($tabtva[$obj->rowid][$compta_tva]))
|
||||
$tabtva[$obj->rowid][$compta_tva] = 0;
|
||||
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
|
||||
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
|
||||
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
|
||||
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc * $situation_ratio;
|
||||
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht * $situation_ratio;
|
||||
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio;
|
||||
$tabcompany[$obj->rowid] = array (
|
||||
'id' => $obj->socid,
|
||||
'name' => $obj->name,
|
||||
@ -165,14 +178,18 @@ if ($result) {
|
||||
|
||||
/*
|
||||
* Action
|
||||
* FIXME Action must be set before any view part
|
||||
*/
|
||||
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
if ($action == 'writebookkeeping')
|
||||
{
|
||||
$now = dol_now();
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
foreach ($tabttc[$key] as $k => $mt)
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
@ -193,7 +210,7 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt) {
|
||||
if ($mt) {
|
||||
// get compte id and label
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
@ -221,8 +238,10 @@ if ($action == 'writebookkeeping') {
|
||||
|
||||
// VAT
|
||||
// var_dump($tabtva);
|
||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||
if ($mt) {
|
||||
foreach ($tabtva[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
$bookkeeping = new BookKeeping($db);
|
||||
$bookkeeping->doc_date = $val["date"];
|
||||
$bookkeeping->doc_ref = $val["ref"];
|
||||
@ -244,20 +263,26 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Export
|
||||
if ($action == 'export_csv') {
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment;filename=journal_ventes.csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv";
|
||||
else
|
||||
$filename="journal_ventes.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
|
||||
$companystatic = new Client($db);
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
$sep = ";";
|
||||
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
@ -307,9 +332,11 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else // Model Classic Export
|
||||
}
|
||||
else // Model Classic Export
|
||||
{
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$companystatic->id = $tabcompany[$key]['id'];
|
||||
$companystatic->name = $tabcompany[$key]['name'];
|
||||
$companystatic->client = $tabcompany[$key]['code_client'];
|
||||
@ -327,10 +354,11 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt)
|
||||
{
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k);
|
||||
|
||||
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
@ -343,7 +371,8 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
|
||||
// VAT
|
||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||
foreach ($tabtva[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt) {
|
||||
print '"' . $date . '"' . $sep;
|
||||
print '"' . $val["ref"] . '"' . $sep;
|
||||
@ -415,7 +444,8 @@ if ($action == 'export_csv') {
|
||||
$invoicestatic = new Facture($db);
|
||||
$companystatic = new Client($db);
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
$invoicestatic->id = $key;
|
||||
$invoicestatic->ref = $val["ref"];
|
||||
$invoicestatic->type = $val["type"];
|
||||
@ -423,7 +453,8 @@ if ($action == 'export_csv') {
|
||||
$date = dol_print_date($db->jdate($val["date"]), 'day');
|
||||
|
||||
// Third party
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
foreach ($tabttc[$key] as $k => $mt)
|
||||
{
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
|
||||
@ -439,10 +470,11 @@ if ($action == 'export_csv') {
|
||||
print "</tr>";
|
||||
|
||||
// Product / Service
|
||||
foreach ( $tabht[$key] as $k => $mt ) {
|
||||
foreach ($tabht[$key] as $k => $mt)
|
||||
{
|
||||
$accountingaccount = new AccountingAccount($db);
|
||||
$accountingaccount->fetch(null, $k);
|
||||
|
||||
|
||||
if ($mt) {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
@ -456,7 +488,8 @@ if ($action == 'export_csv') {
|
||||
}
|
||||
|
||||
// VAT
|
||||
foreach ( $tabtva[$key] as $k => $mt ) {
|
||||
foreach ($tabtva[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt) {
|
||||
print "<tr " . $bc[$var] . ">";
|
||||
print "<td>" . $date . "</td>";
|
||||
@ -477,4 +510,5 @@ if ($action == 'export_csv') {
|
||||
// End of page
|
||||
llxFooter();
|
||||
}
|
||||
$db->close();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -58,6 +58,8 @@ require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Members");
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
@ -70,42 +72,7 @@ $head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -74,42 +74,7 @@ $head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -203,9 +203,9 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center>';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -919,7 +919,7 @@ else
|
||||
print "</table>\n";
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
@ -1168,11 +1168,11 @@ else
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -1094,11 +1094,11 @@ if ($rowid)
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="add" value="'.$langs->trans("AddSubscription").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.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
|
||||
@ -1547,9 +1548,9 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoie nom clicable (avec eventuellement le picto)
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $maxlen length max libelle
|
||||
* @param string $option Page lien
|
||||
* @return string Chaine avec URL
|
||||
@ -1559,29 +1560,33 @@ class Adherent extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label = '<u>' . $langs->trans("ShowMember") . '</u>';
|
||||
$label.= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
|
||||
if (! empty($this->firstname) || ! empty($this->lastname))
|
||||
$label.= '<br><b>' . $langs->trans('Name') . ':</b> ' . $this->getFullName($langs);
|
||||
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
|
||||
if ($option == 'card')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card.php?rowid='.$this->id.$linkclose;
|
||||
$linkend='</a>';
|
||||
}
|
||||
if ($option == 'subscription')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.$linkclose;
|
||||
$linkend='</a>';
|
||||
}
|
||||
if ($option == 'category')
|
||||
{
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
||||
$lienfin='</a>';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3'.$linkclose;
|
||||
$linkend='</a>';
|
||||
}
|
||||
|
||||
$picto='user';
|
||||
$label=$langs->trans("ShowMember");
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||
if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
$result.=$lien.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$lienfin;
|
||||
$result.=$link.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -1716,18 +1721,16 @@ class Adherent extends CommonObject
|
||||
/**
|
||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||
*
|
||||
* @param User $user Objet user
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @param User $user Objet user
|
||||
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
||||
*/
|
||||
function load_board($user)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$now=dol_now();
|
||||
global $conf, $langs;
|
||||
|
||||
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
||||
|
||||
$this->nbtodo=$this->nbtodolate=0;
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT a.rowid, a.datefin";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||
@ -1738,12 +1741,24 @@ class Adherent extends CommonObject
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$langs->load("members");
|
||||
|
||||
$response = new WorkboardResponse();
|
||||
$response->warning_delay=$conf->adherent->cotisation->warning_delay/60/60/24;
|
||||
$response->label=$langs->trans("MembersWithSubscriptionToReceive");
|
||||
$response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1';
|
||||
$response->img=img_object($langs->trans("Members"),"user");
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$this->nbtodo++;
|
||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->adherent->cotisation->warning_delay)) $this->nbtodolate++;
|
||||
$response->nbtodo++;
|
||||
|
||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->adherent->cotisation->warning_delay)) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
|
||||
return $response;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -266,9 +266,9 @@ class AdherentType extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Renvoie nom clicable (avec eventuellement le picto)
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param int $maxlen length max libelle
|
||||
* @return string String with URL
|
||||
*/
|
||||
@ -277,16 +277,16 @@ class AdherentType extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
$picto='group';
|
||||
$label=$langs->trans("ShowTypeCard",$this->libelle);
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/adherents/type.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
$picto='group';
|
||||
|
||||
if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
$result.=$lien.($maxlen?dol_trunc($this->libelle,$maxlen):$this->libelle).$lienfin;
|
||||
$result.=$link.($maxlen?dol_trunc($this->libelle,$maxlen):$this->libelle).$linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -90,7 +90,7 @@ class Cotisation extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,7 @@ class Cotisation extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -181,7 +181,7 @@ class Cotisation extends CommonObject
|
||||
else
|
||||
{
|
||||
$this->db->rollback();
|
||||
$this->error=$this->db->error();
|
||||
$this->error=$this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -217,7 +217,7 @@ class Cotisation extends CommonObject
|
||||
$result=$member->fetch($this->fk_adherent);
|
||||
$result=$member->update_end_date($user);
|
||||
|
||||
if ($accountline->rowid > 0) // If we found bank account line (this means this->fk_bank defined)
|
||||
if ($accountline->id > 0) // If we found bank account line (this means this->fk_bank defined)
|
||||
{
|
||||
$result=$accountline->delete($user); // Return false if refused because line is conciliated
|
||||
if ($result > 0)
|
||||
@ -254,9 +254,9 @@ class Cotisation extends CommonObject
|
||||
|
||||
|
||||
/**
|
||||
* Renvoie nom clicable (avec eventuellement le picto)
|
||||
* Return clicable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0)
|
||||
@ -264,16 +264,16 @@ class Cotisation extends CommonObject
|
||||
global $langs;
|
||||
|
||||
$result='';
|
||||
$label=$langs->trans("ShowSubscription").': '.$this->ref;
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
$link = '<a href="'.DOL_URL_ROOT.'/adherents/fiche_subscription.php?rowid='.$this->id.'" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
|
||||
$linkend='</a>';
|
||||
|
||||
$picto='payment';
|
||||
$label=$langs->trans("ShowSubscription");
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||
if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend);
|
||||
if ($withpicto && $withpicto != 2) $result.=' ';
|
||||
$result.=$lien.$this->ref.$lienfin;
|
||||
$result.=$link.$this->ref.$linkend;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -32,6 +32,12 @@ $langs->load("members");
|
||||
|
||||
$filter=$_GET["filter"];
|
||||
$statut=isset($_GET["statut"])?$_GET["statut"]:1;
|
||||
$search_ref=GETPOST('search_ref');
|
||||
$search_lastname=GETPOST('search_lastname');
|
||||
$search_login=GETPOST('search_login');
|
||||
$search_note=GETPOST('search_note');
|
||||
$search_account=GETPOST('search_account','int');
|
||||
$search_amount=GETPOST('search_amount','int');
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
@ -43,7 +49,6 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder="DESC"; }
|
||||
if (! $sortfield) { $sortfield="c.dateadh"; }
|
||||
|
||||
$msg='';
|
||||
$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"];
|
||||
|
||||
// Security check
|
||||
@ -54,14 +59,27 @@ $result=restrictedArea($user,'adherent','','','cotisation');
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$search="";
|
||||
$search_ref="";
|
||||
$search_lastname="";
|
||||
$search_firstname="";
|
||||
$search_login="";
|
||||
$search_note="";
|
||||
$search_amount="";
|
||||
$search_account="";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("ListOfSubscriptions"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros');
|
||||
|
||||
if ($msg) print $msg.'<br>';
|
||||
|
||||
// List of subscriptions
|
||||
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe,";
|
||||
@ -77,6 +95,31 @@ if (isset($date_select) && $date_select != '')
|
||||
{
|
||||
$sql.= " AND c.dateadh LIKE '".$date_select."%'";
|
||||
}
|
||||
if ($search_ref)
|
||||
{
|
||||
if (is_numeric($search_ref)) $sql.= " AND (c.rowid = ".$db->escape($search_ref).")";
|
||||
else $sql.=" AND 1 = 2"; // Always wrong
|
||||
}
|
||||
if ($search_lastname)
|
||||
{
|
||||
$sql.= " AND (d.firstname LIKE '%".$db->escape($search_lastname)."%' OR d.lastname LIKE '%".$db->escape($search_lastname)."%' OR d.societe LIKE '%".$db->escape($search_lastname)."%')";
|
||||
}
|
||||
if ($search_login)
|
||||
{
|
||||
$sql.= " AND d.login LIKE '%".$db->escape($search_login)."%'";
|
||||
}
|
||||
if ($search_note)
|
||||
{
|
||||
$sql.= " AND c.note LIKE '%".$db->escape($search_note)."%'";
|
||||
}
|
||||
if ($search_account > 0)
|
||||
{
|
||||
$sql.= " AND b.fk_account = ".$search_account;
|
||||
}
|
||||
if ($search_amount)
|
||||
{
|
||||
$sql.=" AND c.cotisation = ".$db->escape($search_amount);
|
||||
}
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
@ -90,10 +133,23 @@ if ($result)
|
||||
if (! empty($date_select)) $title.=' ('.$langs->trans("Year").' '.$date_select.')';
|
||||
|
||||
$param="";
|
||||
$param.="&statut=$statut&date_select=$date_select";
|
||||
$param.="&statut=$statut&date_select=$date_select";
|
||||
|
||||
if ($search_lastname) $param.="&search_lastname=".$search_lastname;
|
||||
if ($search_login) $param.="&search_login=".$search_login;
|
||||
if ($search_acount) $param.="&search_account=".$search_account;
|
||||
if ($search_amount) $param.="&search_amount=".$search_amount;
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num);
|
||||
|
||||
if ($sall)
|
||||
{
|
||||
print $langs->trans("Filter")." (".$langs->trans("Ref").", ".$langs->trans("Lastname").", ".$langs->trans("Firstname").", ".$langs->trans("EMail").", ".$langs->trans("Address")." ".$langs->trans("or")." ".$langs->trans("Town")."): ".$sall;
|
||||
}
|
||||
|
||||
$param="";
|
||||
$param.="&statut=$statut&date_select=$date_select";
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].($param?'?'.$param:'').'">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -107,9 +163,47 @@ if ($result)
|
||||
}
|
||||
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"c.dateadh",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateEnd"),$_SERVER["PHP_SELF"],"c.datef",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"c.cotisation",$param,"",'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"c.cotisation",$param,"",'colspan="2" align="right"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Line for filters fields
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_ref" value="'.$search_ref.'" size="4"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_lastname" value="'.$search_lastname.'" size="12"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_login" value="'.$search_login.'" size="7"></td>';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="search_note" value="'.$search_note.'" size="7"></td>';
|
||||
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_comptes($search_account, 'search_account', 0, '', 1);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
print '<td class="liste_titre"> </td>';
|
||||
|
||||
print '<td align="right" class="liste_titre">';
|
||||
print '<input class="flat" type="text" name="search_amount" value="'.$search_amount.'" size="4">';
|
||||
print '</td><td align="right" class="liste_titre" width="60px">';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" name="button_search" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print ' ';
|
||||
print '<input type="image" class="liste_titre" src="'.img_picto($langs->trans("Search"),'searchclear.png','','',1).'" name="button_removefilter" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
// Static objects
|
||||
$cotisation=new Cotisation($db);
|
||||
$adherent=new Adherent($db);
|
||||
@ -133,11 +227,6 @@ if ($result)
|
||||
|
||||
$var=!$var;
|
||||
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
|
||||
{
|
||||
print "<form method=\"post\" action=\"cotisations.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
}
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
// Ref
|
||||
@ -167,19 +256,6 @@ if ($result)
|
||||
else
|
||||
{
|
||||
print "<td>";
|
||||
if ($allowinsertbankafter && $objp->cotisation)
|
||||
{
|
||||
print '<input type="hidden" name="action" value="2bank">';
|
||||
print '<input type="hidden" name="rowid" value="'.$objp->crowid.'">';
|
||||
$form->select_comptes('','accountid',0,'',1);
|
||||
print '<br>';
|
||||
$form->select_types_paiements('','paymenttypeid');
|
||||
print '<input name="num_chq" type="text" class="flat" size="5">';
|
||||
}
|
||||
else
|
||||
{
|
||||
print ' ';
|
||||
}
|
||||
print "</td>\n";
|
||||
}
|
||||
}
|
||||
@ -191,13 +267,10 @@ if ($result)
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
|
||||
|
||||
// Price
|
||||
print '<td align="right">'.price($objp->cotisation).'</td>';
|
||||
print '<td align="right" colspan="2">'.price($objp->cotisation).'</td>';
|
||||
|
||||
print "</tr>";
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
|
||||
{
|
||||
print "</form>\n";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -214,13 +287,11 @@ if ($result)
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print "<td align=\"right\">".price($total)."</td>\n";
|
||||
print '<td align="right" colspan="2">'.price($total)."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print "</table>";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -228,6 +299,5 @@ else
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -233,7 +233,7 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Action"),$_SERVER["PHP_SELF"],"",$param,"",'width="60" align="center"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
// Line for filters fields
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
print '<td class="liste_titre" align="left">';
|
||||
@ -264,7 +264,6 @@ if ($resql)
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
@ -366,6 +365,7 @@ if ($resql)
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</form>';
|
||||
|
||||
if ($num > $conf->liste_limit)
|
||||
{
|
||||
|
||||
@ -273,9 +273,11 @@ if ($action == 'create')
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
print '<center><input type="submit" name="button" class="button" value="'.$langs->trans("Add").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -680,8 +682,11 @@ if ($rowid > 0)
|
||||
print '</table><br><br>';
|
||||
}
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
@ -184,9 +184,9 @@ if (! empty($triggers))
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Save").'">';
|
||||
print "</center>";
|
||||
print "</div>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -76,41 +76,7 @@ $head=agenda_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Agenda"), 0, 'action');
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
@ -220,9 +220,9 @@ while ($i <= $MAXAGENDA)
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center>';
|
||||
print "<input type=\"submit\" id=\"save\" name=\"save\" class=\"button hideifnotset\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" id="save" name="save" class="button hideifnotset" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ print '</td></tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><input class="button" type="submit" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></center>';
|
||||
print '<div class="center"><input class="button" type="submit" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -136,9 +136,9 @@ print "</tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
print "</div>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
599
htdocs/admin/askpricesupplier.php
Normal file
599
htdocs/admin/askpricesupplier.php
Normal file
@ -0,0 +1,599 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/askpricesupplier/class/askpricesupplier.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/askpricesupplier.lib.php';
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load('other');
|
||||
$langs->load('askpricesupplier');
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$type='askpricesupplier';
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
$error=0;
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconstaskpricesupplier=GETPOST('maskconstaskpricesupplier','alpha');
|
||||
$maskaskpricesupplier=GETPOST('maskaskpricesupplier','alpha');
|
||||
if ($maskconstaskpricesupplier) $res = dolibarr_set_const($db,$maskconstaskpricesupplier,$maskaskpricesupplier,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module','alpha');
|
||||
|
||||
$askpricesupplier = new AskPriceSupplier($db);
|
||||
$askpricesupplier->initAsSpecimen();
|
||||
|
||||
// Search template files
|
||||
$file=''; $classname=''; $filefound=0;
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
foreach($dirmodels as $reldir)
|
||||
{
|
||||
$file=dol_buildpath($reldir."core/modules/askpricesupplier/doc/pdf_".$modele.".modules.php");
|
||||
if (file_exists($file))
|
||||
{
|
||||
$filefound=1;
|
||||
$classname = "pdf_".$modele;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filefound)
|
||||
{
|
||||
require_once $file;
|
||||
|
||||
$module = new $classname($db);
|
||||
|
||||
if ($module->write_file($askpricesupplier,$langs) > 0)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=askpricesupplier&file=SPECIMEN.pdf");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($module->error,'errors');
|
||||
dol_syslog($module->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_ASKPRICESUPPLIER_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft = GETPOST('ASKPRICESUPPLIER_DRAFT_WATERMARK','alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "ASKPRICESUPPLIER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_ASKPRICESUPPLIER_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('ASKPRICESUPPLIER_FREE_TEXT'); // No alpha here, we want exact string
|
||||
|
||||
$res = dolibarr_set_const($db, "ASKPRICESUPPLIER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
$post_size=count($_POST);
|
||||
|
||||
$db->begin();
|
||||
|
||||
for($i=0;$i < $post_size;$i++)
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
if ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
{
|
||||
if ($conf->global->ASKPRICESUPPLIER_ADDON_PDF == "$value") dolibarr_del_const($db, 'ASKPRICESUPPLIER_ADDON_PDF',$conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "ASKPRICESUPPLIER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
$conf->global->ASKPRICESUPPLIER_ADDON_PDF = $value;
|
||||
}
|
||||
|
||||
// On active le modele
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
|
||||
dolibarr_set_const($db, "ASKPRICESUPPLIER_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Affiche page
|
||||
*/
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
|
||||
llxHeader('',$langs->trans("AskPriceSupplierSetup"));
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
//if ($mesg) print $mesg;
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'setup');
|
||||
|
||||
$head = askpricesupplier_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'askpricesupplier');
|
||||
|
||||
/*
|
||||
* Module numerotation
|
||||
*/
|
||||
print_titre($langs->trans("AskPriceSupplierNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name")."</td>\n";
|
||||
print '<td>'.$langs->trans("Description")."</td>\n";
|
||||
print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
clearstatcache();
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/askpricesupplier/");
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, 0, 21) == 'mod_askpricesupplier_' && substr($file, dol_strlen($file)-3, 3) == 'php')
|
||||
{
|
||||
$file = substr($file, 0, dol_strlen($file)-4);
|
||||
|
||||
require_once $dir.$file.'.php';
|
||||
|
||||
$module = new $file;
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||
print $module->info();
|
||||
print '</td>';
|
||||
|
||||
// Show example of numbering module
|
||||
print '<td class="nowrap">';
|
||||
$tmp=$module->getExample();
|
||||
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
if ($conf->global->ASKPRICESUPPLIER_ADDON == "$file")
|
||||
{
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
$askpricesupplier=new AskPriceSupplier($db);
|
||||
$askpricesupplier->initAsSpecimen();
|
||||
|
||||
// Info
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$askpricesupplier->type=0;
|
||||
$nextval=$module->getNextValue($mysoc,$askpricesupplier);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
print "</table><br>\n";
|
||||
|
||||
|
||||
/*
|
||||
* Document templates generators
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("AskPriceSupplierPDFModules"));
|
||||
|
||||
// Load array def with activated templates
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql.= " WHERE type = '".$type."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
$num_rows=$db->num_rows($resql);
|
||||
while ($i < $num_rows)
|
||||
{
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
print " <td>".$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Description")."</td>\n";
|
||||
print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
foreach (array('','/doc') as $valdir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/askpricesupplier".$valdir);
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
$filelist[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
|
||||
foreach($filelist as $file)
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
{
|
||||
if (file_exists($dir.'/'.$file))
|
||||
{
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified)
|
||||
{
|
||||
$var = !$var;
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print '</td>';
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print '<td align="center">'."\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Defaut
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->ASKPRICESUPPLIER_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'bill').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
/*
|
||||
* Other options
|
||||
*
|
||||
*/
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print "<td>".$langs->trans("Parameter")."</td>\n";
|
||||
print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
|
||||
print "<td> </td>\n";
|
||||
print "</tr>";
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_ASKPRICESUPPLIER_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnAskPriceSupplier").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="ASKPRICESUPPLIER_FREE_TEXT" class="flat" cols="120">'.$conf->global->ASKPRICESUPPLIER_FREE_TEXT.'</textarea>';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"set_ASKPRICESUPPLIER_DRAFT_WATERMARK\">";
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("WatermarkOnDraftAskPriceSupplier").'<br>';
|
||||
print '<input size="50" class="flat" type="text" name="ASKPRICESUPPLIER_DRAFT_WATERMARK" value="'.$conf->global->ASKPRICESUPPLIER_DRAFT_WATERMARK.'">';
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER").'</td><td> </td><td align="right">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ASKPRICESUPPLIER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Directory
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("PathToDocuments"));
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
print " <td>".$langs->trans("Name")."</td>\n";
|
||||
print " <td>".$langs->trans("Value")."</td>\n";
|
||||
print "</tr>\n";
|
||||
print "<tr ".$bc[false].">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->askpricesupplier->dir_output."</td>\n</tr>\n";
|
||||
print "</table>\n<br>";
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013-2014 Philippe Grand <philippe.grand@atoo-net.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
|
||||
@ -26,6 +26,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
@ -86,9 +87,15 @@ $form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_BANK_CHEQUERECEIPT_FREE_TEXT">';
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
dol_fiche_head($head, 'general', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameters").'</td>';
|
||||
@ -98,9 +105,7 @@ print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_BANK_CHEQUERECEIPT_FREE_TEXT">';
|
||||
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnChequeReceipts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="BANK_CHEQUERECEIPT_FREE_TEXT" class="flat" cols="120">'.$conf->global->BANK_CHEQUERECEIPT_FREE_TEXT.'</textarea>';
|
||||
@ -184,6 +189,10 @@ while ($i < $nbofbank)
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
$db->close();
|
||||
dol_fiche_end();
|
||||
|
||||
print '</form>';
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
118
htdocs/admin/bank_extrafields.php
Normal file
118
htdocs/admin/bank_extrafields.php
Normal file
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/bank_extrafields.php
|
||||
* \ingroup bank
|
||||
* \brief Page to setup extra fields of bank
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
$langs->load("banks");
|
||||
$langs->load("admin");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
|
||||
// List of supported format
|
||||
$tmptype2label=ExtraFields::$type2label;
|
||||
$type2label=array('');
|
||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='bank_account'; //Must be the $element of the class that manage extrafield
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject = $langs->transnoentitiesnoconv("Bank");
|
||||
|
||||
llxHeader('',$langs->trans("BankSetupModule"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'setup');
|
||||
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("BankSetupModule"), 0, 'account');
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Buttons
|
||||
if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute")."</a>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Edition d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -318,7 +318,6 @@ if (! isset($_SERVER['WINDIR']))
|
||||
print '</td>';
|
||||
print '<td width="60" align="center"><input type="submit" class="button" name="submit_GENBARCODE_LOCATION" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
// Module products
|
||||
@ -350,6 +349,7 @@ if (! empty($conf->societe->enabled))
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
print '</form>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -50,8 +50,7 @@ if ($action == 'addconst')
|
||||
dolibarr_set_const($db, "MAIN_BOXES_MAXLINES",$_POST["MAIN_BOXES_MAXLINES"],'',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
if ($action == 'add') {
|
||||
$error=0;
|
||||
$db->begin();
|
||||
if (isset($_POST['boxid']) && is_array($_POST['boxid']))
|
||||
@ -368,7 +367,6 @@ foreach($boxtoadd as $box)
|
||||
print '<td class="center">';
|
||||
print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n";
|
||||
print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
|
||||
//print '<input type="checkbox" class="flat" name="boxid['.$box->box_id.'][active]">'."\n";
|
||||
print '</td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
|
||||
@ -94,7 +94,7 @@ print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
||||
print '<div class="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
|
||||
print '</form><br><br>';
|
||||
|
||||
|
||||
@ -348,18 +348,16 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$commande->type=0;
|
||||
$nextval=$module->getNextValue($mysoc,$commande);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
@ -624,9 +622,29 @@ else
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("Notifications"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
|
||||
print '</td><td align="right">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -668,11 +668,11 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
}
|
||||
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -135,7 +135,6 @@ print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
|
||||
print "</td></tr>\n";
|
||||
print '<tr '.$bc[true].'><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"'.($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeVirtual').'</td>';
|
||||
print '<td colspan="2">'.nl2br($langs->trans('OptionModeVirtualDesc'))."</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
@ -163,11 +162,10 @@ foreach ($list as $key)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
print "</table>\n";
|
||||
|
||||
print '<br /><br /><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
|
||||
print '</form>';
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.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
|
||||
@ -299,18 +299,16 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$nextval=$module->getNextValue($mysoc,$contract);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
@ -509,7 +507,6 @@ print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnContracts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="CONTRACT_FREE_TEXT" class="flat" cols="120">'.$conf->global->CONTRACT_FREE_TEXT.'</textarea>';
|
||||
print '</td></tr>'."\n";
|
||||
print '</form>';
|
||||
|
||||
//Use draft Watermark
|
||||
$var=!$var;
|
||||
|
||||
@ -177,7 +177,7 @@ if ($action == 'edit')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||
* Copyright (C) 2012-2013 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
|
||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2011-2015 Alexandre Spangaro <alexandre.spangaro@gmail.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
|
||||
@ -316,7 +316,7 @@ $tabcond[13]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabl
|
||||
$tabcond[14]= (! empty($conf->product->enabled) && ! empty($conf->ecotax->enabled));
|
||||
$tabcond[15]= true;
|
||||
$tabcond[16]= (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS));
|
||||
$tabcond[17]= ! empty($conf->deplacement->enabled);
|
||||
$tabcond[17]= (! empty($conf->deplacement->enabled) || ! empty($conf->expensereport->enabled));
|
||||
$tabcond[18]= ! empty($conf->expedition->enabled);
|
||||
$tabcond[19]= ! empty($conf->societe->enabled);
|
||||
$tabcond[20]= ! empty($conf->fournisseur->enabled);
|
||||
|
||||
@ -324,18 +324,16 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$nextval=$module->getNextValue($mysoc,$expedition);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
|
||||
499
htdocs/admin/expensereport.php
Normal file
499
htdocs/admin/expensereport.php
Normal file
@ -0,0 +1,499 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.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
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/expensereport.php
|
||||
* \ingroup expensereport
|
||||
* \brief Setup page of module ExpenseReport
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("errors");
|
||||
$langs->load("trips");
|
||||
$langs->load('other');
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
$value = GETPOST('value','alpha');
|
||||
$label = GETPOST('label','alpha');
|
||||
$scandir = GETPOST('scandir','alpha');
|
||||
$type='expensereport';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
if ($action == 'updateMask')
|
||||
{
|
||||
$maskconst=GETPOST('maskconst','alpha');
|
||||
$maskvalue=GETPOST('maskvalue','alpha');
|
||||
if ($maskconst) $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen') // For fiche inter
|
||||
{
|
||||
$modele= GETPOST('module','alpha');
|
||||
|
||||
$inter = new ExpenseReport($db);
|
||||
$inter->initAsSpecimen();
|
||||
|
||||
// Search template files
|
||||
$file=''; $classname=''; $filefound=0;
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
foreach($dirmodels as $reldir)
|
||||
{
|
||||
$file=dol_buildpath($reldir."core/modules/expensereport/doc/pdf_".$modele.".modules.php",0);
|
||||
if (file_exists($file))
|
||||
{
|
||||
$filefound=1;
|
||||
$classname = "pdf_".$modele;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($filefound)
|
||||
{
|
||||
require_once $file;
|
||||
|
||||
$module = new $classname($db);
|
||||
|
||||
if ($module->write_file($inter,$langs) > 0)
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expensereport&file=SPECIMEN.pdf");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($obj->error,'errors');
|
||||
dol_syslog($obj->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("ErrorModuleNotFound"),'errors');
|
||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
$post_size=count($_POST);
|
||||
|
||||
$db->begin();
|
||||
|
||||
for($i=0;$i < $post_size;$i++)
|
||||
{
|
||||
if (array_key_exists('param'.$i,$_POST))
|
||||
{
|
||||
$param=GETPOST("param".$i,'alpha');
|
||||
$value=GETPOST("value".$i,'alpha');
|
||||
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
else if ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
{
|
||||
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF',$conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->EXPENSEREPORT_ADDON_PDF = $value;
|
||||
}
|
||||
|
||||
// On active le modele
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
|
||||
dolibarr_set_const($db, "EXPENSEREPORT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'set_EXPENSEREPORT_FREE_TEXT')
|
||||
{
|
||||
$freetext= GETPOST('EXPENSEREPORT_FREE_TEXT','alpha');
|
||||
$res = dolibarr_set_const($db, "EXPENSEREPORT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_EXPENSEREPORT_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft= GETPOST('EXPENSEREPORT_DRAFT_WATERMARK','alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'setup');
|
||||
|
||||
|
||||
$head=expensereport_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), 0, 'trip');
|
||||
|
||||
// Interventions numbering model
|
||||
/*
|
||||
print_titre($langs->trans("FicheinterNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/fichinter/");
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
$var=true;
|
||||
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (preg_match('/^(mod_.*)\.php$/i',$file,$reg))
|
||||
{
|
||||
$file = $reg[1];
|
||||
$classname = substr($file,4);
|
||||
|
||||
require_once $dir.$file.'.php';
|
||||
|
||||
$module = new $file;
|
||||
|
||||
if ($module->isEnabled())
|
||||
{
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$module->nom."</td><td>\n";
|
||||
print $module->info();
|
||||
print '</td>';
|
||||
|
||||
// Show example of numbering model
|
||||
print '<td class="nowrap">';
|
||||
$tmp=$module->getExample();
|
||||
if (preg_match('/^Error/',$tmp)) print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
|
||||
else print $tmp;
|
||||
print '</td>'."\n";
|
||||
|
||||
print '<td align="center">';
|
||||
if ($conf->global->FICHEINTER_ADDON == $classname)
|
||||
{
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$classname.'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
$ficheinter=new Fichinter($db);
|
||||
$ficheinter->initAsSpecimen();
|
||||
|
||||
// Info
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$nextval=$module->getNextValue($mysoc,$ficheinter);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</table><br>';
|
||||
*/
|
||||
|
||||
/*
|
||||
* Documents models for Interventions
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("TemplatePDFExpenseReports"));
|
||||
|
||||
// Defini tableau def des modeles
|
||||
$type='expensereport';
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql.= " WHERE type = '".$type."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
$num_rows=$db->num_rows($resql);
|
||||
while ($i < $num_rows)
|
||||
{
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$var=true;
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/expensereport/doc");
|
||||
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
$filelist[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
|
||||
foreach($filelist as $file)
|
||||
{
|
||||
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
|
||||
{
|
||||
|
||||
if (file_exists($dir.'/'.$file))
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
$name = substr($file, 4, dol_strlen($file) -16);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified=1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
|
||||
|
||||
if ($modulequalified)
|
||||
{
|
||||
print '<tr '.$bc[$var].'><td width="100">';
|
||||
print (empty($module->name)?$name:$module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module,'info')) print $module->info($langs);
|
||||
else print $module->description;
|
||||
print '</td>';
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||
print '</a>';
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<td align=\"center\">\n";
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Default"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
$htmltooltip.='<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,-1,0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'intervention').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_object($langs->trans("PreviewNotAvailable"),'generic');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -214,11 +214,11 @@ print '<td>http://news.google.com/news?ned=us&topic=h&output=rss<br>http://www.d
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<center><br>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="norss" value="'.($lastexternalrss+1).'">';
|
||||
print '<br><br>';
|
||||
print '</div><br><br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ else if ($action == 'setdoc')
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->FACTURE_ADDON_PDF = $value;
|
||||
}
|
||||
|
||||
|
||||
// On active le modele
|
||||
$ret = delDocumentModel($value, $type);
|
||||
if ($ret > 0)
|
||||
@ -341,7 +341,7 @@ foreach ($dirmodels as $reldir)
|
||||
// Check if there is a filter on country
|
||||
preg_match('/\-(.*)_(.*)$/',$classname,$reg);
|
||||
if (! empty($reg[2]) && $reg[2] != strtoupper($mysoc->country_code)) continue;
|
||||
|
||||
|
||||
$classname = preg_replace('/\-.*$/','',$classname);
|
||||
if (! class_exists($classname) && is_readable($dir.$filebis) && (preg_match('/mod_/',$filebis) || preg_match('/mod_/',$classname)) && substr($filebis, dol_strlen($filebis)-3, 3) == 'php')
|
||||
{
|
||||
@ -393,61 +393,53 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$facture->type=0;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=$langs->trans("NextValueForInvoices").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
// Example for remplacement
|
||||
$facture->type=1;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
$htmltooltip.=$langs->trans("NextValueForReplacements").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=$langs->trans("NextValueForReplacements").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Example for credit invoice
|
||||
$facture->type=2;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=$langs->trans("NextValueForCreditNotes").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
// Example for deposit invoice
|
||||
$facture->type=3;
|
||||
$nextval=$module->getNextValue($mysoc,$facture);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=$langs->trans("NextValueForDeposit").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error);
|
||||
}
|
||||
}
|
||||
@ -638,7 +630,6 @@ print '</table>';
|
||||
|
||||
/*
|
||||
* Modes de reglement
|
||||
*
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"));
|
||||
@ -819,7 +810,27 @@ print '</tr>'."\n";
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
//dol_fiche_end();
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("Notifications"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
|
||||
print '</td><td align="right">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ else
|
||||
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,$mode,'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
|
||||
$editor->Create();
|
||||
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||
print '<br><div class="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></div>'."\n";
|
||||
print '<div id="divforlog"></div>';
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
@ -221,7 +221,7 @@ else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
||||
elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
||||
{
|
||||
$val = GETPOST('FICHINTER_PRINT_PRODUCTS','alpha');
|
||||
$res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS",($val == 'on'),'bool',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FICHINTER_PRINT_PRODUCTS",($val == 'on' ? 1 : 0),'bool',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@ -328,10 +328,16 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$nextval=$module->getNextValue($mysoc,$ficheinter);
|
||||
if ($nextval != $langs->trans("NotAvailable"))
|
||||
{
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': '.$nextval;
|
||||
}
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
|
||||
@ -53,29 +53,31 @@ $searchformmodule=array('Module1Name','Module1Name','Module50Name','Module50Name
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_HTML5", $_POST["MAIN_ACTIVATE_HTML5"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE", $_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT",$_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT", $_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||
|
||||
// This one is not always defined
|
||||
if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity);
|
||||
@ -174,6 +176,27 @@ if ($action == 'edit') // Edit
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableHtml5").'</td><td>';
|
||||
print $form->selectyesno('MAIN_ACTIVATE_HTML5',$conf->global->MAIN_ACTIVATE_HTML5,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableFileCache").'</td><td>';
|
||||
print $form->selectyesno('MAIN_ACTIVATE_FILECACHE',$conf->global->MAIN_ACTIVATE_FILECACHE,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Max size of lists
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
@ -288,9 +311,9 @@ if ($action == 'edit') // Edit
|
||||
print '</table>'."\n";
|
||||
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
@ -354,6 +377,23 @@ else // Show
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableHtml5").'</td><td>' . yn($conf->global->MAIN_ACTIVATE_HTML5) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableFileCache").'</td><td>' . yn($conf->global->MAIN_ACTIVATE_FILECACHE) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
|
||||
@ -109,7 +109,7 @@ if (empty($reshook))
|
||||
print "<br>";
|
||||
|
||||
// Show logo
|
||||
print '<center><div class="logo_setup"></div></center>';
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ print '</td><td>secret</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -126,9 +126,9 @@ if ($action == 'edit')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
@ -309,15 +309,13 @@ foreach ($dirmodels as $reldir)
|
||||
$htmltooltip='';
|
||||
$htmltooltip.=''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
|
||||
$nextval=$module->getNextValue($mysoc,$livraison);
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) // Keep " on nextval
|
||||
{
|
||||
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
|
||||
$htmltooltip.=''.$langs->trans("NextValue").': ';
|
||||
if ($nextval)
|
||||
{
|
||||
if ($nextval) {
|
||||
if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
|
||||
$nextval = $langs->trans($nextval);
|
||||
$htmltooltip.=$nextval.'<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$htmltooltip.=$langs->trans($module->error).'<br>';
|
||||
}
|
||||
}
|
||||
|
||||
119
htdocs/admin/loan.php
Normal file
119
htdocs/admin/loan.php
Normal file
@ -0,0 +1,119 @@
|
||||
<?php
|
||||
/* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.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
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/loan.php
|
||||
* \ingroup loan
|
||||
* \brief Setup page to configure loan module
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("loan");
|
||||
|
||||
// Security check
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
// Other parameters LOAN_*
|
||||
$list = array (
|
||||
'LOAN_ACCOUNTING_ACCOUNT_CAPITAL',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INTEREST',
|
||||
'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'
|
||||
);
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
foreach ($list as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigLoan'),$linkback,'setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
/*
|
||||
* Params
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('Options') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
foreach ($list as $key)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
print '<tr '.$bc[$var].' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td><label for="'.$key.'">'.$label.'</label></td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '</tr>';
|
||||
|
||||
print '</form>';
|
||||
print "</table>\n";
|
||||
|
||||
print '<br /><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -48,11 +48,14 @@ if ($action == 'setvalue')
|
||||
$mailerror = GETPOST('MAILING_EMAIL_ERRORSTO','alpha');
|
||||
$checkread = GETPOST('value','alpha');
|
||||
$checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY','alpha');
|
||||
$mailingdelay = GETPOST('MAILING_DELAY', 'int');
|
||||
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_FROM",$mailfrom,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_ERRORSTO",$mailerror,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
$res=dolibarr_set_const($db, "MAILING_DELAY",$mailingdelay,'chaine',0,'',$conf->entity);
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
// Create temporary encryption key if nedded
|
||||
$res=dolibarr_set_const($db, "MAILING_EMAIL_UNSUBSCRIBE_KEY",$checkread_key,'chaine',0,'',$conf->entity);
|
||||
@ -124,6 +127,12 @@ print '<input size="32" type="text" name="MAILING_EMAIL_ERRORSTO" value="'.$conf
|
||||
if (!empty($conf->global->MAILING_EMAIL_ERRORSTO) && ! isValidEmail($conf->global->MAILING_EMAIL_ERRORSTO)) print ' '.img_warning($langs->trans("BadEMail"));
|
||||
print '</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("MailingDelay").'</td><td>';
|
||||
print '<input size="32" type="text" name="MAILING_DELAY" value="'.$conf->global->MAILING_DELAY.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Constant to add salt into the unsubscribe and check read tag.
|
||||
// It is also used as a security key parameter.
|
||||
$var=!$var;
|
||||
|
||||
@ -162,11 +162,11 @@ $var=true;
|
||||
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
//$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
//$lien.=$langs->trans("Disable");
|
||||
$lien.=img_picto($langs->trans("Activated"),'switch_on');
|
||||
$lien.='</a>';
|
||||
//$link=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
//$link.=$langs->trans("Disable");
|
||||
$link.=img_picto($langs->trans("Activated"),'switch_on');
|
||||
$link.='</a>';
|
||||
// Edition des varibales globales
|
||||
$constantes=array(
|
||||
'ADHERENT_MAILMAN_ADMINPW',
|
||||
@ -175,7 +175,7 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
'ADHERENT_MAILMAN_LISTS'
|
||||
);
|
||||
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $lien,'');
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -207,11 +207,11 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
}
|
||||
else
|
||||
{
|
||||
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_MAILMAN">';
|
||||
//$lien.=img_$langs->trans("Activate")
|
||||
$lien.=img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$lien.='</a>';
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $lien,'');
|
||||
$link='<a href="'.$_SERVER["PHP_SELF"].'?action=set&value=1&name=ADHERENT_USE_MAILMAN">';
|
||||
//$link.=img_$langs->trans("Activate")
|
||||
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$link.='</a>';
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user