Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b5ac417431
21
.editorconfig
Normal file
21
.editorconfig
Normal file
@ -0,0 +1,21 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
[*.js]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
[*.css]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
[*.xml]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
@ -180,8 +180,38 @@ tools:
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
php_changetracking:
|
||||
enabled: false
|
||||
bug_patterns:
|
||||
- '\bfix(?:es|ed)?\b'
|
||||
feature_patterns:
|
||||
- '\badd(?:s|ed)?\b'
|
||||
- '\bimplement(?:s|ed)?\b'
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
|
||||
# Coding-Style / Bug Detection
|
||||
js_hint: false
|
||||
js_hint:
|
||||
enabled: false
|
||||
use_native_config: true
|
||||
extensions:
|
||||
- js
|
||||
filter:
|
||||
excluded_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
- 'htdocs/includes/*'
|
||||
paths: { }
|
||||
config: { }
|
||||
path_configs: { }
|
||||
|
||||
|
||||
before_commands: { }
|
||||
|
||||
@ -32,10 +32,13 @@ before_script:
|
||||
# - echo Update composer
|
||||
# - ~/.phpenv/versions/$(phpenv version-name)/bin/composer.phar self-update
|
||||
- echo PHPUnit version
|
||||
- which phpunit
|
||||
- phpunit --version
|
||||
- echo Install phpcs then show installed rules
|
||||
- pyrus install pear/PHP_CodeSniffer
|
||||
- phpenv rehash
|
||||
- which phpcs
|
||||
- phpcs --version
|
||||
- phpcs -i
|
||||
- echo Create dir $(pwd)/htdocs/documents
|
||||
- sudo mkdir -p $(pwd)/htdocs/documents/admin/temp;
|
||||
@ -83,6 +86,8 @@ before_script:
|
||||
- sudo cat /etc/apache2/sites-available/default
|
||||
- sudo /etc/init.d/apache2 restart
|
||||
- wget http://localhost/
|
||||
- sudo cat /etc/apache2/envvars
|
||||
- sudo cat /var/log/apache2/error.log
|
||||
- cat index.html
|
||||
|
||||
|
||||
@ -97,13 +102,15 @@ script:
|
||||
- php upgrade.php 3.6.0 3.7.0 >> upgrade.log
|
||||
# - cat upgrade360370.log
|
||||
- php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log
|
||||
- php upgrade.php 3.7.0 3.8.0 >> upgrade.log
|
||||
- php upgrade2.php 3.7.0 3.8.0 >> upgrade2.log
|
||||
# - cat upgrade2.log
|
||||
- cd ../..
|
||||
- date
|
||||
- phpunit -d memory_limit=-1 --configuration test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
- date
|
||||
# - phpcs -p --warning-severity=0 -s --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ htdocs/core/class/dolgraph.class.php 2>&1
|
||||
- phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1
|
||||
- phpcs -p --warning-severity=0 -s --report-checkstyle --report-summary --standard=dev/codesniffer/ruleset.xml --tab-width=4 --ignore=/htdocs/conf/conf.php,/build/html/,/dev/vagrant/,/documents/,/includes/,/test/report/ . 2>&1
|
||||
- date
|
||||
|
||||
after_script:
|
||||
|
||||
25
.tx/config
25
.tx/config
@ -218,12 +218,6 @@ source_file = htdocs/langs/en_US/orders.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.oscommerce]
|
||||
file_filter = htdocs/langs/<lang>/oscommerce.lang
|
||||
source_file = htdocs/langs/en_US/oscommerce.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.other]
|
||||
file_filter = htdocs/langs/<lang>/other.lang
|
||||
source_file = htdocs/langs/en_US/other.lang
|
||||
@ -242,6 +236,18 @@ source_file = htdocs/langs/en_US/paypal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.printipp]
|
||||
file_filter = htdocs/langs/<lang>/printipp.lang
|
||||
source_file = htdocs/langs/en_US/printipp.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.productbatch]
|
||||
file_filter = htdocs/langs/<lang>/productbatch.lang
|
||||
source_file = htdocs/langs/en_US/productbatch.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.products]
|
||||
file_filter = htdocs/langs/<lang>/products.lang
|
||||
source_file = htdocs/langs/en_US/products.lang
|
||||
@ -260,6 +266,12 @@ source_file = htdocs/langs/en_US/propal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.resource]
|
||||
file_filter = htdocs/langs/<lang>/resource.lang
|
||||
source_file = htdocs/langs/en_US/resource.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.salaries]
|
||||
file_filter = htdocs/langs/<lang>/salaries.lang
|
||||
source_file = htdocs/langs/en_US/salaries.lang
|
||||
@ -313,4 +325,3 @@ file_filter = htdocs/langs/<lang>/workflow.lang
|
||||
source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ TCPDF 6.0.093 LGPL-3+ Yes
|
||||
JS libraries:
|
||||
jQuery 1.8.2 MIT License Yes JS library
|
||||
jQuery UI 1.9.1 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery multiple-select 1.1.0 MIT License Yes JS library plugin for sexier multiselect
|
||||
jQuery select2 3.5.2 GPL and Apache License Yes JS library plugin for sexier multiselect
|
||||
jQuery blockUI 2.43 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery DataTables 1.9.4 BSD Yes JS library for tables output
|
||||
|
||||
23
ChangeLog
23
ChangeLog
@ -5,6 +5,8 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
email (this open the road for SSO).
|
||||
- New: Agenda export by project #1967.
|
||||
- New: Increase length of thirdparty to 128 chars.
|
||||
- New: "Is Order shippable" icon #1975.
|
||||
@ -80,8 +82,9 @@ For users:
|
||||
- New: Add dunning into accountancy report.
|
||||
- New: Add favorite button into country dictionary to put value on top select list
|
||||
- Upgrade phpexcel lib to 1.7.8
|
||||
- New : Use of MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR to use disk cache for big excel export
|
||||
- New : Option on extrafields to have them always editable regardless of the document status
|
||||
- New : Use of MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR to use disk cache for big excel export.
|
||||
- New : Option on extrafields to have them always editable regardless of the document status.
|
||||
- New : New module PrintIPP to print without opening document is available as stable.
|
||||
- Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action
|
||||
- Fix: [ bug #1470, #1472, #1473] User trigger problem
|
||||
- Fix: [ bug #1489, #1491 ] Intervention trigger problem
|
||||
@ -160,7 +163,8 @@ Dolibarr better:
|
||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||
- A lot of pages called fiche.php were renamed into card.php
|
||||
- A lot of pages called liste.php were renamed into list.php
|
||||
|
||||
- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the
|
||||
warehouse module and your Point Of Sale module if you use one.
|
||||
|
||||
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
@ -172,7 +176,10 @@ Dolibarr better:
|
||||
- Fix: Civility & birthdate wasn't save into adherent module.
|
||||
- Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref
|
||||
- Fix: Chars - is no more allowed into value for code for extra fields.
|
||||
( Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
||||
- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache
|
||||
- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state
|
||||
- Fix: Show sender Country on PDF docs when sender Country <> receiver Country
|
||||
- Fix: [ bug #1624 ] Use lowest buying price for margin when selling with POS
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
@ -315,6 +322,14 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
||||
|
||||
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
|
||||
Fix: Avoid missing class error for fetch_thirdparty method #1973
|
||||
Fix: Can't update phone_pro from web service
|
||||
Fix: Some security holes.
|
||||
Fix: copy extrafields when creating order from proposal.
|
||||
Fix: report on action was not filtering by environment.
|
||||
Fix: Avoid missing class error.
|
||||
Fix: Add function dolEscapeXML.
|
||||
Fix: Bad days and month reported by function.
|
||||
Fix: Bad margin calculation.
|
||||
|
||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
||||
|
||||
@ -101,14 +101,38 @@ http://packages.qa.debian.org/package.html
|
||||
http://bugs.debian.org/package
|
||||
|
||||
|
||||
##### Modify severity of a bug ticket
|
||||
|
||||
- Send this email to control@bugs.debian.org and wait 10 minutes
|
||||
|
||||
severity 123 xxx
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
|
||||
To set status of a bug to "pending"
|
||||
> bts tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
|
||||
Control: tag -1 +pending
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Testing a package into unstable env
|
||||
|
||||
Check you have a mysql server available from another interface than localhost
|
||||
Check you have a mysql server available from another interface than "localhost".
|
||||
Comment line in /etc/mysql/my.cnf if required and restart mysql
|
||||
#bind-address = 127.0.0.1
|
||||
|
||||
Create a chroot called "unstable-amd64-sbuild"
|
||||
Create a chroot called "unstable-amd64-sbuild".
|
||||
Chroot env is stored into /srv/chroot directory.
|
||||
> sudo sbuild-createchroot --keyring= unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian
|
||||
|
||||
Pour lister les env chroot
|
||||
@ -116,6 +140,7 @@ Pour lister les env chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
> apt-get install links mysql-client
|
||||
|
||||
@ -129,7 +154,10 @@ Pour tester un package
|
||||
> dpkg -i dolibarr*.deb ou pour avoir des traces: dpkg -D77777 -i dolibarr*.deb
|
||||
> apt-get install -f
|
||||
|
||||
Puis http://localhost/dolibarr/ (cela peut etre appeler depuis le hote).
|
||||
If there is a problem launching apache, because port is already used, change it into your chroot install with
|
||||
> vi /etc/apache2/ports.conf
|
||||
Then restart.
|
||||
Then you can call/test dolibarr with http://localhost:port/dolibarr/ (It can be also called from host).
|
||||
|
||||
|
||||
|
||||
@ -196,23 +224,6 @@ http://packages.qa.debian.org/t/tcpdf.html
|
||||
* Package will be into release when test will be moved as stable.
|
||||
|
||||
|
||||
|
||||
##### Update but tracker system
|
||||
To set status of a bug to pending
|
||||
> bts tag 999999 +pending
|
||||
|
||||
or replay to email 999999@bugs.debian.org + submitter of bug
|
||||
With a message starting with:
|
||||
Control: tag -1 +pending
|
||||
and then a text like:
|
||||
Thanks. Fixed into git.
|
||||
|
||||
or replay to email control@bugs.debian.org
|
||||
With only message
|
||||
tag 729538 +pending
|
||||
|
||||
|
||||
|
||||
##### Create/Maintain dolibarr package
|
||||
|
||||
To update dolibarr debian package
|
||||
@ -251,7 +262,7 @@ x.y.z+dfsgw
|
||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||
|
||||
* Add an entry into debian/changelog
|
||||
> dch -v x.y.z+dfsg-w "My comment" will add entry.
|
||||
> dch -v x.y.z+dfsgw-v "My comment" will add entry.
|
||||
For example: dch -v x.y.z+dfsgw-1 "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
Then check/modify also the user/date signature:
|
||||
|
||||
@ -3,81 +3,4 @@ dolibarr (3.7.0-3) UNRELEASED; urgency=low
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 21 Oct 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.6.1-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 23 Sep 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.6.0-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 15 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.5-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 8 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.4-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 1 July 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.3-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 2 May 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.2-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 14 March 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.1-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 7 Feb 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.5.0-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* New upstream release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 31 Jan 2014 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.2-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.1-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 27 Apr 2013 12:00:00 +0100
|
||||
|
||||
dolibarr (3.4.0-3) UNRELEASED; urgency=low
|
||||
|
||||
[ Laurent Destailleur (eldy) ]
|
||||
* Maintenance release.
|
||||
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
|
||||
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 21 Oct 2014 12:00:00 +0100
|
||||
@ -26,7 +26,7 @@ for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversio
|
||||
|
||||
|
||||
<!-- Google AdSense -->
|
||||
<center>
|
||||
<div class="center">
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "pub-1071905880519467";
|
||||
/* PUBBANDEAUDOLIBARR */
|
||||
@ -36,7 +36,7 @@ google_ad_height = 60;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
|
||||
</center>
|
||||
</div>
|
||||
<!-- End google adsense -->
|
||||
<br>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ File added into doxygen generated documentation
|
||||
</div>
|
||||
|
||||
<div id="logodol">
|
||||
<center>
|
||||
<div class="center">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><div id="projectname">$projectname</div> - <span id="projectnumber">$projectnumber</span></td>
|
||||
@ -54,7 +54,7 @@ File added into doxygen generated documentation
|
||||
<!-- banner end --></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -365,6 +365,7 @@ if ($nboftargetok) {
|
||||
print "Clean $BUILDROOT\n";
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/.buildpath`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cache`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.editorconfig`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.externalToolBuilders`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.git*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.project`;
|
||||
@ -373,7 +374,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.travis.yml`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.tx`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/quickbuild.xml`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/pom.xml`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/html`;
|
||||
|
||||
@ -29,12 +29,18 @@ To submit a snapshot for building, we should have a service file with content
|
||||
</services>
|
||||
|
||||
How to have such a service file created automatically ?
|
||||
Click on "Add file", then select mode "Upload From: Remote URL"
|
||||
Enter the Remote URL that should looks like this: http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-3.src.rpm
|
||||
|
||||
Then add into advanded - attributes
|
||||
Go into project you want to update. It mught be:
|
||||
- openSUSE Build Service > Projects > Application:ERP:Dolibarr > dolibarr
|
||||
- or your private project
|
||||
|
||||
Once logged, click on "Add file" in section "Source Files", then select mode "Upload From: Remote URL"
|
||||
Keep empty for "Filename", choose "Remote URL" and enter into last field, URL that should looks like this:
|
||||
http://www.dolibarr.org/files/stable/package_rpm_generic/dolibarr-x.y.v-0.3.src.rpm
|
||||
|
||||
Then add into Advanded - Attributes
|
||||
OBS:Screenshots http://www.dolibarr.org/images/dolibarr_screenshot1.png
|
||||
OBS:QualityCategory Testing
|
||||
OBS:QualityCategory Stable|Testing|Development|Private
|
||||
|
||||
|
||||
# Move project into official directory
|
||||
|
||||
@ -340,21 +340,3 @@ fi
|
||||
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -577,20 +577,3 @@ fi
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -346,20 +346,3 @@ fi
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -357,20 +357,3 @@ fi
|
||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 8 2014 Laurent Destailleur 3.5.5-0.3
|
||||
- Upstream release
|
||||
|
||||
* Tue Jul 1 2014 Laurent Destailleur 3.5.4-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri May 2 2014 Laurent Destailleur 3.5.3-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
|
||||
- Upstream release
|
||||
|
||||
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
|
||||
- Upstream release
|
||||
|
||||
* Mon Dec 30 2013 Laurent Destailleur 3.5.0-0.3
|
||||
- Initial version (#723326)
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
README (English)
|
||||
--------------------------------
|
||||
|
||||
This directory contains ruleset files to use to
|
||||
develop Dolibarr EPR & CRM with Eclipse.
|
||||
This directory contains ruleset files to use to develop Dolibarr EPR & CRM.
|
||||
|
||||
Note: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
To install/upgrade phpcs:
|
||||
> sudo pear upgrade PHP_CodeSniffer
|
||||
|
||||
Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with:
|
||||
* tab value to 4
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
* path of code sniffer standard to dev/codesniffer
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
<exclude-pattern>*/conf.php</exclude-pattern>
|
||||
<exclude-pattern>*/includes/*</exclude-pattern>
|
||||
<exclude-pattern>*/documents/*</exclude-pattern>
|
||||
<exclude-pattern>*/dev/vagrant/*</exclude-pattern>
|
||||
<exclude-pattern>*/custom/*</exclude-pattern>
|
||||
<exclude-pattern>*/nltechno*</exclude-pattern>
|
||||
|
||||
@ -169,6 +170,40 @@
|
||||
<rule ref="PEAR.Commenting.ClassComment.MissingTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@authorTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@categoryTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@licenseTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@linkTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing@packageTag">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamName">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<!-- TODO Remove this and fix reported errors -->
|
||||
<rule ref="PEAR.Commenting.ClassComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.ReturnNotRequired">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Commenting.FunctionComment.Missing">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!--
|
||||
<rule ref="PEAR.Commenting.FileComment" />
|
||||
@ -226,6 +261,24 @@
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||
|
||||
|
||||
@ -1,21 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Helps find duplicate translation keys in language files
|
||||
#
|
||||
# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
|
||||
for file in `find . -type f`
|
||||
do
|
||||
dupes=$(
|
||||
sed "s/^\s*//" "$file" | # Remove any leading whitespace
|
||||
sed "s/\s*\=/=/" | # Remove any whitespace before =
|
||||
grep -Po "(^.*?)=" | # Non greedeely match everything before =
|
||||
sed "s/\=//" | # Remove trailing = so we get the key
|
||||
sort | uniq -d # Find duplicates
|
||||
)
|
||||
|
||||
if [ -n "$dupes" ]
|
||||
then
|
||||
echo "Duplicates found in $file"
|
||||
echo "$dupes"
|
||||
fi
|
||||
done
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#------------------------------------------------------
|
||||
# Script to find files that are not Unix encoded
|
||||
# Detect files that does not contains any tab inside
|
||||
#
|
||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||
#------------------------------------------------------
|
||||
38
dev/fixduplicatelangkey.sh
Executable file
38
dev/fixduplicatelangkey.sh
Executable file
@ -0,0 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Helps find duplicate translation keys in language files
|
||||
#
|
||||
# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
|
||||
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: detectduplicatelangkey.sh (list|fix)"
|
||||
fi
|
||||
|
||||
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
for file in `find htdocs/langs/en_US -name *.lang -type f`
|
||||
do
|
||||
dupes=$(
|
||||
sed "s/^\s*//" "$file" | # Remove any leading whitespace
|
||||
sed "s/\s*\=/=/" | # Remove any whitespace before =
|
||||
grep -Po "(^.*?)=" | # Non greedeely match everything before =
|
||||
sed "s/\=//" | # Remove trailing = so we get the key
|
||||
sort | uniq -d # Find duplicates
|
||||
)
|
||||
|
||||
if [ -n "$dupes" ]
|
||||
then
|
||||
echo "Duplicates found in $file"
|
||||
echo "$dupes"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xfix" ]
|
||||
then
|
||||
echo Feature not implemented. Please fix files manually.
|
||||
fi
|
||||
@ -4867,7 +4867,7 @@ CREATE TABLE `llx_opensurvey_sondage` (
|
||||
`mailsonde` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`survey_link_visible` int(11) DEFAULT '1',
|
||||
`origin` varchar(64) DEFAULT NULL,
|
||||
`tms` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id_sondage`),
|
||||
KEY `idx_id_sondage_admin` (`id_sondage_admin`),
|
||||
KEY `idx_date_fin` (`date_fin`)
|
||||
|
||||
@ -10,6 +10,7 @@ INPLACE='0'
|
||||
max_input_size=0
|
||||
max_output_size=0
|
||||
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EO
|
||||
@ -37,7 +38,8 @@ optimize_image()
|
||||
max_input_size=$(expr $max_input_size + $input_file_size)
|
||||
|
||||
if [ "${1##*.}" = "png" ]; then
|
||||
optipng -o1 -clobber -quiet $1 -out $2.firstpass
|
||||
#optipng -o1 -clobber -quiet $1 -out $2.firstpass
|
||||
optipng -o1 -quiet $1 -out $2.firstpass
|
||||
pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null
|
||||
rm -fr $2.firstpass
|
||||
fi
|
||||
@ -67,6 +69,25 @@ get_max_file_length()
|
||||
|
||||
main()
|
||||
{
|
||||
test=`type pngcrush >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool pngcrush not found" && exit
|
||||
fi
|
||||
|
||||
test=`type optipng >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool optipng not found" && exit
|
||||
fi
|
||||
|
||||
test=`type jpegtran >/dev/null 2>&1`
|
||||
result=$?
|
||||
if [ "x$result" == "x1" ]; then
|
||||
echo "Tool jpegtran not found" && exit
|
||||
fi
|
||||
|
||||
|
||||
# If $INPUT is empty, then we use current directory
|
||||
if [[ "$INPUT" == "" ]]; then
|
||||
INPUT=$(pwd)
|
||||
@ -81,6 +102,8 @@ main()
|
||||
OUTPUT='/tmp/optimize'
|
||||
fi
|
||||
|
||||
echo "Mode is $INPLACE (1=Images are replaced, 0=New images are stored into $OUTPUT)"
|
||||
|
||||
# We create the output directory
|
||||
mkdir -p $OUTPUT
|
||||
|
||||
@ -96,6 +119,7 @@ main()
|
||||
|
||||
# Search of all jpg/jpeg/png in $INPUT
|
||||
# We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT
|
||||
echo "Scan $INPUT to find images"
|
||||
IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT)
|
||||
|
||||
if [ "$QUIET" == "0" ]; then
|
||||
@ -103,6 +127,7 @@ main()
|
||||
echo
|
||||
fi
|
||||
for CURRENT_IMAGE in $IMAGES; do
|
||||
echo "Process $CURRENT_IMAGE"
|
||||
filename=$(basename $CURRENT_IMAGE)
|
||||
if [ "$QUIET" == "0" ]; then
|
||||
printf '%s ' "$filename"
|
||||
@ -155,6 +180,13 @@ SHORTOPTS="h,i:,o:,q,s,p"
|
||||
LONGOPTS="help,input:,output:,quiet,no-stats,inplace"
|
||||
ARGS=$(getopt -s bash --options $SHORTOPTS --longoptions $LONGOPTS --name $PROGNAME -- "$@")
|
||||
|
||||
# Syntax
|
||||
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||
then
|
||||
echo "Usage: optimize_images.sh (list|fix) -i dirtoscan"
|
||||
exit
|
||||
fi
|
||||
|
||||
eval set -- "$ARGS"
|
||||
while true; do
|
||||
case $1 in
|
||||
@ -191,5 +223,11 @@ while true; do
|
||||
shift
|
||||
done
|
||||
|
||||
# To convert
|
||||
if [ "x$1" = "xlist" ]
|
||||
then
|
||||
INPLACE=0
|
||||
fi
|
||||
|
||||
main
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) ---Put here your own copyright and developer email---
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -79,7 +80,7 @@ class Skeleton_Class extends CommonObject
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."mytable(";
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."(";
|
||||
$sql.= " field1,";
|
||||
$sql.= " field2";
|
||||
//...
|
||||
@ -91,13 +92,13 @@ class Skeleton_Class extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."mytable");
|
||||
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
@ -116,7 +117,7 @@ class Skeleton_Class extends CommonObject
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR);
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
@ -145,7 +146,7 @@ class Skeleton_Class extends CommonObject
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
//...
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t";
|
||||
if ($ref) $sql.= " WHERE t.ref = '".$ref."'";
|
||||
else $sql.= " WHERE t.rowid = ".$id;
|
||||
|
||||
@ -181,7 +182,7 @@ class Skeleton_Class extends CommonObject
|
||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function update($user=0, $notrigger=0)
|
||||
function update($user, $notrigger=0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
$error=0;
|
||||
@ -195,7 +196,7 @@ class Skeleton_Class extends CommonObject
|
||||
// Put here code to add a control on parameters values
|
||||
|
||||
// Update request
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."mytable SET";
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
|
||||
$sql.= " field1=".(isset($this->field1)?"'".$this->db->escape($this->field1)."'":"null").",";
|
||||
$sql.= " field2=".(isset($this->field2)?"'".$this->db->escape($this->field2)."'":"null")."";
|
||||
//...
|
||||
@ -203,7 +204,7 @@ class Skeleton_Class extends CommonObject
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::update");
|
||||
dol_syslog(__METHOD__);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
@ -226,7 +227,7 @@ class Skeleton_Class extends CommonObject
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
@ -270,10 +271,10 @@ class Skeleton_Class extends CommonObject
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mytable";
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
dol_syslog(get_class($this)."::delete");
|
||||
dol_syslog(__METHOD__);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
}
|
||||
@ -283,7 +284,7 @@ class Skeleton_Class extends CommonObject
|
||||
{
|
||||
foreach($this->errors as $errmsg)
|
||||
{
|
||||
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
|
||||
dol_syslog(__METHOD__." ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
$this->db->rollback();
|
||||
|
||||
@ -282,7 +282,7 @@ if ($action == 'create')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"> <input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -304,7 +304,7 @@ if (($id || $ref) && $action == 'edit')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" name="add" value="'.$langs->trans("Create").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<center>
|
||||
<div class="center">
|
||||
|
||||
<div class="login_table" align="center">
|
||||
|
||||
<!-- <tr><td colspan="2" valign="middle"> -->
|
||||
<div id="login_line1" align="center">
|
||||
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><center>
|
||||
<div id="login_left" style="display: inline-block; min-width: 250px; margin: 0 auto;"><div class="center">
|
||||
|
||||
<table class="none" summary="Login pass" cellpadding="2" align="center">
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
</table>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
</div> <!-- end div left -->
|
||||
|
||||
<!-- </td>
|
||||
@ -64,7 +64,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
</center>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,9 +1,22 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
/*
|
||||
* strip_language_file.php
|
||||
/* Copyright (C) 2014 by FromDual GmbH, licensed under GPL v2
|
||||
* Copyright (C) 2014 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/>.
|
||||
*
|
||||
* (c) 2014 by FromDual GmbH, licensed under GPL v2
|
||||
* -----
|
||||
*
|
||||
* Compares a secondary language translation file with its primary
|
||||
* language file and strips redundant translations.
|
||||
@ -12,11 +25,10 @@
|
||||
*
|
||||
* Usage:
|
||||
* cd htdocs/langs
|
||||
* ../../dev/translation/strip_language_file.php <primary_lang_dir> <secondary_lang_dir> <languagefile.lang>
|
||||
* ../../dev/translation/strip_language_file.php <primary_lang_dir> <secondary_lang_dir> [file.lang|all]
|
||||
*
|
||||
* Parameters:
|
||||
* 1 - Primary Language
|
||||
* 2 - Secondary Language
|
||||
* To rename all .delta files, you can do
|
||||
* for fic in `ls *.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
|
||||
*
|
||||
* Rules:
|
||||
* secondary string == primary string -> strip
|
||||
@ -24,9 +36,6 @@
|
||||
* secondary string not in primary -> strip and warning
|
||||
* secondary string has no value -> strip and warning
|
||||
* secondary string != primary string -> secondary.lang.delta
|
||||
*
|
||||
* To rename all .delta fils, you can do
|
||||
* for fic in `ls *.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -260,6 +269,9 @@ foreach($filesToProcess as $fileToProcess)
|
||||
}
|
||||
|
||||
print "Output can be found at $output.\n";
|
||||
|
||||
print "To rename all .delta files, you can do\n";
|
||||
print 'for fic in `ls *.delta`; do f=`echo $fic | sed -e \'s/\.delta//\'`; echo $f; mv $f.delta $f; done'."\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ if ($action == 'disable') {
|
||||
}
|
||||
}
|
||||
|
||||
if (GETPOST("button_removefilter"))
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$search_account="";
|
||||
$search_label="";
|
||||
@ -220,4 +220,4 @@ if ($result) {
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -164,8 +164,11 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '"></center';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -214,9 +217,11 @@ else if ($id)
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
@ -44,7 +44,7 @@ $action = GETPOST('action', 'alpha');
|
||||
|
||||
// Other parameters ACCOUNTING_*
|
||||
$list = array (
|
||||
'ACCOUNTING_SEPARATORCSV'
|
||||
'ACCOUNTING_SEPARATORCSV'
|
||||
);
|
||||
|
||||
/*
|
||||
@ -52,26 +52,26 @@ $list = array (
|
||||
*/
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
|
||||
$modelcsv = GETPOST('modelcsv', 'int');
|
||||
|
||||
|
||||
if (! empty($modelcsv)) {
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
|
||||
foreach ( $list as $constname ) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! $error) {
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
} else {
|
||||
@ -90,7 +90,7 @@ $form = new Form($db);
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'setup');
|
||||
|
||||
$head = admin_accounting_prepare_head(null);
|
||||
$head = admin_accounting_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron');
|
||||
|
||||
@ -142,13 +142,13 @@ if ($num) {
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
$var = ! $var;
|
||||
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td>' . $label . '</td>';
|
||||
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
|
||||
@ -59,10 +59,10 @@ $max=100;
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('',$title);
|
||||
|
||||
$title = $langs->trans('FiscalYears');
|
||||
|
||||
llxHeader('',$title,LOG_ERR);
|
||||
|
||||
print_fiche_titre($langs->trans('FiscalYears'));
|
||||
|
||||
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity";
|
||||
|
||||
@ -200,8 +200,11 @@ if ($action == 'create')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></center';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -251,9 +254,11 @@ else if ($id)
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page;
|
||||
|
||||
$formventilation = new FormVentilation($db);
|
||||
|
||||
if (GETPOST("button_removefilter"))
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$search_doc_type="";
|
||||
$search_doc_ref="";
|
||||
@ -231,4 +231,4 @@ else {
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
$db->close();
|
||||
|
||||
@ -25,12 +25,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Classe permettant la gestion des comptes generaux de compta
|
||||
* Class to manage accounting accounts
|
||||
*/
|
||||
class AccountingAccount
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors;
|
||||
|
||||
var $id;
|
||||
var $rowid;
|
||||
@ -126,6 +127,8 @@ class AccountingAccount
|
||||
global $conf, $langs;
|
||||
$error = 0;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
// Clean parameters
|
||||
if (isset($this->fk_pcg_version))
|
||||
$this->fk_pcg_version = trim($this->fk_pcg_version);
|
||||
|
||||
@ -30,6 +30,9 @@
|
||||
class BookKeeping
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors;
|
||||
|
||||
var $id;
|
||||
var $doc_date;
|
||||
var $doc_type;
|
||||
|
||||
@ -127,8 +127,11 @@ if (! empty($id)) {
|
||||
print '</td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><center><input class="button" type="submit" value="' . $langs->trans("Save") . '"> ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '"></center';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="' . $langs->trans("Save") . '">';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -26,7 +26,7 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
@ -43,7 +43,7 @@ if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->ventilation->read)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
// Filter
|
||||
$year = $_GET["year"];
|
||||
if ($year == 0) {
|
||||
@ -57,10 +57,10 @@ if ($year == 0) {
|
||||
// Validate History
|
||||
$action = GETPOST('action');
|
||||
if ($action == 'validatehistory') {
|
||||
|
||||
|
||||
$error = 0;
|
||||
$db->begin();
|
||||
|
||||
|
||||
if ($db->type == 'pgsql') {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql1 .= " SET fd.fk_code_ventilation = accnt.rowid";
|
||||
@ -75,8 +75,7 @@ if ($action == 'validatehistory') {
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||
}
|
||||
|
||||
dol_syslog("/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
|
||||
$resql1 = $db->query($sql1);
|
||||
if (! $resql1) {
|
||||
$error ++;
|
||||
@ -106,7 +105,6 @@ $sql .= " , " . MAIN_DB_PREFIX . "facture as f";
|
||||
$sql .= " WHERE fd.fk_code_ventilation = 0";
|
||||
$sql .= " AND f.rowid = fd.fk_facture AND f.fk_statut = 1;";
|
||||
|
||||
dol_syslog("/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$row = $db->fetch_row($result);
|
||||
@ -162,15 +160,14 @@ if (! empty($conf->multicompany->enabled)) {
|
||||
|
||||
$sql .= " GROUP BY fd.fk_code_ventilation";
|
||||
|
||||
dol_syslog("/accountancy/customer/index.php sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
while ( $i < $num ) {
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
|
||||
print '<tr><td>' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="left">' . $row[1] . '</td>';
|
||||
print '<td align="right">' . price($row[2]) . '</td>';
|
||||
@ -235,15 +232,14 @@ if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
dol_syslog('accountancy/customer/index.php:: $sql=' . $sql);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
while ( $i < $num ) {
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
print '<td align="right">' . price($row[1]) . '</td>';
|
||||
print '<td align="right">' . price($row[2]) . '</td>';
|
||||
@ -284,7 +280,7 @@ if (! empty($conf->margin->enabled)) {
|
||||
print '<td width="60" align="center">' . $langs->trans("NovemberMin") . '</td>';
|
||||
print '<td width="60" align="center">' . $langs->trans("DecemberMin") . '</td>';
|
||||
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
|
||||
|
||||
|
||||
$sql = "SELECT '" . $langs->trans("Vide") . "' AS 'Marge',";
|
||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=1,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Janvier',";
|
||||
$sql .= " ROUND(SUM(IF(MONTH(f.datef)=2,(fd.total_ht-(fd.qty * fd.buy_price_ht)),0)),2) AS 'Fevrier',";
|
||||
@ -303,20 +299,19 @@ if (! empty($conf->margin->enabled)) {
|
||||
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
|
||||
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
|
||||
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
|
||||
|
||||
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity = '" . $conf->entity . "'";
|
||||
}
|
||||
|
||||
dol_syslog('accountancy/customer/index.php:: $sql=' . $sql);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
|
||||
while ( $i < $num ) {
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
|
||||
print '<tr><td>' . $row[0] . '</td>';
|
||||
print '<td align="right">' . price($row[1]) . '</td>';
|
||||
print '<td align="right">' . price($row[2]) . '</td>';
|
||||
|
||||
@ -58,8 +58,10 @@ if ($user->societe_id > 0)
|
||||
|
||||
$action = GETPOST('action');
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$year_current = strftime("%Y", dol_now());
|
||||
@ -152,9 +154,6 @@ if ($result) {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
$now = dol_now();
|
||||
@ -237,9 +236,16 @@ if ($action == 'writebookkeeping') {
|
||||
}
|
||||
}
|
||||
|
||||
// export csv
|
||||
|
||||
if ($action == 'export_csv') {
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$companystatic = new Societe($db);
|
||||
|
||||
// export csv
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_SEPARATORCSV;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
|
||||
@ -53,7 +53,7 @@ if ($action == 'update' || $action == 'add')
|
||||
$constname=GETPOST('constname','alpha');
|
||||
$constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
|
||||
|
||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue='';
|
||||
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE' || $constname=='ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && $constvalue == -1) $constvalue='';
|
||||
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
|
||||
{
|
||||
if ($constvalue) $constvalue=0;
|
||||
@ -209,6 +209,23 @@ if ($conf->facture->enabled)
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
|
||||
print '<td>';
|
||||
print $form->select_produits($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS, 'constvalue_ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS');
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -203,9 +203,9 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center>';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
|
||||
$object->getCanvas($rowid);
|
||||
$canvas = $object->canvas?$object->canvas:GETPOST("canvas");
|
||||
$objcanvas='';
|
||||
$objcanvas=null;
|
||||
if (! empty($canvas))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';
|
||||
@ -79,7 +79,7 @@ if (! empty($canvas))
|
||||
}
|
||||
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas);
|
||||
$result=restrictedArea($user, 'adherent', $rowid, '', '', 'fk_soc', 'rowid', $objcanvas);
|
||||
|
||||
if ($rowid > 0)
|
||||
{
|
||||
@ -291,8 +291,6 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
||||
//$object->note = trim($_POST["comment"]);
|
||||
$object->morphy = $_POST["morphy"];
|
||||
|
||||
$object->amount = $_POST["amount"];
|
||||
|
||||
if (GETPOST('deletephoto')) $object->photo='';
|
||||
elseif (! empty($_FILES['photo']['name'])) $object->photo = dol_sanitizeFileName($_FILES['photo']['name']);
|
||||
|
||||
@ -917,7 +915,7 @@ else
|
||||
print "</table>\n";
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
@ -1166,11 +1164,11 @@ else
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/cotisation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
@ -315,13 +316,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$error++;
|
||||
$errmsg=$acct->error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$error++;
|
||||
$errmsg=$acct->error;
|
||||
}
|
||||
@ -385,6 +386,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
||||
{
|
||||
// Add line to draft invoice
|
||||
$idprodsubscription=0;
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled))) $idprodsubscription = $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS;
|
||||
|
||||
$vattouse=0;
|
||||
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry')
|
||||
{
|
||||
@ -947,9 +950,10 @@ if ($rowid)
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.GETPOST('cotisation').'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
|
||||
// Label
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print dol_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="';
|
||||
if (empty($conf->global->MEMBER_NO_DEFAULT_LABEL)) print $langs->trans("Subscription").' '.dol_print_date(($datefrom?$datefrom:time()),"%Y");
|
||||
print '"></td></tr>';
|
||||
|
||||
// Complementary action
|
||||
if (! empty($conf->banque->enabled) || ! empty($conf->facture->enabled))
|
||||
@ -990,7 +994,13 @@ if ($rowid)
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0).'.';
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0);
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(0));
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
// Add invoice with payments
|
||||
@ -1009,7 +1019,13 @@ if ($rowid)
|
||||
print $langs->trans("CreateDolibarrThirdParty");
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0).'.';
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription",0);
|
||||
if (! empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (! empty($conf->product->enabled) || ! empty($conf->service->enabled)))
|
||||
{
|
||||
$prodtmp=new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(0));
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
@ -1078,11 +1094,11 @@ if ($rowid)
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="add" value="'.$langs->trans("AddSubscription").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -465,8 +465,11 @@ class Adherent extends CommonObject
|
||||
|
||||
$nbrowsaffected+=$this->db->affected_rows($resql);
|
||||
|
||||
$action='update';
|
||||
|
||||
// Actions on extra fields (by external module)
|
||||
$hookmanager->initHooks(array('memberdao'));
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
$hookmanager->initHooks(array('memberdao'));
|
||||
$parameters=array('id'=>$this->id);
|
||||
$action='';
|
||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
@ -1303,7 +1306,7 @@ class Adherent extends CommonObject
|
||||
return $rowid;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
@ -48,7 +48,6 @@ class AdherentStats extends Stats
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party
|
||||
* @param int $userid Id user for filter
|
||||
* @return AdherentStats
|
||||
*/
|
||||
function __construct($db, $socid=0, $userid=0)
|
||||
{
|
||||
|
||||
@ -180,7 +180,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"));
|
||||
dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment');
|
||||
|
||||
print "\n";
|
||||
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -59,7 +59,7 @@ $pagenext = $page + 1;
|
||||
if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); }
|
||||
if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); }
|
||||
|
||||
if (GETPOST("button_removefilter"))
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
{
|
||||
$search="";
|
||||
$search_ref="";
|
||||
|
||||
@ -271,9 +271,11 @@ if ($action == 'create')
|
||||
}
|
||||
print "</table>\n";
|
||||
|
||||
print '<br>';
|
||||
print '<center><input type="submit" name="button" class="button" value="'.$langs->trans("Add").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -678,8 +680,11 @@ if ($rowid > 0)
|
||||
print '</table><br><br>';
|
||||
}
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"> ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
|
||||
@ -184,9 +184,9 @@ if (! empty($triggers))
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" name="save" class="button" value="'.$langs->trans("Save").'">';
|
||||
print "</center>";
|
||||
print "</div>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -220,9 +220,9 @@ while ($i <= $MAXAGENDA)
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center>';
|
||||
print "<input type=\"submit\" id=\"save\" name=\"save\" class=\"button hideifnotset\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" id="save" name="save" class="button hideifnotset" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ print '</td></tr>'."\n";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><input class="button" type="submit" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></center>';
|
||||
print '<div class="center"><input class="button" type="submit" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -136,9 +136,9 @@ print "</tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
print "</div>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -46,93 +46,97 @@ $boxes = array();
|
||||
*/
|
||||
|
||||
if ($action == 'addconst')
|
||||
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_BOXES_MAXLINES",$_POST["MAIN_BOXES_MAXLINES"],'',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
if ($action == 'add')
|
||||
{
|
||||
if ($action == 'add') {
|
||||
$error=0;
|
||||
|
||||
$db->begin();
|
||||
if (isset($_POST['boxid']) && is_array($_POST['boxid']))
|
||||
{
|
||||
foreach($_POST['boxid'] as $boxid)
|
||||
{
|
||||
if (is_numeric($boxid['pos']) && $boxid['pos'] >= 0) // 0=Home, 1=...
|
||||
{
|
||||
$pos = $boxid['pos'];
|
||||
|
||||
// Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
|
||||
$distinctfkuser=array();
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "SELECT fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_param";
|
||||
$sql.= " WHERE param = 'MAIN_BOXES_".$db->escape(GETPOST("pos","alpha"))."' AND value = '1'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
// Initialize distinct fkuser with all already existing values of fk_user (user that use a personalized view of boxes for page "pos")
|
||||
$distinctfkuser=array();
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "SELECT fk_user";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user_param";
|
||||
$sql.= " WHERE param = 'MAIN_BOXES_".$db->escape($pos)."' AND value = '1'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$distinctfkuser[$obj->fk_user]=$obj->fk_user;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($db->lasterror(), 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog("boxes.php search fk_user to activate box for", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i=0;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj=$db->fetch_object($resql);
|
||||
$distinctfkuser[$obj->fk_user]=$obj->fk_user;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($db->lasterror(), 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
$distinctfkuser['0']='0'; // Add entry for fk_user = 0. We must use string as key and val
|
||||
|
||||
$distinctfkuser['0']='0'; // Add entry for fk_user = 0. We must use string as key and val
|
||||
foreach($distinctfkuser as $fk_user)
|
||||
{
|
||||
if (! $error && $fk_user != '')
|
||||
{
|
||||
$nbboxonleft=$nbboxonright=0;
|
||||
$sql = "SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE position = ".$pos." AND fk_user = ".$fk_user." AND entity = ".$conf->entity;
|
||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while($obj = $db->fetch_object($resql))
|
||||
{
|
||||
$boxorder=$obj->box_order;
|
||||
if (preg_match('/A/',$boxorder)) $nbboxonleft++;
|
||||
if (preg_match('/B/',$boxorder)) $nbboxonright++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
|
||||
foreach($distinctfkuser as $fk_user)
|
||||
{
|
||||
if (! $error && $fk_user != '')
|
||||
{
|
||||
$nbboxonleft=$nbboxonright=0;
|
||||
$sql = "SELECT box_order FROM ".MAIN_DB_PREFIX."boxes WHERE position = ".GETPOST("pos","alpha")." AND fk_user = ".$fk_user." AND entity = ".$conf->entity;
|
||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while($obj = $db->fetch_object($resql))
|
||||
{
|
||||
$boxorder=$obj->box_order;
|
||||
if (preg_match('/A/',$boxorder)) $nbboxonleft++;
|
||||
if (preg_match('/B/',$boxorder)) $nbboxonright++;
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
|
||||
$sql.= "box_id, position, box_order, fk_user, entity";
|
||||
$sql.= ") values (";
|
||||
$sql.= $boxid['value'].", ".$pos.", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".$fk_user.", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes (";
|
||||
$sql.= "box_id, position, box_order, fk_user, entity";
|
||||
$sql.= ") values (";
|
||||
$sql.= GETPOST("boxid","int").", ".GETPOST("pos","alpha").", '".(($nbboxonleft > $nbboxonright) ? 'B01' : 'A01')."', ".$fk_user.", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
setEventMessage($db->lasterror(), 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
header("Location: boxes.php");
|
||||
$db->commit();
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
dol_syslog("boxes.php activate box", LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
setEventMessage($db->lasterror(), 'errors');
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
$action='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'delete')
|
||||
@ -317,14 +321,18 @@ if ($resql)
|
||||
$boxtoadd=InfoBox::listBoxes($db,'available',-1,null,$actives);
|
||||
|
||||
print "<br>\n";
|
||||
print "\n\n".'<!-- Boxes Available -->'."\n";
|
||||
print_titre($langs->trans("BoxesAvailable"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||
print '<input type="hidden" name="action" value="add">'."\n";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="300">'.$langs->trans("Box").'</td>';
|
||||
print '<td>'.$langs->trans("Note").'/'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("SourceFile").'</td>';
|
||||
print '<td width="160">'.$langs->trans("ActivateOn").'</td>';
|
||||
print '<td width="160" align="center">'.$langs->trans("ActivateOn").'</td>';
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
foreach($boxtoadd as $box)
|
||||
@ -341,12 +349,10 @@ foreach($boxtoadd as $box)
|
||||
}
|
||||
|
||||
print "\n".'<!-- Box '.$box->boxcode.' -->'."\n";
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
||||
print '</td>';
|
||||
print '</td>'."\n";
|
||||
print '<td>';
|
||||
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
||||
{
|
||||
@ -354,22 +360,24 @@ foreach($boxtoadd as $box)
|
||||
print $langs->trans("WarningUsingThisBoxSlowDown");
|
||||
}
|
||||
else print ($box->note?$box->note:' ');
|
||||
print '</td>';
|
||||
print '<td>' . $box->sourcefile . '</td>';
|
||||
print '</td>'."\n";
|
||||
print '<td>' . $box->sourcefile . '</td>'."\n";
|
||||
|
||||
// Pour chaque position possible, on affiche un lien d'activation si boite non deja active pour cette position
|
||||
print '<td>';
|
||||
print $form->selectarray("pos",$pos_name,0,0,0,0,'',1);
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="boxid" value="'.$box->box_id.'">';
|
||||
print ' <input type="submit" class="button" name="button" value="'.$langs->trans("Activate").'">';
|
||||
print '<td class="center">';
|
||||
print $form->selectarray("boxid[".$box->box_id."][pos]", $pos_name, 0, 1, 0, 0, '', 1)."\n";
|
||||
print '<input type="hidden" name="boxid['.$box->box_id.'][value]" value="'.$box->box_id.'">'."\n";
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</table>'."\n";
|
||||
print '<div class="right">';
|
||||
print '<input type="submit" class="button"'.(count($boxtoadd)?'':' disabled="disabled"').' value="'.$langs->trans("Activate").'">';
|
||||
print '</div>'."\n";
|
||||
print '</form>';
|
||||
print "\n".'<!-- End Boxes Available -->'."\n";
|
||||
|
||||
|
||||
// Activated boxes
|
||||
@ -421,8 +429,8 @@ foreach($boxactivated as $key => $box)
|
||||
$hasprevious=($key != 0);
|
||||
print '<td align="center">'.($key+1).'</td>';
|
||||
print '<td align="center">';
|
||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
||||
print ($hasnext?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key+1]->rowid.'">'.img_down().'</a> ':'');
|
||||
print ($hasprevious?'<a href="boxes.php?action=switch&switchfrom='.$box->rowid.'&switchto='.$boxactivated[$key-1]->rowid.'">'.img_up().'</a>':'');
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="boxes.php?rowid='.$box->rowid.'&action=delete">'.img_delete().'</a>';
|
||||
@ -436,13 +444,14 @@ print '</table><br>';
|
||||
|
||||
// Other parameters
|
||||
|
||||
print "\n\n".'<!-- Other Const -->'."\n";
|
||||
print_titre($langs->trans("Other"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$var=false;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="addconst">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
$var=false;
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Parameter").'</td>';
|
||||
print '<td class="liste_titre">'.$langs->trans("Value").'</td>';
|
||||
@ -459,9 +468,10 @@ print '<td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Save").'" name="Button">';
|
||||
print '</td>'."\n";
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
print "\n".'<!-- End Other Const -->'."\n";
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -94,7 +94,7 @@ print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
||||
print '<div class="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
|
||||
print '</form><br><br>';
|
||||
|
||||
|
||||
@ -249,7 +249,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
$head = order_admin_prepare_head(null);
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Orders"), 0, 'order');
|
||||
|
||||
|
||||
@ -668,11 +668,11 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
}
|
||||
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -260,7 +260,7 @@ if ($result)
|
||||
|
||||
// Note
|
||||
print '<td>';
|
||||
print '<input type="text" id="note_'.$i.'"class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'">';
|
||||
print '<input type="text" id="note_'.$i.'" class="flat inputforupdate" size="40" name="const['.$i.'][note]" value="'.htmlspecialchars($obj->note,1).'">';
|
||||
print '</td>';
|
||||
|
||||
// Entity limit to superadmin
|
||||
|
||||
@ -177,7 +177,7 @@ if ($action == 'edit')
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<br><center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '<br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
print '<br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country";
|
||||
$tabfield[4] = "code,label";
|
||||
$tabfield[5] = "code,label";
|
||||
$tabfield[6] = "code,libelle,type,color,position";
|
||||
$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible";
|
||||
$tabfield[7] = "code,libelle,country,accountancy_code,deductible";
|
||||
$tabfield[8] = "code,libelle,country_id,country";
|
||||
$tabfield[9] = "code,label,unicode";
|
||||
$tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
|
||||
@ -453,8 +453,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
||||
$ok=1;
|
||||
foreach ($listfield as $f => $value)
|
||||
{
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory
|
||||
if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue;
|
||||
if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue;
|
||||
if ($value == 'color' && empty($_POST['color'])) continue;
|
||||
@ -1361,14 +1361,18 @@ function fieldList($fieldlist,$obj='',$tabname='')
|
||||
continue;
|
||||
} // For state page, we do not show the country input (we link to region, not country)
|
||||
print '<td>';
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), 'country', '', 28);
|
||||
$fieldname='country';
|
||||
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28);
|
||||
print '</td>';
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'country_id') {
|
||||
$country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$country_id.'">';
|
||||
print '</td>';
|
||||
if (! in_array('country',$fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate)
|
||||
{
|
||||
$country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
|
||||
print '<td>';
|
||||
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$country_id.'">';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
elseif ($fieldlist[$field] == 'region') {
|
||||
print '<td>';
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -37,6 +37,8 @@ $typeconst=array('yesno','texte','chaine');
|
||||
|
||||
$action = GETPOST('action','alpha');
|
||||
|
||||
$type='donation';
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
@ -135,7 +137,7 @@ else if ($action == 'setart200') {
|
||||
$res = dolibarr_set_const($db, "DONATION_ART200", $setart200, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
|
||||
|
||||
if (! $error) {
|
||||
setEventMessage($langs->trans("SetupSaved"), 'mesgs');
|
||||
} else {
|
||||
@ -147,7 +149,7 @@ else if ($action == 'setart238') {
|
||||
$res = dolibarr_set_const($db, "DONATION_ART238", $setart238, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
|
||||
|
||||
if (! $error) {
|
||||
setEventMessage($langs->trans("SetupSaved"), 'mesgs');
|
||||
} else {
|
||||
@ -159,7 +161,7 @@ else if ($action == 'setart885') {
|
||||
$res = dolibarr_set_const($db, "DONATION_ART885", $setart885, 'yesno', 0, '', $conf->entity);
|
||||
if (! $res > 0)
|
||||
$error ++;
|
||||
|
||||
|
||||
if (! $error) {
|
||||
setEventMessage($langs->trans("SetupSaved"), 'mesgs');
|
||||
} else {
|
||||
@ -183,7 +185,7 @@ print_fiche_titre($langs->trans("DonationsSetup"),$linkback,'setup');
|
||||
* Params
|
||||
*/
|
||||
print_titre($langs->trans("Options"));
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
@ -207,11 +209,11 @@ print '</form>';
|
||||
/*
|
||||
* French params
|
||||
*/
|
||||
if ($conf->global->MAIN_LANG_DEFAULT == "fr_FR")
|
||||
if ($conf->global->MAIN_LANG_DEFAULT == "fr_FR")
|
||||
{
|
||||
print '<br>';
|
||||
print_titre($langs->trans("FrenchOptions"));
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('Parameters') . '</td>';
|
||||
@ -377,7 +379,7 @@ if (is_resource($handle))
|
||||
print '<td align="center">';
|
||||
print $form->textwithpicto('',$htmltooltip,-1,0);
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Preview
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'" target="specimen">'.img_object($langs->trans("Preview"),'generic').'</a>';
|
||||
|
||||
@ -78,15 +78,16 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
||||
print $langs->trans("LogEventDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
$head=security_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'audit', $langs->trans("Security"));
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="save">';
|
||||
|
||||
$head=security_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'audit', $langs->trans("Security"));
|
||||
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
@ -109,14 +110,14 @@ foreach ($eventstolog as $key => $arr)
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
|
||||
print "</center>";
|
||||
print "</div>";
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -214,11 +214,11 @@ print '<td>http://news.google.com/news?ned=us&topic=h&output=rss<br>http://www.d
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<center><br>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="norss" value="'.($lastexternalrss+1).'">';
|
||||
print '<br><br>';
|
||||
print '</div><br><br>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -296,7 +296,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'setup');
|
||||
print '<br>';
|
||||
|
||||
$head = invoice_admin_prepare_head(null);
|
||||
$head = invoice_admin_prepare_head();
|
||||
dol_fiche_head($head, 'general', $langs->trans("Invoices"), 0, 'invoice');
|
||||
|
||||
/*
|
||||
|
||||
@ -165,7 +165,7 @@ else
|
||||
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||
$editor=new DolEditor('formtestfield',isset($conf->global->FCKEDITOR_TEST)?$conf->global->FCKEDITOR_TEST:'Test','',200,$mode,'In', true, $uselocalbrowser, 1, 120, 8, $readonly);
|
||||
$editor->Create();
|
||||
print '<center><br><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></center>'."\n";
|
||||
print '<br><div class="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"></div>'."\n";
|
||||
print '<div id="divforlog"></div>';
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -142,7 +142,7 @@ if ($action == 'edit') // Edit
|
||||
print '</table><br>'."\n";
|
||||
|
||||
// Themes
|
||||
show_theme('',1);
|
||||
show_theme(null,1);
|
||||
print '<br>';
|
||||
|
||||
// Liste des zone de recherche permanantes supportees
|
||||
@ -161,7 +161,7 @@ if ($action == 'edit') // Edit
|
||||
|
||||
// Other
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -287,9 +287,9 @@ if ($action == 'edit') // Edit
|
||||
print '</table>'."\n";
|
||||
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
@ -301,7 +301,7 @@ else // Show
|
||||
// Language
|
||||
print_fiche_titre($langs->trans("Language"),'','').'<br>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td><td> </td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
@ -323,7 +323,7 @@ else // Show
|
||||
|
||||
|
||||
// Themes
|
||||
show_theme('',0);
|
||||
show_theme(null,0);
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -345,7 +345,7 @@ else // Show
|
||||
// Other
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("Parameters").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||
|
||||
@ -109,7 +109,7 @@ if (empty($reshook))
|
||||
print "<br>";
|
||||
|
||||
// Show logo
|
||||
print '<center><div class="logo_setup"></div></center>';
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -239,7 +239,7 @@ print '</td><td>secret</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -126,9 +126,9 @@ if ($action == 'edit')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
@ -158,7 +158,8 @@ $head = mailmanspip_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
$var=!$var;
|
||||
$var=true;
|
||||
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
//$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
|
||||
@ -477,11 +477,11 @@ if ($action == 'edit')
|
||||
print '"></td></tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
@ -26,7 +26,6 @@
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$action=GETPOST('action');
|
||||
|
||||
@ -204,11 +203,11 @@ if ($action == 'edit')
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@ -369,9 +369,11 @@ if ($action == 'create')
|
||||
print '</table>';
|
||||
|
||||
// Boutons
|
||||
print '<center><br><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
@ -453,9 +455,11 @@ elseif ($action == 'edit')
|
||||
print '</table>';
|
||||
|
||||
// Bouton
|
||||
print '<center><br><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -326,6 +326,7 @@ if ($conf->use_javascript_ajax)
|
||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default').'</a> '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default').'</a> '.
|
||||
' '.
|
||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
||||
'</td></tr></table>'
|
||||
);
|
||||
|
||||
@ -534,7 +534,7 @@ dol_fiche_end();
|
||||
|
||||
|
||||
// Show warning about external users
|
||||
if ($mode != 'marketplace') print '<div class="info">'.showModulesExludedForExternal($modules).'</div><br>'."\n";
|
||||
if ($mode != 'marketplace') print info_admin(showModulesExludedForExternal($modules))."\n";
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
@ -142,7 +142,7 @@ print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = order_admin_prepare_head(null);
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Orders"), 0, 'order');
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = order_admin_prepare_head(null);
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributeslines', $langs->trans("Orders"), 0, 'order');
|
||||
|
||||
|
||||
@ -250,9 +250,9 @@ if ($action == 'edit') // Edit
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
@ -116,7 +116,7 @@ foreach ($modulesdir as $dir)
|
||||
$db->commit();
|
||||
|
||||
// Show warning about external users
|
||||
print showModulesExludedForExternal($modules).'<br>'."\n";
|
||||
print info_admin(showModulesExludedForExternal($modules)).'<br>'."\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ print '</td></tr>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
@ -163,6 +163,22 @@ if ($action == 'setdefaultduration')
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...)
|
||||
if ($action == 'setModuleOptions')
|
||||
{
|
||||
@ -247,7 +263,7 @@ $form=new Form($db);
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("PropalSetup"),$linkback,'setup');
|
||||
|
||||
$head = propal_admin_prepare_head(null);
|
||||
$head = propal_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Proposals"), 0, 'propal');
|
||||
|
||||
@ -582,6 +598,35 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="right">';
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
@ -86,6 +86,13 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
||||
print $langs->trans("ProxyDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
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_proxy">';
|
||||
|
||||
|
||||
$head=security_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'proxy', $langs->trans("Security"));
|
||||
@ -118,10 +125,6 @@ if ($conf->use_javascript_ajax)
|
||||
// Timeout
|
||||
$var=true;
|
||||
|
||||
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_proxy">';
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
@ -196,14 +199,13 @@ print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</center>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
|
||||
|
||||
// Class
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
@ -45,7 +45,7 @@ $list = array (
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
$error = 0;
|
||||
@ -72,12 +72,12 @@ if ($action == 'update')
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
llxHeader('',$langs->trans('SalariesSetup'));
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigSalaries'),$linkback,'setup');
|
||||
print_fiche_titre($langs->trans('SalariesSetup'),$linkback,'setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -98,7 +98,7 @@ foreach ($list as $key)
|
||||
print '<tr '.$bc[$var].' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
$label = $langs->trans($key);
|
||||
print '<td><label for="'.$key.'">'.$label.'</label></td>';
|
||||
|
||||
// Value
|
||||
|
||||
@ -80,35 +80,15 @@ else if (preg_match('/del_(.*)/',$action,$reg))
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'MAIN_SESSION_TIMEOUT')
|
||||
else if ($action == 'updateform')
|
||||
{
|
||||
if (! dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else if ($action == 'MAIN_UPLOAD_DOC')
|
||||
{
|
||||
if (! dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else if ($action == 'MAIN_UMASK')
|
||||
{
|
||||
if (! dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else if ($action == 'MAIN_ANTIVIRUS_COMMAND')
|
||||
{
|
||||
if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else if ($action == 'MAIN_ANTIVIRUS_PARAM')
|
||||
{
|
||||
if (! dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
else if ($action == 'MAIN_APPLICATION_TITLE')
|
||||
{
|
||||
if (! dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity)) dol_print_error($db);
|
||||
else setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
$res1=dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", $_POST["MAIN_APPLICATION_TITLE"],'chaine',0,'',$conf->entity);
|
||||
$res2=dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", $_POST["MAIN_SESSION_TIMEOUT"],'chaine',0,'',$conf->entity);
|
||||
$res3=dolibarr_set_const($db, 'MAIN_UPLOAD_DOC',$_POST["MAIN_UPLOAD_DOC"],'chaine',0,'',$conf->entity);
|
||||
$res4=dolibarr_set_const($db, "MAIN_UMASK", $_POST["MAIN_UMASK"],'chaine',0,'',$conf->entity);
|
||||
$res5=dolibarr_set_const($db, "MAIN_ANTIVIRUS_COMMAND", $_POST["MAIN_ANTIVIRUS_COMMAND"],'chaine',0,'',$conf->entity);
|
||||
$res6=dolibarr_set_const($db, "MAIN_ANTIVIRUS_PARAM", $_POST["MAIN_ANTIVIRUS_PARAM"],'chaine',0,'',$conf->entity);
|
||||
if ($res1 && $res2 && $res3 && $res4 && $res5 && $res6) setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
}
|
||||
|
||||
|
||||
@ -138,59 +118,17 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
|
||||
print $langs->trans("MiscellaneousDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="updateform">';
|
||||
|
||||
$head=security_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'misc', $langs->trans("Security"));
|
||||
|
||||
|
||||
// Timeout
|
||||
$var=true;
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="100"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=!$var;
|
||||
$sessiontimeout=ini_get("session.gc_maxlifetime");
|
||||
if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_SESSION_TIMEOUT" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("SessionTimeOut").'</td><td align="right">';
|
||||
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr></form>';
|
||||
|
||||
$var=!$var;
|
||||
$sessiontimeout=ini_get("session.gc_maxlifetime");
|
||||
if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE="";
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_APPLICATION_TITLE" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("HiddeNumVersion").'</td><td align="right">';
|
||||
print $form->textwithpicto('',$langs->trans("HiddeNumVersionExample",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).'"> ';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr></form>';
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Other Options
|
||||
$var=true;
|
||||
|
||||
@ -254,6 +192,44 @@ print "</td></tr>";
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Timeout
|
||||
$var=true;
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=!$var;
|
||||
$sessiontimeout=ini_get("session.gc_maxlifetime");
|
||||
if (empty($conf->global->MAIN_SESSION_TIMEOUT)) $conf->global->MAIN_SESSION_TIMEOUT=$sessiontimeout;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("SessionTimeOut").'</td><td align="right">';
|
||||
print $form->textwithpicto('',$langs->trans("SessionExplanation",ini_get("session.gc_probability"),ini_get("session.gc_divisor")));
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_SESSION_TIMEOUT" type="text" size="6" value="'.htmlentities($conf->global->MAIN_SESSION_TIMEOUT).'"> '.strtolower($langs->trans("Seconds"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$var=!$var;
|
||||
$sessiontimeout=ini_get("session.gc_maxlifetime");
|
||||
if (empty($conf->global->MAIN_APPLICATION_TITLE)) $conf->global->MAIN_APPLICATION_TITLE="";
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("MAIN_APPLICATION_TITLE").'</td><td align="right">';
|
||||
print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_APPLICATION_TITLE" type="text" size="20" value="'.htmlentities($conf->global->MAIN_APPLICATION_TITLE).'"> ';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Upload options
|
||||
@ -263,11 +239,8 @@ print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("Parameters").'</td>';
|
||||
print '<td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="100"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_UPLOAD_DOC" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td colspan="2">'.$langs->trans("MaxSizeForUploadedFiles").'.';
|
||||
$max=@ini_get('upload_max_filesize');
|
||||
@ -277,14 +250,9 @@ print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_UPLOAD_DOC" type="text" size="6" value="'.htmlentities($conf->global->MAIN_UPLOAD_DOC).'"> '.$langs->trans("Kb");
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr></form>';
|
||||
print '</tr>';
|
||||
|
||||
$var=!$var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_UMASK" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$langs->trans("UMask").'</td><td align="right">';
|
||||
print $form->textwithpicto('',$langs->trans("UMaskExplanation"));
|
||||
@ -292,15 +260,10 @@ print '</td>';
|
||||
print '<td class="nowrap">';
|
||||
print '<input class="flat" name="MAIN_UMASK" type="text" size="6" value="'.htmlentities($conf->global->MAIN_UMASK).'">';
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr></form>';
|
||||
print '</tr>';
|
||||
|
||||
// Use anti virus
|
||||
$var=!$var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_ANTIVIRUS_COMMAND" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="2">'.$langs->trans("AntiVirusCommand").'<br>';
|
||||
print $langs->trans("AntiVirusCommandExample");
|
||||
@ -320,16 +283,10 @@ if (ini_get('safe_mode') && ! empty($conf->global->MAIN_ANTIVIRUS_COMMAND))
|
||||
}
|
||||
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 "</td>";
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
// Use anti virus
|
||||
$var=!$var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'?action=MAIN_ANTIVIRUS_PARAM" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="2">'.$langs->trans("AntiVirusParam").'<br>';
|
||||
print $langs->trans("AntiVirusParamExample");
|
||||
@ -337,16 +294,18 @@ 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 "</td>";
|
||||
print '<td align="right">';
|
||||
print '<input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" name="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
// Form to test upload
|
||||
print '<br>';
|
||||
$formfile=new FormFile($db);
|
||||
|
||||
@ -203,11 +203,11 @@ if ($action == 'edit')
|
||||
*/
|
||||
print '</table>';
|
||||
|
||||
print '<br><center>';
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"'.(!count($listofmethods)?' disabled="disbaled"':'').'>';
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</center>';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
||||
@ -117,10 +117,11 @@ $head = mailmanspip_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user');
|
||||
|
||||
$var=true;
|
||||
|
||||
/*
|
||||
* Spip
|
||||
*/
|
||||
$var=!$var;
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
{
|
||||
//$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
|
||||
@ -113,35 +113,20 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("StockSetup"),$linkback,'setup');
|
||||
|
||||
$form=new Form($db);
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("Parameters")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
/*
|
||||
* Formulaire parametres divers
|
||||
*/
|
||||
$disabled='';
|
||||
if (! empty($conf->productbatch->enabled))
|
||||
{
|
||||
$langs->load("productbatch");
|
||||
$disabled=' disabled="disabled"';
|
||||
print info_admin($langs->trans("WhenProductBatchModuleOnOptionAreForced"));
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("UserWarehouseAutoCreate").'</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_USERSTOCK_AUTOCREATE\">";
|
||||
print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
print '<br>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
//if (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER) || ! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT))
|
||||
//{
|
||||
print info_admin($langs->trans("IfYouUsePointOfSaleCheckModule"));
|
||||
//}
|
||||
|
||||
// Title rule for stock decrease
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -160,8 +145,8 @@ if (! empty($conf->facture->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_BILL\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_BILL",$conf->global->STOCK_CALCULATE_ON_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
@ -174,8 +159,8 @@ if (! empty($conf->commande->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_VALIDATE_ORDER\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
@ -188,11 +173,12 @@ if (! empty($conf->expedition->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SHIPMENT\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SHIPMENT",$conf->global->STOCK_CALCULATE_ON_SHIPMENT,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Title rule for stock increase
|
||||
@ -212,8 +198,8 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_BILL\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_BILL",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
@ -226,8 +212,8 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
@ -239,8 +225,8 @@ if (! empty($conf->fournisseur->enabled))
|
||||
print "<form method=\"post\" action=\"stock.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER\">";
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print $form->selectyesno("STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER",$conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER,1,$disabled);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"'.$disabled.'>';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
@ -329,6 +315,34 @@ if ($virtualdiffersfromphysical)
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print " <td>".$langs->trans("Other")."</td>\n";
|
||||
print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td width="60%">'.$langs->trans("UserWarehouseAutoCreate").'</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_USERSTOCK_AUTOCREATE\">";
|
||||
print $form->selectyesno("STOCK_USERSTOCK_AUTOCREATE",$conf->global->STOCK_USERSTOCK_AUTOCREATE,1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
print '<br>';
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
|
||||
@ -198,7 +198,7 @@ print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'invoice', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
@ -199,7 +199,7 @@ print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'order', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ if (!$user->admin)
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("bills");
|
||||
$langs->load("orders");
|
||||
$langs->load("suppliers");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
@ -75,7 +76,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierinvoice', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
||||
print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'supplierorder', $langs->trans("Suppliers"), 0, 'company');
|
||||
|
||||
|
||||
@ -183,8 +183,9 @@ foreach ($syslogModules as $moduleName)
|
||||
{
|
||||
$module = new $moduleName;
|
||||
|
||||
$moduleactive=$module->isActive();
|
||||
if ($moduleactive == -1 && empty($conf->global->MAIN_FEATURES_LEVEL)) continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them)
|
||||
$moduleactive=(int) $module->isActive();
|
||||
//print $moduleName." = ".$moduleactive." - ".$module->getName()." ".($moduleactive == -1)."<br>\n";
|
||||
if (($moduleactive == -1) && empty($conf->global->MAIN_FEATURES_LEVEL)) continue; // Some modules are hidden if not activable and not into debug mode (end user must not see them)
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
@ -199,7 +200,7 @@ foreach ($syslogModules as $moduleName)
|
||||
{
|
||||
foreach ($setuparray as $option)
|
||||
{
|
||||
if (isset($_POST[$option['constant']])) $value=$_POST[$option['constant']];
|
||||
if (isset($_POST[$option['constant']])) $value=$_POST[$option['constant']];
|
||||
else if (defined($option['constant'])) $value = constant($option['constant']);
|
||||
else $value = (isset($option['default']) ? $option['default'] : '');
|
||||
|
||||
@ -220,7 +221,7 @@ foreach ($syslogModules as $moduleName)
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
|
||||
print '<br>';
|
||||
print '<br>'."\n\n";
|
||||
|
||||
print_titre($langs->trans("SyslogLevel"));
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ print '<br><br>';
|
||||
|
||||
|
||||
// Show logo
|
||||
print '<center><div class="logo_setup"></div></center>';
|
||||
print '<div class="center"><div class="logo_setup"></div></div>';
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -151,7 +151,7 @@ print '</td></tr></table>';
|
||||
if ($choice != 'confirm_allfiles')
|
||||
{
|
||||
print '<br>';
|
||||
print '<center><input class="button" type="submit" value="'.$langs->trans("PurgeRunNow").'"></center>';
|
||||
print '<div class="center"><input class="button" type="submit" value="'.$langs->trans("PurgeRunNow").'"></div>';
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
@ -121,8 +121,8 @@ if ($action == 'builddoc')
|
||||
if (! $error)
|
||||
{
|
||||
$code=$forbarcode;
|
||||
$generator=$stdobject->barcode_type_coder;
|
||||
$encoding=strtoupper($stdobject->barcode_type_code);
|
||||
$generator=$stdobject->barcode_type_coder; // coder (loaded by fetch_barcode). Engine.
|
||||
$encoding=strtoupper($stdobject->barcode_type_code); // code (loaded by fetch_barcode). Example 'ean', 'isbn', ...
|
||||
$barcodeimage=$conf->barcode->dir_temp.'/barcode_'.$code.'_'.$encoding.'.png';
|
||||
|
||||
$diroutput=$conf->barcode->dir_temp;
|
||||
|
||||
@ -80,7 +80,7 @@ print '<tr '.$bc[$var].'><td>';
|
||||
print $langs->trans("NbOfBoomarkToShow").'</td><td>';
|
||||
print '<input size="3" type="text" name="BOOKMARKS_SHOW_IN_MENU" value="'.$conf->global->BOOKMARKS_SHOW_IN_MENU.'">';
|
||||
print '</td></tr>';
|
||||
print '</table><br /><center><input type="submit" class="button" value="'.$langs->trans("Modify").'"></center></form>';
|
||||
print '</table><br><div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div></form>';
|
||||
|
||||
$db->close();
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -43,6 +44,8 @@ $userid=GETPOST("userid","int");
|
||||
$position=GETPOST("position","int");
|
||||
$backtopage=GETPOST('backtopage','alpha');
|
||||
|
||||
$bookmark=new Bookmark($db);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -50,6 +53,13 @@ $backtopage=GETPOST('backtopage','alpha');
|
||||
|
||||
if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||
{
|
||||
|
||||
if ($action == 'update') {
|
||||
$invertedaction = 'edit';
|
||||
} else {
|
||||
$invertedaction = 'create';
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
if (GETPOST("cancel"))
|
||||
@ -59,7 +69,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||
exit;
|
||||
}
|
||||
|
||||
$bookmark=new Bookmark($db);
|
||||
if ($action == 'update') $bookmark->fetch($_POST["id"]);
|
||||
$bookmark->fk_user=$userid;
|
||||
$bookmark->title=$title;
|
||||
@ -69,12 +78,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||
|
||||
if (! $title) {
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors');
|
||||
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors');
|
||||
}
|
||||
|
||||
if (! $url) {
|
||||
$error++;
|
||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors');
|
||||
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -95,43 +104,21 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
||||
if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$langs->load("errors");
|
||||
setEventMessage($langs->trans("WarningBookmarkAlreadyExists"), 'warnings');
|
||||
setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings');
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($bookmark->error, 'errors');
|
||||
}
|
||||
$action='create';
|
||||
$action = $invertedaction;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$action='create';
|
||||
$action = $invertedaction;
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$bookmark=new Bookmark($db);
|
||||
$bookmark->id=$_GET["bid"];
|
||||
$bookmark->url=$user->id;
|
||||
$bookmark->target=$user->id;
|
||||
$bookmark->title='xxx';
|
||||
$bookmark->favicon='xxx';
|
||||
|
||||
$res=$bookmark->remove();
|
||||
if ($res > 0)
|
||||
{
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($bookmark->error, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -141,6 +128,17 @@ llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
|
||||
$head = array();
|
||||
$h=1;
|
||||
|
||||
$head[$h][0] = $_SERVER["PHP_SELF"].($bookmark->id?'id='.$bookmark->id:'');
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
$hselected='card';
|
||||
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
/*
|
||||
@ -150,11 +148,11 @@ if ($action == 'create')
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("NewBookmark"));
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>';
|
||||
@ -175,16 +173,16 @@ if ($action == 'create')
|
||||
print '<input class="flat" name="position" size="5" value="'.(isset($_POST["position"])?$_POST["position"]:$bookmark->position).'">';
|
||||
print '</td><td class="hideonsmartphone"> </td></tr>';
|
||||
|
||||
print '</table><br>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
print '<div align="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("CreateBookmark").'" name="create"> ';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Cancel").'" name="cancel">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
}
|
||||
|
||||
|
||||
@ -193,11 +191,15 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
|
||||
/*
|
||||
* Fact bookmark mode or visually edition
|
||||
*/
|
||||
$bookmark=new Bookmark($db);
|
||||
$bookmark->fetch($id);
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
|
||||
$head = array(
|
||||
array(
|
||||
'',
|
||||
$langs->trans('Card'),
|
||||
'card'
|
||||
)
|
||||
);
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
@ -209,16 +211,37 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
|
||||
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
|
||||
}
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark');
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'.$bookmark->ref.'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("BookmarkTitle").'</td><td>';
|
||||
print '<tr><td>';
|
||||
if ($action == 'edit') {
|
||||
print '<span class="fieldrequired">';
|
||||
}
|
||||
|
||||
print $langs->trans("BookmarkTitle");
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '</span>';
|
||||
}
|
||||
|
||||
print '</td><td>';
|
||||
if ($action == 'edit') print '<input class="flat" name="title" size="30" value="'.(isset($_POST["title"])?$_POST["title"]:$bookmark->title).'">';
|
||||
else print $bookmark->title;
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("UrlOrLink").'</td><td>';
|
||||
print '<tr><td>';
|
||||
if ($action == 'edit') {
|
||||
print '<span class="fieldrequired">';
|
||||
}
|
||||
print $langs->trans("UrlOrLink");
|
||||
if ($action == 'edit') {
|
||||
print '</span>';
|
||||
}
|
||||
print '</td><td>';
|
||||
if ($action == 'edit') print '<input class="flat" name="url" size="80" value="'.(isset($_POST["url"])?$_POST["url"]:$bookmark->url).'">';
|
||||
else print '<a href="'.(preg_match('/^http/i',$bookmark->url)?$bookmark->url:DOL_URL_ROOT.$bookmark->url).'"'.($bookmark->target?' target="_blank"':'').'>'.$bookmark->url.'</a>';
|
||||
print '</td></tr>';
|
||||
@ -267,12 +290,14 @@ if ($id > 0 && ! preg_match('/^add/i',$action))
|
||||
|
||||
print '</table>';
|
||||
|
||||
if ($action == 'edit') print '<br><div align="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"> <input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
|
||||
if ($action == 'edit') print '</form>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
if ($action == 'edit')
|
||||
{
|
||||
print '<div align="center"><input class="button" type="submit" name="save" value="'.$langs->trans("Save").'"> <input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></div>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
print "<div class=\"tabsAction\">\n";
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
|
||||
|
||||
$langs->load("bookmarks");
|
||||
$langs->load("admin");
|
||||
|
||||
// Security check
|
||||
if (! $user->rights->bookmark->lire) {
|
||||
@ -58,7 +59,7 @@ if ($_GET["action"] == 'delete')
|
||||
}
|
||||
else
|
||||
{
|
||||
$setEventMessage($bookmark->error, 'errors');
|
||||
setEventMessage($bookmark->error, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -50,14 +50,13 @@ if (GETPOST('action','alpha') == 'set')
|
||||
$db->begin();
|
||||
|
||||
if (GETPOST('socid','int') < 0) $_POST["socid"]='';
|
||||
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
|
||||
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
|
||||
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",GETPOST('socid','int'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",GETPOST('CASHDESK_ID_WAREHOUSE','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_THIRDPARTY",(GETPOST('socid','int') > 0 ? GETPOST('socid','int') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CASH",(GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CASH','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CHEQUE",(GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CHEQUE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_BANKACCOUNT_CB",(GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha') > 0 ? GETPOST('CASHDESK_ID_BANKACCOUNT_CB','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity);
|
||||
|
||||
dol_syslog("admin/cashdesk: level ".GETPOST('level','alpha'));
|
||||
@ -129,9 +128,25 @@ if (! empty($conf->banque->enabled))
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskDoNotDecreaseStock").'</td>'; // Force warehouse (this is not a default value)
|
||||
print '<td colspan="2">';
|
||||
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE,'CASHDESK_ID_WAREHOUSE','',1);
|
||||
print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK',$conf->global->CASHDESK_NO_DECREASE_STOCK,1);
|
||||
print '</td></tr>';
|
||||
|
||||
$disabled=$conf->global->CASHDESK_NO_DECREASE_STOCK;
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>'; // Force warehouse (this is not a default value)
|
||||
print '<td colspan="2">';
|
||||
if (! $disabled)
|
||||
{
|
||||
print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE,'CASHDESK_ID_WAREHOUSE','',1,$disabled);
|
||||
print ' <a href="'.DOL_URL_ROOT.'/product/stock/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">('.$langs->trans("Create").')</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("StockDecreaseForPointOfSaleDisabled");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@ -148,7 +163,7 @@ if (! empty($conf->service->enabled))
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("Save").'"></center>';
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Save").'"></div>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
||||
@ -45,7 +45,17 @@ else
|
||||
|
||||
|
||||
|
||||
// Left area with selected articles (shopping cart)
|
||||
$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart']
|
||||
|
||||
$total_ttc = $obj_facturation->prixTotalTtc();
|
||||
|
||||
/*var_dump($obj_facturation);
|
||||
var_dump($_SESSION['poscart']);
|
||||
var_dump($total_ttc);
|
||||
exit;*/
|
||||
|
||||
|
||||
// Left area with selected articles (area for article, amount and payments)
|
||||
print '<div class="principal">';
|
||||
|
||||
$page=GETPOST('menu','alpha');
|
||||
@ -72,13 +82,10 @@ print '</div>';
|
||||
|
||||
|
||||
|
||||
|
||||
// Right area with selected articles (shopping cart)
|
||||
print '<div class="liste_articles">';
|
||||
|
||||
require ('tpl/liste_articles.tpl.php');
|
||||
$obj_facturation->prixTotalHt($lst_total_ht);
|
||||
$obj_facturation->prixTotalTtc($lst_total_ttc);
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
@ -222,6 +222,7 @@ p.titre {
|
||||
margin: 0 15px;
|
||||
padding: 0;
|
||||
max-width: 500px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.titre1 {
|
||||
@ -308,7 +309,7 @@ p.titre {
|
||||
}
|
||||
|
||||
.texte_ref {
|
||||
width: 80px;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
.texte1,.texte1_off {
|
||||
@ -321,8 +322,8 @@ p.titre {
|
||||
|
||||
/* ------------------- */
|
||||
.textarea_note {
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
padding: 2px 2px;
|
||||
}
|
||||
|
||||
@ -362,7 +363,7 @@ p.titre {
|
||||
}
|
||||
|
||||
.resume_label,.note_label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user