Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
12275871a8
@ -16,6 +16,7 @@ AdoDb-Date 0.33 Modified BSD License Yes
|
||||
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.3.3 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
FirePHPCore 0.4.0 MIT License Yes Send logs to Firefox Firebug console
|
||||
FPDI 1.5.2 Apache Software License 2.0 Yes PDF templates management
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.3 MIT License Yes Detect mobile devices browsers
|
||||
|
||||
35
ChangeLog
35
ChangeLog
@ -9,6 +9,13 @@ Upgrading to any other version or any other database system is abolutely require
|
||||
make a Dolibarr upgrade.
|
||||
|
||||
|
||||
***** ChangeLog for 3.9 compared to 3.8.* *****
|
||||
|
||||
WARNING: Following changes may create regression for some external modules, but were necessary to make
|
||||
Dolibarr better:
|
||||
- Deprecated hidden option MAIN_USE_CUSTOM_TRANSLATION has been removed. Use MAIN_OVERWRITE_TRANS_xx_YY instead.
|
||||
|
||||
|
||||
***** ChangeLog for 3.8 compared to 3.7.* *****
|
||||
For users:
|
||||
FIX: #2519
|
||||
@ -271,11 +278,11 @@ FIX send mail, copy sendto don't read the list of contact
|
||||
FIX Properly escape untrusted data to prevent HTML injection.
|
||||
FIX send mail, copy sendto don't read the list of contact
|
||||
|
||||
Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
|
||||
Path to save photos of products was moved in 3.7.0 to match path of other attached files. If you had loose
|
||||
your photo on the photo tab of products, you can set the constant "PRODUCT_USE_OLD_PATH_FOR_PHOTO" to
|
||||
restore old path.
|
||||
|
||||
WARNING:
|
||||
WARNING:
|
||||
|
||||
Do not try to make any Dolibarr upgrade if you are running Mysql version 5.5.40.
|
||||
Mysql version 5.5.40 has a very critical bug making your data beeing definitely lost.
|
||||
@ -285,7 +292,7 @@ make a Dolibarr upgrade.
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Match other auth system: Login can be done entering login or user
|
||||
- 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.
|
||||
@ -306,14 +313,14 @@ For users:
|
||||
- New: Can filter on status on interventions.
|
||||
- New: Add help info of field type into dictionary of payment types.
|
||||
- New: Add proposals into referer page of thirdparty.
|
||||
- New: On contact list can set filter on both active and not active (no more exclusive select).
|
||||
- New: On contact list can set filter on both active and not active (no more exclusive select).
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Can attach supplier order to a customer order.
|
||||
- New: Supervisor is now visible into user list.
|
||||
- New: Supervisor is now visible into user list.
|
||||
- New: Add user of creation and validation on invoice export.
|
||||
- New: Add info page about browser.
|
||||
- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
|
||||
on uploaded file names.
|
||||
on uploaded file names.
|
||||
- New: No more dependency between contract and service module.
|
||||
- New: [ task #867 ] Remove ESAEB external module code from core.
|
||||
- New: Can create proposal from an intervention.
|
||||
@ -344,7 +351,7 @@ For users:
|
||||
Use accesskey on form search.
|
||||
- New: Intervention documents are now available in ECM module.
|
||||
- New: Add attachments on user card + in ECM module.
|
||||
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
||||
- New: Can add __PROJECT_REF__ and __TIHRPARTY_NAME__ into email topic or content template.
|
||||
- New: [ task #1204 ] add Numering contrat module free (like leopard in product module).
|
||||
- New: [ task #712 ] Add warning when creating invoice from proposal or order, when there is already one invoice.
|
||||
- New: Enable supplier price log table.
|
||||
@ -352,8 +359,8 @@ For users:
|
||||
- New: [ task #1218 ] Can drag and drop an event from calendar to change its day.
|
||||
- New: Optimize size of image static resources.
|
||||
- New: Add hourly and daily amount on user card. Add weekly working hours and salary on user card.
|
||||
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||
- New: Content of predefined email come firstly from table llx_c_email_template, then translation key.
|
||||
- New: Add option MAIN_GENERATE_INVOICES_WITH_PICTURE to show picture
|
||||
onto PDF like MAIN_GENERATE_PROPOSALS_WITH_PICTURE dir for proposals.
|
||||
- New: Add more search field in list of cheque deposits.
|
||||
- New: Add feature to order to invoice on supplier part.
|
||||
@ -456,8 +463,8 @@ Dolibarr better:
|
||||
- Deprecated module "oscommerce" were removed.
|
||||
- Changed the way parameters are provided to scripts sync_xxx_ldap2dolibarr.php
|
||||
- Some field into database were renamed from "libelle" to "label".
|
||||
- Table llx_c_pays were renamed into llx_c_country.
|
||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||
- Table llx_c_pays were renamed into llx_c_country.
|
||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||
- A lot of pages named fiche.php were renamed into card.php
|
||||
- A lot of pages named liste.php were renamed into list.php
|
||||
@ -618,7 +625,7 @@ For users:
|
||||
- Fix: Add actions events not implemented.
|
||||
- Fix: Price min of composition is not supplier price min by quantity.
|
||||
- Fix: [ bug #1356 ] Bank accountancy number is limited to 8 numbers.
|
||||
- Fix: [ bug #1439 ] impossible to remove a a translation (multilanguage-feature)
|
||||
- Fix: [ bug #1439 ] impossible to remove a a translation (multilanguage-feature)
|
||||
- New: If multilangue is enabled, mail (from propal, invoice, etc...) message is pre-defaulted in Customer language
|
||||
- Fix: [ bug #1459 ] _ADD_CONTACT and _DEL_CONTACT triggers do not intercept insertion when reported an error
|
||||
- Fix: [ bug #1478 ] BILL_PAYED trigger action does not intercept failure under some circumstances
|
||||
@ -648,8 +655,8 @@ For developers:
|
||||
- New: A module can disable a standard ECM view.
|
||||
- New: Add multilang support into product webservice.
|
||||
- New: Add hooks on project card page.
|
||||
- New: Add call_trigger method on CommonObject class. So new trigger call within object is just :
|
||||
$result = $this->call_trigger($trigger_name, $user)
|
||||
- New: Add call_trigger method on CommonObject class. So new trigger call within object is just :
|
||||
$result = $this->call_trigger($trigger_name, $user)
|
||||
|
||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
|
||||
@ -15,7 +15,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
# Require all granted
|
||||
# </IfVersion>
|
||||
# <IfVersion < 2.3>
|
||||
# Order allow, deny
|
||||
# Order allow,deny
|
||||
# Allow from all
|
||||
# </IfVersion>
|
||||
#
|
||||
@ -27,7 +27,7 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order allow, deny
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
@ -277,7 +277,7 @@ help=!(Port > 0);
|
||||
Usage:
|
||||
if (help) {
|
||||
printf("----- %s V%s (c)Laurent Destailleur -----\n",PROG,VERSION);
|
||||
printf("%s is a software that allows you to know if a TCP/IP port is used\n",PROG);
|
||||
printf("%s is software that allows you to know if a TCP/IP port is used\n",PROG);
|
||||
printf("%s sources can be compiled for WIN32 (VC++, GCC CYGWIN, MINGW) or for\n");
|
||||
printf("Unix/Linux (GCC)\n",PROG);
|
||||
printf("\n");
|
||||
|
||||
@ -39,12 +39,14 @@ parse_str($argv[1]);
|
||||
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
|
||||
$fp = fopen($outputfile,'w');
|
||||
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
|
||||
fputs($fp, '<checksum_list>'."\n");
|
||||
fputs($fp, '<dolibarr_root_dir version="'.$release.'">'."\n");
|
||||
$dir_iterator = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
$iterator = new RecursiveIteratorIterator($dir_iterator);
|
||||
fputs($fp, '<checksum_list version="'.$release.'">'."\n");
|
||||
|
||||
fputs($fp, '<dolibarr_htdocs_dir>'."\n");
|
||||
|
||||
$dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/');
|
||||
$iterator1 = new RecursiveIteratorIterator($dir_iterator1);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
$files = new RegexIterator($iterator1, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
@ -61,7 +63,34 @@ foreach ($files as $file) {
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '</dolibarr_root_dir>'."\n");
|
||||
fputs($fp, '</dolibarr_htdocs_dir>'."\n");
|
||||
|
||||
|
||||
fputs($fp, '<dolibarr_script_dir version="'.$release.'">'."\n");
|
||||
|
||||
$dir_iterator2 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../scripts/');
|
||||
$iterator2 = new RecursiveIteratorIterator($dir_iterator2);
|
||||
// need to ignore document custom etc
|
||||
$files = new RegexIterator($iterator2, '#^(?:[A-Z]:)?(?:/(?!(?:custom|documents|conf|install|nltechno))[^/]+)+/[^/]+\.(?:php|css|html|js|json|tpl|jpg|png|gif|sql|lang)$#i');
|
||||
$dir='';
|
||||
$needtoclose=0;
|
||||
foreach ($files as $file) {
|
||||
$newdir = str_replace(dirname(__FILE__).'/../scripts', '', dirname($file));
|
||||
if ($newdir!=$dir) {
|
||||
if ($needtoclose)
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '<dir name="'.$newdir.'" >'."\n");
|
||||
$dir = $newdir;
|
||||
$needtoclose=1;
|
||||
}
|
||||
if (filetype($file)=="file") {
|
||||
fputs($fp, '<md5file name="'.basename($file).'">'.md5_file($file).'</md5file>'."\n");
|
||||
}
|
||||
}
|
||||
fputs($fp, '</dir>'."\n");
|
||||
fputs($fp, '</dolibarr_script_dir>'."\n");
|
||||
|
||||
|
||||
fputs($fp, '</checksum_list>'."\n");
|
||||
fclose($fp);
|
||||
|
||||
|
||||
@ -467,6 +467,7 @@ if ($nboftargetok) {
|
||||
|
||||
# Removed known external modules to avoid any error when packaging from env where external modules are tested
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom/*`; # For custom we want to keep dir
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/allscreens*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/ancotec*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/cabinetmed*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/calling*`;
|
||||
@ -481,8 +482,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/timesheet*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`;
|
||||
# Removed other test files
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/eldy/*.new`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/api/explorer`; # This is a dev tool
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||
|
||||
@ -10,13 +10,12 @@ beta version of Dolibarr, step by step.
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- Update version number with x.y.z-w in htdocs/filefunc.inc.php
|
||||
- Update version number with x.y.z-w in build/debian/changelog
|
||||
- Commit all changes.
|
||||
- Add a Tag (x.y.z-beta) and push it: git push --tags
|
||||
- Create a branch (x.y).
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
|
||||
- Create a branch (x.y), if version seems stable enough.
|
||||
|
||||
- Move build files into www.dolibarr.org web site
|
||||
(/home/dolibarr/wwwroot/files/lastbuild).
|
||||
|
||||
@ -31,7 +30,6 @@ complete release of Dolibarr, step by step.
|
||||
- Check all files are commited.
|
||||
- Update version/info in ChangeLog. To generate a changelog, you can do "git log `git merge-base 3.7.0 origin/develop`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e '^FIX\|NEW' | sort -u | sed 's/FIXED:/FIX:/g' | sed 's/FIXED :/FIX:/g' | sed 's/FIX :/FIX:/g' | sed 's/FIX /FIX: /g' | sed 's/NEW :/NEW:/g' | sed 's/NEW /NEW: /g' > /tmp/aaa"
|
||||
- Update version number with x.y.z in htdocs/filefunc.inc.php
|
||||
- Update version number with x.y.z in build/debian/changelog
|
||||
- Commit all changes.
|
||||
|
||||
- Run makepack-dolibarr.pl to generate all packages.
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
"phpoffice/phpexcel": "1.8.0",
|
||||
"restler/framework": "^3.0",
|
||||
"tecnick.com/tcpdf": "6.2.6",
|
||||
"raven/raven": "^0.12.0"
|
||||
"raven/raven": "^0.12.0",
|
||||
"firephp/firephp-core": "^0.4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mysqlnd": "To use with MySQL or MariaDB",
|
||||
|
||||
38
composer.lock
generated
38
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "2ab34d0ff69b48500c20621330c1bfd7",
|
||||
"hash": "f441e6348ae7862942693cab10810418",
|
||||
"packages": [
|
||||
{
|
||||
"name": "ccampbell/chromephp",
|
||||
@ -90,6 +90,42 @@
|
||||
],
|
||||
"time": "2014-02-26 15:34:37"
|
||||
},
|
||||
{
|
||||
"name": "firephp/firephp-core",
|
||||
"version": "v0.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firephp/firephp-core.git",
|
||||
"reference": "fabad0f2503f9577fe8dd2cb1d1c7cd73ed2aacf"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/firephp/firephp-core/zipball/fabad0f2503f9577fe8dd2cb1d1c7cd73ed2aacf",
|
||||
"reference": "fabad0f2503f9577fe8dd2cb1d1c7cd73ed2aacf",
|
||||
"shasum": ""
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"lib/FirePHPCore/FirePHP.class.php",
|
||||
"lib/FirePHPCore/fb.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Christoph Dorn",
|
||||
"email": "christoph@christophdorn.com",
|
||||
"homepage": "http://christophdorn.com"
|
||||
}
|
||||
],
|
||||
"description": "Traditional FirePHPCore library for sending PHP variables to the browser.",
|
||||
"homepage": "https://github.com/firephp/firephp-core",
|
||||
"time": "2013-04-23 15:28:20"
|
||||
},
|
||||
{
|
||||
"name": "mobiledetect/mobiledetectlib",
|
||||
"version": "2.8.3",
|
||||
|
||||
@ -50,16 +50,16 @@ print "***** $script_file ($version) *****\n";
|
||||
// -------------------- START OF BUILD_CLASS_FROM_TABLE SCRIPT --------------------
|
||||
|
||||
// Check parameters
|
||||
if (! isset($argv[1]) || (isset($argv[2]) && ! isset($argv[6])))
|
||||
if (! isset($argv[1]) || ! isset($argv[2]) || (isset($argv[3]) && ! isset($argv[7])))
|
||||
{
|
||||
print "Usage: $script_file tablename [server port databasename user pass]\n";
|
||||
print "Usage: $script_file tablename modulename [server port databasename user pass]\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (isset($argv[2]) && isset($argv[3]) && isset($argv[4]) && isset($argv[5]) && isset($argv[6]))
|
||||
if (isset($argv[3]) && isset($argv[4]) && isset($argv[5]) && isset($argv[6]) && isset($argv[7]))
|
||||
{
|
||||
print 'Use specific database ids'."\n";
|
||||
$db=getDoliDBInstance('mysqli',$argv[2],$argv[5],$argv[6],$argv[4],$argv[3]);
|
||||
$db=getDoliDBInstance('mysqli',$argv[3],$argv[6],$argv[7],$argv[5],$argv[4]);
|
||||
}
|
||||
|
||||
if ($db->type != 'mysql' && $db->type != 'mysqli')
|
||||
@ -68,15 +68,18 @@ if ($db->type != 'mysql' && $db->type != 'mysqli')
|
||||
exit;
|
||||
}
|
||||
|
||||
$table=$argv[1];
|
||||
$module=$argv[2];
|
||||
|
||||
// Show parameters
|
||||
print 'Tablename: '.$argv[1]."\n";
|
||||
print 'Tablename: '.$table."\n";
|
||||
print 'Modulename: '.$module."\n";
|
||||
print "Current dir: ".getcwd()."\n";
|
||||
print "Database name: ".$db->database_name."\n";
|
||||
|
||||
|
||||
// Define array with list of properties
|
||||
$property=array();
|
||||
$table=$argv[1];
|
||||
$foundprimary=0;
|
||||
$resql=$db->DDLDescTable($table);
|
||||
if ($resql)
|
||||
@ -160,7 +163,7 @@ foreach($property as $key => $prop)
|
||||
|
||||
// Define working variables
|
||||
$table=strtolower($table);
|
||||
$tablenoprefix=preg_replace('/'.preg_quote(MAIN_DB_PREFIX).'/i','',$table);
|
||||
$tablenoprefix=preg_replace('/'.preg_quote(MAIN_DB_PREFIX,'/').'/i','',$table);
|
||||
$classname=preg_replace('/_/','',ucfirst($tablenoprefix));
|
||||
$classmin=preg_replace('/_/','',strtolower($classname));
|
||||
|
||||
@ -180,11 +183,18 @@ if (! $sourcecontent)
|
||||
$outfile='out.'.$classmin.'.class.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute module name
|
||||
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element = \''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element = \''.$tablenoprefix.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
|
||||
@ -208,8 +218,8 @@ foreach($property as $key => $prop)
|
||||
$varprop.="\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/public \$prop1;/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/public \$prop2;/', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('public $prop1;','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('public $prop2;','/').'/', '', $targetcontent);
|
||||
|
||||
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 1((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/\*((\s|\n|\r|\t)*)\@var mixed Sample property 2((\s|\n|\r|\t)*)/', '', $targetcontent);
|
||||
@ -284,7 +294,7 @@ foreach($property as $key => $prop)
|
||||
elseif ($prop['istime'])
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].') || dol_strlen($this->'.$prop['field'].')==0?\'NULL\':"\'".$this->db->idate(';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.=").\"'\")";
|
||||
}
|
||||
elseif ($prop['ischar'])
|
||||
@ -300,14 +310,14 @@ foreach($property as $key => $prop)
|
||||
elseif ($prop['isint'])
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.=')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$varprop.='\'.(! isset($this->'.$prop['field'].')?\'NULL\':"\'".';
|
||||
$varprop.="\$this->".$prop['field']."";
|
||||
$varprop.='"\'")';
|
||||
$varprop.="\$this->".$prop['field'];
|
||||
$varprop.='."\'")';
|
||||
}
|
||||
|
||||
if ($i < (count($property)-$no_output_field)) $varprop.=".','";
|
||||
@ -439,6 +449,7 @@ if ($fp)
|
||||
else $error++;
|
||||
|
||||
|
||||
|
||||
//--------------------------------
|
||||
// Build skeleton_script.php
|
||||
//--------------------------------
|
||||
@ -458,12 +469,19 @@ if (! $sourcecontent)
|
||||
$outfile='out.'.$classmin.'_script.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute module name
|
||||
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
|
||||
@ -504,13 +522,19 @@ if (! $sourcecontent)
|
||||
$outfile='out.'.$classmin.'_page.php';
|
||||
$targetcontent=$sourcecontent;
|
||||
|
||||
// Substitute module name
|
||||
$targetcontent=preg_replace('/dev\/skeletons/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule othermodule1 othermodule2/', $module, $targetcontent);
|
||||
$targetcontent=preg_replace('/mymodule/', $module, $targetcontent);
|
||||
|
||||
// Substitute class name
|
||||
$targetcontent=preg_replace('/skeleton_class\.class\.php/', $classmin.'.class.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton_script\.php/', $classmin.'_script.php', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$element = \'skeleton\'/', '\$element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$table_element = \'skeleton\'/', '\$table_element=\''.$classmin.'\'', $targetcontent);
|
||||
$targetcontent=preg_replace('/Skeleton_Class/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classname, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeletons/', $classmin, $targetcontent);
|
||||
$targetcontent=preg_replace('/skeleton/', $classmin, $targetcontent);
|
||||
|
||||
// Substitute comments
|
||||
$targetcontent=preg_replace('/This file is an example to create a new class file/', 'Put here description of this class', $targetcontent);
|
||||
@ -520,9 +544,79 @@ $targetcontent=preg_replace('/Put here some comments/','Initialy built by build_
|
||||
// Substitute table name
|
||||
$targetcontent=preg_replace('/MAIN_DB_PREFIX."mytable/', 'MAIN_DB_PREFIX."'.$tablenoprefix, $targetcontent);
|
||||
|
||||
// Substitute GETPOST search_fieldx
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
if ($prop['isint']) $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','int');\n";
|
||||
else $varprop.='$search_'.$prop['field']."=GETPOST('search_".$prop['field']."','alpha');\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field1=GETPOST("search_field1");','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('$search_field2=GETPOST("search_field2");','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute GETPOST fieldx
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
if ($prop['isint']) $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','int');\n";
|
||||
else $varprop.="\t\$object->".$prop['field']."=GETPOST('".$prop['field']."','alpha');\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('$object->prop1=GETPOST("field1");','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('$object->prop2=GETPOST("field2");','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute fetch/select parameters
|
||||
$targetcontent=preg_replace('/\$sql \.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql \.= " t\.field2";/', '', $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field1,";/', $varpropselect, $targetcontent);
|
||||
$targetcontent=preg_replace('/\$sql\s*\.= " t\.field2";/', '', $targetcontent);
|
||||
|
||||
// Substitute where for search
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.='if ($search_'.$prop['field'].') $sql.= natural_search("'.$prop['field'].'",$search_'.$prop['field'].');'."\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote('if ($search_field1) $sql.= natural_search("field1",$search_field1);','/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote('if ($search_field2) $sql.= natural_search("field2",$search_field2);','/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute print_liste_field_titre
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="print_liste_field_titre(\$langs->trans('".$prop['field']."'),\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$param,'',\$sortfield,\$sortorder);\n";
|
||||
}
|
||||
}
|
||||
|
||||
$targetcontent=preg_replace('/'.preg_quote("print_liste_field_titre(\$langs->trans('field1'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote("print_liste_field_titre(\$langs->trans('field2'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', '', $targetcontent);
|
||||
|
||||
// Substitute where for <td>.fieldx.</td>
|
||||
$varprop="\n";
|
||||
$cleanparam='';
|
||||
foreach($property as $key => $prop)
|
||||
{
|
||||
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
|
||||
{
|
||||
$varprop.="print '<td>'.\$obj->".$prop['field'].".'</td>';\n";
|
||||
}
|
||||
}
|
||||
$targetcontent=preg_replace('/'.preg_quote("print '<td>'.\$obj->field1.'</td>';",'/').'/', $varprop, $targetcontent);
|
||||
$targetcontent=preg_replace('/'.preg_quote("print '<td>'.\$obj->field2.'</td>';",'/').'/', '', $targetcontent);
|
||||
|
||||
|
||||
|
||||
// Build file
|
||||
$fp=fopen($outfile,"w");
|
||||
|
||||
@ -228,11 +228,14 @@ class modMyModule extends DolibarrModules
|
||||
|
||||
// Example:
|
||||
// $this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
// $this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
// $this->export_label[$r]='MyModule'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
// $this->export_enabled[$r]='1'; // Condition to show export in list (ie: '$user->id==3'). Set to 1 to always show when module is enabled.
|
||||
// $this->export_permission[$r]=array(array("facture","facture","export"));
|
||||
// $this->export_icon[$r]='generic:MyModule';
|
||||
// $this->export_permission[$r]=array(array("mymodule","level1","level2"));
|
||||
// $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalTVA",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef');
|
||||
// $this->export_TypeFields_array[$r]=array('t.date'=>'Date', 't.qte'=>'Numeric', 't.poids'=>'Numeric', 't.fad'=>'Numeric', 't.paq'=>'Numeric', 't.stockage'=>'Numeric', 't.fadparliv'=>'Numeric', 't.livau100'=>'Numeric', 't.forfait'=>'Numeric', 's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
|
||||
// $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.fk_product'=>'product','p.ref'=>'product');
|
||||
// $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
// $this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
// $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture as f, '.MAIN_DB_PREFIX.'facturedet as fd, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
// $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on (fd.fk_product = p.rowid)';
|
||||
|
||||
@ -35,19 +35,10 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
|
||||
* Class Skeleton_Class
|
||||
*
|
||||
* Put here description of your class
|
||||
* @see CommonObject
|
||||
*/
|
||||
class Skeleton_Class extends CommonObject
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
* @deprecated
|
||||
* @see Skeleton_Class::errors
|
||||
*/
|
||||
public $error;
|
||||
/**
|
||||
* @var string[] Error codes (or messages)
|
||||
*/
|
||||
public $errors = array();
|
||||
/**
|
||||
* @var string Id to identify managed objects
|
||||
*/
|
||||
@ -62,10 +53,6 @@ class Skeleton_Class extends CommonObject
|
||||
*/
|
||||
public $lines = array();
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
*/
|
||||
public $id;
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
*/
|
||||
|
||||
@ -44,7 +44,7 @@ if (! $res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) $res=@inc
|
||||
if (! $res) die("Include of main fails");
|
||||
// Change this following line to use the correct relative path from htdocs
|
||||
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
|
||||
dol_include_once('/module/class/skeleton_class.class.php');
|
||||
dol_include_once('/mymodule/class/skeleton_class.class.php');
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$langs->load("companies");
|
||||
@ -56,6 +56,9 @@ $action = GETPOST('action','alpha');
|
||||
$backtopage = GETPOST('backtopage');
|
||||
$myparam = GETPOST('myparam','alpha');
|
||||
|
||||
$search_field1=GETPOST("search_field1");
|
||||
$search_field2=GETPOST("search_field2");
|
||||
|
||||
// Protection if external user
|
||||
if ($user->societe_id > 0)
|
||||
{
|
||||
@ -95,7 +98,7 @@ if (empty($reshook))
|
||||
{
|
||||
if (GETPOST('cancel'))
|
||||
{
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/buildingmanagement/list.php',1);
|
||||
$urltogo=$backtopage?$backtopage:dol_buildpath('/mymodule/list.php',1);
|
||||
header("Location: ".$urltogo);
|
||||
exit;
|
||||
}
|
||||
@ -149,7 +152,7 @@ if (empty($reshook))
|
||||
if (empty($object->ref))
|
||||
{
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
|
||||
setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")),null,'errors');
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
@ -180,7 +183,7 @@ if (empty($reshook))
|
||||
if ($result > 0)
|
||||
{
|
||||
// Delete OK
|
||||
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
|
||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
||||
header("Location: ".dol_buildpath('/buildingmanagement/list.php',1));
|
||||
exit;
|
||||
}
|
||||
@ -227,7 +230,10 @@ jQuery(document).ready(function() {
|
||||
// Part to show a list
|
||||
if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
{
|
||||
$sql = "SELECT";
|
||||
// Put here content of your page
|
||||
print load_fiche_titre('PageTitle');
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql.= " t.rowid,";
|
||||
$sql.= " t.field1,";
|
||||
$sql.= " t.field2";
|
||||
@ -238,55 +244,73 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mytable as t";
|
||||
$sql.= " WHERE field3 = 'xxx'";
|
||||
$sql.= " WHERE 1 = 1";
|
||||
if ($search_field1) $sql.= natural_search("field1",$search_field1);
|
||||
if ($search_field2) $sql.= natural_search("field2",$search_field2);
|
||||
|
||||
// Add where from hooks
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.=$db->order($sortfield, $sortorder);
|
||||
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="noborder">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fields title search
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10">';
|
||||
print '</td>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Count total nb of records
|
||||
$nbtotalofrecords = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$result = $db->query($sql);
|
||||
$nbtotalofrecords = $db->num_rows($result);
|
||||
}
|
||||
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
|
||||
dol_syslog($script_file, LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$params='';
|
||||
$params.= '&search_field1='.urlencode($search_field1);
|
||||
$params.= '&search_field2='.urlencode($search_field2);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"],$params,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies');
|
||||
|
||||
|
||||
print '<form method="GET" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
if (! empty($moreforfilter))
|
||||
{
|
||||
print '<div class="liste_titre">';
|
||||
print $moreforfilter;
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<table class="noborder">'."\n";
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('field1'),$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('field2'),$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder);
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fields title search
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_field1" value="'.$search_field1.'" size="10"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_field2" value="'.$search_field2.'" size="10"></td>';
|
||||
$parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
$i = 0;
|
||||
while ($i < $num)
|
||||
{
|
||||
@ -295,11 +319,8 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
{
|
||||
// You can use here results
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $obj->field1;
|
||||
print '</td><td>';
|
||||
print $obj->field2;
|
||||
print '</td>';
|
||||
print '<td>'.$obj->field1.'</td>';
|
||||
print '<td>'.$obj->field2.'</td>';
|
||||
$parameters=array('obj' => $obj);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
@ -307,21 +328,22 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$error++;
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$db->free($resql);
|
||||
|
||||
$parameters=array('sql' => $sql);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -329,7 +351,7 @@ if ($action == 'list' || (empty($id) && $action != 'create'))
|
||||
// Part to create
|
||||
if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewSkeleton"));
|
||||
print load_fiche_titre($langs->trans("NewSkeleton"));
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
6
htdocs/.gitignore
vendored
6
htdocs/.gitignore
vendored
@ -1,7 +1,11 @@
|
||||
/allscreens*
|
||||
/ancot*
|
||||
/bootstrap*
|
||||
/dolimed*
|
||||
/ecommerce*
|
||||
/extensions*
|
||||
/google*
|
||||
/lead
|
||||
/multicompany*
|
||||
/ndf*
|
||||
/numberingpack*
|
||||
@ -11,5 +15,3 @@
|
||||
/teclib*
|
||||
/test.php
|
||||
/ultimatepdf*
|
||||
/lead
|
||||
/dolimed*
|
||||
|
||||
@ -139,7 +139,7 @@ $htmlacc = new FormVentilation($db);
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans('NewAccount'));
|
||||
print load_fiche_titre($langs->trans('NewAccount'));
|
||||
|
||||
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
*
|
||||
* 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,8 +43,12 @@ if (!$user->admin)
|
||||
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
// Other parameters ACCOUNTING_EXPORT_*
|
||||
$list = array (
|
||||
// Parameters ACCOUNTING_EXPORT_*
|
||||
$main_option = array (
|
||||
'ACCOUNTING_EXPORT_PREFIX_SPEC'
|
||||
);
|
||||
|
||||
$model_option = array (
|
||||
'ACCOUNTING_EXPORT_SEPARATORCSV',
|
||||
'ACCOUNTING_EXPORT_DATE',
|
||||
'ACCOUNTING_EXPORT_PIECE',
|
||||
@ -60,10 +64,18 @@ $list = array (
|
||||
if ($action == 'update') {
|
||||
$error = 0;
|
||||
|
||||
$format = GETPOST('format', 'alpha');
|
||||
$modelcsv = GETPOST('modelcsv', 'int');
|
||||
|
||||
if (! empty($format)) {
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
if (! empty($modelcsv)) {
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
@ -71,7 +83,15 @@ if ($action == 'update') {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
foreach ( $list as $constname ) {
|
||||
foreach ($main_option as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($model_option as $constname) {
|
||||
$constvalue = GETPOST($constname, 'alpha');
|
||||
|
||||
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
|
||||
@ -95,7 +115,7 @@ llxHeader();
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
|
||||
$head = admin_accounting_prepare_head();
|
||||
|
||||
@ -106,9 +126,67 @@ print '<input type="hidden" name="action" value="update">';
|
||||
|
||||
dol_fiche_head($head, 'export', $langs->trans("Configuration"), 0, 'cron');
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
$var = true;
|
||||
|
||||
/*
|
||||
* Main Options
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="3">' . $langs->trans('MainOptions') . '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . '>';
|
||||
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
||||
if (! $conf->use_javascript_ajax)
|
||||
{
|
||||
print '<td class="nowrap">';
|
||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||
print "</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td>';
|
||||
$listformat=array(
|
||||
'csv'=>$langs->trans("csv"),
|
||||
'txt'=>$langs->trans("txt")
|
||||
);
|
||||
print $form->selectarray("format",$listformat,$conf->global->ACCOUNTING_EXPORT_FORMAT,0);
|
||||
|
||||
print '</td>';
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
$num = count($main_option);
|
||||
if ($num)
|
||||
{
|
||||
foreach ($main_option as $key) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
// Param
|
||||
$label = $langs->trans($key);
|
||||
print '<td width="50%">' . $label . '</td>';
|
||||
|
||||
// Value
|
||||
print '<td>';
|
||||
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||
print '</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
print "<br>\n";
|
||||
|
||||
/*
|
||||
* Export model
|
||||
*/
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">' . $langs->trans("Modelcsv") . '</td>';
|
||||
print '</tr>';
|
||||
@ -143,8 +221,8 @@ print "<br>\n";
|
||||
* Parameters
|
||||
*/
|
||||
|
||||
$num = count($list);
|
||||
if ($num)
|
||||
$num2 = count($model_option);
|
||||
if ($num2)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -152,7 +230,7 @@ if ($num)
|
||||
print "</tr>\n";
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1) print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||
|
||||
foreach ( $list as $key ) {
|
||||
foreach ($model_option as $key) {
|
||||
$var = ! $var;
|
||||
|
||||
print '<tr ' . $bc[$var] . ' class="value">';
|
||||
|
||||
@ -63,7 +63,7 @@ $title = $langs->trans('FiscalYears');
|
||||
|
||||
llxHeader('',$title,LOG_ERR);
|
||||
|
||||
print_fiche_titre($langs->trans('FiscalYears'));
|
||||
print load_fiche_titre($langs->trans('FiscalYears'));
|
||||
|
||||
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f";
|
||||
|
||||
@ -170,7 +170,7 @@ $form = new Form($db);
|
||||
*/
|
||||
if ($action == 'create')
|
||||
{
|
||||
print_fiche_titre($langs->trans("NewFiscalYear"));
|
||||
print load_fiche_titre($langs->trans("NewFiscalYear"));
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -153,7 +153,7 @@ llxHeader();
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
|
||||
$head = admin_accounting_prepare_head($accounting);
|
||||
|
||||
|
||||
@ -83,7 +83,7 @@ llxHeader();
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans('ConfigAccountingExpert'),$linkback,'title_setup');
|
||||
|
||||
$head = admin_accounting_prepare_head(null);
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ llxHeader('', $langs->trans("Bookkeeping"));
|
||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("AccountBalanceByMonth") . ' ' . $textprevyear . ' ' . $langs->trans("Year") . ' ' . $year_start . ' ' . $textnextyear);
|
||||
print load_fiche_titre($langs->trans("AccountBalanceByMonth") . ' ' . $textprevyear . ' ' . $langs->trans("Year") . ' ' . $year_start . ' ' . $textnextyear);
|
||||
|
||||
$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd";
|
||||
$sql .= " , " . MAIN_DB_PREFIX . "facture as f";
|
||||
|
||||
@ -189,7 +189,7 @@ if ($action == 'delete') {
|
||||
}
|
||||
|
||||
if ($action == 'create') {
|
||||
print_fiche_titre($langs->trans("CreateMvts"));
|
||||
print load_fiche_titre($langs->trans("CreateMvts"));
|
||||
|
||||
$code_journal_array = array (
|
||||
$conf->global->ACCOUNTING_SELL_JOURNAL => $conf->global->ACCOUNTING_SELL_JOURNAL,
|
||||
@ -250,7 +250,7 @@ if ($action == 'create') {
|
||||
}
|
||||
if (! empty($book->piece_num)) {
|
||||
|
||||
print_fiche_titre($langs->trans("UpdateMvts"));
|
||||
print load_fiche_titre($langs->trans("UpdateMvts"));
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr class="pair">';
|
||||
@ -280,7 +280,7 @@ if ($action == 'create') {
|
||||
setEventMessage($book->errors, 'errors');
|
||||
} else {
|
||||
|
||||
print_fiche_titre($langs->trans("ListeMvts"));
|
||||
print load_fiche_titre($langs->trans("ListeMvts"));
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
if (count($book->linesmvt) > 0) {
|
||||
|
||||
@ -367,7 +367,7 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
else {
|
||||
print_fiche_titre($langs->trans("NoRecords"));
|
||||
print load_fiche_titre($langs->trans("NoRecords"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,11 +30,6 @@
|
||||
*/
|
||||
class AccountingAccount extends CommonObject
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors;
|
||||
|
||||
var $id;
|
||||
var $rowid;
|
||||
|
||||
var $datec; // Creation date
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -29,11 +29,6 @@
|
||||
*/
|
||||
class BookKeeping extends CommonObject
|
||||
{
|
||||
var $db;
|
||||
var $error;
|
||||
var $errors;
|
||||
|
||||
var $id;
|
||||
var $doc_date;
|
||||
var $doc_type;
|
||||
var $doc_ref;
|
||||
@ -225,6 +220,8 @@ class BookKeeping extends CommonObject
|
||||
*/
|
||||
function create($user='')
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->piece_num = 0;
|
||||
|
||||
// first check if line not yet in bookkeeping
|
||||
@ -278,13 +275,45 @@ class BookKeeping extends CommonObject
|
||||
$this->date_create = $now;
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_bookkeeping (doc_date, ";
|
||||
$sql .= "doc_type, doc_ref,fk_doc,fk_docdet,code_tiers,numero_compte,label_compte,";
|
||||
$sql .= "debit,credit,montant,sens,fk_user_author,import_key,code_journal,piece_num)";
|
||||
$sql .= " VALUES ('" . $this->doc_date . "','" . $this->doc_type . "','" . $this->doc_ref . "'," . $this->fk_doc . ",";
|
||||
$sql .= $this->fk_docdet . ",'" . $this->code_tiers . "','" . $this->numero_compte . "','" . $this->db->escape($this->label_compte) . "',";
|
||||
$sql .= $this->debit . "," . $this->credit . "," . $this->montant . ",'" . $this->sens . "'," . $user->id . ", '";
|
||||
$sql .= $this->date_create . "','" . $this->code_journal . "'," . $this->piece_num . ")";
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_bookkeeping (";
|
||||
|
||||
$sql .= "doc_date";
|
||||
$sql .= ", doc_type";
|
||||
$sql .= ", doc_ref";
|
||||
$sql .= ", fk_doc";
|
||||
$sql .= ", fk_docdet";
|
||||
$sql .= ", code_tiers";
|
||||
$sql .= ", numero_compte";
|
||||
$sql .= ", label_compte";
|
||||
$sql .= ", debit";
|
||||
$sql .= ", credit";
|
||||
$sql .= ", montant";
|
||||
$sql .= ", sens";
|
||||
$sql .= ", fk_user_author";
|
||||
$sql .= ", import_key";
|
||||
$sql .= ", code_journal";
|
||||
$sql .= ", piece_num";
|
||||
|
||||
$sql .= ") VALUES (";
|
||||
|
||||
$sql .= "'" . $this->doc_date . "'";
|
||||
$sql .= ",'" . $this->doc_type . "'";
|
||||
$sql .= ",'" . $this->doc_ref . "'";
|
||||
$sql .= "," . $this->fk_doc;
|
||||
$sql .= "," . $this->fk_docdet;
|
||||
$sql .= ",'" . $this->code_tiers . "'";
|
||||
$sql .= ",'" . $this->numero_compte . "'";
|
||||
$sql .= ",'" . $this->db->escape($this->label_compte) . "'";
|
||||
$sql .= "," . $this->debit;
|
||||
$sql .= "," . $this->credit;
|
||||
$sql .= "," . $this->montant;
|
||||
$sql .= ",'" . $this->sens . "'";
|
||||
$sql .= ",'" . $this->fk_user_author."'";
|
||||
$sql .= ",'" . $this->date_create . "'";
|
||||
$sql .= ",'" . $this->code_journal . "'";
|
||||
$sql .= "," . $this->piece_num;
|
||||
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog(get_class($this) . ":: create sql=" . $sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@ -296,19 +325,19 @@ class BookKeeping extends CommonObject
|
||||
$result = 0;
|
||||
} else {
|
||||
$result = - 2;
|
||||
dol_syslog("BookKeeping::Create Erreur $result lecture ID");
|
||||
dol_syslog("BookKeeping::Create Error $result lecture ID");
|
||||
}
|
||||
} else {
|
||||
$result = - 1;
|
||||
dol_syslog("BookKeeping::Create Erreur $result INSERT Mysql");
|
||||
dol_syslog("BookKeeping::Create Error $result INSERT Mysql");
|
||||
}
|
||||
} else {
|
||||
$result = - 3;
|
||||
dol_syslog("BookKeeping::Create Erreur $result SELECT Mysql");
|
||||
dol_syslog("BookKeeping::Create Error $result SELECT Mysql");
|
||||
}
|
||||
} else {
|
||||
$result = - 5;
|
||||
dol_syslog("BookKeeping::Create Erreur $result SELECT Mysql");
|
||||
dol_syslog("BookKeeping::Create Error $result SELECT Mysql");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@ -108,7 +108,7 @@ if (! empty($id)) {
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
print_fiche_titre($langs->trans('CustomersVentilation'),'','title_setup');
|
||||
print load_fiche_titre($langs->trans('CustomersVentilation'),'','title_setup');
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
@ -98,7 +98,7 @@ llxHeader('', $langs->trans("CustomersVentilation"));
|
||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
|
||||
print '<b>' . $langs->trans("DescVentilCustomer") . '</b>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=validatehistory">' . $langs->trans("ValidateHistory") . '</a></div>';
|
||||
|
||||
@ -184,6 +184,14 @@ if (strlen(trim($search_vat)))
|
||||
if (! empty($conf->multicompany->enabled)) {
|
||||
$sql .= " AND f.entity IN (" . getEntity("facture", 1) . ")";
|
||||
}
|
||||
// Count total nb of records with no order and no limits
|
||||
$nbtotalofrecords = 0;
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) $nbtotalofrecords = $db->num_rows($resql);
|
||||
else dol_print_error($db);
|
||||
}
|
||||
$sql.= $db->order($sortfield,$sortorder);
|
||||
$sql.= $db->plimit($limit + 1,$offset);
|
||||
|
||||
@ -192,9 +200,16 @@ $result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num_lines = $db->num_rows($result);
|
||||
$i = 0;
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines);
|
||||
|
||||
|
||||
$param="";
|
||||
if ($search_facture) $param.="&search_facture=".$search_facture;
|
||||
if ($search_ref) $param.="&search_ref=".$search_ref;
|
||||
if ($search_label) $param.="&search_label=".$search_label;
|
||||
if ($search_desc) $param.="&search_desc=".$search_desc;
|
||||
if ($search_account) $param.="&search_account=".$search_account;
|
||||
if ($filter) $param.="&filter=".$filter;
|
||||
|
||||
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines,$nbtotalofrecords);
|
||||
print '<td align="left"><b>' . $langs->trans("DescVentilDoneCustomer") . '</b></td>';
|
||||
|
||||
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
|
||||
@ -277,5 +292,10 @@ if ($result) {
|
||||
|
||||
print "</table></form>";
|
||||
|
||||
if ($num_lines > $conf->liste_limit)
|
||||
{
|
||||
print_barre_liste('',$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num_lines,$nbtotalofrecords,'');
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
* 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.
|
||||
* GNU General Public License fr 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/>.
|
||||
@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/accountancy/journal/bankjournal.php
|
||||
* \ingroup Accounting Expert
|
||||
* \brief Page with sells journal
|
||||
* \brief Page with bank journal
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -66,6 +66,8 @@ $date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
$action = GETPOST('action');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -300,6 +302,7 @@ if ($action == 'writeBookKeeping')
|
||||
$bookkeeping->debit = ($mt >= 0 ? $mt : 0);
|
||||
$bookkeeping->credit = ($mt < 0 ? - $mt : 0);
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
if ($tabtype[$key] == 'payment') {
|
||||
|
||||
@ -350,6 +353,7 @@ if ($action == 'writeBookKeeping')
|
||||
$bookkeeping->debit = ($mt < 0 ? - $mt : 0);
|
||||
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
if ($tabtype[$key] == 'sc') {
|
||||
$bookkeeping->code_tiers = '';
|
||||
@ -414,17 +418,16 @@ if ($action == 'writeBookKeeping')
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
setEventMessage($langs->trans('Success'), 'mesgs');
|
||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
||||
}
|
||||
}
|
||||
// Export
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$bank_journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
$journal = $conf->global->ACCOUNTING_BANK_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
header('Content-Disposition: attachment;filename=journal_banque.csv');
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$companystatic = new Client($db);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2013-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
@ -52,6 +52,8 @@ $date_endmonth = GETPOST('date_endmonth');
|
||||
$date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -157,6 +159,7 @@ if ($result) {
|
||||
// Bookkeeping Write
|
||||
if ($action == 'writebookkeeping') {
|
||||
$now = dol_now();
|
||||
$error = 0;
|
||||
|
||||
foreach ( $tabfac as $key => $val ) {
|
||||
foreach ( $tabttc[$key] as $k => $mt ) {
|
||||
@ -177,8 +180,13 @@ if ($action == 'writebookkeeping') {
|
||||
$bookkeeping->debit = ($mt <= 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt > 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
@ -202,8 +210,13 @@ if ($action == 'writebookkeeping') {
|
||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -228,11 +241,20 @@ if ($action == 'writebookkeeping') {
|
||||
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt <= 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -246,15 +268,10 @@ $companystatic = new Fournisseur($db);
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$purchase_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_achats.csv";
|
||||
else
|
||||
$filename="journal_achats.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
|
||||
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) // Model Cegid Expert Export
|
||||
{
|
||||
$sep = ";";
|
||||
|
||||
@ -54,6 +54,8 @@ $date_endmonth = GETPOST('date_endmonth');
|
||||
$date_endday = GETPOST('date_endday');
|
||||
$date_endyear = GETPOST('date_endyear');
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
// Security check
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
@ -192,6 +194,7 @@ if ($result) {
|
||||
if ($action == 'writebookkeeping')
|
||||
{
|
||||
$now = dol_now();
|
||||
$error = 0;
|
||||
|
||||
foreach ($tabfac as $key => $val)
|
||||
{
|
||||
@ -212,8 +215,13 @@ if ($action == 'writebookkeeping')
|
||||
$bookkeeping->debit = ($mt >= 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt < 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Product / Service
|
||||
@ -237,8 +245,13 @@ if ($action == 'writebookkeeping')
|
||||
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -264,25 +277,29 @@ if ($action == 'writebookkeeping')
|
||||
$bookkeeping->debit = ($mt < 0) ? $mt : 0;
|
||||
$bookkeeping->credit = ($mt >= 0) ? $mt : 0;
|
||||
$bookkeeping->code_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
$bookkeeping->fk_user_author = $user->id;
|
||||
|
||||
$bookkeeping->create();
|
||||
$result = $bookkeeping->create();
|
||||
if ($result < 0) {
|
||||
$error ++;
|
||||
setEventMessage($object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error)) {
|
||||
setEventMessage($langs->trans("GeneralLedgerIsWritten"),'mesgs');
|
||||
}
|
||||
}
|
||||
|
||||
// Export
|
||||
if ($action == 'export_csv')
|
||||
{
|
||||
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
|
||||
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
$journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($conf->global->EXPORT_PREFIX_SPEC)
|
||||
$filename=$conf->global->EXPORT_PREFIX_SPEC."_"."journal_ventes.csv";
|
||||
else
|
||||
$filename="journal_ventes.csv";
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php';
|
||||
|
||||
$companystatic = new Client($db);
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ if (! empty($id)) {
|
||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||
print '<input type="hidden" name="action" value="ventil">';
|
||||
|
||||
print_fiche_titre($langs->trans('SuppliersVentilation'),'','title_setup');
|
||||
print load_fiche_titre($langs->trans('SuppliersVentilation'),'','title_setup');
|
||||
|
||||
dol_fiche_head();
|
||||
|
||||
|
||||
@ -95,7 +95,7 @@ llxHeader('', $langs->trans("SuppliersVentilation"));
|
||||
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
|
||||
$textnextyear = ' <a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
print load_fiche_titre($langs->trans("SuppliersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
|
||||
|
||||
print '<b>' . $langs->trans("DescVentilSupplier") . '</b>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=validatehistory">' . $langs->trans("ValidateHistory") . '</a></div>';
|
||||
|
||||
28
htdocs/accountancy/tpl/export_journal.tpl.php
Normal file
28
htdocs/accountancy/tpl/export_journal.tpl.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
$prefix = $conf->global->ACCOUNTING_EXPORT_PREFIX_SPEC;
|
||||
$format = $conf->global->ACCOUNTING_EXPORT_FORMAT;
|
||||
|
||||
$date_export = dol_print_date($now, '%Y%m%d%H%M%S');
|
||||
|
||||
header('Content-Type: text/csv');
|
||||
if ($prefix)
|
||||
$filename = $prefix . "_" . "journal_" . $journal . $date_export . "." . $format;
|
||||
else
|
||||
$filename = "journal_" . $journal . $date_export . "." . $format;
|
||||
header('Content-Disposition: attachment;filename='.$filename);
|
||||
@ -111,14 +111,14 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'general', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
print_fiche_titre($langs->trans("MemberMainOptions"),'','');
|
||||
print load_fiche_titre($langs->trans("MemberMainOptions"),'','');
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
@ -245,7 +245,7 @@ $constantes=array(
|
||||
'ADHERENT_CARD_FOOTER_TEXT'
|
||||
);
|
||||
|
||||
print_fiche_titre($langs->trans("MembersCards"),'','');
|
||||
print load_fiche_titre($langs->trans("MembersCards"),'','');
|
||||
|
||||
form_constantes($constantes);
|
||||
|
||||
@ -263,7 +263,7 @@ print '<br>';
|
||||
*/
|
||||
$constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');
|
||||
|
||||
print_fiche_titre($langs->trans("MembersTickets"),'','');
|
||||
print load_fiche_titre($langs->trans("MembersTickets"),'','');
|
||||
|
||||
form_constantes($constantes);
|
||||
|
||||
@ -293,7 +293,7 @@ $constantes=array(
|
||||
'ADHERENT_MAIL_FROM',
|
||||
);
|
||||
|
||||
print_fiche_titre($langs->trans("Other"),'','');
|
||||
print load_fiche_titre($langs->trans("Other"),'','');
|
||||
|
||||
form_constantes($constantes);
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
@ -95,7 +95,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
@ -108,7 +108,7 @@ if ($action == 'create')
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
@ -98,7 +98,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
@ -111,7 +111,7 @@ if ($action == 'create')
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ abstract class ActionsAdherentCardCommon
|
||||
{
|
||||
$this->object->fetch($_POST["adherentid"]);
|
||||
|
||||
$this->object->oldcopy=dol_clone($this->object);
|
||||
$this->object->oldcopy = clone $this->object;
|
||||
|
||||
$this->assign_post();
|
||||
|
||||
@ -434,4 +434,3 @@ abstract class ActionsAdherentCardCommon
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -30,12 +30,6 @@ include_once DOL_DOCUMENT_ROOT.'/adherents/canvas/actions_adherentcard_common.cl
|
||||
*/
|
||||
class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
{
|
||||
var $db;
|
||||
var $dirmodule;
|
||||
var $targetmodule;
|
||||
var $canvas;
|
||||
var $card;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_CREATE.TPL.PHP DEFAULT -->
|
||||
|
||||
<?php
|
||||
print_fiche_titre($this->control->tpl['title']);
|
||||
print load_fiche_titre($this->control->tpl['title']);
|
||||
|
||||
dol_htmloutput_errors((is_numeric($object->error)?'':$object->error),$object->errors);
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ $contact = $GLOBALS['objcanvas']->control->object;
|
||||
<!-- BEGIN PHP TEMPLATE ADHERENTCARD_EDIT.TPL.PHP DEFAULT -->
|
||||
|
||||
<?php
|
||||
print_fiche_titre($this->control->tpl['title']);
|
||||
print load_fiche_titre($this->control->tpl['title']);
|
||||
|
||||
dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ if (empty($reshook))
|
||||
// Create new object
|
||||
if ($result > 0 && ! $error)
|
||||
{
|
||||
$object->oldcopy=dol_clone($object);
|
||||
$object->oldcopy = clone $object;
|
||||
|
||||
// Change values
|
||||
$object->civility_id = trim($_POST["civility_id"]);
|
||||
@ -779,7 +779,7 @@ else
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
|
||||
print_fiche_titre($langs->trans("NewMember"));
|
||||
print load_fiche_titre($langs->trans("NewMember"));
|
||||
|
||||
if ($conf->use_javascript_ajax)
|
||||
{
|
||||
|
||||
@ -621,7 +621,9 @@ if ($rowid > 0)
|
||||
if ($object->datefin)
|
||||
{
|
||||
print dol_print_date($object->datefin,'day');
|
||||
if ($object->datefin < ($now - $conf->adherent->cotisation->warning_delay) && $object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie
|
||||
if ($object->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -825,7 +827,7 @@ if ($rowid > 0)
|
||||
{
|
||||
print '<br>';
|
||||
|
||||
print_fiche_titre($langs->trans("NewCotisation"));
|
||||
print load_fiche_titre($langs->trans("NewCotisation"));
|
||||
|
||||
// Define default choice to select
|
||||
$bankdirect=0; // 1 means option by default is write to bank direct with no invoice
|
||||
|
||||
@ -219,7 +219,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("MembersCards"));
|
||||
|
||||
print_fiche_titre($langs->trans("LinkToGeneratedPages"));
|
||||
print load_fiche_titre($langs->trans("LinkToGeneratedPages"));
|
||||
print '<br>';
|
||||
|
||||
print $langs->trans("LinkToGeneratedPagesDesc").'<br>';
|
||||
|
||||
@ -44,18 +44,8 @@ class Adherent extends CommonObject
|
||||
public $table_element='adherent';
|
||||
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
var $error;
|
||||
var $errors;
|
||||
var $mesgs;
|
||||
|
||||
var $id;
|
||||
|
||||
var $ref;
|
||||
public $ref_ext;
|
||||
|
||||
var $civility_id;
|
||||
var $firstname;
|
||||
var $lastname;
|
||||
var $login;
|
||||
var $pass;
|
||||
var $societe;
|
||||
@ -68,10 +58,6 @@ class Adherent extends CommonObject
|
||||
var $state_code; // Code of department
|
||||
var $state; // Label of department
|
||||
|
||||
var $country_id;
|
||||
var $country_code;
|
||||
var $country;
|
||||
|
||||
var $email;
|
||||
var $skype;
|
||||
var $phone;
|
||||
@ -80,8 +66,6 @@ class Adherent extends CommonObject
|
||||
|
||||
var $morphy;
|
||||
var $public;
|
||||
var $note_private; // Private note
|
||||
var $note_public; // Public note
|
||||
var $statut; // -1:brouillon, 0:resilie, >=1:valide,paye
|
||||
var $photo;
|
||||
|
||||
@ -99,7 +83,6 @@ class Adherent extends CommonObject
|
||||
var $user_login;
|
||||
|
||||
var $fk_soc;
|
||||
var $thirdparty; // Loaded by ->fetch_thirdparty()
|
||||
|
||||
// Fields loaded by fetch_subscriptions()
|
||||
var $first_subscription_date;
|
||||
@ -110,9 +93,6 @@ class Adherent extends CommonObject
|
||||
var $last_subscription_amount;
|
||||
var $subscriptions=array();
|
||||
|
||||
// var $public;
|
||||
var $array_options;
|
||||
|
||||
var $oldcopy; // To contains a clone of this when we need to save old properties of object
|
||||
|
||||
public $entity;
|
||||
@ -1741,7 +1721,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT a.rowid, a.datefin";
|
||||
$sql = "SELECT a.rowid, a.datefin, a.statut";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
||||
$sql.= " WHERE a.statut = 1";
|
||||
$sql.= " AND a.entity IN (".getEntity('adherent', 1).")";
|
||||
@ -1758,11 +1738,16 @@ class Adherent extends CommonObject
|
||||
$response->url=DOL_URL_ROOT.'/adherents/list.php?mainmenu=members&statut=1';
|
||||
$response->img=img_object($langs->trans("Members"),"user");
|
||||
|
||||
$adherentstatic = new Adherent($this->db);
|
||||
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$response->nbtodo++;
|
||||
|
||||
if ($this->db->jdate($obj->datefin) < ($now - $conf->adherent->cotisation->warning_delay)) {
|
||||
$adherentstatic->datefin = $this->db->jdate($obj->datefin);
|
||||
$adherentstatic->statut = $obj->statut;
|
||||
|
||||
if ($adherentstatic->hasDelay()) {
|
||||
$response->nbtodolate++;
|
||||
}
|
||||
}
|
||||
@ -1974,4 +1959,18 @@ class Adherent extends CommonObject
|
||||
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
|
||||
}
|
||||
|
||||
public function hasDelay()
|
||||
{
|
||||
global $conf;
|
||||
|
||||
//Only valid members
|
||||
if ($this->statut <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
return $this->datefin < ($now - $conf->adherent->cotisation->warning_delay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -35,18 +35,9 @@ class AdherentType extends CommonObject
|
||||
public $table_element = 'adherent_type';
|
||||
public $element = 'adherent_type';
|
||||
|
||||
var $id;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $ref;
|
||||
|
||||
var $libelle;
|
||||
var $statut;
|
||||
var $cotisation; // Soumis a la cotisation
|
||||
var $vote; // droit de vote
|
||||
var $note; // commentaire
|
||||
var $mail_valid; //mail envoye lors de la validation
|
||||
|
||||
|
||||
|
||||
@ -33,16 +33,12 @@ class Cotisation extends CommonObject
|
||||
public $element='subscription';
|
||||
public $table_element='cotisation';
|
||||
|
||||
var $id;
|
||||
var $ref;
|
||||
|
||||
var $datec; // Date creation
|
||||
var $datem; // Date modification
|
||||
var $dateh; // Subscription start date (date subscription)
|
||||
var $datef; // Subscription end date
|
||||
var $fk_adherent;
|
||||
var $amount;
|
||||
var $note;
|
||||
var $fk_bank;
|
||||
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ $staticmember=new Adherent($db);
|
||||
$statictype=new AdherentType($db);
|
||||
$subscriptionstatic=new Cotisation($db);
|
||||
|
||||
print_fiche_titre($langs->trans("MembersArea"));
|
||||
print load_fiche_titre($langs->trans("MembersArea"));
|
||||
|
||||
|
||||
$var=True;
|
||||
|
||||
@ -173,7 +173,7 @@ if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACT
|
||||
|
||||
|
||||
// Affichage attributs LDAP
|
||||
print_titre($langs->trans("LDAPInformationsForThisMember"));
|
||||
print load_fiche_titre($langs->trans("LDAPInformationsForThisMember"));
|
||||
|
||||
print '<table width="100%" class="noborder">';
|
||||
|
||||
|
||||
@ -271,6 +271,8 @@ if ($resql)
|
||||
$memberstatic->ref=$objp->rowid;
|
||||
$memberstatic->lastname=$objp->lastname;
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
$memberstatic->statut=$objp->statut;
|
||||
$memberstatic->datefin= $datefin;
|
||||
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
@ -325,7 +327,9 @@ if ($resql)
|
||||
{
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_print_date($datefin,'day');
|
||||
if ($datefin < ($now - $conf->adherent->cotisation->warning_delay) && $objp->statut > 0) print " ".img_warning($langs->trans("SubscriptionLate"));
|
||||
if ($memberstatic->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("SubscriptionLate"));
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
|
||||
@ -58,7 +58,7 @@ llxHeader('','','','',0,0,array('http://www.google.com/jsapi'));
|
||||
|
||||
$title=$langs->trans("MembersStatisticsByProperties");
|
||||
|
||||
print_fiche_titre($title, $mesg);
|
||||
print load_fiche_titre($title, $mesg);
|
||||
|
||||
dol_mkdir($dir);
|
||||
|
||||
@ -112,7 +112,7 @@ if (! count($data))
|
||||
}
|
||||
else
|
||||
{
|
||||
print_fiche_titre($langs->trans("MembersByNature"),'','');
|
||||
print load_fiche_titre($langs->trans("MembersByNature"),'','');
|
||||
}
|
||||
|
||||
// Print array
|
||||
|
||||
@ -64,7 +64,7 @@ if ($mode == 'memberbytown') $title=$langs->trans("MembersStatisticsByTown");
|
||||
if ($mode == 'memberbyregion') $title=$langs->trans("MembersStatisticsByRegion");
|
||||
|
||||
|
||||
print_fiche_titre($title, $mesg);
|
||||
print load_fiche_titre($title, $mesg);
|
||||
|
||||
dol_mkdir($dir);
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg);
|
||||
print load_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg);
|
||||
|
||||
$dir=$conf->adherent->dir_temp;
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ $form=new Form($db);
|
||||
if (! $rowid && $action != 'create' && $action != 'edit')
|
||||
{
|
||||
|
||||
print_fiche_titre($langs->trans("MembersTypes"));
|
||||
print load_fiche_titre($langs->trans("MembersTypes"));
|
||||
|
||||
dol_fiche_head('');
|
||||
|
||||
@ -238,7 +238,7 @@ if ($action == 'create')
|
||||
{
|
||||
$object = new AdherentType($db);
|
||||
|
||||
print_fiche_titre($langs->trans("NewMemberType"));
|
||||
print load_fiche_titre($langs->trans("NewMemberType"));
|
||||
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -133,7 +133,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
|
||||
@ -70,7 +70,7 @@ $textobject=$langs->transnoentitiesnoconv("Agenda");
|
||||
llxHeader('',$langs->trans("AgendaSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head=agenda_prepare_head();
|
||||
@ -100,7 +100,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
@ -113,7 +113,7 @@ if ($action == 'create')
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@ $arrayofcss=array();
|
||||
llxHeader('',$langs->trans("AgendaSetup"),'','',0,0,$arrayofjs,$arrayofcss);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
print '<form name="extsitesconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -74,8 +74,9 @@ if (preg_match('/del_(.*)/',$action,$reg))
|
||||
|
||||
if ($action == 'set')
|
||||
{
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
@ -89,7 +90,7 @@ $formactions=new FormActions($db);
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
@ -127,6 +128,17 @@ else
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").'</td>'."\n";
|
||||
print '<td align="center"> </td>'."\n";
|
||||
print '<td align="right" class="nowrap">'."\n";
|
||||
$formactions->select_type_actions($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT, "AGENDA_USE_EVENT_TYPE_DEFAULT", '', 0, 1);
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
// AGENDA_DEFAULT_FILTER_TYPE
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
|
||||
@ -74,7 +74,7 @@ if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_A
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AgendaSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
||||
@ -240,7 +240,7 @@ $form=new Form($db);
|
||||
//if ($mesg) print $mesg;
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AskPriceSupplierSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = askpricesupplier_admin_prepare_head();
|
||||
|
||||
@ -249,7 +249,7 @@ dol_fiche_head($head, 'general', $langs->trans("CommRequests"), 0, 'askpricesupp
|
||||
/*
|
||||
* Module numerotation
|
||||
*/
|
||||
print_titre($langs->trans("AskPriceSupplierNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("AskPriceSupplierNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -351,7 +351,7 @@ print "</table><br>\n";
|
||||
* Document templates generators
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("AskPriceSupplierPDFModules"));
|
||||
print load_fiche_titre($langs->trans("AskPriceSupplierPDFModules"));
|
||||
|
||||
// Load array def with activated templates
|
||||
$def = array();
|
||||
@ -513,7 +513,7 @@ print '<br>';
|
||||
* Other options
|
||||
*
|
||||
*/
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
@ -529,7 +529,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_ASKPRICESUPPLIER_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnAskPriceSupplier").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="ASKPRICESUPPLIER_FREE_TEXT" class="flat" cols="120">'.$conf->global->ASKPRICESUPPLIER_FREE_TEXT.'</textarea>';
|
||||
$variablename='ASKPRICESUPPLIER_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
@ -584,7 +594,7 @@ print '</table>';
|
||||
* Directory
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("PathToDocuments"));
|
||||
print load_fiche_titre($langs->trans("PathToDocuments"));
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
|
||||
@ -87,7 +87,7 @@ llxHeader("",$langs->trans("BankSetupModule"));
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
@ -109,7 +109,17 @@ $var=! $var;
|
||||
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnChequeReceipts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="BANK_CHEQUERECEIPT_FREE_TEXT" class="flat" cols="120">'.$conf->global->BANK_CHEQUERECEIPT_FREE_TEXT.'</textarea>';
|
||||
$variablename='BANK_CHEQUERECEIPT_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
@ -132,7 +142,7 @@ print '</form>';
|
||||
|
||||
|
||||
//Show bank account order
|
||||
print_titre($langs->trans("BankOrderShow"));
|
||||
print load_fiche_titre($langs->trans("BankOrderShow"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -66,7 +66,7 @@ llxHeader('',$langs->trans("BankSetupModule"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("BankSetupModule"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head = bank_admin_prepare_head(null);
|
||||
@ -96,7 +96,7 @@ if ($action != 'create' && $action != 'edit')
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
print load_fiche_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
@ -109,7 +109,7 @@ if ($action == 'create')
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ $help_url='EN:Module_Barcode|FR:Module_Codes_Barre|ES:Módulo Código de barra';
|
||||
llxHeader('',$langs->trans("BarcodeSetup"),$help_url);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BarcodeSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("BarcodeSetup"),$linkback,'title_setup');
|
||||
|
||||
// Detect bar codes modules
|
||||
$barcodelist=array();
|
||||
@ -188,7 +188,7 @@ foreach($dirbarcode as $reldir)
|
||||
$var=true;
|
||||
|
||||
print '<br>';
|
||||
print_titre($langs->trans("BarcodeEncodeModule"));
|
||||
print load_fiche_titre($langs->trans("BarcodeEncodeModule"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -288,7 +288,7 @@ print "<br>";
|
||||
* Autres options
|
||||
*
|
||||
*/
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -358,7 +358,7 @@ print '<br>';
|
||||
// Select barcode numbering module
|
||||
if ($conf->produit->enabled)
|
||||
{
|
||||
print_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")");
|
||||
print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("Product").")");
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
@ -219,7 +219,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader('',$langs->trans("Boxes"));
|
||||
|
||||
print_fiche_titre($langs->trans("Boxes"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("Boxes"),'','title_setup');
|
||||
|
||||
print $langs->trans("BoxesDesc")." ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
|
||||
|
||||
@ -323,7 +323,7 @@ $boxtoadd=InfoBox::listBoxes($db,'available',-1,null,$actives);
|
||||
|
||||
print "<br>\n";
|
||||
print "\n\n".'<!-- Boxes Available -->'."\n";
|
||||
print_titre($langs->trans("BoxesAvailable"));
|
||||
print load_fiche_titre($langs->trans("BoxesAvailable"));
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
|
||||
@ -385,7 +385,7 @@ print "\n".'<!-- End Boxes Available -->'."\n";
|
||||
$boxactivated=InfoBox::listBoxes($db,'activated',-1,null);
|
||||
//var_dump($boxactivated);
|
||||
print "<br>\n\n";
|
||||
print_titre($langs->trans("BoxesActivated"));
|
||||
print load_fiche_titre($langs->trans("BoxesActivated"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -446,7 +446,7 @@ print '</table><br>';
|
||||
// Other parameters
|
||||
|
||||
print "\n\n".'<!-- Other Const -->'."\n";
|
||||
print_titre($langs->trans("Other"));
|
||||
print load_fiche_titre($langs->trans("Other"));
|
||||
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">';
|
||||
|
||||
@ -60,7 +60,7 @@ $wikihelp='EN:Module_ClickToDial_En|FR:Module_ClickToDial|ES:Módulo_ClickTodial
|
||||
llxHeader('',$langs->trans("ClickToDialSetup"),$wikihelp);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ClickToDialSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("ClickToDialSetup"),$linkback,'title_setup');
|
||||
|
||||
print $langs->trans("ClickToDialDesc")."<br>\n";
|
||||
|
||||
|
||||
@ -263,7 +263,7 @@ llxHeader("",$langs->trans("OrdersSetup"));
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("OrdersSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = order_admin_prepare_head();
|
||||
|
||||
@ -273,7 +273,7 @@ dol_fiche_head($head, 'general', $langs->trans("Orders"), 0, 'order');
|
||||
* Orders Numbering model
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OrdersNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("OrdersNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -377,7 +377,7 @@ print "</table><br>\n";
|
||||
* Document templates generators
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OrdersModelModule"));
|
||||
print load_fiche_titre($langs->trans("OrdersModelModule"));
|
||||
|
||||
// Load array def with activated templates
|
||||
$def = array();
|
||||
@ -540,7 +540,7 @@ print "<br>";
|
||||
*
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
@ -555,7 +555,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_COMMANDE_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnOrders").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="COMMANDE_FREE_TEXT" class="flat" cols="120">'.$conf->global->COMMANDE_FREE_TEXT.'</textarea>';
|
||||
$variablename='COMMANDE_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
@ -628,7 +638,7 @@ print '<br>';
|
||||
* Notifications
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("Notifications"));
|
||||
print load_fiche_titre($langs->trans("Notifications"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
|
||||
@ -277,7 +277,7 @@ $formcompany=new FormCompany($db);
|
||||
|
||||
$countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
|
||||
|
||||
print_fiche_titre($langs->trans("CompanyFoundation"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("CompanyFoundation"),'','title_setup');
|
||||
|
||||
print $langs->trans("CompanyFundationDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
@ -414,9 +414,9 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
// Forme juridique
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td><label for="legal_form">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||
print '<tr '.$bc[$var].'><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||
if ($mysoc->country_code) {
|
||||
print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'legal_form');
|
||||
print $formcompany->select_juridicalstatus($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE, $mysoc->country_code, '', 'forme_juridique_code');
|
||||
} else {
|
||||
print $countrynotdefined;
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ComptaSetup'),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans('ComptaSetup'),$linkback,'title_setup');
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ $form=new Form($db);
|
||||
llxHeader("","");
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
$h = 0;
|
||||
|
||||
@ -172,7 +172,7 @@ jQuery(document).ready(function() {
|
||||
<?php
|
||||
}
|
||||
|
||||
print_fiche_titre($langs->trans("OtherSetup"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("OtherSetup"),'','title_setup');
|
||||
|
||||
print $langs->trans("ConstDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
@ -184,7 +184,7 @@ else if ($action == 'setmod')
|
||||
|
||||
else if ($action == 'set_other')
|
||||
{
|
||||
$freetext= GETPOST('CONTRACT_FREE_TEXT','alpha');
|
||||
$freetext= GETPOST('CONTRACT_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$res1 = dolibarr_set_const($db, "CONTRACT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
$draft= GETPOST('CONTRACT_DRAFT_WATERMARK','alpha');
|
||||
@ -214,7 +214,7 @@ llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("ContractsSetup"),$linkback,'title_setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -226,7 +226,7 @@ dol_fiche_head($head, 'contract', $langs->trans("Contracts"), 0, 'contract');
|
||||
* Contracts Numbering model
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("ContractsNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("ContractsNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -329,7 +329,7 @@ print '</table><br>';
|
||||
* Documents models for Contracts
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("TemplatePDFContracts"));
|
||||
print load_fiche_titre($langs->trans("TemplatePDFContracts"));
|
||||
|
||||
// Defini tableau def des modeles
|
||||
$def = array();
|
||||
@ -494,7 +494,7 @@ 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_other">';
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
@ -505,7 +505,17 @@ $var=true;
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnContracts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="CONTRACT_FREE_TEXT" class="flat" cols="120">'.$conf->global->CONTRACT_FREE_TEXT.'</textarea>';
|
||||
$variablename='CONTRACT_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
//Use draft Watermark
|
||||
|
||||
@ -133,7 +133,7 @@ $form = new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("DelaysOfToleranceBeforeWarning"),'','title_setup');
|
||||
|
||||
print $langs->transnoentities("DelaysOfToleranceDesc",img_warning());
|
||||
print " ".$langs->trans("OnlyActiveElementsAreShown",DOL_URL_ROOT.'/admin/modules.php')."<br>\n";
|
||||
|
||||
@ -151,7 +151,7 @@ $tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country a
|
||||
$tabsql[9] = "SELECT c.code_iso as code, c.label, c.unicode, c.active FROM ".MAIN_DB_PREFIX."c_currencies AS c";
|
||||
$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, c.label as country, c.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
||||
$tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t";
|
||||
$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c';
|
||||
$tabsql[12]= "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.nbjour, c.fdm, c.decalage, c.active, c.sortorder FROM ".MAIN_DB_PREFIX.'c_payment_term AS c';
|
||||
$tabsql[13]= "SELECT c.id as rowid, c.code, c.libelle, c.type, c.active, c.accountancy_code FROM ".MAIN_DB_PREFIX."c_paiement AS c";
|
||||
$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, c.code as country_code, c.label as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_country as c WHERE e.fk_pays=c.rowid and c.active=1";
|
||||
$tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format";
|
||||
@ -215,7 +215,7 @@ $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";
|
||||
$tabfield[11]= "element,source,code,libelle";
|
||||
$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
|
||||
$tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder";
|
||||
$tabfield[13]= "code,libelle,type,accountancy_code";
|
||||
$tabfield[14]= "code,libelle,price,organization,country_id,country";
|
||||
$tabfield[15]= "code,libelle,width,height,unit";
|
||||
@ -247,7 +247,7 @@ $tabfieldvalue[8] = "code,libelle,country";
|
||||
$tabfieldvalue[9] = "code,label,unicode";
|
||||
$tabfieldvalue[10]= "country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
|
||||
$tabfieldvalue[11]= "element,source,code,libelle";
|
||||
$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
|
||||
$tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder";
|
||||
$tabfieldvalue[13]= "code,libelle,type,accountancy_code";
|
||||
$tabfieldvalue[14]= "code,libelle,price,organization,country";
|
||||
$tabfieldvalue[15]= "code,libelle,width,height,unit";
|
||||
@ -279,7 +279,7 @@ $tabfieldinsert[8] = "code,libelle,fk_country";
|
||||
$tabfieldinsert[9] = "code_iso,label,unicode";
|
||||
$tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note";
|
||||
$tabfieldinsert[11]= "element,source,code,libelle";
|
||||
$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage";
|
||||
$tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage,sortorder";
|
||||
$tabfieldinsert[13]= "code,libelle,type,accountancy_code";
|
||||
$tabfieldinsert[14]= "code,libelle,price,organization,fk_pays";
|
||||
$tabfieldinsert[15]= "code,label,width,height,unit";
|
||||
@ -445,6 +445,7 @@ if ($id == 11)
|
||||
$langs->load("interventions");
|
||||
$elementList = array(
|
||||
'' => '',
|
||||
'societe' => $langs->trans('ThirdParty'),
|
||||
// 'proposal' => $langs->trans('Proposal'),
|
||||
// 'order' => $langs->trans('Order'),
|
||||
// 'invoice' => $langs->trans('Bill'),
|
||||
@ -812,7 +813,7 @@ if ($id)
|
||||
$titre.=' - '.$langs->trans($tablib[$id]);
|
||||
$linkback='<a href="'.$_SERVER['PHP_SELF'].'">'.$langs->trans("BackToDictionaryList").'</a>';
|
||||
}
|
||||
print_fiche_titre($titre,$linkback,'title_setup');
|
||||
print load_fiche_titre($titre,$linkback,'title_setup');
|
||||
|
||||
if (empty($id))
|
||||
{
|
||||
@ -1594,6 +1595,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
|
||||
if ($fieldlist[$field]=='accountancy_code') $size='size="10" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_sell') $size='size="10" ';
|
||||
if ($fieldlist[$field]=='accountancy_code_buy') $size='size="10" ';
|
||||
if ($fieldlist[$field]=='sortorder') $size='size="2" ';
|
||||
print '<input type="text" '.$size.' class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ $help_url='';
|
||||
llxHeader('',$langs->trans("ECMSetup"),$help_url);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ECMSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("ECMSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == "save")
|
||||
llxHeader('',$langs->trans("Audit"));
|
||||
|
||||
//$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("SecuritySetup"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup');
|
||||
|
||||
print $langs->trans("LogEventDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'updateMask')
|
||||
|
||||
else if ($action == 'set_SHIPPING_FREE_TEXT')
|
||||
{
|
||||
$freetext=GETPOST('SHIPPING_FREE_TEXT','alpha');
|
||||
$freetext=GETPOST('SHIPPING_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if ($res > 0)
|
||||
@ -217,7 +217,7 @@ $form=new Form($db);
|
||||
llxHeader("","");
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -248,7 +248,7 @@ dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
* Expedition numbering model
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("SendingsNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("SendingsNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -354,7 +354,7 @@ print '</table><br>';
|
||||
/*
|
||||
* Documents models for Sendings Receipt
|
||||
*/
|
||||
print_titre($langs->trans("SendingsReceiptModel"));
|
||||
print load_fiche_titre($langs->trans("SendingsReceiptModel"));
|
||||
|
||||
// Defini tableau def de modele invoice
|
||||
$type="shipping";
|
||||
@ -516,7 +516,7 @@ print '<br>';
|
||||
* Other options
|
||||
*
|
||||
*/
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
|
||||
$var=true;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
@ -532,7 +532,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_SHIPPING_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnShippings").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="SHIPPING_FREE_TEXT" class="flat" cols="120">'.$conf->global->SHIPPING_FREE_TEXT.'</textarea>';
|
||||
$variablename='SHIPPING_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -189,7 +189,7 @@ else if ($action == 'setmod')
|
||||
|
||||
else if ($action == 'set_EXPENSEREPORT_FREE_TEXT')
|
||||
{
|
||||
$freetext= GETPOST('EXPENSEREPORT_FREE_TEXT','alpha');
|
||||
$freetext= GETPOST('EXPENSEREPORT_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "EXPENSEREPORT_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
@ -235,7 +235,7 @@ llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("ExpenseReportsSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head=expensereport_admin_prepare_head();
|
||||
@ -244,7 +244,7 @@ dol_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), 0, 'trip
|
||||
|
||||
// Interventions numbering model
|
||||
/*
|
||||
print_titre($langs->trans("FicheinterNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("FicheinterNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -346,7 +346,7 @@ print '</table><br>';
|
||||
* Documents models for Interventions
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("TemplatePDFExpenseReports"));
|
||||
print load_fiche_titre($langs->trans("TemplatePDFExpenseReports"));
|
||||
|
||||
// Defini tableau def des modeles
|
||||
$type='expensereport';
|
||||
|
||||
@ -189,7 +189,7 @@ if ($_POST["delete"])
|
||||
llxHeader('',$langs->trans("ExternalRSSSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("ExternalRSSSetup"), $linkback, 'title_setup');
|
||||
print load_fiche_titre($langs->trans("ExternalRSSSetup"), $linkback, 'title_setup');
|
||||
print '<br>';
|
||||
|
||||
// Formulaire ajout
|
||||
|
||||
@ -293,7 +293,7 @@ $form=new Form($db);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("BillsSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = invoice_admin_prepare_head();
|
||||
dol_fiche_head($head, 'general', $langs->trans("Invoices"), 0, 'invoice');
|
||||
@ -302,7 +302,7 @@ dol_fiche_head($head, 'general', $langs->trans("Invoices"), 0, 'invoice');
|
||||
* Numbering module
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("BillsNumberingModule"));
|
||||
print load_fiche_titre($langs->trans("BillsNumberingModule"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -471,7 +471,7 @@ print '</table>';
|
||||
* Document templates generators
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("BillsPDFModules"));
|
||||
print load_fiche_titre($langs->trans("BillsPDFModules"));
|
||||
|
||||
// Load array def with activated templates
|
||||
$type='invoice';
|
||||
@ -631,7 +631,7 @@ print '</table>';
|
||||
* Modes de reglement
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"));
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInInvoice"));
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
@ -726,7 +726,7 @@ print "</form>";
|
||||
|
||||
|
||||
print "<br>";
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -756,7 +756,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
print '<input type="hidden" name="action" value="set_FACTURE_FREE_TEXT" />';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnInvoices").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="FACTURE_FREE_TEXT" class="flat" cols="120">'.$conf->global->FACTURE_FREE_TEXT.'</textarea>';
|
||||
$variablename='FACTURE_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
@ -795,7 +805,7 @@ print '</table>';
|
||||
* Repertoire
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("PathToDocuments"));
|
||||
print load_fiche_titre($langs->trans("PathToDocuments"));
|
||||
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
@ -813,7 +823,7 @@ print "</table>\n";
|
||||
* Notifications
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("Notifications"));
|
||||
print load_fiche_titre($langs->trans("Notifications"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
@ -98,13 +99,36 @@ foreach($modules as $const => $desc)
|
||||
|
||||
if (GETPOST('save','alpha'))
|
||||
{
|
||||
$res=dolibarr_set_const($db, "FCKEDITOR_TEST", GETPOST('formtestfield'),'chaine',0,'',$conf->entity);
|
||||
$error = 0;
|
||||
|
||||
if ($res > 0) setEventMessage($langs->trans("RecordModifiedSuccessfully"));
|
||||
$fckeditor_skin = GETPOST('fckeditor_skin', 'alpha');
|
||||
if (! empty($fckeditor_skin)) {
|
||||
if (! dolibarr_set_const($db, 'FCKEDITOR_SKIN', $fckeditor_skin, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
$fckeditor_test = GETPOST('formtestfield');
|
||||
if (! empty($fckeditor_test)) {
|
||||
if (! dolibarr_set_const($db, 'FCKEDITOR_TEST', $fckeditor_test, 'chaine', 0, '', $conf->entity)) {
|
||||
$error ++;
|
||||
}
|
||||
} else {
|
||||
$error ++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
setEventMessage($langs->trans("SetupSaved"));
|
||||
}
|
||||
else
|
||||
{
|
||||
setEventMessage($langs->trans("Error"),'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -112,7 +136,7 @@ if (GETPOST('save','alpha'))
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AdvancedEditor"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("AdvancedEditor"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
$var=true;
|
||||
@ -157,9 +181,15 @@ else
|
||||
|
||||
print '</table>'."\n";
|
||||
|
||||
print '<br>'."\n";
|
||||
|
||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
// Skins
|
||||
show_skin(null,1);
|
||||
print '<br>'."\n";
|
||||
print_fiche_titre($langs->trans("TestSubmitForm"),'(mode='.$mode.')','');
|
||||
print '<form name="formtest" method="POST" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
|
||||
print load_fiche_titre($langs->trans("TestSubmitForm"),'(mode='.$mode.')','');
|
||||
print '<input type="hidden" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||
$uselocalbrowser=true;
|
||||
$readonly=($mode=='dolibarr_readonly'?1:0);
|
||||
|
||||
@ -185,7 +185,7 @@ else if ($action == 'setmod')
|
||||
|
||||
else if ($action == 'set_FICHINTER_FREE_TEXT')
|
||||
{
|
||||
$freetext= GETPOST('FICHINTER_FREE_TEXT','alpha');
|
||||
$freetext= GETPOST('FICHINTER_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$res = dolibarr_set_const($db, "FICHINTER_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
@ -247,7 +247,7 @@ llxHeader();
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'title_setup');
|
||||
|
||||
|
||||
$head=fichinter_admin_prepare_head();
|
||||
@ -256,7 +256,7 @@ dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), 0, 'interven
|
||||
|
||||
// Interventions numbering model
|
||||
|
||||
print_titre($langs->trans("FicheinterNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("FicheinterNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -358,7 +358,7 @@ print '</table><br>';
|
||||
* Documents models for Interventions
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("TemplatePDFInterventions"));
|
||||
print load_fiche_titre($langs->trans("TemplatePDFInterventions"));
|
||||
|
||||
// Defini tableau def des modeles
|
||||
$type='ficheinter';
|
||||
@ -512,7 +512,7 @@ print "<br>";
|
||||
*
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
@ -527,7 +527,17 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set_FICHINTER_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnInterventions").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="FICHINTER_FREE_TEXT" class="flat" cols="120">'.$conf->global->FICHINTER_FREE_TEXT.'</textarea>';
|
||||
$variablename='FICHINTER_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -76,7 +76,7 @@ $form=new Form($db);
|
||||
llxHeader();
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("GeoIPMaxmindSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("GeoIPMaxmindSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
$version='';
|
||||
|
||||
@ -63,8 +63,7 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_HTML5", $_POST["MAIN_ACTIVATE_HTML5"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_ACTIVATE_FILECACHE", $_POST["MAIN_ACTIVATE_FILECACHE"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity);
|
||||
@ -90,8 +89,8 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities
|
||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", $_POST["MAIN_BUGTRACK_ENABLELINK"],'chaine',0,'',$conf->entity);
|
||||
|
||||
if (GETPOST('check_THEME_ELDY_USE_HOVER') == 'on') dolibarr_set_const($db,"THEME_ELDY_USE_HOVER", 1,'chaine',0,'',$conf->entity);
|
||||
else dolibarr_set_const($db,"THEME_ELDY_USE_HOVER",0,'chaine',0,'',$conf->entity);
|
||||
if (GETPOST('THEME_ELDY_USE_HOVER') == '') dolibarr_del_const($db, "THEME_ELDY_USE_HOVER", $conf->entity);
|
||||
else dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $_POST["THEME_ELDY_USE_HOVER"], 'chaine', 0, '', $conf->entity);
|
||||
|
||||
// This one is not always defined
|
||||
if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity);
|
||||
@ -114,7 +113,7 @@ $form=new Form($db);
|
||||
$formother=new FormOther($db);
|
||||
$formadmin=new FormAdmin($db);
|
||||
|
||||
print_fiche_titre($langs->trans("GUISetup"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("GUISetup"),'','title_setup');
|
||||
|
||||
print $langs->trans("DisplayDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
@ -132,7 +131,7 @@ if ($action == 'edit') // Edit
|
||||
clearstatcache();
|
||||
$var=true;
|
||||
|
||||
print_fiche_titre($langs->trans("Language"),'','');
|
||||
print load_fiche_titre($langs->trans("Language"),'','');
|
||||
print '<br>';
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
@ -189,17 +188,6 @@ if ($action == 'edit') // Edit
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("EnableHtml5").'</td><td>';
|
||||
print $form->selectyesno('MAIN_ACTIVATE_HTML5',$conf->global->MAIN_ACTIVATE_HTML5,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
@ -343,7 +331,7 @@ else // Show
|
||||
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td width="20">';
|
||||
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation",$conf->global->MAIN_LANG_DEFAULT),1);
|
||||
if ($user->admin && $conf->global->MAIN_LANG_DEFAULT!='auto') print info_admin($langs->trans("SubmitTranslation".($conf->global->MAIN_LANG_DEFAULT=='en_US'?'ENUS':''),$conf->global->MAIN_LANG_DEFAULT),1);
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
@ -385,15 +373,6 @@ else // Show
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
|
||||
// Activate Html5 - Developement - Only available on Eldy template
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("EnableHtml5").'</td><td>' . yn($conf->global->MAIN_ACTIVATE_HTML5) . '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
// Activate FileCache - Developement
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_FILECACHE)) {
|
||||
$var=!$var;
|
||||
|
||||
@ -43,7 +43,7 @@ llxHeader('',$langs->trans("Setup"),$wikihelp);
|
||||
$form = new Form($db);
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("SetupArea"),'','title_setup.png');
|
||||
print load_fiche_titre($langs->trans("SetupArea"),'','title_setup.png');
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_MOTD_SETUPPAGE))
|
||||
|
||||
@ -82,7 +82,7 @@ llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:M&o
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = ldap_prepare_head();
|
||||
|
||||
@ -263,7 +263,7 @@ if (function_exists("ldap_connect"))
|
||||
$ldap = new Ldap(); // Les parametres sont passes et recuperes via $conf
|
||||
|
||||
$result = $ldap->connect_bind();
|
||||
if ($result)
|
||||
if ($result > 0)
|
||||
{
|
||||
// Test ldap connect and bind
|
||||
print img_picto('','info').' ';
|
||||
|
||||
@ -95,7 +95,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = ldap_prepare_head();
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = ldap_prepare_head();
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = ldap_prepare_head();
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ if ($action == 'setvalue' && $user->admin)
|
||||
llxHeader('',$langs->trans("LDAPSetup"),'EN:Module_LDAP_En|FR:Module_LDAP|ES:Módulo_LDAP');
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
|
||||
print_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("LDAPSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = ldap_prepare_head();
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ $form=new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("LimitsSetup"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("LimitsSetup"),'','title_setup');
|
||||
|
||||
|
||||
print $langs->trans("LimitsDesc")."<br>\n";
|
||||
|
||||
@ -68,7 +68,7 @@ if ($action == 'updateMask')
|
||||
|
||||
if ($action == 'set_DELIVERY_FREE_TEXT')
|
||||
{
|
||||
$free=GETPOST('DELIVERY_FREE_TEXT','alpha');
|
||||
$free=GETPOST('DELIVERY_FREE_TEXT'); // No alpha here, we want exact string
|
||||
$res=dolibarr_set_const($db, "DELIVERY_FREE_TEXT",$free,'chaine',0,'',$conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
@ -208,7 +208,7 @@ llxHeader("","");
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -237,7 +237,7 @@ dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
* Livraison numbering model
|
||||
*/
|
||||
|
||||
print_titre($langs->trans("DeliveryOrderNumberingModules"));
|
||||
print load_fiche_titre($langs->trans("DeliveryOrderNumberingModules"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -340,7 +340,7 @@ print '</table>';
|
||||
* Documents Models for delivery
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("DeliveryOrderModel"));
|
||||
print load_fiche_titre($langs->trans("DeliveryOrderModel"));
|
||||
|
||||
// Defini tableau def de modele
|
||||
$type="delivery";
|
||||
@ -487,7 +487,7 @@ print '</table>';
|
||||
* Autres Options
|
||||
*/
|
||||
print "<br>";
|
||||
print_titre($langs->trans("OtherOptions"));
|
||||
print load_fiche_titre($langs->trans("OtherOptions"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
@ -504,6 +504,16 @@ print '<input type="hidden" name="action" value="set_DELIVERY_FREE_TEXT">';
|
||||
print '<tr '.$bc[$var].'><td colspan="2">';
|
||||
print $langs->trans("FreeLegalTextOnDeliveryReceipts").' ('.$langs->trans("AddCRIfTooLong").')<br>';
|
||||
print '<textarea name="DELIVERY_FREE_TEXT" class="flat" cols="120">'.$conf->global->DELIVERY_FREE_TEXT.'</textarea>';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
|
||||
{
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
}
|
||||
else
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor=new DolEditor($variablename, $conf->global->$variablename,'',80,'dolibarr_details');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td align="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -78,7 +78,7 @@ llxHeader();
|
||||
$form = new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans('ConfigLoan'),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans('ConfigLoan'),$linkback,'title_setup');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -81,7 +81,7 @@ if ($action == 'setvalue')
|
||||
llxHeader('',$langs->trans("MailingSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MailingSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MailingSetup"),$linkback,'title_setup');
|
||||
|
||||
if (! empty($conf->use_javascript_ajax))
|
||||
{
|
||||
|
||||
@ -152,7 +152,7 @@ llxHeader('',$langs->trans("MailmanSpipSetup"),$help_url);
|
||||
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup');
|
||||
print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup');
|
||||
|
||||
$head = mailmanspip_admin_prepare_head();
|
||||
|
||||
@ -175,7 +175,7 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
'ADHERENT_MAILMAN_LISTS'
|
||||
);
|
||||
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
print load_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
|
||||
print '<br>';
|
||||
|
||||
@ -211,7 +211,7 @@ else
|
||||
//$link.=img_$langs->trans("Activate")
|
||||
$link.=img_picto($langs->trans("Disabled"),'switch_off');
|
||||
$link.='</a>';
|
||||
print_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
print load_fiche_titre($langs->trans('MailmanTitle'), $link,'');
|
||||
}
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
@ -244,7 +244,7 @@ if (! $server) $server='127.0.0.1';
|
||||
$wikihelp='EN:Setup EMails|FR:Paramétrage EMails|ES:Configuración EMails';
|
||||
llxHeader('',$langs->trans("Setup"),$wikihelp);
|
||||
|
||||
print_fiche_titre($langs->trans("EMailsSetup"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("EMailsSetup"),'','title_setup');
|
||||
|
||||
print $langs->trans("EMailsDesc")."<br>\n";
|
||||
print "<br>\n";
|
||||
@ -660,7 +660,7 @@ else
|
||||
if ($action == 'testconnect')
|
||||
{
|
||||
print '<br>';
|
||||
print_titre($langs->trans("DoTestServerAvailability"));
|
||||
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
|
||||
|
||||
// If we use SSL/TLS
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server;
|
||||
@ -686,7 +686,7 @@ else
|
||||
if ($action == 'test' || $action == 'testhtml')
|
||||
{
|
||||
print '<br>';
|
||||
print_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend"));
|
||||
print load_fiche_titre($action == 'testhtml'?$langs->trans("DoTestSendHTML"):$langs->trans("DoTestSend"));
|
||||
|
||||
// Cree l'objet formulaire mail
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
|
||||
@ -131,7 +131,7 @@ $formadmin=new FormAdmin($db);
|
||||
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
||||
llxHeader('',$langs->trans("Setup"),$wikihelp);
|
||||
|
||||
print_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
|
||||
|
||||
$h = 0;
|
||||
|
||||
@ -270,7 +270,7 @@ if ($action == 'create')
|
||||
});
|
||||
</script>';
|
||||
|
||||
print_fiche_titre($langs->trans("NewMenu"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("NewMenu"),'','title_setup');
|
||||
|
||||
print '<form action="./edit.php?action=add&menuId='.$_GET['menuId'].'" method="post" name="formmenucreate">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -379,7 +379,7 @@ if ($action == 'create')
|
||||
}
|
||||
elseif ($action == 'edit')
|
||||
{
|
||||
print_fiche_titre($langs->trans("ModifMenu"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("ModifMenu"),'','title_setup');
|
||||
print '<br>';
|
||||
|
||||
print '<form action="./edit.php?action=update" method="POST" name="formmenuedit">';
|
||||
|
||||
@ -214,7 +214,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css')
|
||||
llxHeader('',$langs->trans("Menus"),'','',0,0,$arrayofjs,$arrayofcss);
|
||||
|
||||
|
||||
print_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
|
||||
|
||||
$h = 0;
|
||||
|
||||
@ -71,7 +71,7 @@ else if ($action == 'disable_layoutmenu')
|
||||
|
||||
llxHeader('',$langs->trans("Setup"));
|
||||
|
||||
print_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
print load_fiche_titre($langs->trans("Menus"),'','title_setup');
|
||||
|
||||
|
||||
$h = 0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user