mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Compare commits
78 Commits
3.6.0-alph
...
3.5.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb2393e663 | ||
|
|
81ff0a8643 | ||
|
|
80f1100bf9 | ||
|
|
75e76dc232 | ||
|
|
7fcf57ca5a | ||
|
|
5d4b861156 | ||
|
|
351ab9788b | ||
|
|
e061c442a6 | ||
|
|
6f40825270 | ||
|
|
13659b1528 | ||
|
|
60b37dffe1 | ||
|
|
4e619c42fa | ||
|
|
e0e64af18c | ||
|
|
9a056ab497 | ||
|
|
9dd499b133 | ||
|
|
eb0d98d406 | ||
|
|
fe49f55a48 | ||
|
|
f25ddfbc9c | ||
|
|
42b6628b76 | ||
|
|
6f47e2e154 | ||
|
|
3bc63c43dc | ||
|
|
41a2ce1a74 | ||
|
|
90f5f0823f | ||
|
|
c57c3aef84 | ||
|
|
174d4f6ff2 | ||
|
|
da0aebb2e9 | ||
|
|
63729ab508 | ||
|
|
ebb9016ad5 | ||
|
|
d5448f9ca4 | ||
|
|
cf8ff97855 | ||
|
|
d5986caed2 | ||
|
|
918fe5dbb5 | ||
|
|
f3bbf54447 | ||
|
|
a2a46f9300 | ||
|
|
46e46507ec | ||
|
|
8cb06cac08 | ||
|
|
a4797a0e4a | ||
|
|
663a3bd45c | ||
|
|
c421613da9 | ||
|
|
ab6a67054a | ||
|
|
48c77d2ceb | ||
|
|
6dab09e07a | ||
|
|
df5a009aa2 | ||
|
|
c969bc3e93 | ||
|
|
f1466e64af | ||
|
|
1fad693867 | ||
|
|
ed49f88446 | ||
|
|
e6bd3921f1 | ||
|
|
95793a5475 | ||
|
|
c506e59d8c | ||
|
|
a5c2b78565 | ||
|
|
61f649e1ae | ||
|
|
acb752c5f2 | ||
|
|
832ebb1cfe | ||
|
|
f282ffc549 | ||
|
|
ae728645d6 | ||
|
|
c6b700d449 | ||
|
|
f97c8feb54 | ||
|
|
3d12979b3f | ||
|
|
57cf384617 | ||
|
|
e16385b496 | ||
|
|
bb07d7f814 | ||
|
|
f115501ddf | ||
|
|
3f78fe8c93 | ||
|
|
6039c81845 | ||
|
|
57bd043f59 | ||
|
|
466de67b5b | ||
|
|
09e02f807f | ||
|
|
e2f51d0df2 | ||
|
|
c8c77dbdcf | ||
|
|
e0b4bd9b0d | ||
|
|
a1e778c146 | ||
|
|
1061a650d2 | ||
|
|
4bd6f11112 | ||
|
|
c8c4a10a06 | ||
|
|
10fda1956f | ||
|
|
b7bfadd660 | ||
|
|
649f535d56 |
51
ChangeLog
51
ChangeLog
@@ -2,6 +2,50 @@
|
||||
English Dolibarr ChangeLog
|
||||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.5.2 compared to 3.5.1 *****
|
||||
Fix: Can't add user for a task.
|
||||
Fix: Autoselect of warehouse if there is only one warehouse.
|
||||
Fix: Install of odt template for project and tasks.
|
||||
Fix: [ bug #1318 ] Problem with enter key when adding an existing
|
||||
product to a customer invoice.
|
||||
Fix: [ bug #1307 ] Quotes get removed from several inputs.
|
||||
Fix: [ bug #1317 ] Removing a category does not remove all child categories
|
||||
Fix: [ bug #1312 ] Call to undefined function _()
|
||||
Fix: Restore build for obs and launchpad.
|
||||
Fix: deleting files into backup system tools.
|
||||
Fix: Dump using php not not include lock on tables that are deleted.
|
||||
Fix: Fixed a problem with bank accounts sharing across entities.
|
||||
Fix: fields into group by of sql requests for module margins must be
|
||||
same than fields into select.
|
||||
Fix: When select_date is called with '' as preselected date,
|
||||
automatic user date was not correctly et (We must set a date into PHP
|
||||
server timezone area)
|
||||
Fix: First param of select_date must always be forged with a dolibarr
|
||||
date function and not time().
|
||||
Fix: fix can't add line with product in supplier order
|
||||
Fix: [bug #1309]
|
||||
Fix: Solve pb of too many embedded tables
|
||||
Fix: [ bug #1306 ] Fatal error when adding an external calendar
|
||||
Fix: A fix to manage automatic creation of code for import.
|
||||
Fix: Try to add code to provide easy way to fix warning on timezone not
|
||||
defined.
|
||||
Fix: Several fix into workflow/condition for invoice payments or convert
|
||||
into discount.
|
||||
Fix: Option MAIN_PDF_DASH_BETWEEN_LINES was not working when tcpdf was
|
||||
making a pagebreak higher than 2 pages.
|
||||
Fix: form to add images should not show link form.
|
||||
Fix: Correction when adding order line with price as '0'.
|
||||
Fix: [ bug #1283 ] ROUGET Shipment PDF.
|
||||
Fix: [ bug #1300 ]
|
||||
Fix: Miscellaneous problems on task tabs (withproject parameter lost and
|
||||
download fails).
|
||||
Fix: Avoid home project page to hung when too many tasks opened.
|
||||
Fix: bug #1295: Error when creating an agenda extrafield with a number as reference
|
||||
Fix: Translation of number for pt_PT.
|
||||
Fix: Error on ajax_constantonoff function.
|
||||
Fix: [ bug #1323 ] problème pour générer un odt depuis les taches dans projet.
|
||||
Fix: Can not make withdrawals
|
||||
|
||||
|
||||
***** ChangeLog for 3.5.1 compared to 3.5.0 *****
|
||||
Fix: Do not report trigger errors twice.
|
||||
@@ -40,8 +84,11 @@ Fix: [ bug #520 ] Product statistics and detailed lists are wrong.
|
||||
Fix: [ bug #1240 ] traduction.
|
||||
Fix: [ bug #1238 ] When creating accompte with a %, free product are used for calculation.
|
||||
Fix: [ bug #1280 ] service with not end of date was tagged as expired.
|
||||
Fix: [ bug #1295 ] Error when creating an agenda extrafield with a number as reference
|
||||
Fix: [ bug #1295 ] Error when creating an agenda extrafield with a number as reference.
|
||||
Fix: [ bug #1306 ] Fatal error when adding an external calendar.
|
||||
New: Added es_CL language
|
||||
Fix: Margin tabs bad data show
|
||||
Fix: [ bug #1318 ] Problem with enter key when adding an existing product to a customer invoice.
|
||||
|
||||
***** ChangeLog for 3.5 compared to 3.4.* *****
|
||||
For users:
|
||||
@@ -187,6 +234,8 @@ Fix: Warning into bank conciliation feature.
|
||||
Fix: Bad get of localtaxes into contracts add lines.
|
||||
Fix: Add a limit into list to avoid browser to hang when database is too large.
|
||||
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
|
||||
Fix: Agenda and Banks module were not working with multicompany module
|
||||
Fix: [ bug #1317 ] Removing a category does not remove all child categories
|
||||
|
||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
||||
Fix: field's problem into company's page (RIB).
|
||||
|
||||
@@ -6,7 +6,7 @@ Maintainer: Laurent Destailleur (eldy) <eldy@users.sourceforge.net>
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: http://www.dolibarr.org
|
||||
Build-Depends: debhelper (>= 9), po-debconf
|
||||
Comments: This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
|
||||
|
||||
Package: dolibarr
|
||||
Architecture: all
|
||||
@@ -16,7 +16,7 @@ Depends: libapache2-mod-php5 | libapache2-mod-php5filter | php5-cgi | php5-fpm |
|
||||
php5-mysql | php5-mysqli, php5-curl, php5-gd, php5-ldap, php5-geoip,
|
||||
# Required PHP libraries
|
||||
php-pear, php-mail-mime,
|
||||
# libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
# php-tcpdf, libfpdi-php, libfpdf-tpl-php, php-fpdf,
|
||||
# libphp-adodb,
|
||||
# libnusoap-php,
|
||||
# libphp-pclzip,
|
||||
|
||||
@@ -37,7 +37,7 @@ $force_install_lockinstall='444';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_lib_PHPEXCEL_PATH='';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
|
||||
@@ -442,8 +442,8 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/jqueryFileTree/connectors/jqueryFileTree.pl`; # Avoid errors into rpmlint
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/template`; # Package not valid for most linux distributions (errors reported into compile.js). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpmailer`; # Package not valid for most linux distributions (errors reported into file LICENSE). Package should be embed by modules to avoid problems.
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/adapters`; # Keep this removal in case we embed libraries
|
||||
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
|
||||
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
|
||||
@@ -505,8 +505,9 @@ if ($nboftargetok) {
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT/\" \"$BUILDROOT/$FILENAMETGZ\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/build/exe`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMETGZ into $FILENAMETGZ.tgz...\n";
|
||||
$cmd="tar --exclude-vcs --exclude-from \"$BUILDROOT/$PROJECT/build/tgz/tar_exclude.txt\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" $FILENAMETGZ";
|
||||
$ret=`$cmd`;
|
||||
@@ -532,6 +533,9 @@ if ($nboftargetok) {
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$FILENAMEXZ\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEXZ/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMEXZ into $FILENAMEXZ.xz...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
@@ -563,6 +567,9 @@ if ($nboftargetok) {
|
||||
$cmd="cp -pr \"$BUILDROOT/$PROJECT\" \"$BUILDROOT/$FILENAMEZIP\"";
|
||||
$ret=`$cmd`;
|
||||
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEZIP/build/exe`;
|
||||
$ret=`rm -fr $BUILDROOT/$FILENAMEZIP/htdocs/includes/ckeditor/_source`; # We can't remove it with exclude file, we need it for some tarball packages
|
||||
|
||||
print "Compress $FILENAMEZIP into $FILENAMEZIP.zip...\n";
|
||||
|
||||
print "Go to directory $BUILDROOT\n";
|
||||
|
||||
@@ -103,6 +103,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
@@ -166,6 +166,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/adodbtime
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/nusoap
|
||||
@@ -305,6 +306,11 @@ done >>%{name}.lang
|
||||
%post
|
||||
|
||||
echo Run post script of packager dolibarr_generic.spec
|
||||
echo Detected constant fedora=0%{?fedora}
|
||||
echo Detected constant rhel_version=0%{?rhel_version}
|
||||
echo Detected constant centos_version=0%{?centos_version}
|
||||
echo Detected constant mdkversion=0%{?mdkversion}
|
||||
echo Detected constant suse_version=0%{?suse_version}
|
||||
|
||||
# Define vars
|
||||
export docdir="/var/lib/dolibarr/documents"
|
||||
@@ -465,9 +471,12 @@ echo Restart mysql server
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysqld restart
|
||||
#/etc/init.d/mysqld restart
|
||||
fi
|
||||
if [ -f /etc/init.d/mysql ]; then
|
||||
/sbin/service mysql restart
|
||||
#/etc/init.d/mysql restart
|
||||
fi
|
||||
%else
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
|
||||
@@ -102,6 +102,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
|
||||
@@ -103,6 +103,7 @@ cui hai bisogno ed essere facile da usare.
|
||||
%{__cp} -pr build/tgz/* $RPM_BUILD_ROOT%{_datadir}/%{name}/build/tgz
|
||||
%{__cp} -pr htdocs $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__cp} -pr scripts $RPM_BUILD_ROOT%{_datadir}/%{name}
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/ckeditor/_source
|
||||
%{__rm} -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/htdocs/includes/fonts
|
||||
|
||||
# Lang
|
||||
@@ -289,8 +290,9 @@ fi
|
||||
# Restart mysql
|
||||
echo Restart mysql
|
||||
if [ -f /etc/init.d/mysqld ]; then
|
||||
/etc/init.d/mysqld restart
|
||||
else
|
||||
/sbin/service mysqld restart
|
||||
fi
|
||||
if [ -f /etc/init.d/mysql ]; then
|
||||
/sbin/service mysql restart
|
||||
fi
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@ doli*.rpm
|
||||
doli*.deb
|
||||
doli*.zip
|
||||
cvschangelogbuilder_dolibarr*
|
||||
dolibarr_install.log
|
||||
dolibarr_install.log
|
||||
|
||||
@@ -21,4 +21,4 @@ dolibarr*.rpm
|
||||
dolibarr*.deb
|
||||
dolibarr*.zip
|
||||
cvschangelogbuilder_dolibarr*
|
||||
dolibarr_install.log
|
||||
dolibarr_install.log
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -171,6 +171,7 @@ export list="
|
||||
--ignore-table=$base.llx_abonne_extrafields
|
||||
--ignore-table=$base.llx_abonne_type
|
||||
--ignore-table=$base.llx_abonnement
|
||||
--ignore-table=$base.llx_bootstrap
|
||||
--ignore-table=$base.llx_bt_namemap
|
||||
--ignore-table=$base.llx_bt_speedlimit
|
||||
--ignore-table=$base.llx_bt_summary
|
||||
|
||||
@@ -183,7 +183,7 @@ if ($resql)
|
||||
if ($type > 0)
|
||||
{
|
||||
$membertype=new AdherentType($db);
|
||||
$result=$membertype->fetch($_REQUEST["type"]);
|
||||
$result=$membertype->fetch(GETPOST("type"));
|
||||
$titre.=" (".$membertype->libelle.")";
|
||||
}
|
||||
|
||||
@@ -193,6 +193,7 @@ if ($resql)
|
||||
if ($search_login) $param.="&search_login=".$search_login;
|
||||
if ($search_email) $param.="&search_email=".$search_email;
|
||||
if ($filter) $param.="&filter=".$filter;
|
||||
if ($type > 0) $param.="&type=".$type;
|
||||
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords);
|
||||
|
||||
if ($sall)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
@@ -50,7 +50,7 @@ if (! $user->admin)
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/backup/'.GETPOST('urlfile');
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
|
||||
@@ -58,7 +58,7 @@ if ($file && ! $what)
|
||||
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$file=$conf->admin->dir_output.'/backup/'.GETPOST('urlfile');
|
||||
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
|
||||
$ret=dol_delete_file($file, 1);
|
||||
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
|
||||
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
|
||||
@@ -451,46 +451,53 @@ function backup_tables($outputfile, $tables='*')
|
||||
//fwrite($handle,"/*!40101 SET character_set_client = utf8 */;\n");
|
||||
$resqldrop=$db->query('SHOW CREATE TABLE '.$table);
|
||||
$row2 = $db->fetch_row($resqldrop);
|
||||
fwrite($handle,$row2[1].";\n");
|
||||
//fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n");
|
||||
|
||||
|
||||
// Dumping the data (locking the table and disabling the keys check while doing the process)
|
||||
fwrite($handle, "\n--\n-- Dumping data for table `".$table."`\n--\n");
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "LOCK TABLES `".$table."` WRITE;\n"); // Lock the table before inserting data (when the data will be imported back)
|
||||
if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` DISABLE KEYS;\n");
|
||||
|
||||
$sql='SELECT * FROM '.$table;
|
||||
$result = $db->query($sql);
|
||||
$num_fields = $db->num_rows($result);
|
||||
while($row = $db->fetch_row($result)) {
|
||||
// For each row of data we print a line of INSERT
|
||||
fwrite($handle,'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES (');
|
||||
$columns = count($row);
|
||||
for($j=0; $j<$columns; $j++) {
|
||||
// Processing each columns of the row to ensure that we correctly save the value (eg: add quotes for string - in fact we add quotes for everything, it's easier)
|
||||
if ($row[$j] == null and !is_string($row[$j])) {
|
||||
// IMPORTANT: if the field is NULL we set it NULL
|
||||
$row[$j] = 'NULL';
|
||||
} elseif(is_string($row[$j]) and $row[$j] == '') {
|
||||
// if it's an empty string, we set it as an empty string
|
||||
$row[$j] = "''";
|
||||
} elseif(is_numeric($row[$j]) and !strcmp($row[$j], $row[$j]+0) ) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0)
|
||||
// if it's a number, we return it as-is
|
||||
$row[$j] = $row[$j];
|
||||
} else { // else for all other cases we escape the value and put quotes around
|
||||
$row[$j] = addslashes($row[$j]);
|
||||
$row[$j] = preg_replace("#\n#", "\\n", $row[$j]);
|
||||
$row[$j] = "'".$row[$j]."'";
|
||||
}
|
||||
}
|
||||
fwrite($handle,implode(',', $row).");\n");
|
||||
if (empty($row2[1]))
|
||||
{
|
||||
fwrite($handle, "\n-- WARNING: Show create table ".$table." return empy string when it should not.\n");
|
||||
}
|
||||
if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` ENABLE KEYS;\n"); // Enabling back the keys/index checking
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "UNLOCK TABLES;\n"); // Unlocking the table
|
||||
fwrite($handle,"\n\n\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite($handle,$row2[1].";\n");
|
||||
//fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n");
|
||||
|
||||
// Dumping the data (locking the table and disabling the keys check while doing the process)
|
||||
fwrite($handle, "\n--\n-- Dumping data for table `".$table."`\n--\n");
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "LOCK TABLES `".$table."` WRITE;\n"); // Lock the table before inserting data (when the data will be imported back)
|
||||
if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` DISABLE KEYS;\n");
|
||||
|
||||
$sql='SELECT * FROM '.$table;
|
||||
$result = $db->query($sql);
|
||||
$num_fields = $db->num_rows($result);
|
||||
while($row = $db->fetch_row($result))
|
||||
{
|
||||
// For each row of data we print a line of INSERT
|
||||
fwrite($handle,'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES (');
|
||||
$columns = count($row);
|
||||
for($j=0; $j<$columns; $j++) {
|
||||
// Processing each columns of the row to ensure that we correctly save the value (eg: add quotes for string - in fact we add quotes for everything, it's easier)
|
||||
if ($row[$j] == null and !is_string($row[$j])) {
|
||||
// IMPORTANT: if the field is NULL we set it NULL
|
||||
$row[$j] = 'NULL';
|
||||
} elseif(is_string($row[$j]) and $row[$j] == '') {
|
||||
// if it's an empty string, we set it as an empty string
|
||||
$row[$j] = "''";
|
||||
} elseif(is_numeric($row[$j]) and !strcmp($row[$j], $row[$j]+0) ) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0)
|
||||
// if it's a number, we return it as-is
|
||||
$row[$j] = $row[$j];
|
||||
} else { // else for all other cases we escape the value and put quotes around
|
||||
$row[$j] = addslashes($row[$j]);
|
||||
$row[$j] = preg_replace("#\n#", "\\n", $row[$j]);
|
||||
$row[$j] = "'".$row[$j]."'";
|
||||
}
|
||||
}
|
||||
fwrite($handle,implode(',', $row).");\n");
|
||||
}
|
||||
if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` ENABLE KEYS;\n"); // Enabling back the keys/index checking
|
||||
if (!GETPOST("nobin_nolocks")) fwrite($handle, "UNLOCK TABLES;\n"); // Unlocking the table
|
||||
fwrite($handle,"\n\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Backup Procedure structure*/
|
||||
/*
|
||||
$result = $db->query('SHOW PROCEDURE STATUS');
|
||||
|
||||
@@ -292,6 +292,20 @@ class Categorie
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
/* FIX #1317 : Check for child cat and move up 1 level*/
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."categorie";
|
||||
$sql.= " SET fk_parent = ".$this->fk_parent;
|
||||
$sql.= " WHERE fk_parent = ".$this->id;
|
||||
|
||||
if (!$this->db->query($sql))
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR);
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
if (! $error)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_societe";
|
||||
|
||||
@@ -538,7 +538,7 @@ if ($action == 'create')
|
||||
|
||||
// Busy
|
||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
|
||||
print '<input id="transparency" type="checkbox" name="transparency"'.($actioncomm->transparency?' checked="checked"':'').'>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Realised by
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
ini_set('html_errors', false);
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/action/index.php
|
||||
@@ -315,7 +312,7 @@ $sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,';
|
||||
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
|
||||
$sql.= ' WHERE a.fk_action = ca.id';
|
||||
$sql.= ' AND a.entity IN ('.getEntity().')';
|
||||
$sql.= ' AND a.entity IN ('.getEntity('agenda', 1).')';
|
||||
if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
|
||||
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
|
||||
|
||||
@@ -381,7 +381,7 @@ if ($id > 0)
|
||||
print '<td colspan="3">';
|
||||
$amount_discount=$object->getAvailableDiscounts();
|
||||
if ($amount_discount < 0) dol_print_error($db,$object->error);
|
||||
if ($amount_discount > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.price($amount_discount).'</a> '.$langs->trans("Currency".$conf->currency);
|
||||
if ($amount_discount > 0) print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.price($amount_discount,1,$langs,1,-1,-1,$conf->currency).'</a>';
|
||||
else print $langs->trans("DiscountNone");
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1681,28 +1681,22 @@ else
|
||||
if ($soc->remise_percent) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_percent);
|
||||
else print $langs->trans("CompanyHasNoRelativeDiscount");
|
||||
print '. ';
|
||||
$absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL');
|
||||
$absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL');
|
||||
$absolute_discount=price2num($absolute_discount,'MT');
|
||||
$absolute_creditnote=price2num($absolute_creditnote,'MT');
|
||||
if ($absolute_discount)
|
||||
{
|
||||
if ($object->statut > 0)
|
||||
{
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount",price($absolute_discount),$langs->transnoentities("Currency".$conf->currency));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$absolute_discount = $soc->getAvailableDiscounts('', 'fk_facture_source IS NULL');
|
||||
$absolute_creditnote = $soc->getAvailableDiscounts('', 'fk_facture_source IS NOT NULL');
|
||||
$absolute_discount = price2num($absolute_discount, 'MT');
|
||||
$absolute_creditnote = price2num($absolute_creditnote, 'MT');
|
||||
if ($absolute_discount) {
|
||||
if ($object->statut > 0) {
|
||||
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount, 0, $langs, 0, 0, -1, $conf->currency));
|
||||
} else {
|
||||
// Remise dispo de type non avoir
|
||||
$filter='fk_facture_source IS NULL';
|
||||
print '<br>';
|
||||
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?id='.$object->id,0,'remise_id',$soc->id,$absolute_discount,$filter);
|
||||
}
|
||||
}
|
||||
if ($absolute_creditnote)
|
||||
{
|
||||
print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'. ';
|
||||
if ($absolute_creditnote) {
|
||||
print $langs->trans("CompanyHasCreditNote", price($absolute_creditnote, 0, $langs, 0, 0, -1, $conf->currency)) . '. ';
|
||||
}
|
||||
if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -581,9 +581,9 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
}
|
||||
if (GETPOST('addline_predefined')
|
||||
if (GETPOST('addline_predefined')
|
||||
|| (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field
|
||||
)
|
||||
)
|
||||
{
|
||||
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
@@ -643,8 +643,8 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
||||
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod)))
|
||||
{
|
||||
// Clean parameters
|
||||
$date_start=dol_mktime(0, 0, 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||
$date_end=dol_mktime(0, 0, 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||
$date_start=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), 0, GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||
$date_end=dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), 0, GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||
$price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT');
|
||||
|
||||
// Ecrase $pu par celui du produit
|
||||
@@ -863,8 +863,8 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST('
|
||||
// Clean parameters
|
||||
$date_start='';
|
||||
$date_end='';
|
||||
$date_start=dol_mktime(0, 0, 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||
$date_end=dol_mktime(0, 0, 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||
$date_start=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
|
||||
$date_end=dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||
$description=dol_htmlcleanlastbr(GETPOST('product_desc'));
|
||||
$pu_ht=GETPOST('price_ht');
|
||||
$vat_rate=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
@@ -1882,7 +1882,7 @@ else
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
|
||||
}
|
||||
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
|
||||
@@ -1902,7 +1902,7 @@ else
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
|
||||
}
|
||||
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220);
|
||||
@@ -1933,7 +1933,7 @@ else
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
|
||||
}
|
||||
|
||||
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1);
|
||||
|
||||
@@ -50,7 +50,7 @@ $confirm=GETPOST('confirm','alpha');
|
||||
$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref :''));
|
||||
$fieldtype = (! empty($ref) ? 'ref' :'rowid');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
|
||||
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account&bank_account','','',$fieldtype);
|
||||
|
||||
$paiementtype=GETPOST('paiementtype','alpha',3);
|
||||
$req_nb=GETPOST("req_nb",'',3);
|
||||
|
||||
@@ -43,7 +43,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -44,7 +44,7 @@ if (isset($_GET["id"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
/*
|
||||
@@ -325,7 +325,7 @@ if ($action == 'create')
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("Date").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$form->select_date(time(), 're', 0, 0, 0, 'formsoc');
|
||||
$form->select_date('', 're', 0, 0, 0, 'formsoc');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';
|
||||
|
||||
@@ -41,7 +41,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
$account=$_GET["account"];
|
||||
$mode='standard';
|
||||
|
||||
@@ -42,7 +42,7 @@ if (isset($_GET["account"]) || isset($_GET["ref"]))
|
||||
}
|
||||
$fieldid = isset($_GET["ref"])?'ref':'rowid';
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
|
||||
$result=restrictedArea($user,'banque',$id,'bank_account&bank_account','','',$fieldid);
|
||||
|
||||
|
||||
$vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"];
|
||||
|
||||
@@ -51,6 +51,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('companies');
|
||||
$langs->load('compta');
|
||||
$langs->load('products');
|
||||
$langs->load('banks');
|
||||
$langs->load('main');
|
||||
@@ -1139,7 +1140,9 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
$error = 0;
|
||||
|
||||
// Set if we used free entry or predefined product
|
||||
if (GETPOST('addline_libre'))
|
||||
if (GETPOST('addline_libre')
|
||||
|| (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field
|
||||
)
|
||||
{
|
||||
$predef='';
|
||||
$idprod=0;
|
||||
@@ -1147,7 +1150,9 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
|
||||
$price_ht = GETPOST('price_ht');
|
||||
$tva_tx=(GETPOST('tva_tx')?GETPOST('tva_tx'):0);
|
||||
}
|
||||
if (GETPOST('addline_predefined'))
|
||||
if (GETPOST('addline_predefined')
|
||||
|| (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field
|
||||
)
|
||||
{
|
||||
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
|
||||
$idprod=GETPOST('idprod', 'int');
|
||||
@@ -2622,7 +2627,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1),
|
||||
//array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1,0,0,$langs->trans("NoStockAction"))));
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1,0,0,$langs->trans("NoStockAction"))));
|
||||
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete',$formquestion,"yes",1);
|
||||
}else {
|
||||
$formconfirm=$form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id,$langs->trans('DeleteBill'),$text,'confirm_delete','','',1);
|
||||
@@ -2683,7 +2688,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$value = '<input type="hidden" id="idwarehouse" name="idwarehouse" value="' . key($warehouse_array) . '">';
|
||||
} else {
|
||||
$label = $object->type==2?$langs->trans("SelectWarehouseForStockIncrease"):$langs->trans("SelectWarehouseForStockDecrease");
|
||||
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1);
|
||||
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1);
|
||||
}
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
@@ -2726,7 +2731,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$value = '<input type="hidden" id="idwarehouse" name="idwarehouse" value="' . key($warehouse_array) . '">';
|
||||
} else {
|
||||
$label=$object->type==2?$langs->trans("SelectWarehouseForStockDecrease"):$langs->trans("SelectWarehouseForStockIncrease");
|
||||
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1);
|
||||
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1);
|
||||
}
|
||||
$formquestion=array(
|
||||
//'text' => $langs->trans("ConfirmClone"),
|
||||
|
||||
@@ -1252,6 +1252,16 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
// Fin appel triggers
|
||||
}
|
||||
|
||||
// Removed extrafields
|
||||
if (! $error) {
|
||||
$result=$this->deleteExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -671,9 +671,10 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
/**
|
||||
* Get number of invoices to withdrawal
|
||||
* TODO delete params banque and agence when not necesary
|
||||
*
|
||||
* @param int $banque bank
|
||||
* @param int $agence agence
|
||||
* @param int $banque dolibarr mysoc bank
|
||||
* @param int $agence dolibarr mysoc agence
|
||||
* @return int <O if KO, number of invoices if OK
|
||||
*/
|
||||
function NbFactureAPrelever($banque=0,$agence=0)
|
||||
@@ -683,16 +684,16 @@ class BonPrelevement extends CommonObject
|
||||
$sql = "SELECT count(f.rowid)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
if ($banque || $agence) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
//if ($banque || $agence) $sql.=", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
$sql.= " WHERE f.fk_statut = 1";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND f.rowid = pfd.fk_facture";
|
||||
$sql.= " AND f.paye = 0";
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
$sql.= " AND f.total_ttc > 0";
|
||||
if ($banque || $agence) $sql.= " AND f.fk_soc = sr.rowid";
|
||||
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
//if ($banque || $agence) $sql.= " AND f.fk_soc = sr.rowid";
|
||||
//if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
//if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@@ -715,9 +716,10 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
/**
|
||||
* Create a withdraw
|
||||
* TODO delete params banque and agence when not necesary
|
||||
*
|
||||
* @param int $banque code of bank (to withdraw a specific bankof a specific customer. By default '')
|
||||
* @param int $agence code of bank office (guichet) (to withdraw a specific bankof a specific customer. By default '')
|
||||
* @param int $banque dolibarr mysoc bank
|
||||
* @param int $agence dolibarr mysoc bank office (guichet)
|
||||
* @param string $mode real=do action, simu=test only
|
||||
* @return int <0 if KO, nbre of invoice withdrawed if OK
|
||||
*/
|
||||
@@ -755,17 +757,17 @@ class BonPrelevement extends CommonObject
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."prelevement_facture_demande as pfd";
|
||||
if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
//if ($banque || $agence) $sql.= ", ".MAIN_DB_PREFIX."societe_rib as sr";
|
||||
$sql.= " WHERE f.rowid = pfd.fk_facture";
|
||||
$sql.= " AND f.entity = ".$conf->entity;
|
||||
$sql.= " AND s.rowid = f.fk_soc";
|
||||
if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
|
||||
//if ($banque || $agence) $sql.= " AND s.rowid = sr.fk_soc";
|
||||
$sql.= " AND f.fk_statut = 1";
|
||||
$sql.= " AND f.paye = 0";
|
||||
$sql.= " AND pfd.traite = 0";
|
||||
$sql.= " AND f.total_ttc > 0";
|
||||
if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
//if ($banque) $sql.= " AND sr.code_banque = '".$conf->global->PRELEVEMENT_CODE_BANQUE."'";
|
||||
//if ($agence) $sql.= " AND sr.code_guichet = '".$conf->global->PRELEVEMENT_CODE_GUICHET."'";
|
||||
|
||||
dol_syslog(get_class($this)."::Create sql=".$sql, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@@ -201,6 +201,20 @@ class Conf
|
||||
//var_dump($this->modules);
|
||||
//var_dump($this->modules_parts['theme']);
|
||||
|
||||
// If you can't set timezone of your PHP, set this constant. Better is to set it to UTC.
|
||||
// In future, this constant will be forced to 'UTC' so PHP server timezone will not have effect anymore.
|
||||
//$this->global->MAIN_SERVER_TZ='Europe/Paris';
|
||||
if (! empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto')
|
||||
{
|
||||
try {
|
||||
date_default_timezone_set($this->global->MAIN_SERVER_TZ);
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
dol_syslog("Error: Bad value for parameter MAIN_SERVER_TZ=".$this->global->MAIN_SERVER_TZ, LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// Object $mc
|
||||
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
||||
{
|
||||
|
||||
@@ -776,6 +776,7 @@ class ExtraFields
|
||||
$labeltoshow=dol_trunc($obj->$field_toshow,18).' ';
|
||||
}
|
||||
}
|
||||
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2915,16 +2915,17 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a form to select a date
|
||||
* Show a form + html select a date
|
||||
*
|
||||
* @param string $page Page
|
||||
* @param string $selected Date preselected
|
||||
* @param string $htmlname Name of input html field
|
||||
* @param string $htmlname Html name of date input fields or 'none'
|
||||
* @param int $displayhour Display hour selector
|
||||
* @param int $displaymin Display minutes selector
|
||||
* @return void
|
||||
* @see select_date
|
||||
*/
|
||||
function form_date($page, $selected, $htmlname,$displayhour=0,$displaymin=0)
|
||||
function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@@ -3057,13 +3058,13 @@ class Form
|
||||
print '<tr><td class="nowrap">';
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
|
||||
{
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice
|
||||
else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
|
||||
else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
|
||||
if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
else print $langs->trans("CompanyHasCreditNote",price($amount,0,$langs,0,0,-1,$conf->currency)).': ';
|
||||
}
|
||||
$newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles
|
||||
if ($filter) $newfilter.=' AND ('.$filter.')';
|
||||
@@ -3437,13 +3438,13 @@ class Form
|
||||
|
||||
|
||||
/**
|
||||
* Show a HTML widget to input a date or combo list for day, month, years and optionnaly hours and minutes
|
||||
* Show a HTML widget to input a date or combo list for day, month, years and optionnaly hours and minutes.
|
||||
* Fields are preselected with :
|
||||
* - set_time date (Local PHP server timestamps or date format YYYY-MM-DD or YYYY-MM-DD HH:MM)
|
||||
* - local date of PHP server if set_time is ''
|
||||
* - Empty (fields empty) if set_time is -1 (in this case, parameter empty must also have value 1)
|
||||
* - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM')
|
||||
* - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location)
|
||||
* - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1)
|
||||
*
|
||||
* @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp)
|
||||
* @param timestamp $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date.
|
||||
* @param string $prefix Prefix for fields name
|
||||
* @param int $h 1=Show also hours
|
||||
* @param int $m 1=Show also minutes
|
||||
@@ -3455,6 +3456,7 @@ class Form
|
||||
* @param int $disabled Disable input fields
|
||||
* @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
|
||||
* @return mixed Nothing or string if nooutput is 1
|
||||
* @see form_date
|
||||
*/
|
||||
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowbutton=0, $nooutput=0, $disabled=0, $fullday='')
|
||||
{
|
||||
@@ -3467,7 +3469,11 @@ class Form
|
||||
if($m == '') $m=0;
|
||||
if($empty == '') $empty=0;
|
||||
|
||||
if (! $set_time && $empty == 0) $set_time = dol_now('tzuser');
|
||||
if ($set_time === '' && $empty == 0)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
$set_time = dol_now('tzuser')-(getServerTimeZoneInt('now')*3600); // set_time must be relative to PHP server timezone
|
||||
}
|
||||
|
||||
// Analysis of the pre-selection date
|
||||
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/',$set_time,$reg))
|
||||
|
||||
@@ -641,7 +641,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p";
|
||||
$sql .= " WHERE p.fk_soc = ".$object->id;
|
||||
if ($search_status!='') $sql .= " AND p.statut = ".$db->escape($search_status);
|
||||
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape(strtolower($search_name))."%' OR p.firstname LIKE '%".$db->escape(strtolower($search_name))."%')";
|
||||
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
|
||||
$sql.= " ORDER BY $sortfield $sortorder";
|
||||
|
||||
dol_syslog('core/lib/company.lib.php :: show_contacts sql='.$sql,LOG_DEBUG);
|
||||
@@ -726,7 +726,8 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
$coords .= "<br />".addslashes($object->country);
|
||||
}
|
||||
|
||||
print '<td align="center"><a href="#" onclick="return copyToClipboard(\''.$coords.'\');">';
|
||||
print '<td align="center">'; // hideonsmatphone because copyToClipboard call jquery dialog that does not work with jmobile
|
||||
print '<a href="#" class="hideonsmartphone" onclick="return copyToClipboard(\''.$coords.'\');">';
|
||||
print img_picto($langs->trans("Address"), 'object_address.png');
|
||||
print '</a></td>';
|
||||
|
||||
@@ -736,7 +737,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
print '<td align="center">';
|
||||
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
|
||||
print '<a class="hideonsmartphone" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&actioncode=AC_RDV&contactid='.$obj->rowid.'&socid='.$object->id.'&backtopage='.urlencode($backtopage).'">';
|
||||
print img_object($langs->trans("Rendez-Vous"),"action_rdv");
|
||||
print '</a> ';
|
||||
}
|
||||
@@ -771,18 +772,17 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
|
||||
print "<br>\n";
|
||||
?>
|
||||
<div id="dialog" title="<?php echo dol_escape_htmltag($langs->trans('Address')); ?>" style="display: none;">
|
||||
</div>
|
||||
<div id="dialog" title="<?php echo dol_escape_htmltag($langs->trans('Address')); ?>" style="display: none;"></div>
|
||||
<?php
|
||||
print '<script type="text/javascript">
|
||||
function copyToClipboard (text) {
|
||||
function copyToClipboard (text) {
|
||||
text = text.replace(/<br \/>/g,"\n");
|
||||
var newElem = "<textarea id=\"coords\" style=\"border: none; width: 90%; height: 120px;\">"+text+"</textarea><br/><br/>'.$langs->trans('HelpCopyToClipboard').'";
|
||||
$("#dialog").html(newElem);
|
||||
$( "#dialog" ).dialog();
|
||||
$("#dialog").dialog();
|
||||
$("#coords").select();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>';
|
||||
|
||||
return $i;
|
||||
|
||||
@@ -510,6 +510,12 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1)
|
||||
return -3;
|
||||
}
|
||||
if (empty($newmask) && ! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
|
||||
if (empty($newmask)) // This should no happen
|
||||
{
|
||||
dol_syslog("Warning: dol_copy called with empty value for newmask and no default value defined", LOG_WARNING);
|
||||
$newmask='0664';
|
||||
}
|
||||
|
||||
@chmod($newpathofdestfile, octdec($newmask));
|
||||
|
||||
return 1;
|
||||
|
||||
@@ -1058,7 +1058,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
|
||||
|
||||
/**
|
||||
* Return date for now. We should always use this function without parameters (that means GMT time)
|
||||
* Return date for now. In mot cases, we use this function without parameters (that means GMT time).
|
||||
*
|
||||
* @param string $mode 'gmt' => we return GMT timestamp,
|
||||
* 'tzserver' => we add the PHP server timezone
|
||||
@@ -1068,7 +1068,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
|
||||
*/
|
||||
function dol_now($mode='gmt')
|
||||
{
|
||||
// Note that gmmktime and mktime return same value (GMT) whithout parameters
|
||||
// Note that gmmktime and mktime return same value (GMT) when used without parameters
|
||||
//if ($mode == 'gmt') $ret=gmmktime(); // Strict Standards: gmmktime(): You should be using the time() function instead
|
||||
if ($mode == 'gmt') $ret=time(); // Time for now at greenwich.
|
||||
else if ($mode == 'tzserver') // Time for now with PHP server timezone added
|
||||
@@ -1083,7 +1083,7 @@ function dol_now($mode='gmt')
|
||||
$tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time
|
||||
$ret=dol_now('gmt')+($tzsecond*3600);
|
||||
}*/
|
||||
else if ($mode == 'tzuser') // Time for now with user timezone is added
|
||||
else if ($mode == 'tzuser') // Time for now with user timezone added
|
||||
{
|
||||
//print 'eeee'.time().'-'.mktime().'-'.gmmktime();
|
||||
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;
|
||||
|
||||
@@ -128,9 +128,9 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
|
||||
// Protection and encryption of pdf
|
||||
if (empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->PDF_SECURITY_ENCRYPTION))
|
||||
{
|
||||
{
|
||||
/* Permission supported by TCPDF
|
||||
- print : Print the document;
|
||||
- print : Print the document;
|
||||
- modify : Modify the contents of the document by operations other than those controlled by 'fill-forms', 'extract' and 'assemble';
|
||||
- copy : Copy or otherwise extract text and graphics from the document;
|
||||
- annot-forms : Add or modify text annotations, fill in interactive form fields, and, if 'modify' is also set, create or modify interactive form fields (including signature fields);
|
||||
@@ -145,8 +145,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
// For TCPDF, we specify permission we want to block
|
||||
$pdfrights = array('modify','copy');
|
||||
|
||||
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
|
||||
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
|
||||
$pdfuserpass = ''; // Password for the end user
|
||||
$pdfownerpass = NULL; // Password of the owner, created randomly if not defined
|
||||
$pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass);
|
||||
}
|
||||
else
|
||||
@@ -160,8 +160,8 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
{
|
||||
// Declare here a class to overwrite FPDI to add method writeHTMLCell
|
||||
/**
|
||||
* This class if a enhanced FPDI class that support method writeHTMLCell
|
||||
*/
|
||||
* This class if a enhanced FPDI class that support method writeHTMLCell
|
||||
*/
|
||||
class FPDI_DolExtended extends FPDI
|
||||
{
|
||||
/**
|
||||
@@ -258,7 +258,7 @@ function pdf_getPDFFontSize($outputlangs)
|
||||
|
||||
|
||||
/**
|
||||
* Return height to use for Logo onot PDF
|
||||
* Return height to use for Logo onto PDF
|
||||
*
|
||||
* @param string $logo Full path to logo file to use
|
||||
* @param bool $url Image with url (true or false)
|
||||
@@ -311,7 +311,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
|
||||
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
|
||||
{
|
||||
// Tel
|
||||
// Phone
|
||||
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
|
||||
// Fax
|
||||
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
|
||||
@@ -344,7 +344,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
|
||||
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
||||
{
|
||||
// Tel
|
||||
// Phone
|
||||
if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro);
|
||||
// Fax
|
||||
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
|
||||
@@ -362,7 +362,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
|
||||
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
|
||||
{
|
||||
// Tel
|
||||
// Phone
|
||||
if ($targetcompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->phone);
|
||||
// Fax
|
||||
if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax);
|
||||
@@ -410,7 +410,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
|
||||
{
|
||||
$stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($deliverycompany))."\n";
|
||||
|
||||
// Tel
|
||||
// Phone
|
||||
if ($deliverycompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($deliverycompany->phone);
|
||||
// Fax
|
||||
if ($deliverycompany->fax) $stringaddress .= ($stringaddress ? ($deliverycompany->phone ? " - " : "\n") : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($deliverycompany->fax);
|
||||
@@ -446,7 +446,7 @@ function pdf_pagehead(&$pdf,$outputlangs,$page_height)
|
||||
* @param Translate $outputlangs Object lang
|
||||
* @param int $h Height of PDF
|
||||
* @param int $w Width of PDF
|
||||
* @param string $unit Unit of height (mmn, pt, ...)
|
||||
* @param string $unit Unit of height (mm, pt, ...)
|
||||
* @param string $text Text to show
|
||||
* @return void
|
||||
*/
|
||||
@@ -782,7 +782,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
$pdf->SetFont('','',7);
|
||||
$pdf->SetDrawColor(224,224,224);
|
||||
|
||||
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
|
||||
// The start of the bottom of this page footer is positioned according to # of lines
|
||||
$freetextheight=0;
|
||||
if ($line) // Free text
|
||||
{
|
||||
@@ -900,7 +900,7 @@ function pdf_writeLinkedObjects(&$pdf,$object,$outputlangs,$posx,$posy,$w,$h,$al
|
||||
* @param int $posx Pos x
|
||||
* @param int $posy Pos y
|
||||
* @param int $hideref Hide reference
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $issupplierline Is it a line for a supplier object ?
|
||||
* @return void
|
||||
*/
|
||||
@@ -1013,7 +1013,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
|
||||
// If line linked to a product
|
||||
if ($idprod)
|
||||
{
|
||||
// On ajoute la ref
|
||||
// We add ref
|
||||
if ($prodser->ref)
|
||||
{
|
||||
$prefix_prodserv = "";
|
||||
|
||||
@@ -133,7 +133,7 @@ function restrictedArea($user, $features, $objectid=0, $dbtablename='', $feature
|
||||
// More parameters
|
||||
$params = explode('&', $dbtablename);
|
||||
$dbtablename=(! empty($params[0]) ? $params[0] : '');
|
||||
$sharedelement=(! empty($params[1]) ? $params[1] : '');
|
||||
$sharedelement=(! empty($params[1]) ? $params[1] : $dbtablename);
|
||||
|
||||
$listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -228,34 +228,24 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->COMMANDE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -593,20 +593,6 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$pdf->GetY()+1;
|
||||
}
|
||||
*/
|
||||
if (! empty($object->date_livraison))
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$text=$outputlangs->transnoentities("DeliveryDate").':';
|
||||
$pdf->MultiCell(80, 3, $text, 0, 'L', 0);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$text=dol_print_date($object->date_livraison,'day','',$outputlangs);
|
||||
$pdf->MultiCell(80, 3, $text, 0, 'L', 0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
}
|
||||
/* TODO
|
||||
else if (! empty($object->availability_code))
|
||||
{
|
||||
@@ -619,7 +605,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$posy=$pdf->GetY()+1;
|
||||
}*/
|
||||
|
||||
// Show shipping date
|
||||
// Show planed date of delivery
|
||||
if ($object->date_livraison)
|
||||
{
|
||||
$outputlangs->load("sendings");
|
||||
|
||||
@@ -208,7 +208,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -218,34 +218,24 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->EXPEDITION_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$texte.= '<table class="nobordernopadding" width="100%">';
|
||||
|
||||
// List of directories area
|
||||
$texte.= '<tr><td>';
|
||||
$texte.= '<tr><td valign="middle">';
|
||||
$texttitle=$langs->trans("ListOfDirectories");
|
||||
$listofdir=explode(',',preg_replace('/[\r\n]+/',',',trim($conf->global->FACTURE_ADDON_PDF_ODT_PATH)));
|
||||
$listoffiles=array();
|
||||
@@ -243,34 +243,24 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->FACTURE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
@@ -184,12 +184,6 @@ class modProjet extends DolibarrModules
|
||||
$this->export_permission[$r]=array(array("projet","export"));
|
||||
$this->export_dependencies_array[$r]=array('task_time'=>'ppt.rowid');
|
||||
|
||||
$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',
|
||||
'p.rowid'=>"ProjectId",'p.ref'=>"RefProject",'p.datec'=>"DateCreation",'p.dateo'=>"DateStart",'p.datee'=>"DateEnd",'p.fk_statut'=>'Status','p.description'=>"Description",
|
||||
'pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription",
|
||||
'ptt.task_date'=>'TaskTimeDate','ptt.task_duration'=>"TimesSpent",'ptt.fk_user'=>"TaskTimeUser",'ptt.note'=>"TaskTimeNote");
|
||||
|
||||
$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_pays:libelle',
|
||||
's.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text',
|
||||
'p.rowid'=>"List:projet:ref",'p.ref'=>"Text",'p.datec'=>"Date",'p.dateo'=>"Date",'p.datee'=>"Date",'p.fk_statut'=>'Status','p.description'=>"Text",
|
||||
@@ -198,15 +192,96 @@ class modProjet extends DolibarrModules
|
||||
|
||||
$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',
|
||||
'p.rowid'=>"project",'p.ref'=>"project",'p.datec'=>"project",'p.dateo'=>"project",'p.datee'=>"project",'p.duree'=>"project",'p.fk_statut'=>"project",'p.description'=>"project",
|
||||
'pt.rowid'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask",
|
||||
'ptt.task_date'=>'task_time','ptt.task_duration'=>"task_time",'ptt.fk_user'=>"task_time",'ptt.note'=>"task_time");
|
||||
'p.rowid'=>"project",'p.ref'=>"project",'p.datec'=>"project",'p.dateo'=>"project",'p.datee'=>"project",'p.duree'=>"project",'p.fk_statut'=>"project",'p.description'=>"project");
|
||||
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'projet as p, '.MAIN_DB_PREFIX.'societe as s)';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task as pt ON (p.rowid = pt.fk_projet)";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON (pt.rowid = ptt.fk_task)";
|
||||
$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',
|
||||
'p.rowid'=>"ProjectId",'p.ref'=>"RefProject",'p.datec'=>"DateCreation",'p.dateo'=>"DateStart",'p.datee'=>"DateEnd",'p.fk_statut'=>'Status','p.description'=>"Description");
|
||||
|
||||
// Add fields for project
|
||||
$this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array());
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet'";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$fieldname='extra.'.$obj->name;
|
||||
$fieldlabel=ucfirst($obj->label);
|
||||
$typeFilter="Text";
|
||||
switch($obj->type)
|
||||
{
|
||||
case 'int':
|
||||
case 'double':
|
||||
case 'price':
|
||||
$typeFilter="Numeric";
|
||||
break;
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
$typeFilter="Date";
|
||||
break;
|
||||
case 'boolean':
|
||||
$typeFilter="Boolean";
|
||||
break;
|
||||
case 'sellist':
|
||||
$typeFilter="List:".$obj->param;
|
||||
break;
|
||||
}
|
||||
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||
$this->export_entities_array[$r][$fieldname]='project';
|
||||
}
|
||||
}
|
||||
// End add extra fields
|
||||
|
||||
// Add fields for tasks
|
||||
$this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('pt.rowid'=>'RefTask','pt.dateo'=>"TaskDateStart",'pt.datee'=>"TaskDateEnd",'pt.duration_effective'=>"DurationEffective",'pt.planned_workload'=>"PlannedWorkload",'pt.progress'=>"Progress",'pt.description'=>"TaskDescription"));
|
||||
$this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('pt.rowid'=>'projecttask','pt.dateo'=>"projecttask",'pt.datee'=>"projecttask",'pt.duration_effective'=>"projecttask",'pt.planned_workload'=>"projecttask",'pt.progress'=>"projecttask",'pt.description'=>"projecttask"));
|
||||
// Add extra fields
|
||||
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task'";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
while ($obj=$this->db->fetch_object($resql))
|
||||
{
|
||||
$fieldname='extra2.'.$obj->name;
|
||||
$fieldlabel=ucfirst($obj->label);
|
||||
$typeFilter="Text";
|
||||
switch($obj->type)
|
||||
{
|
||||
case 'int':
|
||||
case 'double':
|
||||
case 'price':
|
||||
$typeFilter="Numeric";
|
||||
break;
|
||||
case 'date':
|
||||
case 'datetime':
|
||||
$typeFilter="Date";
|
||||
break;
|
||||
case 'boolean':
|
||||
$typeFilter="Boolean";
|
||||
break;
|
||||
case 'sellist':
|
||||
$typeFilter="List:".$obj->param;
|
||||
break;
|
||||
}
|
||||
$this->export_fields_array[$r][$fieldname]=$fieldlabel;
|
||||
$this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
|
||||
$this->export_entities_array[$r][$fieldname]='projecttask';
|
||||
}
|
||||
}
|
||||
// End add extra fields
|
||||
$this->export_fields_array[$r]=array_merge($this->export_fields_array[$r], array('ptt.task_date'=>'TaskTimeDate','ptt.task_duration'=>"TimesSpent",'ptt.fk_user'=>"TaskTimeUser",'ptt.note'=>"TaskTimeNote"));
|
||||
$this->export_entities_array[$r]=array_merge($this->export_entities_array[$r], array('ptt.task_date'=>'task_time','ptt.task_duration'=>"task_time",'ptt.fk_user'=>"task_time",'ptt.note'=>"task_time"));
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'projet as p';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_extrafields as extra ON p.rowid = extra.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task as pt ON p.rowid = pt.fk_projet";
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet_task_extrafields as extra2 ON pt.rowid = extra2.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."projet_task_time as ptt ON pt.rowid = ptt.fk_task,";
|
||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'societe as s';
|
||||
$this->export_sql_end[$r] .=' WHERE p.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND p.entity = '.$conf->entity;
|
||||
|
||||
@@ -228,6 +303,47 @@ class modProjet extends DolibarrModules
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
//ODT template for project
|
||||
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/projects/template_project.odt';
|
||||
$dirodt=DOL_DATA_ROOT.'/doctemplates/projects';
|
||||
$dest=$dirodt.'/template_project.odt';
|
||||
|
||||
if (file_exists($src) && ! file_exists($dest))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result=dol_copy($src,$dest,0,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//ODT template for tasks
|
||||
$src=DOL_DOCUMENT_ROOT.'/install/doctemplates/tasks/template_task_summary.odt';
|
||||
$dirodt=DOL_DATA_ROOT.'/doctemplates/tasks';
|
||||
$dest=$dirodt.'/template_task_summary.odt';
|
||||
|
||||
if (file_exists($src) && ! file_exists($dest))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
dol_mkdir($dirodt);
|
||||
$result=dol_copy($src,$dest,0,0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
$this->error=$langs->trans('ErrorFailToCopyFile',$src,$dest);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','invoice',".$conf->entity.")"
|
||||
);
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity,
|
||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','project',".$conf->entity.")",
|
||||
|
||||
@@ -322,7 +322,7 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -332,34 +332,24 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROJECT_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ abstract class ModeleNumRefTask
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Valeur
|
||||
@@ -171,7 +171,7 @@ function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h
|
||||
}
|
||||
else
|
||||
{
|
||||
$modele='baleine';
|
||||
$modele='nodefault';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ function task_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $h
|
||||
$file = $prefix."_".$modele.".modules.php";
|
||||
|
||||
// On verifie l'emplacement du modele
|
||||
$file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0);
|
||||
$file=dol_buildpath($reldir."core/modules/project/task/pdf/".$file,0);
|
||||
if (file_exists($file))
|
||||
{
|
||||
$filefound=1;
|
||||
|
||||
@@ -323,7 +323,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -333,34 +333,24 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
@@ -431,7 +421,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
{
|
||||
//print "srctemplatepath=".$srctemplatepath; // Src filename
|
||||
$newfile=basename($srctemplatepath);
|
||||
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
|
||||
$newfiletmp=preg_replace('/\.(ods|odt)/i','',$newfile);
|
||||
$newfiletmp=preg_replace('/template_/i','',$newfiletmp);
|
||||
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
|
||||
$newfiletmp=$objectref.'_'.$newfiletmp;
|
||||
@@ -536,7 +526,6 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
else // Text
|
||||
{
|
||||
$odfHandler->setVars($key, $value, true, 'UTF-8');
|
||||
$odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8');
|
||||
}
|
||||
}
|
||||
catch(OdfException $e)
|
||||
|
||||
@@ -129,7 +129,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
if (! is_dir($tmpdir)) $texttitle.=img_warning($langs->trans("ErrorDirNotFound",$tmpdir),0);
|
||||
else
|
||||
{
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
|
||||
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.(ods|odt)');
|
||||
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
|
||||
}
|
||||
}
|
||||
@@ -139,17 +139,14 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$texthelp.=$langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
|
||||
|
||||
$texte.= $form->textwithpicto($texttitle,$texthelp,1,'help','',1);
|
||||
$texte.= '<table><tr><td>';
|
||||
$texte.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
|
||||
$texte.= '<textarea class="flat" cols="60" name="value1">';
|
||||
$texte.=$conf->global->PROPALE_ADDON_PDF_ODT_PATH;
|
||||
$texte.= '</textarea>';
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td align="center"> ';
|
||||
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir))
|
||||
{
|
||||
@@ -181,22 +178,13 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr>';
|
||||
$texte.= '<td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -135,17 +135,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2">';
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
$texte.= $langs->trans("ExampleOfDirectoriesForModelGen");
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
/*$texte.= '<tr><td align="center">';
|
||||
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
|
||||
$texte.= '</td>';
|
||||
$texte.= '</tr>';*/
|
||||
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -988,7 +988,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
else
|
||||
{
|
||||
$pdf->SetTextColor(255,0,0);
|
||||
$pdf->MultiCell(100, 3, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
|
||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
|
||||
}
|
||||
|
||||
$posy+=2;
|
||||
|
||||
@@ -142,7 +142,7 @@ class InterfaceMailmanSpipsynchro
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// We add subscription if we change category (new category may means more mailing-list to subscribe)
|
||||
if ($object->linkto->add_to_abo() < 0)
|
||||
if (is_object($object->linkto) && method_exists($object->linkto, 'add_to_abo') && $object->linkto->add_to_abo() < 0)
|
||||
{
|
||||
$this->error=$object->linkto->error;
|
||||
$this->errors=$object->linkto->errors;
|
||||
@@ -160,7 +160,7 @@ class InterfaceMailmanSpipsynchro
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
// We remove subscription if we change category (lessw category may means less mailing-list to subscribe)
|
||||
if ($object->unlinkoff->del_to_abo() < 0)
|
||||
if (is_object($object->unlinkoff) && method_exists($object->unlinkoff, 'del_to_abo') && $object->unlinkoff->del_to_abo() < 0)
|
||||
{
|
||||
$this->error=$object->unlinkoff->error;
|
||||
$this->errors=$object->unlinkoff->errors;
|
||||
|
||||
@@ -303,11 +303,13 @@ if (($action=="create") || ($action=="edit"))
|
||||
|
||||
print "<tr><td>";
|
||||
print $langs->trans('CronHourStart')."</td><td>";
|
||||
if(!empty($object->datestart)){
|
||||
if(!empty($object->datestart))
|
||||
{
|
||||
$form->select_date($object->datestart,'datestart',1,1,'',"cronform");
|
||||
}
|
||||
else{
|
||||
$form->select_date(dol_now(),'datestart',1,1,'',"cronform");
|
||||
else
|
||||
{
|
||||
$form->select_date('','datestart',1,1,'',"cronform");
|
||||
}
|
||||
print "</td>";
|
||||
print "<td>";
|
||||
|
||||
@@ -24,10 +24,6 @@
|
||||
* \brief Note card expedition
|
||||
*/
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
ini_set('html_errors', false);
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/sendings.lib.php';
|
||||
|
||||
@@ -240,7 +240,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
|
||||
// Ecrase $pu par celui du produit
|
||||
// Ecrase $desc par celui du produit
|
||||
// Ecrase $txtva par celui du produit
|
||||
if ((GETPOST('addline_predefined') || GETPOST('idprodfournprice')) && ( GETPOST('pu')!=='')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
if (GETPOST('addline_predefined') || GETPOST('idprodfournprice')) // With combolist idprodfournprice is > 0 or -1. With autocomplete, idprodfournprice is > 0 or ''
|
||||
{
|
||||
$idprod=0;
|
||||
$productsupplier = new ProductFournisseur($db);
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
* \brief Page for supplier invoice card (view, edit, validate)
|
||||
*/
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
ini_set('html_errors', false);
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
|
||||
Binary file not shown.
@@ -1435,7 +1435,7 @@ AccountancyCodeBuy=Purchase account. code
|
||||
AgendaSetup=Events and agenda module setup
|
||||
PasswordTogetVCalExport=Key to authorize export link
|
||||
PastDelayVCalExport=Do not export event older than
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (managed into Configuration->Dictionnary->llx_c_actioncomm)
|
||||
AGENDA_USE_EVENT_TYPE=Use events types (managed into menu Setup -> Dictionnary -> Type of agenda events)
|
||||
##### ClickToDial #####
|
||||
ClickToDialDesc=This module allows to add an icon after phone numbers. A click on this icon will call a server with a particular URL you define below. This can be used to call a call center system from Dolibarr that can call the phone number on a SIP system for example.
|
||||
##### Point Of Sales (CashDesk) #####
|
||||
|
||||
@@ -33,8 +33,15 @@ LabelTask=Libellé tâche
|
||||
NewTimeSpent=Nouveau consommé
|
||||
MyTimeSpent=Mon consommé
|
||||
MyTasks=Mes tâches
|
||||
TaskTimeSpent=Temps consommé sur les tâches
|
||||
TaskTimeUser=Utilisateur
|
||||
TaskTimeNote=Note
|
||||
TaskTimeDate=Date
|
||||
Tasks=Tâches
|
||||
Task=Tâche
|
||||
TaskDateStart=Date de début de tâche
|
||||
TaskDateEnd=Date de fin de tâche
|
||||
TaskDescription=Description de la tâche
|
||||
NewTask=Nouvelle tâche
|
||||
AddTask=Créer tâche
|
||||
AddDuration=Ajouter la durée
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -104,7 +105,8 @@ print '</td></tr>';
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.code_client, s.client, ";
|
||||
$sql = "SELECT";
|
||||
if ($agentid > 0) $sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
$sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
@@ -130,12 +132,15 @@ if ($agentid > 0) {
|
||||
else
|
||||
$sql .= " AND sc.fk_user = ".$agentid;
|
||||
}
|
||||
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
if (!empty($startdate))
|
||||
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate))
|
||||
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
|
||||
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||
if ($agentid > 0) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, u.rowid, u.login, u.lastname, u.firstname";
|
||||
else $sql.= " GROUP BY u.rowid, u.login, u.lastname, u.firstname";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -159,9 +160,9 @@ if (! empty($conf->global->DISPLAY_MARK_RATES)) {
|
||||
print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql = "SELECT";
|
||||
$sql.= " s.rowid as socid, s.nom, s.code_client, s.client,";
|
||||
if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
@@ -172,13 +173,18 @@ $sql.= " WHERE f.fk_soc = s.rowid";
|
||||
$sql.= " AND f.fk_statut > 0";
|
||||
$sql.= " AND s.entity = ".$conf->entity;
|
||||
$sql.= " AND d.fk_facture = f.rowid";
|
||||
if ($client) $sql.= " AND f.fk_soc = ".$socid;
|
||||
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
if ($client)
|
||||
$sql.= " AND f.fk_soc = ".$socid;
|
||||
if (!empty($startdate))
|
||||
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate))
|
||||
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
|
||||
$sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
if ($client) $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
else $sql.= " GROUP BY s.rowid, s.nom, s.code_client, s.client";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -163,9 +164,8 @@ print "</table>";
|
||||
print '</form>';
|
||||
|
||||
$sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,";
|
||||
$sql.= " d.fk_product,";
|
||||
$sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut,";
|
||||
if ($id > 0) $sql.= " d.fk_product,";
|
||||
if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
|
||||
$sql.= " sum(d.total_ht) as selling_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,";
|
||||
$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge";
|
||||
@@ -178,13 +178,18 @@ $sql.= " AND f.fk_soc = s.rowid";
|
||||
$sql.= " AND d.fk_product = p.rowid";
|
||||
$sql.= " AND f.fk_statut > 0";
|
||||
$sql.= " AND d.fk_facture = f.rowid";
|
||||
if ($id > 0) $sql.= " AND d.fk_product =".$id;
|
||||
if (!empty($startdate)) $sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate)) $sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
if ($id > 0)
|
||||
$sql.= " AND d.fk_product =".$id;
|
||||
if (!empty($startdate))
|
||||
$sql.= " AND f.datef >= '".$db->idate($startdate)."'";
|
||||
if (!empty($enddate))
|
||||
$sql.= " AND f.datef <= '".$db->idate($enddate)."'";
|
||||
$sql .= " AND d.buy_price_ht IS NOT NULL";
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0";
|
||||
$sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
$sql.= " ORDER BY ".$sortfield." ".$sortorder;
|
||||
if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)
|
||||
$sql .= " AND d.buy_price_ht <> 0";
|
||||
if ($id > 0) $sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref, d.fk_product, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut";
|
||||
else $sql.= " GROUP BY p.label, p.rowid, p.fk_product_type, p.ref";
|
||||
$sql.=$db->order($sortfield,$sortorder);
|
||||
// TODO: calculate total to display then restore pagination
|
||||
//$sql.= $db->plimit($conf->liste_limit +1, $offset);
|
||||
|
||||
|
||||
@@ -185,19 +185,19 @@ if ($testremplissage != "ok" && (isset($_POST["fin_sondage_autre"]) || isset($_P
|
||||
|
||||
//message d'erreur si mauvaise date
|
||||
if ($testdate === false) {
|
||||
print "<br><font color=\"#FF0000\">" . _("Date must be have the format DD/MM/YYYY") . "</font><br><br>"."\n";
|
||||
print "<br><font color=\"#FF0000\">" . $langs->trans("Date must be have the format DD/MM/YYYY") . "</font><br><br>"."\n";
|
||||
}
|
||||
|
||||
if ($erreur_injection) {
|
||||
print "<font color=#FF0000>" . _("Characters \" < and > are not permitted") . "</font><br><br>\n";
|
||||
print "<font color=#FF0000>" . $langs->trans("Characters \" < and > are not permitted") . "</font><br><br>\n";
|
||||
}
|
||||
|
||||
if ((isset($_POST["fin_sondage_autre"]) || isset($_POST["fin_sondage_autre_x"])) && !$erreur && !$erreur_injection) {
|
||||
//demande de la date de fin du sondage
|
||||
print '<br>'."\n";
|
||||
print '<div class=presentationdatefin>'."\n";
|
||||
print '<br>'. _("Your poll will be automatically removed after 6 months.<br> You can fix another removal date for it.") .'<br><br>'."\n";
|
||||
print _("Removal date (optional)") .' : <input type="text" name="champdatefin" value="'.$date_selected.'" size="10" maxlength="10"> '. _("(DD/MM/YYYY)") ."\n";
|
||||
print '<br>'. $langs->trans("Your poll will be automatically removed after 6 months.<br> You can fix another removal date for it.") .'<br><br>'."\n";
|
||||
print $langs->trans("Removal date (optional)") .' : <input type="text" name="champdatefin" value="'.$date_selected.'" size="10" maxlength="10"> '. $langs->trans("(DD/MM/YYYY)") ."\n";
|
||||
print '</div>'."\n";
|
||||
print '<div class=presentationdatefin>'."\n";
|
||||
print '<font color=#FF0000>'. $langs->trans("InfoAfterCreate") .'</font>'."\n";
|
||||
|
||||
@@ -2599,6 +2599,7 @@ class Product extends CommonObject
|
||||
function load_stock()
|
||||
{
|
||||
$this->stock_reel = 0;
|
||||
$this->stock_warehouse = array();
|
||||
|
||||
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/product/index.php
|
||||
* \ingroup product
|
||||
* \brief Page accueil des produits et services
|
||||
* \brief Homepage products and services
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$type=isset($_GET["type"])?$_GET["type"]:(isset($_POST["type"])?$_POST["type"]:'');
|
||||
if ($type =='' && !$user->rights->produit->lire) $type='1'; // Force global page on service page only
|
||||
if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page on prpduct page only
|
||||
if ($type =='' && !$user->rights->service->lire) $type='0'; // Force global page on product page only
|
||||
|
||||
// Security check
|
||||
if ($type=='0') $result=restrictedArea($user,'produit');
|
||||
@@ -74,7 +74,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||
|
||||
|
||||
/*
|
||||
* Zone recherche produit/service
|
||||
* Search Area of product/service
|
||||
*/
|
||||
$rowspan=2;
|
||||
if (! empty($conf->barcode->enabled)) $rowspan++;
|
||||
@@ -101,7 +101,7 @@ print "</table></form><br>";
|
||||
|
||||
|
||||
/*
|
||||
* Nombre de produits et/ou services
|
||||
* Number of products and/or services
|
||||
*/
|
||||
$prodser = array();
|
||||
$prodser[0][0]=$prodser[0][1]=$prodser[1][0]=$prodser[1][1]=0;
|
||||
@@ -284,10 +284,10 @@ function activitytrim($product_type)
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
// on affiche les 3 dernières années
|
||||
// We display the last 3 years
|
||||
$yearofbegindate=date('Y',dol_time_plus_duree(time(), -3, "y"));
|
||||
|
||||
// ventilation par trimestre
|
||||
// breakdown by quarter
|
||||
$sql = "SELECT DATE_FORMAT(p.datep,'%Y') as annee, DATE_FORMAT(p.datep,'%m') as mois, SUM(fd.total_ht) as Mnttot";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
$sql.= " , ".MAIN_DB_PREFIX."paiement as p,".MAIN_DB_PREFIX."paiement_facture as pf";
|
||||
@@ -346,7 +346,7 @@ function activitytrim($product_type)
|
||||
print '</tr>';
|
||||
$lgn++;
|
||||
}
|
||||
// on passe à l'année suivante
|
||||
// We go to the following year
|
||||
$tmpyear = $objp->annee;
|
||||
$trim1=0;
|
||||
$trim2=0;
|
||||
|
||||
@@ -214,7 +214,7 @@ foreach ($listofreferent as $key => $value)
|
||||
print '<br>';
|
||||
|
||||
print_titre($langs->trans($title));
|
||||
|
||||
|
||||
$selectList=$formproject->select_element($tablename);
|
||||
if ($selectList)
|
||||
{
|
||||
@@ -223,7 +223,7 @@ foreach ($listofreferent as $key => $value)
|
||||
print '<input type="hidden" name="action" value="addelement">';
|
||||
print '<table><tr><td>'.$langs->trans("SelectElement").'</td>';
|
||||
print '<td>'.$selectList.'</td>';
|
||||
print '<td><input type="submit" class="button" value="'.$langs->trans("AddElement").'"></td>';
|
||||
print '<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("AddElement")).'"></td>';
|
||||
print '</tr></table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
@@ -129,9 +129,9 @@ if ($action == 'add' && $user->rights->projet->creer)
|
||||
$db->begin();
|
||||
|
||||
$object->ref = GETPOST('ref','alpha');
|
||||
$object->title = GETPOST('title','alpha');
|
||||
$object->title = GETPOST('title'); // Do not use 'alpha' here, we want field as it is
|
||||
$object->socid = GETPOST('socid','int');
|
||||
$object->description = GETPOST('description','alpha');
|
||||
$object->description = GETPOST('description'); // Do not use 'alpha' here, we want field as it is
|
||||
$object->public = GETPOST('public','alpha');
|
||||
$object->datec=dol_now();
|
||||
$object->date_start=$date_start;
|
||||
@@ -205,9 +205,9 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->projet->creer)
|
||||
$old_start_date = $object->date_start;
|
||||
|
||||
$object->ref = GETPOST('ref','alpha');
|
||||
$object->title = GETPOST('title','alpha');
|
||||
$object->title = GETPOST('title'); // Do not use 'alpha' here, we want field as it is
|
||||
$object->socid = GETPOST('socid','int');
|
||||
$object->description = GETPOST('description','alpha');
|
||||
$object->description = GETPOST('description'); // Do not use 'alpha' here, we want field as it is
|
||||
$object->public = GETPOST('public','alpha');
|
||||
$object->date_start = empty($_POST["project"])?'':$date_start;
|
||||
$object->date_end = empty($_POST["projectend"])?'':$date_end;
|
||||
|
||||
@@ -166,7 +166,6 @@ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_
|
||||
}
|
||||
// Add line to gantt
|
||||
$s = "// Add taks id=".$task["task_id"]." level = ".$level."\n";
|
||||
//$s.= "g.AddElementItem(new JSGantt.ElementItem('task',".$task['task_id'].",'".$name."','".$start_date."', '".$end_date."', '".$task['task_color']."', '', ".$task['task_milestone'].", '".$resources."', ".$percent.", ".($task["task_is_group"]>0?1:0).", ".$parent.", 1".($depend?", ".$depend:"")."));";
|
||||
$s = "g.AddTaskItem(new JSGantt.TaskItem(".$task['task_id'].",'".dol_escape_js($name)."','".$start_date."', '".$end_date."', '".$task['task_color']."', '".$link."', ".$task['task_milestone'].", '".$resources."', ".$percent.", ".($task["task_is_group"]>0?1:0).", '".$parent."', 1, '".($depend?$depend:"")."'));";
|
||||
echo $s."\n";
|
||||
}
|
||||
|
||||
@@ -61,7 +61,8 @@ if ($action == 'addcontact' && $user->rights->projet->creer)
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
{
|
||||
$result = $object->add_contact($_POST["contactid"], $_POST["type"], $_POST["source"]);
|
||||
$idfortaskuser=GETPOST("contactid")>0?GETPOST("contactid"):GETPOST("userid");
|
||||
$result = $object->add_contact($idfortaskuser, GETPOST("type"), GETPOST("source"));
|
||||
}
|
||||
|
||||
if ($result >= 0)
|
||||
@@ -299,7 +300,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td colspan="1">';
|
||||
// On recupere les id des users deja selectionnes
|
||||
$contactsofproject=$projectstatic->getListContactId('internal');
|
||||
$form->select_users($user->id,'userid',0,'',0,'',$contactsofproject);
|
||||
$form->select_users($user->id,'contactid',0,'',0,'',$contactsofproject);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$formcompany->selectTypeContact($object, '', 'type','internal','rowid');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -23,9 +23,6 @@
|
||||
* \brief Page of a project task
|
||||
*/
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
ini_set('html_errors', false);
|
||||
|
||||
require ("../../main.inc.php");
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
@@ -131,11 +131,8 @@ Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tag
|
||||
Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable<br>
|
||||
|
||||
<script type="text/javascript">
|
||||
/*$(document).ready(function(){
|
||||
$('#abc').dataTable();
|
||||
});*/
|
||||
$(document).ready(function(){
|
||||
$('#def').dataTable();
|
||||
$('#idtableexample2').dataTable();
|
||||
});
|
||||
|
||||
/*
|
||||
@@ -179,7 +176,7 @@ $('xxxth').replaceWith(
|
||||
*/
|
||||
</script>
|
||||
|
||||
<table id="def">
|
||||
<table id="idtableexample2">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>snake</th>
|
||||
@@ -274,4 +271,4 @@ Example 3 : Standard table<br>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
71
htdocs/public/test/test_forms.php
Normal file
71
htdocs/public/test/test_forms.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
require '../../main.inc.php';
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
if (empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
{
|
||||
print "Page available onto dev environment only";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/img/favicon.ico"/>
|
||||
<title>Test page</title>
|
||||
<!-- Includes for JQuery (Ajax library) -->
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/css/smoothness/jquery-ui-latest.custom.css" />
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/css/jquery.dataTables.css" />
|
||||
<!-- <link rel="stylesheet" type="text/css" href="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" /> -->
|
||||
<!-- <link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=1" /> -->
|
||||
<link rel="stylesheet" type="text/css" title="default" href="<?php echo DOL_URL_ROOT ?>/theme/eldy/style.css.php?dol_use_jmobile=0" />
|
||||
<!-- Includes JS for JQuery -->
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/js/jquery-latest.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/tablednd/jquery.tablednd.0.6.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/datatables/js/jquery.dataTables.js"></script>
|
||||
<!-- <script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script> -->
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body style="margin: 4px;">
|
||||
<div data-role="page">
|
||||
<br>
|
||||
This page is a sample of page using html methods.<br>
|
||||
<br>
|
||||
|
||||
<!-- Output to test html.form.class.php -->
|
||||
<?php
|
||||
$form=new Form($db);
|
||||
|
||||
// Test1: form->select_date using tzuser date
|
||||
print "Test 1: We must have here current hour for user (must match hour on browser). Note: Check your are logged so user TZ and DST are known.";
|
||||
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;
|
||||
$offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60;
|
||||
print " (dol_tz=".$offsettz." dol_dst=".$dol_dst.")<br>\n";
|
||||
$form->select_date('', 'test1', 1, 1, 0);
|
||||
|
||||
print '<br><br>'."\n";
|
||||
|
||||
// Test2: form->select_date using tzuser date
|
||||
print "Test 2: We must have here 1970-01-01 00:00:00 selected (fields can be empty)<br>\n";
|
||||
$form->select_date(dol_get_first_day(1970,1,false), 'test2', 1, 1, 1);
|
||||
|
||||
print '<br><br>'."\n";
|
||||
|
||||
// Test3: form->select_date for 1970-01-01 00:00:00
|
||||
print "Test 3: We must have here 1970-01-01 00:00:00 selected (fields are mandatory)<br>\n";
|
||||
$form->select_date(dol_get_first_day(1970,1,false), 'test3', 1, 1, 0);
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1022,7 +1022,7 @@ class Societe extends CommonObject
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$entity=isset($this->entity)?$this->entity:$conf->entity;
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||
$error = 0;
|
||||
|
||||
@@ -1159,7 +1159,7 @@ class Societe extends CommonObject
|
||||
dol_delete_dir_recursive($docdir);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
@@ -1168,7 +1168,8 @@ class Societe extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
else dol_syslog("Can't remove thirdparty with id ".$id.". There is ".$objectisused." childs", LOG_WARNING);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1515,6 +1515,8 @@ table.valid {
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-title {
|
||||
margin:0 !important;
|
||||
line-height:28px;
|
||||
|
||||
@@ -1723,6 +1723,8 @@ opacity: 1;
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-trigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -1816,6 +1816,8 @@ border-radius:6px;
|
||||
/* Calendar */
|
||||
/* ============================================================================== */
|
||||
|
||||
img.datecallink { padding-left: 2px !important; padding-right: 2px !important; }
|
||||
|
||||
.ui-datepicker-trigger {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* Copyright (C) 2011 Herve Prot <herve.prot@symeos.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -185,13 +185,14 @@ if ($action == 'add' && $canadduser)
|
||||
$object->office_phone = GETPOST("office_phone");
|
||||
$object->office_fax = GETPOST("office_fax");
|
||||
$object->user_mobile = GETPOST("user_mobile");
|
||||
$object->skype = GETPOST("skype");
|
||||
$object->skype = GETPOST("skype");
|
||||
$object->email = GETPOST("email");
|
||||
$object->job = GETPOST("job");
|
||||
$object->signature = GETPOST("signature");
|
||||
$object->accountancy_code = GETPOST("accountancy_code");
|
||||
$object->note = GETPOST("note");
|
||||
$object->ldap_sid = GETPOST("ldap_sid");
|
||||
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost($extralabels,$object);
|
||||
@@ -327,7 +328,7 @@ if ($action == 'update' && ! $_POST["cancel"])
|
||||
$object->email = GETPOST("email");
|
||||
$object->job = GETPOST("job");
|
||||
$object->signature = GETPOST("signature");
|
||||
$object->accountancy_code = GETPOST("accountancy_code");
|
||||
$object->accountancy_code = GETPOST("accountancy_code");
|
||||
$object->openid = GETPOST("openid");
|
||||
$object->fk_user = GETPOST("fk_user")>0?GETPOST("fk_user"):0;
|
||||
|
||||
@@ -864,7 +865,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
||||
print '<input size="20" type="text" name="office_fax" value="'.GETPOST('office_fax').'">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
@@ -1189,7 +1190,7 @@ else
|
||||
print '<tr><td valign="top">'.$langs->trans("Fax").'</td>';
|
||||
print '<td>'.dol_print_phone($object->office_fax,'',0,0,1).'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
// Skype
|
||||
if (! empty($conf->skype->enabled))
|
||||
{
|
||||
@@ -1808,7 +1809,7 @@ else
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
// EMail
|
||||
print "<tr>".'<td valign="top"'.(! empty($conf->global->USER_MAIL_REQUIRED)?' class="fieldrequired"':'').'>'.$langs->trans("EMail").'</td>';
|
||||
print '<td>';
|
||||
|
||||
1
test/.gitignore
vendored
1
test/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
/report
|
||||
/test.xml
|
||||
|
||||
Reference in New Issue
Block a user