Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
@ -287,10 +287,13 @@ script:
|
|||||||
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
php upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log
|
||||||
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
||||||
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
|
||||||
|
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
|
||||||
|
php upgrade2.php 4.0.0 5.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||||
|
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
|
||||||
cd -
|
cd -
|
||||||
set +e
|
set +e
|
||||||
echo
|
echo
|
||||||
#cat $TRAVIS_BUILD_DIR/upgrade390400-2.log
|
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
|
||||||
#cat /tmp/dolibarr_install.log
|
#cat /tmp/dolibarr_install.log
|
||||||
|
|
||||||
- |
|
- |
|
||||||
|
|||||||
@ -52,7 +52,7 @@ jQuery Mobile 1.3.0 GPL and MIT License Yes
|
|||||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||||
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
|
||||||
jsGantt 1.2 BSD License Yes JS library (to build Gantt reports)
|
jsGanttImproved 1.7.5.2 BSD License Yes JS library (to build Gantt reports)
|
||||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||||
|
|
||||||
For licenses compatibility informations:
|
For licenses compatibility informations:
|
||||||
|
|||||||
114
ChangeLog
@ -12,9 +12,23 @@ Upgrading to any other version or any other database system is abolutely require
|
|||||||
make a Dolibarr upgrade.
|
make a Dolibarr upgrade.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 5.0.0 compared to 4.0.* *****
|
||||||
|
For users:
|
||||||
|
...
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regression for some external modules, but were necessary to make
|
||||||
|
Dolibarr better:
|
||||||
|
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
|
||||||
|
check you make a fetch on object before calling the delete.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
***** ChangeLog for 4.0.0 compared to 3.9.* *****
|
||||||
For users:
|
For users:
|
||||||
|
|
||||||
NEW: Add reccuring invoice feature and automatic generation of invoices.
|
NEW: Add reccuring invoice feature and automatic generation of invoices.
|
||||||
NEW: Add module "Loan" as stable.
|
NEW: Add module "Loan" as stable.
|
||||||
NEW: Add module "Supplier commercial proposal" (price request) is set to stable status.
|
NEW: Add module "Supplier commercial proposal" (price request) is set to stable status.
|
||||||
@ -120,7 +134,6 @@ NEW: When creating a template invoice from a draft invoice, if there is link to
|
|||||||
NEW: When emailing is not sent completely, show progression.
|
NEW: When emailing is not sent completely, show progression.
|
||||||
|
|
||||||
For developers:
|
For developers:
|
||||||
|
|
||||||
NEW: Add a css class style called 'reposition', so when clicking on a link with this class will move scrollbarr to be placed at same page location.
|
NEW: Add a css class style called 'reposition', so when clicking on a link with this class will move scrollbarr to be placed at same page location.
|
||||||
NEW: TimeZone can be supplied to mktime
|
NEW: TimeZone can be supplied to mktime
|
||||||
NEW: hook in shipment card
|
NEW: hook in shipment card
|
||||||
@ -161,7 +174,41 @@ So if you included it into your module, change your code like this to be compati
|
|||||||
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
|
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
|
||||||
|
FIX: #4383 $userid not defined
|
||||||
|
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||||
|
FIX: #4455
|
||||||
|
FIX: #4749
|
||||||
|
FIX: #4756
|
||||||
|
FIX: #4828
|
||||||
|
FIX: #4926
|
||||||
|
FIX: #4964 buyprice in customer from shipping buyprice wasn't load in expedition::fetch_lines
|
||||||
|
FIX: #5004
|
||||||
|
FIX: #5068
|
||||||
|
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
|
||||||
|
FIX: #5338 use of not initialized var $aphour, $apmin, etc
|
||||||
|
FIX: #5343
|
||||||
|
FIX: #5380
|
||||||
|
FIX: #5383 bad object id on don delete
|
||||||
|
FIX: #5414
|
||||||
|
FIX: #5470 User of expense report in bank transactions page is not correct
|
||||||
|
FIX: a case of corrupted ODT by Word that insert <text:s> when it should not.
|
||||||
|
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
|
||||||
|
FIX: dasboard wrong for late invoice
|
||||||
|
FIX: duplicate jquery.js files
|
||||||
|
FIX: extrafield cloned on project clone
|
||||||
|
FIX: Failed to open file
|
||||||
|
FIX: Filter on opportunity amount and budget
|
||||||
|
FIX: form_confirm to delete payment on supplier invoice
|
||||||
|
FIX: javascript error with german-switzerland language
|
||||||
|
FIX: large expense note
|
||||||
|
FIX: Missing original .js file (license violation if sources are not provided)
|
||||||
|
FIX: Option strict mode compatibility
|
||||||
|
FIX: product stats all bloc module without enbaled test
|
||||||
|
FIX: receiving link never works
|
||||||
|
FIX: task ODT company object not correctly retrieved
|
||||||
|
FIX: Translate group perms as it is done into user perms
|
||||||
|
FIX: We must take the last recent defined price when using price level
|
||||||
|
|
||||||
***** ChangeLog for 3.9.2 compared to 3.9.1 *****
|
***** ChangeLog for 3.9.2 compared to 3.9.1 *****
|
||||||
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
|
FIX: #4813 Won translation for the key OppStatusWON instead OppStatusWIN
|
||||||
@ -426,6 +473,67 @@ This is list of hooks modified:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.8.5 compared to 3.8.4 *****
|
||||||
|
FIX: #3815 Call to undefined function local_by_date().
|
||||||
|
FIX: #4424 Missing email of user popup in supplier orders area
|
||||||
|
FIX: #4442 Missing translation in Banks menu
|
||||||
|
FIX: #4448 $filebonprev is not used, $this->filename now
|
||||||
|
FIX: #4455
|
||||||
|
FIX: #4737 Bank transacion type selector translation is cropped
|
||||||
|
FIX: #4742 Able to delete a supplier invoice with a registered payment
|
||||||
|
FIX: #4743 UI glitch in project summary page
|
||||||
|
FIX: #4747 Missing UI background when registering a supplier invoice payment
|
||||||
|
FIX: #4748 Supplier invoice payment confirmation amount is not translated
|
||||||
|
FIX: #4749
|
||||||
|
FIX: #4756
|
||||||
|
FIX: #4766 VAT not shown in supplier invoice popup
|
||||||
|
FIX: #4809 - Duplicate functions with different content
|
||||||
|
FIX: #4851 Project selector in supplier invoices shows the project label twice
|
||||||
|
FIX: #4870
|
||||||
|
FIX: #5008 SQL error when editing the reference of a supplier invoice that already exists
|
||||||
|
FIX: #5048 Product supplier list display only one produc
|
||||||
|
FIX: #5170 tva sign with INVOICE_POSITIVE_CREDIT_NOTE option
|
||||||
|
FIX: #5203
|
||||||
|
FIX: #5207
|
||||||
|
FIX: #5338 use of not initialized var $aphour, $apmin, etc
|
||||||
|
FIX: #5380
|
||||||
|
FIX: #5383 bad object id on don delete
|
||||||
|
FIX: #5474 Country_id of "Don" object is still empty
|
||||||
|
FIX: Accountancy - 3.8 - Chart of accounts are limited on only one country
|
||||||
|
FIX: Bad include and param for project numbering module call
|
||||||
|
FIX: Box disabled because bugged
|
||||||
|
FIX: bug on email template
|
||||||
|
FIX: Can correct stock of lot using eatby or sell by date
|
||||||
|
FIX: Can make a movement on "out of sell" products
|
||||||
|
FIX: Can't create thirdparty or validate invoice if profid is mandatory and profid does not exists for other countries
|
||||||
|
FIX: can't fetch by siret or siren because of first "if"
|
||||||
|
FIX: Check stock of product by warehouse if $entrepot_id defined on shippings
|
||||||
|
FIX: correct display of minimum buying price
|
||||||
|
FIX: Creation of thumb image for size "small" was not done.
|
||||||
|
FIX: Direction of movement lost if an error occurs
|
||||||
|
FIX: dont retrieve new buying price on margin display
|
||||||
|
FIX: Duplicate records into export
|
||||||
|
FIX: Email templates not compatible with Multicompany
|
||||||
|
FIX: end of select when no fournprice
|
||||||
|
FIX: finished parameters not used
|
||||||
|
FIX: hook on group card called but not initialized
|
||||||
|
FIX: It doesn't check if there is enough stock to update the lines of orders/invoices
|
||||||
|
FIX: large expense note
|
||||||
|
FIX: missing column when module was installed before standard integration
|
||||||
|
FIX: Missing database escaping on supplier price insert/update
|
||||||
|
FIX: Not filtering correctly when come from dashboard
|
||||||
|
FIX: PROPAL_MERGE_PDF with PRODUCT_USE_OLD_PATH
|
||||||
|
FIX: real min buying price
|
||||||
|
FIX: receiving link never works
|
||||||
|
FIX: same page added several times on mergepropal option
|
||||||
|
FIX: search on date into supplier invoice list dont work because of status -1
|
||||||
|
FIX: Search supplier ref on contract
|
||||||
|
FIX: SQL error function on getAvailableDiscounts function, on bill create mode if socid is empty
|
||||||
|
FIX: systematic rounding causes prices to be updated without reason
|
||||||
|
FIX: task ODT company object not correctly retrieved
|
||||||
|
FIX: Template email must take care of positino column
|
||||||
|
FIX: VAT rate can be negative. Example spain selling to morroco.
|
||||||
|
|
||||||
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
|
***** ChangeLog for 3.8.4 compared to 3.8.3 *****
|
||||||
FIX: #3694
|
FIX: #3694
|
||||||
FIX: #3798 #2519 Cron jobs would never be executed
|
FIX: #3798 #2519 Cron jobs would never be executed
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Ubuntu) ou DoliRpm (la version tout-en-un de Dolibarr pour Fedora, Redhat,
|
|||||||
OpenSuse, Mandriva ou Mageia).
|
OpenSuse, Mandriva ou Mageia).
|
||||||
|
|
||||||
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
|
Vous pouvez les télécharger depuis la rubrique *download* du portail officiel:
|
||||||
http://www.dolibarr.org/
|
https://www.dolibarr.org/
|
||||||
|
|
||||||
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (Mysql),
|
Si vous avez déjà installé un serveur Web avec PHP et une base de donnée (Mysql),
|
||||||
vous pouvez installer Dolibarr avec cette version de la manière suivante:
|
vous pouvez installer Dolibarr avec cette version de la manière suivante:
|
||||||
@ -139,13 +139,13 @@ Suivez le projet Dolibarr project sur les réseaux francophones
|
|||||||
|
|
||||||
- Facebook: <https://www.facebook.com/dolibarr.fr>
|
- Facebook: <https://www.facebook.com/dolibarr.fr>
|
||||||
- Google+: <https://plus.google.com/+DolibarrFrance>
|
- Google+: <https://plus.google.com/+DolibarrFrance>
|
||||||
- Twitter: <http://www.twitter.com/dolibarr_france>
|
- Twitter: <https://www.twitter.com/dolibarr_france>
|
||||||
|
|
||||||
ou sur les réseaux anglophones
|
ou sur les réseaux anglophones
|
||||||
|
|
||||||
- [Facebook](https://www.facebook.com/dolibarr)
|
- [Facebook](https://www.facebook.com/dolibarr)
|
||||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||||
- [Twitter](http://www.twitter.com/dolibarr)
|
- [Twitter](https://www.twitter.com/dolibarr)
|
||||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||||
|
|||||||
12
README.md
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
 
|
 
|
||||||
|
|
||||||
Dolibarr ERP & CRM is a modern software to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).
|
Dolibarr ERP & CRM is a modern software package 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.
|
It's an Open Source software (wrote in PHP language) designed for small, medium or large companies, foundations and freelances.
|
||||||
|
|
||||||
You can freely use, study, modify or distribute it according to its Free Software licence.
|
You can freely use, study, modify or distribute it according to its 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.
|
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
|
## LICENSE
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
Releases can be downloaded from [official website](http://www.dolibarr.org/).
|
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||||
|
|
||||||
### Simple setup
|
### Simple setup
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
|||||||
|
|
||||||
### Extending
|
### Extending
|
||||||
|
|
||||||
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](http://www.dolistore.com).
|
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](https://www.dolistore.com).
|
||||||
|
|
||||||
## FUTURE
|
## FUTURE
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ Follow Dolibarr project on:
|
|||||||
|
|
||||||
- [Facebook](https://www.facebook.com/dolibarr)
|
- [Facebook](https://www.facebook.com/dolibarr)
|
||||||
- [Google+](https://plus.google.com/+DolibarrOrg)
|
- [Google+](https://plus.google.com/+DolibarrOrg)
|
||||||
- [Twitter](http://www.twitter.com/dolibarr)
|
- [Twitter](https://www.twitter.com/dolibarr)
|
||||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||||
|
|||||||
@ -288,11 +288,11 @@ from origin/upstream and origin/pristine.
|
|||||||
> debian/get-orig-source.sh
|
> debian/get-orig-source.sh
|
||||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||||
|
|
||||||
* Edit tgz file to remove
|
* Edit orig.tar.gz file to remove
|
||||||
|
- debian
|
||||||
- htdocs/includes/ckeditor
|
- htdocs/includes/ckeditor
|
||||||
- htdocs/includes/jquery/plugins/datatables/extras/TableTools/swf
|
- htdocs/includes/phpexcel or htdocs/includes/phpoffice
|
||||||
- htdocs/includes/phpexcel
|
- htdocs/includes/tcpdf or htdocs/includes/tecnickom
|
||||||
- htdocs/includes/tcpdf
|
|
||||||
And rename file into
|
And rename file into
|
||||||
dolibarr-x.y.z+dfsgw.tgz
|
dolibarr-x.y.z+dfsgw.tgz
|
||||||
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
(x.y.z = version, w start from 1 and is increased for each new git-import-orig already done)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ Architecture: all
|
|||||||
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm | php5,
|
||||||
php5-cli,
|
php5-cli,
|
||||||
# Required PHP extensions
|
# Required PHP extensions
|
||||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap,
|
||||||
# Required PHP libraries
|
# Required PHP libraries
|
||||||
php-pear, php-mail-mime,
|
php-pear, php-mail-mime,
|
||||||
# php-tcpdf, libfpdi-php,
|
# php-tcpdf, libfpdi-php,
|
||||||
@ -31,10 +31,10 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
|||||||
${misc:Depends},
|
${misc:Depends},
|
||||||
${perl:Depends}
|
${perl:Depends}
|
||||||
Recommends: apache2 | lighttpd | httpd
|
Recommends: apache2 | lighttpd | httpd
|
||||||
Suggests: www-browser
|
Suggests: www-browser, php5-geoip
|
||||||
Description: Web based software to manage a company or foundation
|
Description: Web based software to manage a company or foundation
|
||||||
Dolibarr ERP & CRM is an easy to use open source/free software for small
|
Dolibarr ERP & CRM is an easy to use open source/free software package for
|
||||||
and medium companies, foundations or freelances. It includes different
|
companies, foundations or freelances. It includes different
|
||||||
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
features for Enterprise Resource Planning (ERP) and Customer Relationship
|
||||||
Management (CRM) but also for different other activities.
|
Management (CRM) but also for different other activities.
|
||||||
.
|
.
|
||||||
|
|||||||
@ -1,2 +1 @@
|
|||||||
README.md
|
README.md
|
||||||
README-FR.md
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
# Remove warning, we want to keep both standard and minified sources.
|
# Remove warning, we want to keep both standard and minified sources.
|
||||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
|
||||||
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
|
||||||
|
# This is a textual data file
|
||||||
|
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
||||||
@ -2,4 +2,4 @@
|
|||||||
version=3
|
version=3
|
||||||
|
|
||||||
#http://sf.net/dolibarr/dolibarr-(.+)\.tgz
|
#http://sf.net/dolibarr/dolibarr-(.+)\.tgz
|
||||||
http://www.dolibarr.org/files/stable/standard/dolibarr-(.+)\.tgz
|
http://www.dolibarr.org/files/stable/package_debian-ubuntu/dolibarr_(.+)\.orig\.tar\.gz
|
||||||
|
|||||||
@ -4,17 +4,14 @@ File added into doxygen generated documentation
|
|||||||
|
|
||||||
|
|
||||||
<!-- Google analytics -->
|
<!-- Google analytics -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
var _gaq = _gaq || [];
|
ga('create', 'UA-9049390-16', 'auto');
|
||||||
_gaq.push(['_setAccount', 'UA-9049390-1']);
|
ga('send', 'pageview');
|
||||||
_gaq.push(['_trackPageview']);
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
||||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
||||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
||||||
})();
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<!-- End google analytics -->
|
<!-- End google analytics -->
|
||||||
@ -22,7 +19,7 @@ File added into doxygen generated documentation
|
|||||||
|
|
||||||
<hr class="footer" />
|
<hr class="footer" />
|
||||||
<address class="footer"><small>Generated on $datetime
|
<address class="footer"><small>Generated on $datetime
|
||||||
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
|
for <a href="https://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
|
||||||
|
|
||||||
|
|
||||||
<!-- Google AdSense -->
|
<!-- Google AdSense -->
|
||||||
@ -35,11 +32,20 @@ google_ad_width = 468;
|
|||||||
google_ad_height = 60;
|
google_ad_height = 60;
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
<script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||||
</div>
|
</div>
|
||||||
<!-- End google adsense -->
|
<!-- End google adsense -->
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Twitter ad collector -->
|
||||||
|
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">twttr.conversion.trackPid('ntm4n', { tw_sale_amount: 0, tw_order_quantity: 0 });</script>
|
||||||
|
<noscript>
|
||||||
|
<img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
|
||||||
|
<img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=ntm4n&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0" />
|
||||||
|
</noscript>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@ -1,6 +1,4 @@
|
|||||||
<!--
|
<!-- File added into doxygen generated documentation -->
|
||||||
File added into doxygen generated documentation
|
|
||||||
-->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
@ -14,7 +12,23 @@ File added into doxygen generated documentation
|
|||||||
<link href="tabs.css" rel="stylesheet" type="text/css" />
|
<link href="tabs.css" rel="stylesheet" type="text/css" />
|
||||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||||
<!-- End from dolibarr.org -->
|
<!-- End from dolibarr.org -->
|
||||||
|
|
||||||
|
<!-- Facebook Pixel Code -->
|
||||||
|
<script>
|
||||||
|
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
||||||
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
|
||||||
|
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
|
||||||
|
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
|
||||||
|
document,'script','//connect.facebook.net/en_US/fbevents.js');
|
||||||
|
|
||||||
|
fbq('init', '1998533953704960');
|
||||||
|
fbq('track', "PageView");</script>
|
||||||
|
<noscript><img height="1" width="1" style="display:none"
|
||||||
|
src="https://www.facebook.com/tr?id=1998533953704960&ev=PageView&noscript=1"
|
||||||
|
/></noscript>
|
||||||
|
<!-- End Facebook Pixel Code -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="top">
|
<div id="top">
|
||||||
|
|
||||||
|
|||||||
@ -15,10 +15,7 @@ Alias /dolibarr "WAMPROOT/www/dolibarr/htdocs/"
|
|||||||
# NOTE FOR APACHE 2.3:
|
# NOTE FOR APACHE 2.3:
|
||||||
# To restrict access to dolibarr from outside set lines
|
# To restrict access to dolibarr from outside set lines
|
||||||
#
|
#
|
||||||
# <RequireAny>
|
# Require local
|
||||||
# Require ip 127.0.0.1
|
|
||||||
# Require host localhost
|
|
||||||
# <RequireAny>
|
|
||||||
#
|
#
|
||||||
# instead of
|
# instead of
|
||||||
#
|
#
|
||||||
|
|||||||
@ -42,6 +42,7 @@ SolidCompression=yes
|
|||||||
WizardImageFile=build\exe\doliwamp\doliwamp.bmp
|
WizardImageFile=build\exe\doliwamp\doliwamp.bmp
|
||||||
WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
|
WizardSmallImageFile=build\exe\doliwamp\doliwampsmall.bmp
|
||||||
SetupIconFile=doc\images\dolibarr.ico
|
SetupIconFile=doc\images\dolibarr.ico
|
||||||
|
;To say the installer must be ran as admin
|
||||||
PrivilegesRequired=admin
|
PrivilegesRequired=admin
|
||||||
DisableProgramGroupPage=yes
|
DisableProgramGroupPage=yes
|
||||||
ChangesEnvironment=no
|
ChangesEnvironment=no
|
||||||
@ -148,8 +149,12 @@ Name: "{userdesktop}\Dolibarr Help center"; Filename: "{app}\rundolihelp.bat"; W
|
|||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "<Path to your exe>" /t REG_SZ /d RUNASADMIN
|
; Add "run as admin" flag. Same than command line: reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "<Path to your exe>" /t REG_SZ /d RUNASADMIN
|
||||||
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
|
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
|
||||||
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\"; ValueType: String; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Flags: uninsdeletekeyifempty uninsdeletevalue;
|
Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
|
||||||
|
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN";
|
||||||
|
Root: "HKLM32"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN";
|
||||||
|
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\startdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
|
||||||
|
Root: "HKLM64"; Subkey: "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\stopdoliwamp.bat"; ValueData: "RUNASADMIN"; Check: IsWin64
|
||||||
|
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
@ -239,9 +244,9 @@ begin
|
|||||||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
|
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\MSCRM','SMTPServer', value) then
|
||||||
begin
|
begin
|
||||||
if value <> '' then smtpServer:=value;
|
if value <> '' then smtpServer:=value;
|
||||||
end
|
end;
|
||||||
end
|
end;
|
||||||
end
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
|
if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\NLTechno\DoliWamp','apachePort', value) then
|
||||||
@ -419,7 +424,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
|
themessage := FmtMessage(CustomMessage('FailedToDeleteLock'),[pathWithSlashes]);
|
||||||
MsgBox(themessage,mbInformation,MB_OK);
|
MsgBox(themessage,mbInformation,MB_OK);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
// Check if parameters already defined in conf.php file
|
// Check if parameters already defined in conf.php file
|
||||||
@ -592,7 +597,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
||||||
SaveStringToFile(destFileA,srcContents, False);
|
SaveStringToFile(destFileA,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
|
if MsgBox(CustomMessage('DoliWampWillStartApacheMysql'),mbConfirmation,MB_YESNO) = IDYES then
|
||||||
@ -615,7 +620,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
|
StringChangeEx (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
DeleteFile(srcFile);
|
DeleteFile(srcFile);
|
||||||
|
|
||||||
|
|
||||||
@ -648,8 +653,8 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile, srcContents, False);
|
SaveStringToFile(destFile, srcContents, False);
|
||||||
end
|
end;
|
||||||
end
|
end;
|
||||||
DeleteFile(srcFile);
|
DeleteFile(srcFile);
|
||||||
|
|
||||||
|
|
||||||
@ -679,8 +684,8 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -703,7 +708,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -725,7 +730,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLVERSION', mysqlVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -757,7 +762,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEPORT', myporta, True);
|
||||||
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEPSSL', myportas, True);
|
||||||
SaveStringToFile(destFile, srcContents, False);
|
SaveStringToFile(destFile, srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -780,7 +785,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -801,7 +806,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -822,7 +827,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -843,7 +848,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLNEWPASSWORD', mypass, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -864,7 +869,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -885,7 +890,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
StringChangeEx (srcContents, 'WAMPMYSQLPORT', myport, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -904,7 +909,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
StringChangeEx (srcContents, 'WAMPAPACHEVERSION', apacheVersion, True);
|
||||||
|
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
@ -921,7 +926,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
|
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
|
||||||
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
|
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// Create file php.ini in apache (if not exists)
|
// Create file php.ini in apache (if not exists)
|
||||||
@ -937,7 +942,7 @@ begin
|
|||||||
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
|
StringChangeEx (srcContents, 'WAMPSMTP', mysmtp, True);
|
||||||
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
|
StringChangeEx (srcContents, 'WAMPPHPVERSION', phpVersion, True);
|
||||||
SaveStringToFile(destFile,srcContents, False);
|
SaveStringToFile(destFile,srcContents, False);
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -979,7 +984,7 @@ begin
|
|||||||
|
|
||||||
res := False;
|
res := False;
|
||||||
|
|
||||||
end
|
end;
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -989,9 +994,9 @@ begin
|
|||||||
|
|
||||||
res := False;
|
res := False;
|
||||||
|
|
||||||
end
|
end;
|
||||||
|
|
||||||
end
|
end;
|
||||||
|
|
||||||
|
|
||||||
Result := res;
|
Result := res;
|
||||||
|
|||||||
@ -255,6 +255,9 @@ KeepAliveTimeout 30
|
|||||||
# Controls who can get stuff from this server.
|
# Controls who can get stuff from this server.
|
||||||
#
|
#
|
||||||
# onlineoffline tag - don't remove
|
# onlineoffline tag - don't remove
|
||||||
|
|
||||||
|
Require all granted
|
||||||
|
|
||||||
<RequireAny>
|
<RequireAny>
|
||||||
Require ip 127.0.0.1
|
Require ip 127.0.0.1
|
||||||
Require host localhost
|
Require host localhost
|
||||||
|
|||||||
@ -19,17 +19,11 @@ Alias /phpmyadmin "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/"
|
|||||||
#
|
#
|
||||||
# instead of
|
# instead of
|
||||||
#
|
#
|
||||||
# <RequireAny>
|
# Require local
|
||||||
# Require ip 127.0.0.1
|
|
||||||
# Require host localhost
|
|
||||||
# <RequireAny>
|
|
||||||
#
|
#
|
||||||
|
|
||||||
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
<Directory "WAMPROOT/apps/phpmyadminWAMPPHPMYADMINVERSION/">
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride all
|
AllowOverride all
|
||||||
<RequireAny>
|
Require local
|
||||||
Require ip 127.0.0.1
|
|
||||||
Require host localhost
|
|
||||||
</RequireAny>
|
|
||||||
</Directory>
|
</Directory>
|
||||||
@ -173,6 +173,7 @@ $build =~ s/-.*$//g;
|
|||||||
# now build is 0+nmu1 for example
|
# now build is 0+nmu1 for example
|
||||||
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
$FILENAMEDEBNATIVE="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||||
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
$FILENAMEDEB="${PROJECT}_${MAJOR}.${MINOR}.${newbuild}";
|
||||||
|
$FILENAMEDEBSHORT="${PROJECT}_${MAJOR}.${MINOR}.${build}";
|
||||||
|
|
||||||
|
|
||||||
my $copyalreadydone=0;
|
my $copyalreadydone=0;
|
||||||
@ -389,10 +390,15 @@ if ($nboftargetok) {
|
|||||||
{
|
{
|
||||||
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
print 'Run git tag -a -f -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
|
||||||
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
$ret=`git tag -a -f -m "$MAJOR.$MINOR.$BUILD" "$MAJOR.$MINOR.$BUILD"`;
|
||||||
|
print 'Run git push -f --tags'."\n";
|
||||||
|
$ret=`git push -f --tags`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print 'Run git push --tags'."\n";
|
print 'Run git push --tags'."\n";
|
||||||
$ret=`git push --tags`;
|
$ret=`git push --tags`;
|
||||||
|
}
|
||||||
chdir("$olddir");
|
chdir("$olddir");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -824,7 +830,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
print "Remove other files\n";
|
print "Remove other files\n";
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/README-FR.md`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README-FR`;
|
$ret=`rm -f $BUILDROOT/$PROJECT.tmp/build/README-FR`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/aps`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/aps`;
|
||||||
@ -1111,6 +1117,7 @@ if ($nboftargetok) {
|
|||||||
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
print "Move $SOURCE/build/$FILENAMEEXEDOLIWAMP.exe to $NEWDESTI/$FILENAMEEXEDOLIWAMP.exe\n";
|
||||||
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
$ret=`mv "$SOURCE/build/$FILENAMEEXEDOLIWAMP.exe" "$NEWDESTI/$FILENAMEEXEDOLIWAMP.exe"`;
|
||||||
|
|
||||||
|
print "Remove tmp file $SOURCE/build/exe/doliwamp/doliwamp.tmp.iss\n";
|
||||||
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
$ret=`rm "$SOURCE/build/exe/doliwamp/doliwamp.tmp.iss"`;
|
||||||
|
|
||||||
next;
|
next;
|
||||||
@ -1127,6 +1134,7 @@ if ($nboftargetok) {
|
|||||||
%filestoscansf=(
|
%filestoscansf=(
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
|
||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
|
||||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
|
||||||
@ -1134,6 +1142,7 @@ if ($nboftargetok) {
|
|||||||
%filestoscanstableasso=(
|
%filestoscanstableasso=(
|
||||||
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
|
||||||
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
|
||||||
|
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
|
||||||
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
|
||||||
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
|
||||||
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
"$DESTI/standard/$FILENAMETGZ.zip"=>'standard'
|
||||||
@ -1195,7 +1204,7 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
if ($target eq 'SF') {
|
if ($target eq 'SF' && $filestoscan{$file} ne 'none') {
|
||||||
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
|
||||||
}
|
}
|
||||||
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
|
||||||
|
|||||||
@ -187,7 +187,9 @@
|
|||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag" />
|
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
|
<rule ref="PEAR.Commenting.ClassComment.MissingAuthorTag">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
|
|||||||
@ -2,4 +2,4 @@ README
|
|||||||
------
|
------
|
||||||
|
|
||||||
Scripts in this directory can be used to load or purge data of a database instance.
|
Scripts in this directory can be used to load or purge data of a database instance.
|
||||||
WARNING: This may erase data.
|
WARNING: Some of this script may delete definitely data.
|
||||||
|
|||||||
@ -31,8 +31,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/generate-facture.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-commande.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-produit.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-propale.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
|
||||||
|
|||||||
@ -32,8 +32,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recupere root dolibarr
|
// Recupere root dolibarr
|
||||||
$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
//$path=preg_replace('/generate-societe.php/i','',$_SERVER["PHP_SELF"]);
|
||||||
require ($path."../../htdocs/master.inc.php");
|
require (__DIR__. '/../../htdocs/master.inc.php');
|
||||||
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -56,7 +57,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
dol_syslog($script_file." launched with arg ".implode(',',$argv));
|
||||||
|
|
||||||
$mode = $argv[1];
|
$mode = $argv[1];
|
||||||
$filepath = $argv[2];
|
$filepath = $argv[2];
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -56,7 +57,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
dol_syslog($script_file." launched with arg ".implode(',',$argv));
|
||||||
|
|
||||||
$mode = $argv[1];
|
$mode = $argv[1];
|
||||||
$filepath = $argv[2];
|
$filepath = $argv[2];
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -56,7 +57,7 @@ $error=0;
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
dol_syslog($script_file." launched with arg ".implode(',',$argv));
|
||||||
|
|
||||||
$mode = $argv[1];
|
$mode = $argv[1];
|
||||||
$filepath = $argv[2];
|
$filepath = $argv[2];
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
@ -146,7 +146,7 @@ $sqls=array(
|
|||||||
|
|
||||||
@set_time_limit(0);
|
@set_time_limit(0);
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',',$argv));
|
dol_syslog($script_file." launched with arg ".implode(',',$argv));
|
||||||
|
|
||||||
$mode = $argv[1];
|
$mode = $argv[1];
|
||||||
$option = $argv[2];
|
$option = $argv[2];
|
||||||
@ -154,14 +154,14 @@ $option = $argv[2];
|
|||||||
if (empty($mode) || ! in_array($mode,array('test','confirm'))) {
|
if (empty($mode) || ! in_array($mode,array('test','confirm'))) {
|
||||||
print "Usage: $script_file (test|confirm) (all|option)\n";
|
print "Usage: $script_file (test|confirm) (all|option)\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
print "option can be ".join(',',array_keys($sqls))."\n";
|
print "option can be ".implode(',',array_keys($sqls))."\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) {
|
if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) {
|
||||||
print "Usage: $script_file (test|confirm) (all|option)\n";
|
print "Usage: $script_file (test|confirm) (all|option)\n";
|
||||||
print "\n";
|
print "\n";
|
||||||
print "option can be ".join(',',array_keys($sqls))."\n";
|
print "option can be ".implode(',',array_keys($sqls))."\n";
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
|
After Width: | Height: | Size: 33 KiB |
BIN
dev/initdemo/documents_demo/produit/DOLICLOUD/dolicloud_logo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
BIN
dev/initdemo/documents_demo/societe/contact/10/eldy_php.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/eldy_php.jpg
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_mini.jpg
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
dev/initdemo/documents_demo/users/9/1/thumbs/eldy_php_small.jpg
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||||
if [ "x$mydir" = "x" ]
|
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
|
||||||
then
|
then
|
||||||
export mydir="."
|
export mydir="."
|
||||||
fi
|
fi
|
||||||
@ -132,23 +132,6 @@ then
|
|||||||
exit;;
|
exit;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# ---------------------------- chemin d'acces du repertoire documents
|
|
||||||
#DIALOG=${DIALOG=dialog}
|
|
||||||
#fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
|
|
||||||
#trap "rm -f $fichtemp" 0 1 2 5 15
|
|
||||||
#$DIALOG --title "Init Dolibarr with demo values" --clear \
|
|
||||||
# --inputbox "Full path to documents directory (ex: /var/www/dolibarr/documents)- no / at end :" 16 55 2> $fichtemp
|
|
||||||
|
|
||||||
#valret=$?
|
|
||||||
|
|
||||||
#case $valret in
|
|
||||||
# 0)
|
|
||||||
#docs=`cat $fichtemp`;;
|
|
||||||
# 1)
|
|
||||||
#exit;;
|
|
||||||
# 255)
|
|
||||||
#exit;;
|
|
||||||
#esac
|
|
||||||
|
|
||||||
# ---------------------------- confirmation
|
# ---------------------------- confirmation
|
||||||
DIALOG=${DIALOG=dialog}
|
DIALOG=${DIALOG=dialog}
|
||||||
@ -177,6 +160,25 @@ echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
|||||||
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||||
export res=$?
|
export res=$?
|
||||||
|
|
||||||
|
|
||||||
|
# ---------------------------- copy demo files
|
||||||
|
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
|
||||||
|
if [ "x$documentdir" != "x" ]
|
||||||
|
then
|
||||||
|
echo cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
|
cp -pr $mydir/documents_demo/* "$documentdir/"
|
||||||
|
echo cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||||
|
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
|
||||||
|
mkdir -p "$documentdir/ecm/Administrative documents"
|
||||||
|
mkdir -p "$documentdir/ecm/Images"
|
||||||
|
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
|
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
|
||||||
|
else
|
||||||
|
echo Detection of documents directory failed so demo files were not copied.
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "x$res" = "x0" ]
|
if [ "x$res" = "x0" ]
|
||||||
then
|
then
|
||||||
echo "Success, file successfully loaded."
|
echo "Success, file successfully loaded."
|
||||||
|
|||||||
8576
dev/initdemo/mysqldump_dolibarr_4.0.0.sql
Normal file
@ -187,7 +187,6 @@ export list="
|
|||||||
--ignore-table=$base.llx_bt_webseedfiles
|
--ignore-table=$base.llx_bt_webseedfiles
|
||||||
--ignore-table=$base.llx_c_civilite
|
--ignore-table=$base.llx_c_civilite
|
||||||
--ignore-table=$base.llx_c_dolicloud_plans
|
--ignore-table=$base.llx_c_dolicloud_plans
|
||||||
--ignore-table=$base.llx_c_lead_status
|
|
||||||
--ignore-table=$base.llx_c_source
|
--ignore-table=$base.llx_c_source
|
||||||
--ignore-table=$base.llx_cabinetmed_c_banques
|
--ignore-table=$base.llx_cabinetmed_c_banques
|
||||||
--ignore-table=$base.llx_cabinetmed_c_ccam
|
--ignore-table=$base.llx_cabinetmed_c_ccam
|
||||||
|
|||||||
126
dev/initdemo/updatedemo.php
Executable file
@ -0,0 +1,126 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
/* Copyright (C) 2016 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 2 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/>.
|
||||||
|
* or see http://www.gnu.org/
|
||||||
|
*
|
||||||
|
* Get a distant dump file and load it into a mysql database
|
||||||
|
*/
|
||||||
|
|
||||||
|
$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;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global variables
|
||||||
|
$error=0;
|
||||||
|
|
||||||
|
$confirm=isset($argv[1])?$argv[1]:'';
|
||||||
|
|
||||||
|
// Include Dolibarr environment
|
||||||
|
$res=0;
|
||||||
|
if (! $res && file_exists($path."../../master.inc.php")) $res=@include($path."../../master.inc.php");
|
||||||
|
if (! $res && file_exists($path."../../htdocs/master.inc.php")) $res=@include($path."../../htdocs/master.inc.php");
|
||||||
|
if (! $res && file_exists("../master.inc.php")) $res=@include("../master.inc.php");
|
||||||
|
if (! $res && file_exists("../../master.inc.php")) $res=@include("../../master.inc.php");
|
||||||
|
if (! $res && file_exists("../../../master.inc.php")) $res=@include("../../../master.inc.php");
|
||||||
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include($path."../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||||
|
if (! $res && preg_match('/\/nltechno([^\/]*)\//',$_SERVER["PHP_SELF"],$reg)) $res=@include("../../../dolibarr".$reg[1]."/htdocs/master.inc.php"); // Used on dev env only
|
||||||
|
if (! $res) die ("Failed to include master.inc.php file\n");
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (empty($confirm))
|
||||||
|
{
|
||||||
|
print "Usage: $script_file confirm\n";
|
||||||
|
print "Return code: 0 if success, <>0 if error\n";
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$tmp=dol_getdate(dol_now());
|
||||||
|
|
||||||
|
|
||||||
|
$tables=array(
|
||||||
|
'propal'=>array(0=>'datep', 1=>'fin_validite', 2=>'date_valid', 3=>'date_cloture'),
|
||||||
|
'commande'=>array(0=>'date_commande', 1=>'date_valid', 2=>'date_cloture'),
|
||||||
|
'facture'=>array(0=>'datef', 1=>'date_valid', 2=>'date_lim_reglement'),
|
||||||
|
'paiement'=>array(0=>'datep'),
|
||||||
|
'bank'=>array(0=>'datev', 1=>'dateo'),
|
||||||
|
'commande_fournisseur'=>array(0=>'date_commande', 1=>'date_valid', 3=>'date_creation', 4=>'date_approve', 5=>'date_approve2', 6=>'date_livraison'),
|
||||||
|
'supplier_proposal'=>array(0=>'datec', 1=>'date_valid', 2=>'date_cloture')
|
||||||
|
);
|
||||||
|
|
||||||
|
$year=2010;
|
||||||
|
$currentyear=$tmp['year'];
|
||||||
|
while ($year <= $currentyear)
|
||||||
|
{
|
||||||
|
//$year=2021;
|
||||||
|
$delta=($currentyear - $year);
|
||||||
|
//$delta=-1;
|
||||||
|
|
||||||
|
if ($delta)
|
||||||
|
{
|
||||||
|
foreach($tables as $tablekey => $tableval)
|
||||||
|
{
|
||||||
|
print "\nCorrect ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
|
||||||
|
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
|
||||||
|
//$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." > NOW()";
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i=0;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj=$db->fetch_object($resql);
|
||||||
|
if ($obj)
|
||||||
|
{
|
||||||
|
print ".";
|
||||||
|
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
|
||||||
|
$j=0;
|
||||||
|
foreach($tableval as $field)
|
||||||
|
{
|
||||||
|
if ($j) $sql2.=", ";
|
||||||
|
$sql2.= $field." = DATE_ADD(".$field.", INTERVAL ".$delta." YEAR)";
|
||||||
|
$j++;
|
||||||
|
}
|
||||||
|
$sql2.=" WHERE rowid = ".$obj->rowid;
|
||||||
|
//print $sql2."\n";
|
||||||
|
$resql2 = $db->query($sql2);
|
||||||
|
if (! $resql2) dol_print_error($db);
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else dol_print_error($db);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$year++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "\n";
|
||||||
|
|
||||||
|
exit(0);
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
* Copyright (C) ---Put here your own copyright and developer email---
|
* Copyright (C) ---Put here your own copyright and developer email---
|
||||||
@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
|||||||
* Class Skeleton_Class
|
* Class Skeleton_Class
|
||||||
*
|
*
|
||||||
* Put here description of your class
|
* Put here description of your class
|
||||||
|
*
|
||||||
* @see CommonObject
|
* @see CommonObject
|
||||||
*/
|
*/
|
||||||
class Skeleton_Class extends CommonObject
|
class Skeleton_Class extends CommonObject
|
||||||
@ -116,7 +117,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
@ -189,7 +190,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
@ -256,7 +257,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
return $num;
|
return $num;
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
return - 1;
|
return - 1;
|
||||||
}
|
}
|
||||||
@ -301,7 +302,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error && !$notrigger) {
|
if (!$error && !$notrigger) {
|
||||||
@ -362,7 +363,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +411,7 @@ class Skeleton_Class extends CommonObject
|
|||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors = $object->errors;
|
$this->errors = $object->errors;
|
||||||
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . implode(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
// End
|
// End
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) ---Put here your own copyright and developer email---
|
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -91,13 +91,12 @@ $extrafields = new ExtraFields($db);
|
|||||||
$extralabels = $extrafields->fetch_name_optionals_label('mymodule');
|
$extralabels = $extrafields->fetch_name_optionals_label('mymodule');
|
||||||
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
|
||||||
|
|
||||||
// Load object if id or ref is provided as parameter
|
// List of fields to search into when doing a "search in all"
|
||||||
$object=new Skeleton_Class($db);
|
$fieldstosearchall = array(
|
||||||
if (($id > 0 || ! empty($ref)) && $action != 'add')
|
't.ref'=>'Ref',
|
||||||
{
|
't.note_public'=>'NotePublic',
|
||||||
$result=$object->fetch($id,$ref);
|
);
|
||||||
if ($result < 0) dol_print_error($db);
|
if (empty($user->socid)) $fieldstosearchall["t.note_private"]="NotePrivate";
|
||||||
}
|
|
||||||
|
|
||||||
// Definition of fields for list
|
// Definition of fields for list
|
||||||
$arrayfields=array(
|
$arrayfields=array(
|
||||||
@ -118,6 +117,15 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Load object if id or ref is provided as parameter
|
||||||
|
$object=new Skeleton_Class($db);
|
||||||
|
if (($id > 0 || ! empty($ref)) && $action != 'add')
|
||||||
|
{
|
||||||
|
$result=$object->fetch($id,$ref);
|
||||||
|
if ($result < 0) dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
@ -127,7 +135,7 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
|
|||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
|
||||||
if (! GETPOST('confirmmassaction')) { $massaction=''; }
|
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
|
||||||
|
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
@ -135,50 +143,26 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
|
|||||||
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
|
// Purge search criteria
|
||||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") ||GETPOST("button_removefilter")) // All test are required to be compatible with all browsers
|
||||||
{
|
{
|
||||||
$search_field1='';
|
$search_field1='';
|
||||||
$search_field2='';
|
$search_field2='';
|
||||||
$search_date_creation='';
|
$search_date_creation='';
|
||||||
$search_date_update='';
|
$search_date_update='';
|
||||||
|
$toselect='';
|
||||||
$search_array_options=array();
|
$search_array_options=array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
// Mass actions. Controls on number of lines checked
|
$objectclass='Commande';
|
||||||
$maxformassaction=1000;
|
$permtoread = $user->rights->commande->lire;
|
||||||
if (! empty($massaction) && count($toselect) < 1)
|
$permtodelete = $user->rights->commande->supprimer;
|
||||||
{
|
$uploaddir = $conf->commande->dir_output;
|
||||||
$error++;
|
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||||
setEventMessages($langs->trans("NoLineChecked"), null, "warnings");
|
|
||||||
}
|
}
|
||||||
if (! $error && count($toselect) > $maxformassaction)
|
|
||||||
{
|
|
||||||
setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors');
|
|
||||||
$error++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Action to delete
|
|
||||||
if ($action == 'confirm_delete')
|
|
||||||
{
|
|
||||||
$result=$object->delete($user);
|
|
||||||
if ($result > 0)
|
|
||||||
{
|
|
||||||
// Delete OK
|
|
||||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
|
||||||
header("Location: ".dol_buildpath('/mymodule/list.php',1));
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (! empty($object->errors)) setEventMessages(null,$object->errors,'errors');
|
|
||||||
else setEventMessages($object->error,null,'errors');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -188,10 +172,14 @@ if (empty($reshook))
|
|||||||
* Put here all code to build page
|
* Put here all code to build page
|
||||||
****************************************************/
|
****************************************************/
|
||||||
|
|
||||||
llxHeader('','MyPageName','');
|
$now=dol_now();
|
||||||
|
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
|
//$help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes";
|
||||||
|
$help_url='';
|
||||||
|
llxHeader('','MyPageName',$help_url);
|
||||||
|
|
||||||
// Put here content of your page
|
// Put here content of your page
|
||||||
$title = $langs->trans('MyModuleListTitle');
|
$title = $langs->trans('MyModuleListTitle');
|
||||||
|
|
||||||
@ -215,8 +203,8 @@ $sql = "SELECT";
|
|||||||
$sql.= " t.rowid,";
|
$sql.= " t.rowid,";
|
||||||
$sql.= " t.field1,";
|
$sql.= " t.field1,";
|
||||||
$sql.= " t.field2";
|
$sql.= " t.field2";
|
||||||
// Add fields for extrafields
|
// Add fields from extrafields
|
||||||
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
|
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -265,7 +253,10 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
|
$arrayofselected=is_array($toselect)?$toselect:array();
|
||||||
|
|
||||||
$params='';
|
$params='';
|
||||||
|
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
||||||
if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1);
|
if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1);
|
||||||
if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2);
|
if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2);
|
||||||
@ -278,8 +269,13 @@ if ($resql)
|
|||||||
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
$arrayofmassactions = array(
|
||||||
|
'presend'=>$langs->trans("SendByMail"),
|
||||||
|
'builddoc'=>$langs->trans("PDFMerge"),
|
||||||
|
);
|
||||||
|
if ($user->rights->commande->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
|
||||||
|
if ($massaction == 'presend') $arrayofmassactions=array();
|
||||||
|
$massactionbutton=$form->selectMassAction('', $arrayofmassactions);
|
||||||
|
|
||||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
@ -289,10 +285,12 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
|
||||||
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
|
||||||
|
|
||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall);
|
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
@ -300,20 +298,22 @@ if ($resql)
|
|||||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
|
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
|
||||||
$moreforfilter.= '</div>';
|
$moreforfilter.= '</div>';
|
||||||
|
|
||||||
|
$parameters=array();
|
||||||
|
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint;
|
||||||
|
else $moreforfilter = $hookmanager->resPrint;
|
||||||
|
|
||||||
if (! empty($moreforfilter))
|
if (! empty($moreforfilter))
|
||||||
{
|
{
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
$parameters=array();
|
|
||||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
|
||||||
print $hookmanager->resPrint;
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||||
|
|
||||||
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
|
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||||
|
|
||||||
// Fields title
|
// Fields title
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -393,7 +393,7 @@ if ($resql)
|
|||||||
}*/
|
}*/
|
||||||
// Action column
|
// Action column
|
||||||
print '<td class="liste_titre" align="right">';
|
print '<td class="liste_titre" align="right">';
|
||||||
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
$searchpitco=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1);
|
||||||
print $searchpitco;
|
print $searchpitco;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -466,7 +466,14 @@ if ($resql)
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
print '<td></td>';
|
print '<td class="nowrap" align="center">';
|
||||||
|
if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
{
|
||||||
|
$selected=0;
|
||||||
|
if (in_array($obj->rowid, $arrayofselected)) $selected=1;
|
||||||
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected?' checked="checked"':'').'>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
if (! $i) $totalarray['nbfield']++;
|
if (! $i) $totalarray['nbfield']++;
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -474,16 +481,61 @@ if ($resql)
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show total line
|
||||||
|
if (isset($totalarray['totalhtfield']))
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
$i=0;
|
||||||
|
while ($i < $totalarray['nbfield'])
|
||||||
|
{
|
||||||
|
$i++;
|
||||||
|
if ($i == 1)
|
||||||
|
{
|
||||||
|
if ($num < $limit) print '<td align="left">'.$langs->trans("Total").'</td>';
|
||||||
|
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||||
|
}
|
||||||
|
elseif ($totalarray['totalhtfield'] == $i) print '<td align="right">'.price($totalarray['totalht']).'</td>';
|
||||||
|
elseif ($totalarray['totalvatfield'] == $i) print '<td align="right">'.price($totalarray['totalvat']).'</td>';
|
||||||
|
elseif ($totalarray['totalttcfield'] == $i) print '<td align="right">'.price($totalarray['totalttc']).'</td>';
|
||||||
|
else print '<td></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|
||||||
$parameters=array('sql' => $sql);
|
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
print "</table>\n";
|
print '</table>'."\n";
|
||||||
print "</form>\n";
|
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
|
||||||
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Show list of available documents
|
||||||
|
*/
|
||||||
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
|
$filedir=$diroutputmassaction;
|
||||||
|
$genallowed=$user->rights->facture->lire;
|
||||||
|
$delallowed=$user->rights->facture->lire;
|
||||||
|
|
||||||
|
print '<br><a name="show_files"></a>';
|
||||||
|
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
|
||||||
|
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$db->free($result);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -300,7 +300,7 @@ class autoTranslator
|
|||||||
//setting language pair
|
//setting language pair
|
||||||
$lang_pair = $src_lang.'|'.$dest_lang;
|
$lang_pair = $src_lang.'|'.$dest_lang;
|
||||||
|
|
||||||
$src_text_to_translate=preg_replace('/%s/','SSSSS',join('',$src_texts));
|
$src_text_to_translate=preg_replace('/%s/','SSSSS',implode('',$src_texts));
|
||||||
$src_text_to_translate=preg_replace('/'.preg_quote('\n\n').'/',' NNNNN ',$src_text_to_translate);
|
$src_text_to_translate=preg_replace('/'.preg_quote('\n\n').'/',' NNNNN ',$src_text_to_translate);
|
||||||
|
|
||||||
// Define GET URL v1
|
// Define GET URL v1
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (c) 2015 Tommaso Basilici <t.basilici@19.coop>
|
/* Copyright (c) 2015 Tommaso Basilici <t.basilici@19.coop>
|
||||||
* Copyright (c) 2015 Laurent Destailleur <eldy@destailleur.fr>
|
* Copyright (c) 2015 Laurent Destailleur <eldy@destailleur.fr>
|
||||||
|
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -294,7 +295,11 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^DescADHERENT_/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^SubmitTranslation/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^ModuleCompanyCode/', $value)) $qualifiedforclean=0;
|
||||||
|
// boxes.lang
|
||||||
|
if (preg_match('/^BoxTitleLast/', $value)) $qualifiedforclean=0;
|
||||||
|
if (preg_match('/^BoxTitleLatest/', $value)) $qualifiedforclean=0;
|
||||||
|
// install.lang
|
||||||
|
if (preg_match('/^KeepDefaultValues/', $value)) $qualifiedforclean=0;
|
||||||
// main.lang
|
// main.lang
|
||||||
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^Duration/', $value)) $qualifiedforclean=0;
|
||||||
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
if (preg_match('/^FormatDate/', $value)) $qualifiedforclean=0;
|
||||||
@ -339,7 +344,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
}
|
}
|
||||||
|
|
||||||
//$search = '\'trans("'.$value.'")\'';
|
//$search = '\'trans("'.$value.'")\'';
|
||||||
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')"';
|
$search = '-e "\''.$value.'\'" -e \'"'.$value.'"\' -e "('.$value.')" -e "('.$value.',"';
|
||||||
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
$string = 'grep -R -m 1 -F --exclude=includes/* --include=*.php '.$search.' '.$htdocs.'* '.$scripts.'*';
|
||||||
//print $string."<br>\n";
|
//print $string."<br>\n";
|
||||||
exec($string,$output);
|
exec($string,$output);
|
||||||
@ -359,7 +364,7 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
|
|||||||
{
|
{
|
||||||
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
|
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
|
||||||
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
|
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
|
||||||
file_put_contents($filetosave, join("",$unused));
|
file_put_contents($filetosave, implode("",$unused));
|
||||||
print "To remove from original file, run command :\n";
|
print "To remove from original file, run command :\n";
|
||||||
if (($argv[2]?$argv[2]:"")) print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; ";
|
if (($argv[2]?$argv[2]:"")) print 'cd htdocs/langs/en_US; mv '.($argv[2]?$argv[2]:"")." ".($argv[2]?$argv[2]:"").".tmp; ";
|
||||||
print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:"");
|
print "diff ".($argv[2]?$argv[2]:"").".tmp ".$filetosave." | grep \< | cut -b 3- > ".($argv[2]?$argv[2]:"");
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 212 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 57 KiB |
BIN
doc/images/dolibarr_screenshot6_1280x800.png
Normal file
|
After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.2 KiB |
@ -58,7 +58,17 @@ if ($action == 'add') {
|
|||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
// Clean code
|
// Clean code
|
||||||
$account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right
|
|
||||||
|
// To manage zero or not at the end of the accounting account
|
||||||
|
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||||
|
{
|
||||||
|
$account_number = GETPOST('account_number');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$account_number = clean_account(GETPOST('account_number'));
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('account_category') <= 0) {
|
if (GETPOST('account_category') <= 0) {
|
||||||
$account_parent = '';
|
$account_parent = '';
|
||||||
} else {
|
} else {
|
||||||
@ -98,7 +108,17 @@ if ($action == 'add') {
|
|||||||
$obj = $db->fetch_object($result2);
|
$obj = $db->fetch_object($result2);
|
||||||
|
|
||||||
// Clean code
|
// Clean code
|
||||||
$account_number = clean_account(GETPOST('account_number')); // Accounting account without zero on the right
|
|
||||||
|
// To manage zero or not at the end of the accounting account
|
||||||
|
if($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
|
||||||
|
{
|
||||||
|
$account_number = GETPOST('account_number');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$account_number = clean_account(GETPOST('account_number'));
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('account_category') <= 0) {
|
if (GETPOST('account_category') <= 0) {
|
||||||
$account_parent = '';
|
$account_parent = '';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -130,6 +130,7 @@ if ($action == 'update') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TO DO Mutualize code for yes/no constants
|
||||||
if ($action == 'setlistsorttodo') {
|
if ($action == 'setlistsorttodo') {
|
||||||
$setlistsorttodo = GETPOST('value', 'int');
|
$setlistsorttodo = GETPOST('value', 'int');
|
||||||
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
|
||||||
@ -155,6 +156,18 @@ if ($action == 'setlistsortdone') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'setmanagezero') {
|
||||||
|
$setmanagezero = GETPOST('value', 'int');
|
||||||
|
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
|
||||||
|
if (! $res > 0)
|
||||||
|
$error ++;
|
||||||
|
if (! $error) {
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -286,6 +299,7 @@ foreach ( $list_account as $key ) {
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TO DO Mutualize code for yes/no constants
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print "<tr " . $bc[$var] . ">";
|
print "<tr " . $bc[$var] . ">";
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||||
@ -314,6 +328,20 @@ if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
|||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td width="80%">' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
* \ingroup Advanced accountancy
|
* \ingroup Advanced accountancy
|
||||||
* \brief Balance of book keeping
|
* \brief Balance of book keeping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
|
|
||||||
// Class
|
// Class
|
||||||
@ -184,7 +185,7 @@ else {
|
|||||||
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "t.label_compte", "", $options, "", $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Solde"), $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
|
||||||
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -213,6 +214,9 @@ else {
|
|||||||
|
|
||||||
$total_debit = 0;
|
$total_debit = 0;
|
||||||
$total_credit = 0;
|
$total_credit = 0;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
$displayed_account = "";
|
||||||
|
|
||||||
foreach ( $object->lines as $line ) {
|
foreach ( $object->lines as $line ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
@ -220,11 +224,36 @@ else {
|
|||||||
$total_debit += $line->debit;
|
$total_debit += $line->debit;
|
||||||
$total_credit += $line->credit;
|
$total_credit += $line->credit;
|
||||||
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
|
||||||
|
$root_account_description = $object->get_compte_racine($line->numero_compte);
|
||||||
if(empty($description)){
|
if(empty($description)){
|
||||||
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
|
$link = '<a href="../admin/card.php?action=create&compte=' . length_accountg($line->numero_compte) . '">' . img_edit_add() .'</a>';
|
||||||
}
|
}
|
||||||
print '<tr'. $bc[$var].'>';
|
print '<tr'. $bc[$var].'>';
|
||||||
|
|
||||||
|
|
||||||
|
// Permet d'afficher le compte comptable
|
||||||
|
if ($root_account_description != $displayed_account) {
|
||||||
|
|
||||||
|
// Affiche un Sous-Total par compte comptable
|
||||||
|
if ($displayed_account != "") {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche le compte comptable en début de ligne
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">'. $root_account_description .'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account = $root_account_description;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// $object->get_compte_racine($line->numero_compte);
|
||||||
|
|
||||||
|
|
||||||
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
print '<td>' . length_accountg($line->numero_compte) . '</td>';
|
||||||
print '<td>' . $description . '</td>';
|
print '<td>' . $description . '</td>';
|
||||||
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
print '<td align="right">' . number_format($line->debit, 2, ',', ' ') . '</td>';
|
||||||
@ -233,21 +262,22 @@ else {
|
|||||||
print '<td align="center">' . $link;
|
print '<td align="center">' . $link;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Comptabilise le sous-total
|
||||||
|
$sous_total_debit += $line->debit;
|
||||||
|
$sous_total_credit += $line->credit;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="liste_total">';
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("SubTotal") . ':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td><td class="nowrap" align="right">'.price($sous_total_credit-$sous_total_debit).'</td>';
|
||||||
print '<td></td>';
|
print "<td> </td>\n";
|
||||||
print '<td></td>';
|
|
||||||
print '<td align="right">';
|
|
||||||
print price($total_debit);
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="right">';
|
|
||||||
print price($total_credit);
|
|
||||||
print '</td>';
|
|
||||||
print '<td align="right">' . price($total_credit - $total_debit) . '</td>';
|
|
||||||
print '<td align="right"></td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="2">'.$langs->trans("AccountBalance") . ':</td><td class="nowrap" align="right">'.price($total_debit).'</td><td class="nowrap" align="right">'.price($total_credit).'</td><td class="nowrap" align="right">'.price($total_credit-$total_debit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|||||||
@ -258,7 +258,6 @@ if ($action == 'export_csv') {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
$title_page = $langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||||
|
|
||||||
llxHeader('', $title_page);
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
// List
|
// List
|
||||||
@ -315,6 +314,7 @@ print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield
|
|||||||
|
|
||||||
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
print '<div class="tabsAction">' . "\n";
|
print '<div class="tabsAction">' . "\n";
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="./listbyaccount.php">' . $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . strtolower($langs->trans("AccountAccounting")) . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" name="button_delmvt" class="butAction" value="' . $langs->trans("DelBookKeeping") . '" /></div>';
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
print '<div class="inline-block divButAction"><input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . '" /></div>';
|
||||||
|
|||||||
348
htdocs/accountancy/bookkeeping/listbyaccount.php
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 Neil Orley <neil.orley@oeris.fr>
|
||||||
|
* largely based on the great work of :
|
||||||
|
* - Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
|
* - Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||||
|
* - Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@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/accountancy/bookkeeping/listbyaccount.php
|
||||||
|
* \ingroup Advanced accountancy
|
||||||
|
* \brief List operation of book keeping ordered by account number
|
||||||
|
*/
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
|
|
||||||
|
// Class
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/html.formventilation.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||||
|
|
||||||
|
// Langs
|
||||||
|
$langs->load("accountancy");
|
||||||
|
|
||||||
|
$page = GETPOST("page");
|
||||||
|
$sortorder = GETPOST("sortorder");
|
||||||
|
$sortfield = GETPOST("sortfield");
|
||||||
|
$action = GETPOST('action', 'alpha');
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
|
||||||
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$search_accountancy_code = GETPOST("search_accountancy_code");
|
||||||
|
|
||||||
|
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
|
||||||
|
if ($search_accountancy_code_start == - 1) {
|
||||||
|
$search_accountancy_code_start = '';
|
||||||
|
}
|
||||||
|
$search_label_account = GETPOST('search_label_account', 'alpha');
|
||||||
|
|
||||||
|
$search_mvt_label = GETPOST('search_mvt_label', 'alpha');
|
||||||
|
$search_direction = GETPOST('search_direction', 'alpha');
|
||||||
|
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
|
||||||
|
|
||||||
|
$limit = GETPOST('limit') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
|
if ($page == -1) { $page = 0 ; }
|
||||||
|
$offset = $limit * $page ;
|
||||||
|
$pageprev = $page - 1;
|
||||||
|
$pagenext = $page + 1;
|
||||||
|
|
||||||
|
$object = new BookKeeping($db);
|
||||||
|
|
||||||
|
$formventilation = new FormVentilation($db);
|
||||||
|
$formother = new FormOther($db);
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (empty($search_date_start)) {
|
||||||
|
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
|
||||||
|
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
|
||||||
|
}
|
||||||
|
if ($sortorder == "")
|
||||||
|
$sortorder = "ASC";
|
||||||
|
if ($sortfield == "")
|
||||||
|
$sortfield = "t.rowid";
|
||||||
|
|
||||||
|
|
||||||
|
$options = '';
|
||||||
|
$filter = array ();
|
||||||
|
|
||||||
|
if (! empty($search_date_start)) {
|
||||||
|
$filter['t.doc_date>='] = $search_date_start;
|
||||||
|
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_date_end)) {
|
||||||
|
$filter['t.doc_date<='] = $search_date_end;
|
||||||
|
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
|
||||||
|
}
|
||||||
|
if (! empty($search_doc_date)) {
|
||||||
|
$filter['t.doc_date'] = $search_doc_date;
|
||||||
|
$options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (!GETPOST("button_removefilter_x") && !GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
if (! empty($search_accountancy_code_start)) {
|
||||||
|
$filter['t.numero_compte'] = $search_accountancy_code_start;
|
||||||
|
$options .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
|
||||||
|
}
|
||||||
|
if (! empty($search_label_account)) {
|
||||||
|
$filter['t.label_compte'] = $search_label_account;
|
||||||
|
$options .= '&search_label_account=' . $search_label_account;
|
||||||
|
}
|
||||||
|
if (! empty($search_mvt_label)) {
|
||||||
|
$filter['t.label_compte'] = $search_mvt_label;
|
||||||
|
$options .= '&search_mvt_label=' . $search_mvt_label;
|
||||||
|
}
|
||||||
|
if (! empty($search_direction)) {
|
||||||
|
$filter['t.sens'] = $search_direction;
|
||||||
|
$options .= '&search_direction=' . $search_direction;
|
||||||
|
}
|
||||||
|
if (! empty($search_ledger_code)) {
|
||||||
|
$filter['t.code_journal'] = $search_ledger_code;
|
||||||
|
$options .= '&search_ledger_code=' . $search_ledger_code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Action
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||||
|
{
|
||||||
|
$search_doc_date = '';
|
||||||
|
$search_accountancy_code = '';
|
||||||
|
$search_accountancy_code_start = '';
|
||||||
|
$search_label_account = '';
|
||||||
|
$search_mvt_label = '';
|
||||||
|
$search_direction = '';
|
||||||
|
$search_ledger_code = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($action == 'delmouvconfirm') {
|
||||||
|
|
||||||
|
$mvt_num = GETPOST('mvt_num', 'int');
|
||||||
|
|
||||||
|
if (! empty($mvt_num)) {
|
||||||
|
$result = $object->deleteMvtNum($mvt_num);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
Header("Location: listbyaccount.php");
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
$title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By")) . ' ' . $langs->trans("AccountAccounting") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end);
|
||||||
|
|
||||||
|
llxHeader('', $title_page);
|
||||||
|
|
||||||
|
// List
|
||||||
|
|
||||||
|
$nbtotalofrecords = 0;
|
||||||
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
|
$nbtotalofrecords = $object->fetchAllByAccount($sortorder, $sortfield, 0, 0, $filter);
|
||||||
|
if ($nbtotalofrecords < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter);
|
||||||
|
if ($result < 0) {
|
||||||
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
|
}
|
||||||
|
$nbtotalofrecords = $result;
|
||||||
|
|
||||||
|
if ($action == 'delmouv') {
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
|
||||||
|
print $formconfirm;
|
||||||
|
}
|
||||||
|
if ($action == 'delbookkeepingyear') {
|
||||||
|
|
||||||
|
$form_question = array ();
|
||||||
|
$delyear = GETPOST('delyear');
|
||||||
|
|
||||||
|
if (empty($delyear)) {
|
||||||
|
$delyear = dol_print_date(dol_now(), '%Y');
|
||||||
|
}
|
||||||
|
$year_array = $formventilation->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||||
|
|
||||||
|
$form_question['delyear'] = array (
|
||||||
|
'name' => 'delyear',
|
||||||
|
'type' => 'select',
|
||||||
|
'label' => $langs->trans('DelYear'),
|
||||||
|
'values' => $year_array,
|
||||||
|
'default' => $delyear
|
||||||
|
);
|
||||||
|
|
||||||
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
||||||
|
print $formconfirm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||||
|
|
||||||
|
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'',0,'','',$limit);
|
||||||
|
|
||||||
|
// Reverse sort order
|
||||||
|
if ( preg_match('/^asc/i', $sortorder) )
|
||||||
|
$sortorder = "asc";
|
||||||
|
else
|
||||||
|
$sortorder = "desc";
|
||||||
|
|
||||||
|
print '<div class="tabsAction">' . "\n";
|
||||||
|
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>' . $langs->trans("AccountAccounting") . '</td>';
|
||||||
|
print_liste_field_titre($langs->trans("Docdate"), $_SERVER['PHP_SELF'], "t.doc_date", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Docref"), $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
|
||||||
|
print '<td>' . $langs->trans("SuppliersInvoices") . ' / ' . $langs->trans("CustomersInvoices") . '</td>';
|
||||||
|
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||||
|
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="GET">';
|
||||||
|
print '<td width >' . $object->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '') . '</td>';
|
||||||
|
print '<td class="liste_titre">';
|
||||||
|
print $langs->trans('From') . ': ';
|
||||||
|
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||||
|
print '<br>';
|
||||||
|
print $langs->trans('to') . ': ';
|
||||||
|
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||||
|
print '</td>';
|
||||||
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/></td>';
|
||||||
|
print '<td class="liste_titre"><input type="text" size="7" class="flat" name="search_label_account" value="' . $search_label_account . '"/></td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td align="right"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
|
||||||
|
print '<td align="right" colspan="2" class="liste_titre">';
|
||||||
|
$searchpitco=$form->showFilterAndCheckAddButtons(0);
|
||||||
|
print $searchpitco;
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = True;
|
||||||
|
|
||||||
|
$total_debit = 0;
|
||||||
|
$total_credit = 0;
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
$displayed_account_number = "";
|
||||||
|
|
||||||
|
foreach ( $object->lines as $line ) {
|
||||||
|
$var = ! $var;
|
||||||
|
|
||||||
|
$total_debit += $line->debit;
|
||||||
|
$total_credit += $line->credit;
|
||||||
|
|
||||||
|
// Permet d'afficher le compte comptable
|
||||||
|
if (length_accountg($line->numero_compte) != $displayed_account_number) {
|
||||||
|
|
||||||
|
// Affiche un Sous-Total par compte comptable
|
||||||
|
if ($displayed_account_number != "") {
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche le compte comptable en début de ligne
|
||||||
|
print "<tr>";
|
||||||
|
print '<td colspan="7" style="font-weight:bold; border-bottom: 1pt solid black;">'.length_accountg($line->numero_compte) . ' : ' . $object->get_compte_desc($line->numero_compte).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$displayed_account_number = length_accountg($line->numero_compte);
|
||||||
|
$sous_total_debit = 0;
|
||||||
|
$sous_total_credit = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr'. $bc[$var].'>';
|
||||||
|
print '<td> </td>';
|
||||||
|
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
|
||||||
|
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->doc_ref . '</a></td>';
|
||||||
|
|
||||||
|
// Affiche un lien vers la facture client/fournisseur
|
||||||
|
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
|
||||||
|
if ($line->doc_type == 'supplier_invoice')
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/fourn/facture/list.php?search_ref_supplier=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
elseif ($line->doc_type == 'customer_invoice')
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a></td>' : '<td><a href="/compta/facture/list.php?search_ref=' . $doc_ref . '">' . $line->label_compte . '</a><br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
else
|
||||||
|
print strlen(length_accounta($line->code_tiers)) == 0 ? '<td>' . $line->label_compte . '</td>' : '<td>' . $line->label_compte . '<br /><span style="font-size:0.8em">(' . length_accounta($line->code_tiers) . ')</span></td>';
|
||||||
|
|
||||||
|
|
||||||
|
print '<td align="right">' . price($line->debit) . '</td>';
|
||||||
|
print '<td align="right">' . price($line->credit) . '</td>';
|
||||||
|
print '<td align="center">' . $line->code_journal . '</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||||
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||||
|
print '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Comptabilise le sous-total
|
||||||
|
$sous_total_debit += $line->debit;
|
||||||
|
$sous_total_credit += $line->credit;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Affiche un Sous-Total du dernier compte comptable affiché
|
||||||
|
print '<tr class="liste_total"><td align="right" colspan="4">'.$langs->trans("SubTotal").':</td><td class="nowrap" align="right">'.price($sous_total_debit).'</td><td class="nowrap" align="right">'.price($sous_total_credit).'</td>';
|
||||||
|
print "<td> </td>\n";
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
|
// Affiche le Total
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
print '<td align="right" colspan="4">'.$langs->trans("Total").':</td>';
|
||||||
|
print '<td align="right">';
|
||||||
|
print price($total_debit);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="right">';
|
||||||
|
print price($total_credit);
|
||||||
|
print '</td>';
|
||||||
|
print '<td colspan="2"></td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
|
||||||
|
|
||||||
|
$db->close();
|
||||||
@ -109,8 +109,6 @@ class BookKeeping extends CommonObject
|
|||||||
public function create(User $user, $notrigger = false) {
|
public function create(User $user, $notrigger = false) {
|
||||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
global $langs;
|
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
@ -168,11 +166,11 @@ class BookKeeping extends CommonObject
|
|||||||
// first check if line not yet in bookkeeping
|
// first check if line not yet in bookkeeping
|
||||||
$sql = "SELECT count(*) as nb";
|
$sql = "SELECT count(*) as nb";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||||
$sql .= " WHERE doc_type = '" . $this->db->escape($this->doc_type) . "'";
|
$sql .= " WHERE doc_type = '" . $this->doc_type . "'";
|
||||||
$sql .= " AND fk_docdet = " . $this->fk_docdet;
|
$sql .= " AND fk_docdet = " . $this->fk_docdet;
|
||||||
$sql .= " AND numero_compte = '" . $this->db->escape($this->numero_compte) . "'";
|
$sql .= " AND numero_compte = '" . $this->numero_compte . "'";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . ":: create ", LOG_DEBUG);
|
dol_syslog(get_class($this) . ":: create sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
@ -204,12 +202,11 @@ class BookKeeping extends CommonObject
|
|||||||
$this->piece_num = $objnum->maxpiecenum;
|
$this->piece_num = $objnum->maxpiecenum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dol_syslog(get_class($this) . ":: create this->piece_num=" . $this->piece_num, LOG_DEBUG);
|
||||||
if (empty($this->piece_num)) {
|
if (empty($this->piece_num)) {
|
||||||
$this->piece_num = 1;
|
$this->piece_num = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this) . ":: create this->piece_num=" . $this->piece_num, LOG_DEBUG);
|
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
if (empty($this->date_create)) {
|
if (empty($this->date_create)) {
|
||||||
$this->date_create = $now;
|
$this->date_create = $now;
|
||||||
@ -236,26 +233,26 @@ class BookKeeping extends CommonObject
|
|||||||
|
|
||||||
$sql .= ") VALUES (";
|
$sql .= ") VALUES (";
|
||||||
|
|
||||||
$sql .= "'" . $this->db->idate($this->doc_date) . "'";
|
$sql .= "'" . $this->doc_date . "'";
|
||||||
$sql .= ",'" . $this->db->escape($this->doc_type) . "'";
|
$sql .= ",'" . $this->doc_type . "'";
|
||||||
$sql .= ",'" . $this->db->escape($this->doc_ref) . "'";
|
$sql .= ",'" . $this->doc_ref . "'";
|
||||||
$sql .= "," . $this->fk_doc;
|
$sql .= "," . $this->fk_doc;
|
||||||
$sql .= "," . $this->fk_docdet;
|
$sql .= "," . $this->fk_docdet;
|
||||||
$sql .= ",'" . $this->db->escape($this->code_tiers) . "'";
|
$sql .= ",'" . $this->code_tiers . "'";
|
||||||
$sql .= ",'" . $this->db->escape($this->numero_compte) . "'";
|
$sql .= ",'" . $this->numero_compte . "'";
|
||||||
$sql .= ",'" . $this->db->escape($this->label_compte) . "'";
|
$sql .= ",'" . $this->db->escape($this->label_compte) . "'";
|
||||||
$sql .= "," . $this->debit;
|
$sql .= "," . $this->debit;
|
||||||
$sql .= "," . $this->credit;
|
$sql .= "," . $this->credit;
|
||||||
$sql .= "," . $this->montant;
|
$sql .= "," . $this->montant;
|
||||||
$sql .= ",'" . $this->db->escape($this->sens) . "'";
|
$sql .= ",'" . $this->sens . "'";
|
||||||
$sql .= ",'" . $this->fk_user_author . "'";
|
$sql .= ",'" . $this->fk_user_author . "'";
|
||||||
$sql .= ",'" . $this->date_create . "'";
|
$sql .= ",'" . $this->date_create . "'";
|
||||||
$sql .= ",'" . $this->db->escape($this->code_journal) . "'";
|
$sql .= ",'" . $this->code_journal . "'";
|
||||||
$sql .= "," . $this->piece_num;
|
$sql .= "," . $this->piece_num;
|
||||||
|
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . ":: create", LOG_DEBUG);
|
dol_syslog(get_class($this) . ":: create sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
$id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
|
||||||
@ -267,25 +264,25 @@ class BookKeeping extends CommonObject
|
|||||||
$result = - 2;
|
$result = - 2;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error Create Error ' . $result . ' lecture ID';
|
$this->errors[] = 'Error Create Error ' . $result . ' lecture ID';
|
||||||
dol_syslog(__METHOD__ . ' $result='.$result.' ' . implode(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = - 1;
|
$result = - 1;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' $result='.$result.' ' . implode(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = - 3;
|
$result = - 3;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = $langs->trans('BookeppingLineAlreayExists');
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' $result='.$result.' ' . implode(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = - 5;
|
$result = - 5;
|
||||||
$error ++;
|
$error ++;
|
||||||
$this->errors[] = 'Error ' . $this->db->lasterror();
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . ' $result='.$result.' '. implode(',', $this->errors), LOG_ERR);
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
@ -531,6 +528,118 @@ class BookKeeping 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
|
||||||
|
* @param string $filtermode filter mode (AND or OR)
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
|
||||||
|
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||||
|
|
||||||
|
$sql = 'SELECT';
|
||||||
|
$sql .= ' t.rowid,';
|
||||||
|
|
||||||
|
$sql .= " t.doc_date,";
|
||||||
|
$sql .= " t.doc_type,";
|
||||||
|
$sql .= " t.doc_ref,";
|
||||||
|
$sql .= " t.fk_doc,";
|
||||||
|
$sql .= " t.fk_docdet,";
|
||||||
|
$sql .= " t.code_tiers,";
|
||||||
|
$sql .= " t.numero_compte,";
|
||||||
|
$sql .= " t.label_compte,";
|
||||||
|
$sql .= " t.debit,";
|
||||||
|
$sql .= " t.credit,";
|
||||||
|
$sql .= " t.montant,";
|
||||||
|
$sql .= " t.sens,";
|
||||||
|
$sql .= " t.fk_user_author,";
|
||||||
|
$sql .= " t.import_key,";
|
||||||
|
$sql .= " t.code_journal,";
|
||||||
|
$sql .= " t.piece_num";
|
||||||
|
|
||||||
|
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||||
|
|
||||||
|
// Manage filter
|
||||||
|
$sqlwhere = array ();
|
||||||
|
if (count($filter) > 0) {
|
||||||
|
foreach ( $filter as $key => $value ) {
|
||||||
|
if ($key == 't.doc_date') {
|
||||||
|
$sqlwhere[] = $key . '=\'' . $this->db->idate($value) . '\'';
|
||||||
|
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||||
|
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
|
||||||
|
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.code_tiers>=' || $key == 't.code_tiers<=') {
|
||||||
|
$sqlwhere[] = $key . '\'' . $this->db->escape($value) . '\'';
|
||||||
|
} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {
|
||||||
|
$sqlwhere[] = $key . '=' . $value;
|
||||||
|
} elseif ($key == 't.code_tiers' || $key == 't.numero_compte') {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
|
||||||
|
} elseif ($key == 't.label_compte') {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
|
||||||
|
}else {
|
||||||
|
$sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($sqlwhere) > 0) {
|
||||||
|
$sql .= ' WHERE ' . implode(' ' . $filtermode . ' ', $sqlwhere);
|
||||||
|
}
|
||||||
|
// Affichage par compte comptable
|
||||||
|
$sql .= ' ORDER BY t.numero_compte ASC';
|
||||||
|
if (! empty($sortfield)) {
|
||||||
|
$sql .= ', ' . $sortfield . ' ' .$sortorder;
|
||||||
|
}
|
||||||
|
if (! empty($limit)) {
|
||||||
|
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
|
||||||
|
}
|
||||||
|
$this->lines = array ();
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$num = $this->db->num_rows($resql);
|
||||||
|
|
||||||
|
while ( $obj = $this->db->fetch_object($resql) ) {
|
||||||
|
$line = new BookKeepingLine();
|
||||||
|
|
||||||
|
$line->id = $obj->rowid;
|
||||||
|
|
||||||
|
$line->doc_date = $this->db->jdate($obj->doc_date);
|
||||||
|
$line->doc_type = $obj->doc_type;
|
||||||
|
$line->doc_ref = $obj->doc_ref;
|
||||||
|
$line->fk_doc = $obj->fk_doc;
|
||||||
|
$line->fk_docdet = $obj->fk_docdet;
|
||||||
|
$line->code_tiers = $obj->code_tiers;
|
||||||
|
$line->numero_compte = $obj->numero_compte;
|
||||||
|
$line->label_compte = $obj->label_compte;
|
||||||
|
$line->debit = $obj->debit;
|
||||||
|
$line->credit = $obj->credit;
|
||||||
|
$line->montant = $obj->montant;
|
||||||
|
$line->sens = $obj->sens;
|
||||||
|
$line->fk_user_author = $obj->fk_user_author;
|
||||||
|
$line->import_key = $obj->import_key;
|
||||||
|
$line->code_journal = $obj->code_journal;
|
||||||
|
$line->piece_num = $obj->piece_num;
|
||||||
|
|
||||||
|
$this->lines[] = $line;
|
||||||
|
}
|
||||||
|
$this->db->free($resql);
|
||||||
|
|
||||||
|
return $num;
|
||||||
|
} else {
|
||||||
|
$this->errors[] = 'Error ' . $this->db->lasterror();
|
||||||
|
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
|
||||||
|
|
||||||
|
return - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load object in memory from the database
|
* Load object in memory from the database
|
||||||
*
|
*
|
||||||
@ -947,49 +1056,6 @@ class BookKeeping extends CommonObject
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete bookkepping by year
|
|
||||||
*
|
|
||||||
* @param string $delyear year to delete
|
|
||||||
* @param string $deljournal journal to delete
|
|
||||||
* @return int Result
|
|
||||||
*/
|
|
||||||
function deleteByYearAndJournal($delyear,$deljournal) {
|
|
||||||
$this->db->begin();
|
|
||||||
|
|
||||||
$sqlwhere=array();
|
|
||||||
|
|
||||||
// first check if line not yet in bookkeeping
|
|
||||||
$sql = "DELETE";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
|
||||||
if (!empty($delyear)) {
|
|
||||||
$sqlwhere[] .= " YEAR(doc_date) = " . $delyear;
|
|
||||||
}
|
|
||||||
if (!empty($deljournal)) {
|
|
||||||
$sqlwhere[] .= " code_journal = '" . $this->db->escape($deljournal)."'";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (count($sqlwhere)>0) {
|
|
||||||
$sql.=" WHERE ".implode(' AND ', $sqlwhere);
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
|
|
||||||
if (! $resql) {
|
|
||||||
$this->errors[] = "Error " . $this->db->lasterror();
|
|
||||||
foreach ( $this->errors as $errmsg ) {
|
|
||||||
dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR);
|
|
||||||
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
|
|
||||||
}
|
|
||||||
$this->db->rollback();
|
|
||||||
return - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->db->commit();
|
|
||||||
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete bookkepping by piece number
|
* Delete bookkepping by piece number
|
||||||
*
|
*
|
||||||
@ -1248,6 +1314,122 @@ class BookKeeping extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return list of accounts with label by chart of accounts
|
||||||
|
*
|
||||||
|
* @param string $selectid Preselected chart of accounts
|
||||||
|
* @param string $htmlname Name of field in html form
|
||||||
|
* @param int $showempty Add an empty field
|
||||||
|
* @param array $event Event options
|
||||||
|
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
|
||||||
|
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
|
||||||
|
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
|
||||||
|
*
|
||||||
|
* @return string String with HTML select
|
||||||
|
*/
|
||||||
|
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||||
|
|
||||||
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
|
$sql = "SELECT DISTINCT ab.numero_compte as account_number, aa.label as label, aa.rowid as rowid, aa.fk_pcg_version";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.account_number = ab.numero_compte";
|
||||||
|
$sql .= " AND aa.active = 1";
|
||||||
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
|
$sql .= " ORDER BY account_number ASC";
|
||||||
|
|
||||||
|
dol_syslog(get_class($this) . "::select_account", LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
|
||||||
|
if (!$resql) {
|
||||||
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
|
dol_syslog(get_class($this) . "::select_account " . $this->error, LOG_ERR);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out = ajax_combobox($htmlname, $event);
|
||||||
|
|
||||||
|
$options = array();
|
||||||
|
$selected = null;
|
||||||
|
|
||||||
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
|
$label = length_accountg($obj->account_number) . ' - ' . $obj->label;
|
||||||
|
$label = dol_trunc($label, $trunclength);
|
||||||
|
|
||||||
|
$select_value_in = $obj->rowid;
|
||||||
|
$select_value_out = $obj->rowid;
|
||||||
|
|
||||||
|
if ($select_in == 1) {
|
||||||
|
$select_value_in = $obj->account_number;
|
||||||
|
}
|
||||||
|
if ($select_out == 1) {
|
||||||
|
$select_value_out = $obj->account_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remember guy's we store in database llx_facturedet the rowid of accounting_account and not the account_number
|
||||||
|
// Because same account_number can be share between different accounting_system and do have the same meaning
|
||||||
|
if (($selectid != '') && $selectid == $select_value_in) {
|
||||||
|
$selected = $select_value_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
$options[$select_value_out] = $label;
|
||||||
|
}
|
||||||
|
|
||||||
|
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
|
||||||
|
$this->db->free($resql);
|
||||||
|
return $out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description of a root accounting account
|
||||||
|
*
|
||||||
|
* @param string $account Accounting account
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function get_compte_racine($account = null)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT root.account_number, root.label as label";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||||
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as parent ON aa.account_parent = parent.rowid";
|
||||||
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as root ON parent.account_parent = root.rowid";
|
||||||
|
$sql .= " WHERE aa.account_number = '" . $account . "'";
|
||||||
|
$sql .= " AND parent.active = 1";
|
||||||
|
$sql .= " AND root.active = 1";
|
||||||
|
|
||||||
|
|
||||||
|
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql) {
|
||||||
|
$obj = '';
|
||||||
|
if ($this->db->num_rows($resql)) {
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $obj->label;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of accounting account
|
* Description of accounting account
|
||||||
*
|
*
|
||||||
@ -1258,7 +1440,6 @@ class BookKeeping extends CommonObject
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
$pcgver = $conf->global->CHARTOFACCOUNTS;
|
||||||
|
|
||||||
$sql = "SELECT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version, cat.label as category";
|
$sql = "SELECT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version, cat.label as category";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa ";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa ";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||||
@ -1266,7 +1447,6 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= " AND asy.rowid = " . $pcgver;
|
$sql .= " AND asy.rowid = " . $pcgver;
|
||||||
$sql .= " AND aa.active = 1";
|
$sql .= " AND aa.active = 1";
|
||||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid";
|
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid";
|
||||||
|
|
||||||
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
dol_syslog(get_class($this) . "::select_account sql=" . $sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
@ -1284,7 +1464,6 @@ class BookKeeping extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
$this->error = "Error " . $this->db->lasterror();
|
$this->error = "Error " . $this->db->lasterror();
|
||||||
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
dol_syslog(__METHOD__ . " " . $this->error, LOG_ERR);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -16,12 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||||
|
$nodateexport = $conf->global->ACCOUNTING_EXPORT_NO_DATE_IN_FILENAME;
|
||||||
|
|
||||||
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
||||||
|
|
||||||
header('Content-Type: text/csv');
|
header('Content-Type: text/csv');
|
||||||
if ($prefix)
|
|
||||||
$filename = $prefix . "_" . "journal_" . $journal . $date_export . "." . $format;
|
$filename = ($prefix?$prefix . "_":""). "journal_" . $journal . ($nodateexport?"":$date_export) . "." . $format;
|
||||||
else
|
|
||||||
$filename = "journal_" . $journal . $date_export . "." . $format;
|
|
||||||
header('Content-Disposition: attachment;filename=' . $filename);
|
header('Content-Disposition: attachment;filename=' . $filename);
|
||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2012-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2015-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1418,11 +1418,11 @@ else
|
|||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
@ -1463,7 +1463,7 @@ else
|
|||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||||
|
|||||||
@ -591,11 +591,11 @@ if ($rowid > 0)
|
|||||||
// Login
|
// Login
|
||||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED))
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Login").' / '.$langs->trans("Id").'</td><td class="valeur">'.$object->login.' </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td>'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
print '<tr><td class="titlefield">'.$langs->trans("Type").'</td><td class="valeur">'.$adht->getNomUrl(1)."</td></tr>\n";
|
||||||
|
|
||||||
// Morphy
|
// Morphy
|
||||||
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
print '<tr><td>'.$langs->trans("Nature").'</td><td class="valeur" >'.$object->getmorphylib().'</td>';
|
||||||
@ -630,7 +630,7 @@ if ($rowid > 0)
|
|||||||
print '<table class="border tableforfield" width="100%">';
|
print '<table class="border tableforfield" width="100%">';
|
||||||
|
|
||||||
// Birthday
|
// Birthday
|
||||||
print '<tr><td>'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
print '<tr><td class="titlefield">'.$langs->trans("Birthday").'</td><td class="valeur">'.dol_print_date($object->birth,'day').'</td></tr>';
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
print '<tr><td>'.$langs->trans("Public").'</td><td class="valeur">'.yn($object->public).'</td></tr>';
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -353,7 +354,7 @@ class Adherent extends CommonObject
|
|||||||
|
|
||||||
if (count($this->errors))
|
if (count($this->errors))
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::create ".join(',',$this->errors), LOG_ERR);
|
dol_syslog(get_class($this)."::create ".implode(',',$this->errors), LOG_ERR);
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -3;
|
return -3;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
* Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
* Copyright (C) 2013-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
|
* Copyright (C) 2014-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -83,7 +84,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search
|
|||||||
// List of fields to search into when doing a "search in all"
|
// List of fields to search into when doing a "search in all"
|
||||||
$fieldstosearchall = array(
|
$fieldstosearchall = array(
|
||||||
'd.rowid'=>'Ref',
|
'd.rowid'=>'Ref',
|
||||||
//'d.ref'=>'Ref',
|
'd.login'=>'Login',
|
||||||
'd.lastname'=>'Lastname',
|
'd.lastname'=>'Lastname',
|
||||||
'd.firstname'=>'Firstname',
|
'd.firstname'=>'Firstname',
|
||||||
'd.login'=>'Login',
|
'd.login'=>'Login',
|
||||||
@ -328,7 +329,7 @@ if ($resql)
|
|||||||
if ($sall)
|
if ($sall)
|
||||||
{
|
{
|
||||||
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
|
||||||
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
|
print $langs->trans("FilterOnInto", $sall) . implode(', ',$fieldstosearchall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter on categories
|
// Filter on categories
|
||||||
|
|||||||
@ -54,7 +54,7 @@ $langs->load("companies");
|
|||||||
|
|
||||||
$memberstatic=new Adherent($db);
|
$memberstatic=new Adherent($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans("MembersStatisticsByProperties"),'','',0,0,array('http://www.google.com/jsapi'));
|
llxHeader('',$langs->trans("MembersStatisticsByProperties"),'','',0,0,array('https://www.google.com/jsapi'));
|
||||||
|
|
||||||
$title=$langs->trans("MembersStatisticsByProperties");
|
$title=$langs->trans("MembersStatisticsByProperties");
|
||||||
|
|
||||||
|
|||||||
@ -53,7 +53,7 @@ $langs->load("companies");
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$arrayjs=array('http://www.google.com/jsapi');
|
$arrayjs=array('https://www.google.com/jsapi');
|
||||||
if (! empty($conf->dol_use_jmobile)) $arrayjs=array();
|
if (! empty($conf->dol_use_jmobile)) $arrayjs=array();
|
||||||
|
|
||||||
$title=$langs->trans("Statistics");
|
$title=$langs->trans("Statistics");
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
|
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -36,7 +37,11 @@ $langs->load("admin");
|
|||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
|
$value = GETPOST('value','alpha');
|
||||||
|
$param = GETPOST('param','alpha');
|
||||||
$cancel = GETPOST('cancel','alpha');
|
$cancel = GETPOST('cancel','alpha');
|
||||||
|
$scandir = GETPOST('scandir','alpha');
|
||||||
|
$type = 'action';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -71,7 +76,21 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||||
|
if ($action == 'setModuleOptions')
|
||||||
|
{
|
||||||
|
|
||||||
|
if ($param) $res = dolibarr_set_const($db,$param,$value,'chaine',0,'',$conf->entity);
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
|
||||||
@ -79,6 +98,85 @@ if ($action == 'set')
|
|||||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
else if ($action == 'specimen') // For orders
|
||||||
|
{
|
||||||
|
$modele=GETPOST('module','alpha');
|
||||||
|
|
||||||
|
$commande = new CommandeFournisseur($db);
|
||||||
|
$commande->initAsSpecimen();
|
||||||
|
$commande->thirdparty=$specimenthirdparty;
|
||||||
|
|
||||||
|
// 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/action/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,$commande);
|
||||||
|
|
||||||
|
if ($module->write_file($commande,$langs) > 0)
|
||||||
|
{
|
||||||
|
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($module->error, $module->errors, 'errors');
|
||||||
|
dol_syslog($module->error, LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
|
||||||
|
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Activate a model
|
||||||
|
else if ($action == 'setmodel')
|
||||||
|
{
|
||||||
|
print "sssd".$value;
|
||||||
|
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ($action == 'del')
|
||||||
|
{
|
||||||
|
$ret = delDocumentModel($value, $type);
|
||||||
|
if ($ret > 0)
|
||||||
|
{
|
||||||
|
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF',$conf->entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set default model
|
||||||
|
else if ($action == 'setdoc')
|
||||||
|
{
|
||||||
|
if (dolibarr_set_const($db, "ACTION_EVENT_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->ACTION_EVENT_ADDON_PDF = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
// On active le modele
|
||||||
|
$ret = delDocumentModel($value, $type);
|
||||||
|
if ($ret > 0)
|
||||||
|
{
|
||||||
|
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +184,7 @@ if ($action == 'set')
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$formactions=new FormActions($db);
|
$formactions=new FormActions($db);
|
||||||
|
$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
@ -95,14 +193,151 @@ print "<br>\n";
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
|
||||||
print '<input type="hidden" name="action" value="set">';
|
|
||||||
|
|
||||||
$head=agenda_prepare_head();
|
$head=agenda_prepare_head();
|
||||||
|
|
||||||
dol_fiche_head($head, 'other', $langs->trans("Agenda"), 0, 'action');
|
dol_fiche_head($head, 'other', $langs->trans("Agenda"), 0, 'action');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Documents models for supplier orders
|
||||||
|
*/
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("AgendaModelModule"),'','');
|
||||||
|
|
||||||
|
// Define array def of models
|
||||||
|
$def = array();
|
||||||
|
|
||||||
|
$sql = "SELECT nom";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||||
|
$sql.= " WHERE type = 'action'";
|
||||||
|
$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 width="100">'.$langs->trans("Name").'</td>'."\n";
|
||||||
|
print '<td>'.$langs->trans("Description").'</td>'."\n";
|
||||||
|
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="40">'.$langs->trans("ShortInfo").'</td>';
|
||||||
|
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
|
||||||
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
clearstatcache();
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
foreach ($dirmodels as $reldir)
|
||||||
|
{
|
||||||
|
$dir = dol_buildpath($reldir."core/modules/action/doc/");
|
||||||
|
|
||||||
|
if (is_dir($dir))
|
||||||
|
{
|
||||||
|
$handle=opendir($dir);
|
||||||
|
if (is_resource($handle))
|
||||||
|
{
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$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, new ActionComm($db));
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">\n";
|
||||||
|
print "<td>";
|
||||||
|
print (empty($module->name)?$name:$module->name);
|
||||||
|
print "</td>\n";
|
||||||
|
print "<td>\n";
|
||||||
|
require_once $dir.$file;
|
||||||
|
$module = new $classname($db,$specimenthirdparty);
|
||||||
|
if (method_exists($module,'info'))
|
||||||
|
print $module->info($langs);
|
||||||
|
else
|
||||||
|
print $module->description;
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
|
// Active
|
||||||
|
if (in_array($name, $def))
|
||||||
|
{
|
||||||
|
|
||||||
|
print '<td align="center">'."\n";
|
||||||
|
if ($conf->global->ACTION_EVENT_ADDON_PDF != "$name")
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">';
|
||||||
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
|
print '</a>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print img_picto($langs->trans("Enabled"),'switch_on');
|
||||||
|
}
|
||||||
|
print "</td>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<td align="center">'."\n";
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmodel&value='.$name.'&scandir='.$module->scandir.'&label='.urlencode($module->name).'&type=action">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||||
|
print "</td>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default
|
||||||
|
print '<td align="center">';
|
||||||
|
if ($conf->global->ACTION_EVENT_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).'&type=action"" 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);
|
||||||
|
print '<td align="center">';
|
||||||
|
print $form->textwithpicto('',$htmltooltip,1,0);
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'order').'</a>';
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
|
print "</tr>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print '</table><br>';
|
||||||
|
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
print '<form action="'.$_SERVER["PHP_SELF"].'" name="agenda">';
|
||||||
|
print '<input type="hidden" name="action" value="set">';
|
||||||
|
|
||||||
print '<table class="noborder allwidth">'."\n";
|
print '<table class="noborder allwidth">'."\n";
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
|
|||||||
@ -602,6 +602,8 @@ print "</td></tr>\n";
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Shippable Icon in List
|
// Shippable Icon in List
|
||||||
|
/* Kept as hidden feature for the moment, result seems bugged.
|
||||||
|
Whet is definition of "shippable" according to all different STOCK_CALCULATE_... options ?
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
|
||||||
@ -617,6 +619,8 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
|
|||||||
print '</a></td>';
|
print '</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
/* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
|
||||||
|
/*
|
||||||
// Ask for payment bank during order
|
// Ask for payment bank during order
|
||||||
if ($conf->banque->enabled)
|
if ($conf->banque->enabled)
|
||||||
{
|
{
|
||||||
@ -676,6 +680,7 @@ else
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
|
||||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||||
@ -596,7 +596,9 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||||
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
if ($value == 'formula' && empty($_POST['formula'])) continue;
|
||||||
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
if ((! isset($_POST[$value]) || $_POST[$value]=='')
|
||||||
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy'))) // Fields that are not mandatory
|
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
|
||||||
|
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
|
||||||
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
$ok=0;
|
$ok=0;
|
||||||
@ -1085,7 +1087,7 @@ if ($id)
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||||
$formmail=new FormMail($db);
|
$formmail=new FormMail($db);
|
||||||
$tmp=$formmail->getAvailableSubstitKey('form');
|
$tmp=$formmail->getAvailableSubstitKey('form');
|
||||||
print join(', ', $tmp);
|
print implode(', ', $tmp);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -372,7 +372,6 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Name").'</td>';
|
print '<td>'.$langs->trans("Name").'</td>';
|
||||||
|
|||||||
@ -232,6 +232,20 @@ elseif ($action == 'set_FICHINTER_PRINT_PRODUCTS')
|
|||||||
{
|
{
|
||||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
}
|
}
|
||||||
|
} elseif ($action == 'set_FICHINTER_USE_SERVICE_DURATION') {
|
||||||
|
$val = GETPOST('FICHINTER_USE_SERVICE_DURATION', 'alpha');
|
||||||
|
$res = dolibarr_set_const($db, "FICHINTER_USE_SERVICE_DURATION", ($val == 'on' ? 1 : 0), 'bool', 0, '',
|
||||||
|
$conf->entity);
|
||||||
|
|
||||||
|
if (!$res > 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
} else {
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -568,7 +582,22 @@ print '/>';
|
|||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
// Use services duration
|
||||||
|
$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_FICHINTER_USE_SERVICE_DURATION">';
|
||||||
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print '<td>';
|
||||||
|
print $langs->trans("UseServicesDurationOnFichinter");
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"' . ($conf->global->FICHINTER_USE_SERVICE_DURATION?' checked':'') . '>';
|
||||||
|
print '</td>';
|
||||||
|
print '<td align="right">';
|
||||||
|
print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '">';
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -75,28 +76,28 @@ if ($action == 'update')
|
|||||||
|
|
||||||
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);
|
||||||
|
|
||||||
$val=(join(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array()))));
|
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array()))));
|
||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', join(',',colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', implode(',',colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'),array())),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
$val=(join(',',(colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array()))));
|
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array()))));
|
||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', join(',',colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', implode(',',colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'),array())),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
$val=(join(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array()))));
|
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array()))));
|
||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', join(',',colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', implode(',',colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'),array())),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
$val=(join(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array()))));
|
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array()))));
|
||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', join(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', implode(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'),array())),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_del_const($db, "THEME_ELDY_USE_HOVER", $conf->entity);
|
if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_del_const($db, "THEME_ELDY_USE_HOVER", $conf->entity);
|
||||||
else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity);
|
else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity);
|
||||||
|
|
||||||
$val=(join(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array()))));
|
$val=(implode(',',(colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array()))));
|
||||||
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
||||||
else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', join(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array())),'chaine',0,'',$conf->entity);
|
else dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', implode(',',colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'),array())),'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_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "MAIN_SIZE_SHORTLISTE_LIMIT", $_POST["main_size_shortliste_limit"],'chaine',0,'',$conf->entity);
|
||||||
|
|||||||
@ -237,7 +237,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<input size="25" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
print '<input size="25" type="text" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';
|
||||||
}
|
}
|
||||||
print '</td><td>secret</td></tr>';
|
print '</td><td>'.$langs->trans('Password').' (ex: secret)</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2005 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011-2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -437,7 +437,7 @@ if (function_exists("ldap_connect"))
|
|||||||
print "search: *<br>\n";
|
print "search: *<br>\n";
|
||||||
print "userDN: ".$conf->global->LDAP_USER_DN."<br>\n";
|
print "userDN: ".$conf->global->LDAP_USER_DN."<br>\n";
|
||||||
print "useridentifier: ".$conf->global->LDAP_KEY_USERS."<br>\n";
|
print "useridentifier: ".$conf->global->LDAP_KEY_USERS."<br>\n";
|
||||||
print "required_fields: ".join(',',$required_fields)."<br>\n";
|
print "required_fields: ".implode(',',$required_fields)."<br>\n";
|
||||||
print "=> ".count($liste)." records<br>\n";
|
print "=> ".count($liste)." records<br>\n";
|
||||||
print "\n<br>";
|
print "\n<br>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -304,7 +304,7 @@ $h++;
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $mode, $langs->trans("Modules"));
|
dol_fiche_head($head, $mode, '');
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
@ -443,11 +443,11 @@ if ($mode != 'marketplace')
|
|||||||
if ($familykey!=$oldfamily)
|
if ($familykey!=$oldfamily)
|
||||||
{
|
{
|
||||||
print '<tr class="liste_titre">'."\n";
|
print '<tr class="liste_titre">'."\n";
|
||||||
print '<td colspan="6">';
|
print '<td colspan="5">';
|
||||||
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
$familytext=empty($familyinfo[$familykey]['label'])?$familykey:$familyinfo[$familykey]['label'];
|
||||||
print $familytext;
|
print $familytext;
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<td align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
print '<td colspan="2" align="right">'.$langs->trans("SetupShort").'</td>'."\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$atleastoneforfamily=0;
|
$atleastoneforfamily=0;
|
||||||
//print "<tr><td>yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
//print "<tr><td>yy".$oldfamily."-".$familykey."-".$atleastoneforfamily."<br></td><tr>";
|
||||||
|
|||||||
@ -118,7 +118,11 @@ llxHeader('',$langs->trans("NotificationSetup"));
|
|||||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
print load_fiche_titre($langs->trans("NotificationSetup"),$linkback,'title_setup');
|
print load_fiche_titre($langs->trans("NotificationSetup"),$linkback,'title_setup');
|
||||||
|
|
||||||
print $langs->trans("NotificationsDesc").'<br><br>';
|
print $langs->trans("NotificationsDesc").'<br>';
|
||||||
|
print $langs->trans("NotificationsDescUser").'<br>';
|
||||||
|
if (! empty($conf->societe->enabled)) print $langs->trans("NotificationsDescContact").'<br>';
|
||||||
|
print $langs->trans("NotificationsDescGlobal").'<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -141,18 +145,19 @@ print '</td>';
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
if ($conf->societe->enabled)
|
// Notification per contacts
|
||||||
{
|
$title=$langs->trans("ListOfNotificationsPerUser");
|
||||||
print load_fiche_titre($langs->trans("ListOfNotificationsPerContact"),'','');
|
if (! empty($conf->societe->enabled)) $title=$langs->trans("ListOfNotificationsPerUserOrContact");
|
||||||
|
print load_fiche_titre($title,'','');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td>'.$langs->trans("Module").'</td>';
|
|
||||||
print '<td>'.$langs->trans("Code").'</td>';
|
|
||||||
print '<td>'.$langs->trans("Label").'</td>';
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
|
/*print '<td>'.$langs->trans("Code").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Label").'</td>';*/
|
||||||
//print '<td align="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
//print '<td align="right">'.$langs->trans("NbOfTargetedContacts").'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -160,7 +165,11 @@ if ($conf->societe->enabled)
|
|||||||
$notificationtrigger=new InterfaceNotification($db);
|
$notificationtrigger=new InterfaceNotification($db);
|
||||||
$listofnotifiedevents=$notificationtrigger->getListOfManagedEvents();
|
$listofnotifiedevents=$notificationtrigger->getListOfManagedEvents();
|
||||||
|
|
||||||
|
print '<tr '.$bc[$var].'>';
|
||||||
|
print '<td>';
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
$i=0;
|
||||||
foreach($listofnotifiedevents as $notifiedevent)
|
foreach($listofnotifiedevents as $notifiedevent)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -172,21 +181,17 @@ if ($conf->societe->enabled)
|
|||||||
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order');
|
||||||
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention');
|
||||||
|
|
||||||
print '<tr '.$bc[$var].'>';
|
if ($i) print ', ';
|
||||||
print '<td>'.$elementLabel.'</td>';
|
print $label;
|
||||||
print '<td>'.$notifiedevent['code'].'</td>';
|
|
||||||
print '<td>'.$label.'</td>';
|
$i++;
|
||||||
/*print '<td align="right">';
|
|
||||||
$tmparray = $notify->getNotificationsArray($notifiedevent['code'], 0);
|
|
||||||
print count($tmparray);
|
|
||||||
print '</td>';*/
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '* '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
print '* '.$langs->trans("GoOntoUserCardToAddMore").'<br>';
|
||||||
print '<br>';
|
if (! empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'<br>';
|
||||||
}
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("ListOfFixedNotifications"),'','');
|
print load_fiche_titre($langs->trans("ListOfFixedNotifications"),'','');
|
||||||
|
|||||||
@ -69,7 +69,23 @@ if ($action == 'setmod')
|
|||||||
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "PAYMENT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($action == 'set_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS')
|
||||||
|
{
|
||||||
|
$freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS'); // No alpha here, we want exact string
|
||||||
|
|
||||||
|
$res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$freetext,'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -215,6 +231,33 @@ foreach ($dirmodels as $reldir)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
print "<br />";
|
||||||
|
|
||||||
|
print load_fiche_titre($langs->trans("OtherOptions"),'','');
|
||||||
|
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||||
|
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||||
|
print '<td width="80"> </td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Allow payments on different thirdparties bills but same parent company
|
||||||
|
$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_FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS" />';
|
||||||
|
print '<tr '.$bc[$var].'><td>';
|
||||||
|
print $langs->trans("PaymentOnDifferentThirdBills");
|
||||||
|
print '</td><td width="60" align="center">';
|
||||||
|
print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS",$conf->global->FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS,1);
|
||||||
|
print '</td><td align="right">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||||
|
print "</td></tr>\n";
|
||||||
|
print '</form>';
|
||||||
|
|
||||||
|
print '</table>';
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -200,13 +200,13 @@ if ($result)
|
|||||||
{
|
{
|
||||||
print img_picto($langs->trans("Active"),'tick');
|
print img_picto($langs->trans("Active"),'tick');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<a href="perms.php?pid='.$obj->id.'&action=remove#'.$objMod->getName().'">'.img_edit_remove().'</a>';
|
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=remove">'.img_edit_remove().'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print '<a href="perms.php?pid='.$obj->id.'&action=add#'.$objMod->getName().'">'.img_edit_add().'</a>';
|
print '<a class="reposition" href="perms.php?pid='.$obj->id.'&action=add">'.img_edit_add().'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -141,7 +141,7 @@ print '</td></tr>';
|
|||||||
// ICS
|
// ICS
|
||||||
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
|
print '<tr class="pair"><td class="fieldrequired">'.$langs->trans("ICS").'</td>';
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="9" ></td>';
|
print '<input type="text" name="PRELEVEMENT_ICS" value="'.$conf->global->PRELEVEMENT_ICS.'" size="15" ></td>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
//User
|
//User
|
||||||
|
|||||||
@ -606,6 +606,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
|||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
|
/* Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation.
|
||||||
if ($conf->banque->enabled)
|
if ($conf->banque->enabled)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -634,6 +635,7 @@ else
|
|||||||
print '<tr '.$bc[$var].'><td>';
|
print '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,7 @@ if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
|||||||
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
|
dol_syslog("safe_mode is on, basedir is ".$basedir.", safe_mode_exec_dir is ".ini_get('safe_mode_exec_dir'), LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
|
print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND):'').'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ print '<td colspan="2">'.$langs->trans("AntiVirusParam").'<br>';
|
|||||||
print $langs->trans("AntiVirusParamExample");
|
print $langs->trans("AntiVirusParamExample");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
|
print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" class="minwidth500imp" value="'.(! empty($conf->global->MAIN_ANTIVIRUS_PARAM)?dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM):'').'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,10 @@ if($action)
|
|||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "STOCK_USERSTOCK_AUTOCREATE", GETPOST('STOCK_USERSTOCK_AUTOCREATE','alpha'),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "STOCK_USERSTOCK_AUTOCREATE", GETPOST('STOCK_USERSTOCK_AUTOCREATE','alpha'),'chaine',0,'',$conf->entity);
|
||||||
}
|
}
|
||||||
|
if ($action == 'STOCK_ALLOW_NEGATIVE_TRANSFER')
|
||||||
|
{
|
||||||
|
$res = dolibarr_set_const($db, "STOCK_ALLOW_NEGATIVE_TRANSFER", GETPOST('STOCK_ALLOW_NEGATIVE_TRANSFER','alpha'),'chaine',0,'',$conf->entity);
|
||||||
|
}
|
||||||
// Mode of stock decrease
|
// Mode of stock decrease
|
||||||
if ($action == 'STOCK_CALCULATE_ON_BILL'
|
if ($action == 'STOCK_CALCULATE_ON_BILL'
|
||||||
|| $action == 'STOCK_CALCULATE_ON_VALIDATE_ORDER'
|
|| $action == 'STOCK_CALCULATE_ON_VALIDATE_ORDER'
|
||||||
@ -319,9 +323,6 @@ $found++;
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
// Option to force stock to be enough before adding a line into document
|
|
||||||
if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabled)
|
|
||||||
{
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -329,6 +330,20 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl
|
|||||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print '<td width="60%">'.$langs->trans("WarehouseAllowNegativeTransfer").'</td>';
|
||||||
|
print '<td width="160" align="right">';
|
||||||
|
print "<form method=\"post\" action=\"stock.php\">";
|
||||||
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_ALLOW_NEGATIVE_TRANSFER\">";
|
||||||
|
print $form->selectyesno("STOCK_ALLOW_NEGATIVE_TRANSFER",$conf->global->STOCK_ALLOW_NEGATIVE_TRANSFER,1);
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
|
print '</form>';
|
||||||
|
print "</td>\n";
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
// Option to force stock to be enough before adding a line into document
|
||||||
if($conf->invoice->enabled) {
|
if($conf->invoice->enabled) {
|
||||||
$var = !$var;
|
$var = !$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
@ -374,7 +389,6 @@ if ($conf->invoice->enabled || $conf->order->enabled || $conf->expedition->enabl
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
|
||||||
|
|
||||||
$virtualdiffersfromphysical=0;
|
$virtualdiffersfromphysical=0;
|
||||||
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
if (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)
|
||||||
@ -427,6 +441,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
/* I keep the option/feature, but hidden to end users for the moment. If feature is used by module, no need to have users see it.
|
/* I keep the option/feature, but hidden to end users for the moment. If feature is used by module, no need to have users see it.
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -87,9 +88,9 @@ foreach($phparray as $key => $value)
|
|||||||
$valtoshow=$keyvalue;
|
$valtoshow=$keyvalue;
|
||||||
if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
|
if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
if ($keyparam == 'Path') $valtoshow=join('; ',explode(';',trim($valtoshow)));
|
if ($keyparam == 'Path') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
|
||||||
if ($keyparam == 'PATH') $valtoshow=join('; ',explode(';',trim($valtoshow)));
|
if ($keyparam == 'PATH') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
|
||||||
if ($keyparam == '_SERVER["PATH"]') $valtoshow=join('; ',explode(';',trim($valtoshow)));
|
if ($keyparam == '_SERVER["PATH"]') $valtoshow=implode('; ',explode(';',trim($valtoshow)));
|
||||||
print $valtoshow;
|
print $valtoshow;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
@ -104,7 +105,7 @@ foreach($phparray as $key => $value)
|
|||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$valtoshow=$keyvalue2;
|
$valtoshow=$keyvalue2;
|
||||||
if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow)));
|
if ($keyparam == 'disable_functions') $valtoshow=implode(', ',explode(',',trim($valtoshow)));
|
||||||
//print $keyparam;
|
//print $keyparam;
|
||||||
print $valtoshow;
|
print $valtoshow;
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -168,6 +168,8 @@ print load_fiche_titre($langs->trans("Upgrade"),'','title_setup');
|
|||||||
|
|
||||||
print $langs->trans("CurrentVersion").' : <b>'.DOL_VERSION.'</b><br>';
|
print $langs->trans("CurrentVersion").' : <b>'.DOL_VERSION.'</b><br>';
|
||||||
|
|
||||||
|
if (function_exists('curl_init'))
|
||||||
|
{
|
||||||
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
$result = getURLContent('http://sourceforge.net/projects/dolibarr/rss');
|
||||||
//var_dump($result['content']);
|
//var_dump($result['content']);
|
||||||
$sfurl = simplexml_load_string($result['content']);
|
$sfurl = simplexml_load_string($result['content']);
|
||||||
@ -196,8 +198,9 @@ else
|
|||||||
{
|
{
|
||||||
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
|
print $langs->trans("LastStableVersion").' : <b>' .$langs->trans("UpdateServerOffline").'</b><br>';
|
||||||
}
|
}
|
||||||
print '<br>';
|
}
|
||||||
|
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
// Upgrade
|
// Upgrade
|
||||||
print $langs->trans("Upgrade").'<br>';
|
print $langs->trans("Upgrade").'<br>';
|
||||||
|
|||||||
@ -28,6 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
||||||
|
|
||||||
|
$langs->load("admin");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
@ -36,7 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
|||||||
// Enable and test if module Api is enabled
|
// Enable and test if module Api is enabled
|
||||||
if (empty($conf->global->MAIN_MODULE_API))
|
if (empty($conf->global->MAIN_MODULE_API))
|
||||||
{
|
{
|
||||||
$langs->load("admin");
|
|
||||||
dol_syslog("Call Dolibarr API interfaces with module REST disabled");
|
dol_syslog("Call Dolibarr API interfaces with module REST disabled");
|
||||||
print $langs->trans("WarningModuleNotActive",'Api').'.<br><br>';
|
print $langs->trans("WarningModuleNotActive",'Api').'.<br><br>';
|
||||||
print $langs->trans("ToActivateModule");
|
print $langs->trans("ToActivateModule");
|
||||||
@ -58,7 +59,7 @@ foreach ($modulesdir as $dir)
|
|||||||
/*
|
/*
|
||||||
* Search available module
|
* Search available module
|
||||||
*/
|
*/
|
||||||
dol_syslog("Scan directory ".$dir." for API modules");
|
//dol_syslog("Scan directory ".$dir." for API modules");
|
||||||
|
|
||||||
$handle=@opendir(dol_osencode($dir));
|
$handle=@opendir(dol_osencode($dir));
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
@ -103,17 +104,43 @@ foreach ($modulesdir as $dir)
|
|||||||
{
|
{
|
||||||
while (($file_searched = readdir($handle_part))!==false)
|
while (($file_searched = readdir($handle_part))!==false)
|
||||||
{
|
{
|
||||||
|
// Support of the deprecated API.
|
||||||
|
if (is_readable($dir_part.$file_searched) && preg_match("/^api_deprecated_(.*)\.class\.php$/i",$file_searched,$reg))
|
||||||
|
{
|
||||||
|
$classname = ucwords($reg[1]).'Api';
|
||||||
|
require_once $dir_part.$file_searched;
|
||||||
|
if (class_exists($classname))
|
||||||
|
{
|
||||||
|
dol_syslog("Found deprecated API classname=".$classname." into ".$dir);
|
||||||
|
$api->r->addAPIClass($classname, '');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (is_readable($dir_part.$file_searched) && preg_match("/^api_(.*)\.class\.php$/i",$file_searched,$reg))
|
||||||
|
{
|
||||||
|
$classname = ucwords($reg[1]);
|
||||||
|
require_once $dir_part.$file_searched;
|
||||||
|
if (class_exists($classname))
|
||||||
|
{
|
||||||
|
dol_syslog("Found API classname=".$classname." into ".$dir);
|
||||||
|
$listofapis[] = $classname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (is_readable($dir_part.$file_searched) && preg_match("/^(api_.*)\.class\.php$/i",$file_searched,$reg))
|
if (is_readable($dir_part.$file_searched) && preg_match("/^(api_.*)\.class\.php$/i",$file_searched,$reg))
|
||||||
{
|
{
|
||||||
$classname=$reg[1];
|
$classname=$reg[1];
|
||||||
$classname = str_replace('Api_','',ucwords($reg[1])).'Api';
|
$classname = str_replace('Api_','',ucwords($reg[1])).'Api';
|
||||||
|
//$classname = str_replace('Api_','',ucwords($reg[1]));
|
||||||
$classname = ucfirst($classname);
|
$classname = ucfirst($classname);
|
||||||
require_once $dir_part.$file_searched;
|
require_once $dir_part.$file_searched;
|
||||||
|
|
||||||
if (class_exists($classname))
|
if (class_exists($classname))
|
||||||
{
|
{
|
||||||
dol_syslog("Found API classname=".$classname);
|
dol_syslog("Found API classname=".$classname);
|
||||||
$api->r->addAPIClass($classname,'');
|
$api->r->addAPIClass($classname,'');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/Routes.php';
|
||||||
$tmpclass = new ReflectionClass($classname);
|
$tmpclass = new ReflectionClass($classname);
|
||||||
@ -124,8 +151,9 @@ foreach ($modulesdir as $dir)
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
//$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
|
//$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
|
||||||
}
|
/* }
|
||||||
}
|
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,8 +162,8 @@ foreach ($modulesdir as $dir)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var_dump($listofapis);
|
||||||
$listofapis=Routes::toArray();
|
$listofapis=Routes::toArray(); // TODO api for "status" is lost here
|
||||||
//var_dump($listofapis);
|
//var_dump($listofapis);
|
||||||
|
|
||||||
|
|
||||||
@ -165,6 +193,7 @@ print $langs->trans("ListOfAvailableAPIs").':<br>';
|
|||||||
foreach($listofapis['v1'] as $key => $val)
|
foreach($listofapis['v1'] as $key => $val)
|
||||||
{
|
{
|
||||||
if ($key == 'login') continue;
|
if ($key == 'login') continue;
|
||||||
|
if ($key == 'index') continue;
|
||||||
|
|
||||||
if ($key)
|
if ($key)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -95,9 +95,23 @@ print '</tr>';
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
// Define $urlwithroot
|
||||||
|
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||||
|
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
|
// Show message
|
||||||
|
$message='';
|
||||||
|
$url='<a href="'.$urlwithroot.'/api/index.php/login?login='.urlencode($user->login).'&password=yourpassword" target="_blank">'.$urlwithroot.'/api/index.php/login?login='.urlencode($user->login).'&password=yourpassword[&reset=1]</a>';
|
||||||
|
$message.=$langs->trans("UrlToGetKeyToUseAPIs").':<br>';
|
||||||
|
$message.=img_picto('','object_globe.png').' '.$url;
|
||||||
|
print $message;
|
||||||
|
print '<br>';
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
// Explorer
|
// Explorer
|
||||||
print '<u>'.$langs->trans("ApiExporerIs").':</u><br>';
|
print '<u>'.$langs->trans("ApiExporerIs").':</u><br>';
|
||||||
$url=DOL_MAIN_URL_ROOT.'/api/admin/explorer.php';
|
$url=DOL_MAIN_URL_ROOT.'/api/index.php/explorer';
|
||||||
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
print img_picto('','object_globe.png').' <a href="'.$url.'" target="_blank">'.$url."</a><br>\n";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||