Compare commits

..

1 Commits
3.5.2 ... 3.5.1

Author SHA1 Message Date
Laurent Destailleur
5df06d3f5e Enhance packager:
- No need to be root to run script
- debian package do not use the deprecated dpatch command
- debian package is a quilt package (not native)
- debian package was missing file watch
- clean exclusion for zip and tgz package (exclusion must be done into
makepack-dolibarr.pl, not into specific package code)
- can publish files to sourceforge
2014-03-09 01:34:49 +01:00
155 changed files with 694 additions and 1508 deletions

View File

@@ -2,57 +2,13 @@
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.
Fix: Error when creating event was not reported.
Fix: Bug of import of agenda when using https link
Fix: Field nature not saved correctly
Fix: Substitution of extra field was ko for order
Fix: Substituion of extra field was ko for order
Fix: Bad translation of date format for pt_BR.
Fix: priority field of agenda record is smallint.
Fix: Missing loading of lang in some pages.
@@ -72,11 +28,11 @@ Fix: Enable extrafields for customer order, proposal and invoice lines. This fea
Fix: user right on Holiday for month report nor working.
Fix: [ bug #1250 ] "Supplier Ref. product" sidebar search box does not work
Fix: Bad space in predefined messages.
Fix: [ bug #1256 ] Signature was not added for email sent from thirdparty page.
Fix: Signature was not added for email sent from thirdparty page.
Fix: Action event SHIPPING_VALIDATE is not implemented
Fix: The customer code was set to uppercase when using numbering module leopard. We
must keep data safe of any change.
Fix: [ bug #1291 ] Loading actions extrafields fails.
Fix: Loading actions extrafields fails.
Fix: [ bug #1123 ] Paid deposit invoices are always shown as partially paid when fully paid
Fix: Corrected project contact types translation.
Fix: [ bug #1206 ] PMP price is bad calculated.
@@ -84,11 +40,6 @@ 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 #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:
@@ -234,8 +185,6 @@ 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).

View File

@@ -1,10 +1,3 @@
dolibarr (3.5.2-3) unstable; urgency=low
[ Laurent Destailleur (eldy) ]
* New upstream release.
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Fri, 14 March 2014 12:00:00 +0100
dolibarr (3.5.1-3) unstable; urgency=low
[ Laurent Destailleur (eldy) ]

View File

@@ -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
# This package need at least debian 7 or ubuntu 13.04 or any distribution based on this version
Comments: 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,
# php-tcpdf, libfpdi-php, libfpdf-tpl-php, php-fpdf,
# libfpdi-php, libfpdf-tpl-php, php-fpdf,
# libphp-adodb,
# libnusoap-php,
# libphp-pclzip,

View File

@@ -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'; // Use '/javascript/ckeditor' or 'disabled'
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor';
//$force_dolibarr_js_JQUERY='/javascript/jquery';
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';

View File

@@ -31,7 +31,7 @@ PROJECT_NAME = dolibarr
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 3.5.2
PROJECT_NUMBER = 3.5.1
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -17,9 +17,9 @@
; ----- Change this -----
AppName=DoliWamp
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
AppVerName=DoliWamp-3.5.2
AppVerName=DoliWamp-3.5.1
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
OutputBaseFilename=DoliWamp-3.5.2
OutputBaseFilename=DoliWamp-3.5.1
; ----- End of change
;OutputManifestFile=build\doliwampbuild.log
; Define full path from which all relative path are defined

View File

@@ -331,7 +331,7 @@ if ($nboftargetok) {
}
}
print 'Run git push --tags'."\n";
$ret=`git push --tags`;
#$ret=`git push --tags`;
chdir("$olddir");
}
@@ -349,7 +349,6 @@ if ($nboftargetok) {
mkdir "$BUILDROOT/$PROJECT";
print "Copy $SOURCE into $BUILDROOT/$PROJECT\n";
$ret=`cp -pr "$SOURCE" "$BUILDROOT/$PROJECT"`;
print "Copy $SOURCE/build/debian/apache/.htaccess into $BUILDROOT/$PROJECT/build/debian/apache/.htaccess\n";
$ret=`cp -pr "$SOURCE/build/debian/apache/.htaccess" "$BUILDROOT/$PROJECT/build/debian/apache/.htaccess"`;
}
@@ -442,8 +441,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/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 -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 -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
@@ -505,9 +504,8 @@ if ($nboftargetok) {
$cmd="cp -pr \"$BUILDROOT/$PROJECT/\" \"$BUILDROOT/$FILENAMETGZ\"";
$ret=`$cmd`;
$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
$ret=`rm -fr $BUILDROOT/$PROJECT/build/exe`;
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`;
@@ -533,9 +531,6 @@ 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";
@@ -567,9 +562,6 @@ 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";
@@ -1007,7 +999,7 @@ if ($nboftargetok) {
print "$command\n";
my $ret=`$command 2>&1`;
$command="rsync -s $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\"";
$command="rsync -s -n $OPTIONUPDATEDIST -e 'ssh' \"$file\" \"".$destFolder."\"";
print "$command\n";
my $ret=`$command 2>&1`;
print "$ret\n";

View File

@@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "3.5.2", "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
return ( "3.5.1", "3.5.0", "3.4.1", "3.4.0", "3.3.3", "3.3.2", "3.3.1", "3.3.0", "3.2.1", "3.1.1" );
}
sub script_dolibarr_category

View File

@@ -103,7 +103,6 @@ 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
@@ -331,9 +330,6 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
- Upstream release
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
- Upstream release

View File

@@ -166,7 +166,6 @@ 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
@@ -306,11 +305,6 @@ 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"
@@ -471,12 +465,9 @@ echo Restart mysql server
%else
%if 0%{?suse_version}
if [ -f /etc/init.d/mysqld ]; then
/sbin/service mysqld restart
#/etc/init.d/mysqld restart
fi
if [ -f /etc/init.d/mysql ]; then
/etc/init.d/mysqld restart
else
/sbin/service mysql restart
#/etc/init.d/mysql restart
fi
%else
if [ -f /etc/init.d/mysqld ]; then
@@ -567,9 +558,6 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
- Upstream release
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
- Upstream release

View File

@@ -102,7 +102,6 @@ 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
@@ -336,9 +335,6 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
- Upstream release
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
- Upstream release

View File

@@ -103,7 +103,6 @@ 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
@@ -290,9 +289,8 @@ fi
# Restart mysql
echo Restart mysql
if [ -f /etc/init.d/mysqld ]; then
/sbin/service mysqld restart
fi
if [ -f /etc/init.d/mysql ]; then
/etc/init.d/mysqld restart
else
/sbin/service mysql restart
fi
@@ -347,9 +345,6 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Fri Feb 14 2014 Laurent Destailleur 3.5.2-0.3
- Upstream release
* Fri Feb 7 2014 Laurent Destailleur 3.5.1-0.3
- Upstream release

View File

@@ -21,4 +21,4 @@ doli*.rpm
doli*.deb
doli*.zip
cvschangelogbuilder_dolibarr*
dolibarr_install.log
dolibarr_install.log

View File

@@ -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

View File

@@ -171,7 +171,6 @@ 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

View File

@@ -183,7 +183,7 @@ if ($resql)
if ($type > 0)
{
$membertype=new AdherentType($db);
$result=$membertype->fetch(GETPOST("type"));
$result=$membertype->fetch($_REQUEST["type"]);
$titre.=" (".$membertype->libelle.")";
}
@@ -193,7 +193,6 @@ 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)

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,6 @@ 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();

View File

@@ -50,7 +50,7 @@ if (! $user->admin)
if ($action == 'delete')
{
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
$file=$conf->admin->dir_output.'/backup/'.GETPOST('urlfile');
$ret=dol_delete_file($file, 1);
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');

View File

@@ -58,7 +58,7 @@ if ($file && ! $what)
if ($action == 'delete')
{
$file=$conf->admin->dir_output.'/'.GETPOST('urlfile');
$file=$conf->admin->dir_output.'/backup/'.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,53 +451,46 @@ 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);
if (empty($row2[1]))
{
fwrite($handle, "\n-- WARNING: Show create table ".$table." return empy string when it should not.\n");
}
else
{
fwrite($handle,$row2[1].";\n");
//fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n");
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");
}
// 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');

View File

@@ -292,20 +292,6 @@ 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";

View File

@@ -209,7 +209,7 @@ if ($object->id)
{
// Affiche formulaire upload
$formfile=new FormFile($db);
$formfile->form_attach_new_file($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;type='.$type, $langs->trans("AddPhoto"), 1, '', $user->rights->categorie->creer, 50, $object, '', false, '', 0);
$formfile->form_attach_new_file($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;type='.$type,$langs->trans("AddPhoto"),1);
}
// Affiche photos

View File

@@ -261,7 +261,7 @@ if ($object->id > 0)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}
$db->close();

View File

@@ -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"'.($actioncomm->transparency?' checked="checked"':'').'>';
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
print '</td></tr>';
// Realised by

View File

@@ -19,6 +19,9 @@
* 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
@@ -312,7 +315,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('agenda', 1).')';
$sql.= ' AND a.entity IN ('.getEntity().')';
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 . ")";

View File

@@ -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,1,$langs,1,-1,-1,$conf->currency).'</a>';
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>&nbsp;'.$langs->trans("Currency".$conf->currency);
else print $langs->trans("DiscountNone");
print '</td>';
print '</tr>';

View File

@@ -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-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013 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,22 +1681,28 @@ 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, 0, $langs, 0, 0, -1, $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),$langs->transnoentities("Currency".$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, 0, $langs, 0, 0, -1, $conf->currency)) . '. ';
if ($absolute_creditnote)
{
print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->currency)).'. ';
}
if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.';
print '</td></tr>';

View File

@@ -137,7 +137,7 @@ if ($object->id > 0)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}
llxFooter();

View File

@@ -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(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'));
$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'));
$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(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'));
$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'));
$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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1)));
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
}
$formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1);

View File

@@ -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&bank_account','','',$fieldtype);
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
$paiementtype=GETPOST('paiementtype','alpha',3);
$req_nb=GETPOST("req_nb",'',3);

View File

@@ -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&bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
/*

View File

@@ -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&bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'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('', 're', 0, 0, 0, 'formsoc');
$form->select_date(time(), 're', 0, 0, 0, 'formsoc');
print '</td></tr>';
print '<tr><td valign="top">'.$langs->trans("BalanceMinimalAllowed").'</td>';

View File

@@ -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&bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$account=$_GET["account"];
$mode='standard';

View File

@@ -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&bank_account','','',$fieldid);
$result=restrictedArea($user,'banque',$id,'bank_account','','',$fieldid);
$vline=isset($_GET["vline"])?$_GET["vline"]:$_POST["vline"];

View File

@@ -128,7 +128,7 @@ if ($object->id)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}
llxFooter();

View File

@@ -60,6 +60,7 @@ llxHeader('',$langs->trans("ListOfFees"),$help_url);
$totalnb=0;
$sql = "SELECT count(d.rowid) as nb, sum(d.km) as km, d.type";
$sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d";
@@ -89,11 +90,13 @@ if ($result)
print_fiche_titre($langs->trans("ExpensesArea"));
print '<table width="100%" class="notopnoleftnoright">';
// Left area
print '<tr><td class="notopnoleft" width="30%" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">';
// Statistics
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="4">'.$langs->trans("Statistics").'</td>';
@@ -121,8 +124,8 @@ print '</tr>';
print '</table>';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
// Right area
print '</td><td valign="top">';
$max=10;
@@ -188,9 +191,6 @@ if ($result)
else dol_print_error($db);
print '</div></div></div>';
llxFooter();
$db->close();

View File

@@ -51,7 +51,6 @@ 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');
@@ -579,21 +578,14 @@ else if ($action == 'confirm_canceled' && $confirm == 'yes')
// Convertir en reduc
else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->rights->facture->creer)
{
$db->begin();
$object->fetch($id);
$object->fetch_thirdparty();
$object->fetch_lines();
// Check if there is already a discount (protection to avoid duplicate creation when resubmit post)
$discountcheck=new DiscountAbsolute($db);
$result=$discountcheck->fetch(0,$object->id);
$canconvert=0;
if ($object->type == 3 && $object->paye == 1 && empty($discountcheck->id)) $canconvert=1; // we can convert deposit into discount if deposit is payed completely and not already converted (see real condition into condition used to show button converttoreduc)
if ($object->type == 2 && $object->paye == 0 && empty($discountcheck->id)) $canconvert=1; // we can convert credit note into discount if credit note is not payed back and amount of payment is 0 (see real condition into condition used to show button converttoreduc)
if ($canconvert)
if (! $object->paye) // protection against multiple submit
{
$db->begin();
// Boucle sur chaque taux de tva
$i=0;
foreach($object->lines as $line)
@@ -609,7 +601,8 @@ else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->righ
if ($object->type == 2) $discount->description='(CREDIT_NOTE)';
elseif ($object->type == 3) $discount->description='(DEPOSIT)';
else {
setEventMessage($langs->trans('CantConvertToReducAnInvoiceOfThisType'),'errors');
$this->error="CantConvertToReducAnInvoiceOfThisType";
return -1;
}
$discount->tva_tx=abs($object->total_ttc);
$discount->fk_soc=$object->socid;
@@ -624,7 +617,6 @@ else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->righ
$discount->tva_tx=abs($tva_tx);
$result=$discount->create($user);
if ($result < 0)
{
$error++;
@@ -632,24 +624,24 @@ else if ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $user->righ
}
}
if (empty($error))
if (! $error)
{
// Classe facture
$result=$object->set_paid($user);
if ($result >= 0)
if ($result > 0)
{
//$mesgs[]='OK'.$discount->id;
$db->commit();
}
else
{
setEventMessage($object->error,'errors');
$mesgs[]='<div class="error">'.$object->error.'</div>';
$db->rollback();
}
}
else
{
setEventMessage($discount->error,'errors');
$mesgs[]='<div class="error">'.$discount->error.'</div>';
$db->rollback();
}
}
@@ -1140,9 +1132,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights-
$error = 0;
// Set if we used free entry or predefined product
if (GETPOST('addline_libre')
|| (GETPOST('dp_desc') && ! GETPOST('addline_libre') && ! GETPOST('idprod', 'int')>0) // we push enter onto qty field
)
if (GETPOST('addline_libre'))
{
$predef='';
$idprod=0;
@@ -1150,9 +1140,7 @@ 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')
|| (! GETPOST('dp_desc') && ! GETPOST('addline_predefined') && GETPOST('idprod', 'int')>0) // we push enter onto qty field
)
if (GETPOST('addline_predefined'))
{
$predef=(($conf->global->MAIN_FEATURES_LEVEL < 2) ? '_predef' : '');
$idprod=GETPOST('idprod', 'int');
@@ -1992,10 +1980,9 @@ if ($action == 'update_extras')
}
/*
* View
*/
*/
$form = new Form($db);
$formother=new FormOther($db);
@@ -2198,7 +2185,6 @@ if ($action == 'create')
$options.='</option>';
}
// Show link for credit note
$facids=$facturestatic->list_qualified_avoir_invoices($soc->id);
if ($facids < 0)
{
@@ -2627,7 +2613,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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1,0,0,$langs->trans("NoStockAction"))));
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'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);
@@ -2688,7 +2674,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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1);
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1);
}
$formquestion=array(
//'text' => $langs->trans("ConfirmClone"),
@@ -2731,7 +2717,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')?GETPOST('idwarehouse'):'ifone','idwarehouse','',1);
$value = $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1);
}
$formquestion=array(
//'text' => $langs->trans("ConfirmClone"),
@@ -3606,10 +3592,7 @@ else if ($id > 0 || ! empty($ref))
}
// Reopen a standard paid invoice
if ((($object->type == 0 || $object->type == 1)
|| ($object->type == 2 && empty($discount->id))
|| ($object->type == 3 && empty($discount->id)))
&& ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
{
if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice
{
@@ -3696,32 +3679,23 @@ else if ($id > 0 || ! empty($ref))
// For credit note only
if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement)
{
if ($resteapayer == 0)
{
print '<div class="inline-block divButAction"><span class="butActionRefused" title="'.$langs->trans("DisabledBecauseRemainderToPayIsZero").'">'.$langs->trans('DoPaymentBack').'</span></div>';
}
else
{
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&amp;action=create">'.$langs->trans('DoPaymentBack').'</a></div>';
}
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid='.$object->id.'&amp;action=create">'.$langs->trans('DoPaymentBack').'</a></div>';
}
// For credit note
if ($object->type == 2 && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a></div>';
}
// For deposit invoice
if ($object->type == 3 && $object->paye == 1 && $resteapayer == 0 && $user->rights->facture->creer && empty($discount->id))
if ($object->type == 3 && $object->statut == 1 && $resteapayer == 0 && $user->rights->facture->creer)
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=converttoreduc">'.$langs->trans('ConvertToReduc').'</a></div>';
}
}
// Classify paid
if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement && (($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0))
|| ($object->type == 3 && $object->paye == 0 && $resteapayer == 0 && $user->rights->facture->paiement && empty($discount->id))
)
// Classify paid (if not deposit and not credit note. Such invoice are "converted")
if ($object->statut == 1 && $object->paye == 0 && $user->rights->facture->paiement &&
(($object->type != 2 && $object->type != 3 && $resteapayer <= 0) || ($object->type == 2 && $resteapayer >= 0)) )
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?facid='.$object->id.'&amp;action=paid">'.$langs->trans('ClassifyPaid').'</a></div>';
}

View File

@@ -1252,16 +1252,6 @@ 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)
{
@@ -1481,7 +1471,6 @@ class Facture extends CommonInvoice
if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'";
$sql.= ' WHERE rowid = '.$this->id;
dol_syslog(get_class($this)."::set_paid sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{
@@ -1497,7 +1486,8 @@ class Facture extends CommonInvoice
else
{
$error++;
$this->error=$this->db->lasterror();
$this->error=$this->db->error();
dol_print_error($this->db);
}
if (! $error)

View File

@@ -160,7 +160,7 @@ if ($id > 0 || ! empty($ref))
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}
$db->close();

View File

@@ -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-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2012 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,10 +671,9 @@ class BonPrelevement extends CommonObject
/**
* Get number of invoices to withdrawal
* TODO delete params banque and agence when not necesary
*
* @param int $banque dolibarr mysoc bank
* @param int $agence dolibarr mysoc agence
* @param int $banque bank
* @param int $agence agence
* @return int <O if KO, number of invoices if OK
*/
function NbFactureAPrelever($banque=0,$agence=0)
@@ -684,16 +683,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);
@@ -716,10 +715,9 @@ class BonPrelevement extends CommonObject
/**
* Create a withdraw
* TODO delete params banque and agence when not necesary
*
* @param int $banque dolibarr mysoc bank
* @param int $agence dolibarr mysoc bank office (guichet)
* @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 string $mode real=do action, simu=test only
* @return int <0 if KO, nbre of invoice withdrawed if OK
*/
@@ -757,17 +755,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);

View File

@@ -167,7 +167,7 @@ if ($object->id)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}

View File

@@ -130,7 +130,7 @@ if ($object->id)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}

View File

@@ -201,20 +201,6 @@ 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))
{

View File

@@ -154,7 +154,7 @@ class DiscountAbsolute
$sql.= " amount_ht, amount_tva, amount_ttc, tva_tx,";
$sql.= " fk_facture_source";
$sql.= ")";
$sql.= " VALUES ('".$this->db->idate($this->datec!=''?$this->datec:dol_now())."', ".$this->fk_soc.", ".$user->id.", '".$this->db->escape($this->description)."',";
$sql.= " VALUES (".$this->db->idate($this->datec!=''?$this->datec:dol_now()).", ".$this->fk_soc.", ".$user->id.", '".$this->db->escape($this->description)."',";
$sql.= " ".$this->amount_ht.", ".$this->amount_tva.", ".$this->amount_ttc.", ".$this->tva_tx.",";
$sql.= " ".($this->fk_facture_source?"'".$this->fk_facture_source."'":"null");
$sql.= ")";

View File

@@ -776,7 +776,6 @@ class ExtraFields
$labeltoshow=dol_trunc($obj->$field_toshow,18).' ';
}
}
$out.='<option value="'.$obj->rowid.'" selected="selected">'.$labeltoshow.'</option>';
}
else
{

View File

@@ -2915,17 +2915,16 @@ class Form
}
/**
* Show a form + html select a date
* Show a form to select a date
*
* @param string $page Page
* @param string $selected Date preselected
* @param string $htmlname Html name of date input fields or 'none'
* @param string $htmlname Name of input html field
* @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;
@@ -3058,13 +3057,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,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)).': ';
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)).': ';
}
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,0,$langs,0,0,-1,$conf->currency)).': ';
else print $langs->trans("CompanyHasCreditNote",price($amount,0,$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,1,$langs,0,0,-1,$conf->currency)).': ';
else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': ';
}
$newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles
if ($filter) $newfilter.=' AND ('.$filter.')';
@@ -3438,13 +3437,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 (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)
* - 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)
*
* @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 timestamp $set_time Pre-selected date (must be a local PHP server timestamp)
* @param string $prefix Prefix for fields name
* @param int $h 1=Show also hours
* @param int $m 1=Show also minutes
@@ -3456,7 +3455,6 @@ 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='')
{
@@ -3469,11 +3467,7 @@ class Form
if($m == '') $m=0;
if($empty == '') $empty=0;
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
}
if (! $set_time && $empty == 0) $set_time = dol_now('tzuser');
// Analysis of the pre-selection date
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/',$set_time,$reg))

View File

@@ -764,9 +764,8 @@ class FormFile
if (empty($relativepath))
{
$relativepath=(! empty($object->ref)?dol_sanitizeFileName($object->ref):'').'/';
if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath
if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath; // TODO Call using a defined value for $relativepath
if ($object->element == 'project_task') $relativepath='Call_not_supported_._Call_function_using_a_defined_relative_path_.';
if ($object->element == 'invoice_supplier') $relativepath=get_exdir($object->id,2).$relativepath;
if ($object->element == 'member') $relativepath=get_exdir($object->id,2).$relativepath;
}
$var=!$var;
@@ -1053,10 +1052,9 @@ class FormFile
* @param int $permtodelete Deletion is allowed
* @param string $action Action
* @param string $selected ???
* @param string $param More param to add into URL
* @return int Number of links
*/
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='')
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null)
{
global $user, $conf, $langs, $user;
global $bc;
@@ -1073,17 +1071,17 @@ class FormFile
$sortfield = null;
}
$res = $link->fetchAll($links, $object->element, $object->id, $sortfield, $sortorder);
$param .= (isset($object->id)?'&id=' . $object->id : '');
$param = (isset($object->id)?'&id=' . $object->id : '');
// Show list of associated links
print_titre($langs->trans("LinkedFiles"));
print '<form action="' . $_SERVER['PHP_SELF'] . ($param?'?'.$param:'') . '" method="POST">';
print '<form action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
print '<table width="100%" class="liste">';
print '<tr class="liste_titre">';
print_liste_field_titre(
$langs->trans("Links"),
$langs->trans("Documents2"),
$_SERVER['PHP_SELF'],
"name",
"",
@@ -1137,34 +1135,34 @@ class FormFile
print '<input type="hidden" name="action" value="confirm_updateline">';
print $langs->trans('Link') . ': <input type="text" name="link" size="50" value="' . $link->url . '">';
print '</td>';
print '<td>';
print '<td align="right">';
print $langs->trans('Label') . ': <input type="text" name="label" value="' . $link->label . '">';
print '</td>';
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
print '<td align="right"></td>';
print '<td align="right" colspan="2">';
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
print '<td align="right" colspan="2"><input type="submit" name="save" class="button" value="' . $langs->trans('Save') . '">';
print '<input type="submit" name="cancel" class="button" value="' . $langs->trans('Cancel') . '">';
print '</td>';
}
else
{
else {
print '<td>';
print '<a data-ajax="false" href="' . $link->url . '" target="_blank">';
print '<a data-ajax="false" href="'. $link->url . '" target="_blank">';
print $link->label;
print '</a>';
print '</td>'."\n";
print "</td>\n";
print '<td align="right"></td>';
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
print '<td align="center"></td>';
print '<td align="right" colspan="2">';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>'; // id= is included into $param
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id
. '&id=' . $object->id . '" class="editfilelink" >' . img_edit().'</a>';
if ($permtodelete) {
print ' &nbsp; <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
print ' &nbsp; <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id
. '&id=' . $object->id . '" class="deletefilelink" >' . img_delete() . '</a>';
} else {
print '&nbsp;';
}
print '</td>';
print "</td>";
}
print "</tr>\n";
}

View File

@@ -481,8 +481,6 @@ class FormOther
{
$var = !$var;
//var_dump($selectedtask."--".$selectedtask."--".$lines[$i]->fk_project."_".$lines[$i]->id);
// Break on a new project
if ($parent == 0)
{
@@ -510,10 +508,10 @@ class FormOther
}
// Print task
if ($lines[$i]->id >= 0)
if ($lines[$i]->id > 0)
{
print '<option value="'.$lines[$i]->fk_project.'_'.$lines[$i]->id.'"';
if (($lines[$i]->id == $selectedtask) || ($lines[$i]->fk_project.'_'.$lines[$i]->id == $selectedtask)) print ' selected="selected"';
if ($lines[$i]->id == $selectedtask) print ' selected="selected"';
print '>';
print $langs->trans("Project").' '.$lines[$i]->projectref;
if (empty($lines[$i]->public))

View File

@@ -985,7 +985,7 @@ class DoliDBMysql extends DoliDB
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
$sql= "ALTER TABLE ".$table." ADD `".$field_name."` ";
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
$sql.= $field_desc['type'];
if(preg_match("/^[^\s]/i",$field_desc['value']))
if (! in_array($field_desc['type'],array('date','datetime')))

View File

@@ -979,7 +979,7 @@ class DoliDBMysqli extends DoliDB
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
// ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment');
$sql= "ALTER TABLE ".$table." ADD `".$field_name."` ";
$sql= "ALTER TABLE ".$table." ADD ".$field_name." ";
$sql.= $field_desc['type'];
if(preg_match("/^[^\s]/i",$field_desc['value']))
if (! in_array($field_desc['type'],array('date','datetime')))

View File

@@ -383,7 +383,7 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0)
$out= "\n<!-- Ajax code to switch constant ".$code." -->".'
<script type="text/javascript">
$(document).ready(function() {
$(function() {
var input = '.json_encode($input).';
var url = \''.DOL_URL_ROOT.'/core/ajax/constantonoff.php\';
var code = \''.$code.'\';

View File

@@ -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($search_name)."%' OR p.firstname LIKE '%".$db->escape($search_name)."%')";
if ($search_name) $sql .= " AND (p.lastname LIKE '%".$db->escape(strtolower($search_name))."%' OR p.firstname LIKE '%".$db->escape(strtolower($search_name))."%')";
$sql.= " ORDER BY $sortfield $sortorder";
dol_syslog('core/lib/company.lib.php :: show_contacts sql='.$sql,LOG_DEBUG);
@@ -726,8 +726,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
$coords .= "<br />".addslashes($object->country);
}
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 '<td align="center"><a href="#" onclick="return copyToClipboard(\''.$coords.'\');">';
print img_picto($langs->trans("Address"), 'object_address.png');
print '</a></td>';
@@ -737,7 +736,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
print '<td align="center">';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
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 '<a 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> ';
}
@@ -772,17 +771,18 @@ 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;

View File

@@ -510,12 +510,6 @@ 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;

View File

@@ -987,9 +987,9 @@ function dol_getdate($timestamp,$fast=false)
* @param int $month Month (1 to 12)
* @param int $day Day (1 to 31)
* @param int $year Year
* @param int $gm true or 1=Input informations are GMT values, false or 0 or 'server' = local to server TZ, 'user' = local to user TZ
* @param int $gm 1=Input informations are GMT values, otherwise local to server TZ
* @param int $check 0=No check on parameters (Can use day 32, etc...)
* @return int Date as a timestamp, '' if error
* @return int Date as a timestamp, '' if error
* @see dol_print_date, dol_stringtotime, dol_getdate
*/
function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
@@ -1015,23 +1015,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
if (method_exists('DateTime','getTimestamp') && empty($conf->global->MAIN_OLD_DATE))
{
if (empty($gm) || $gm === 'server')
{
// 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.
if (! empty($conf->global->MAIN_SERVER_TZ))
{
if ($conf->global->MAIN_SERVER_TZ != 'auto') $default_timezone=$conf->global->MAIN_SERVER_TZ;
else $default_timezone=@date_default_timezone_get();
}
else $default_timezone=@date_default_timezone_get();
$localtz = new DateTimeZone($default_timezone);
}
else if ($gm === 'user')
{
$default_timezone=(empty($_SESSION["dol_tz_string"])?'UTC':$_SESSION["dol_tz_string"]);
$localtz = new DateTimeZone($default_timezone);
}
if (empty($gm)) $localtz = new DateTimeZone(date_default_timezone_get());
else $localtz = new DateTimeZone('UTC');
$dt = new DateTime(null,$localtz);
$dt->setDate($year,$month,$day);
@@ -1058,7 +1042,7 @@ function dol_mktime($hour,$minute,$second,$month,$day,$year,$gm=false,$check=1)
/**
* Return date for now. In mot cases, we use this function without parameters (that means GMT time).
* Return date for now. We should always 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 +1052,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) when used without parameters
// Note that gmmktime and mktime return same value (GMT) whithout 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 +1067,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 added
else if ($mode == 'tzuser') // Time for now with user timezone is added
{
//print 'eeee'.time().'-'.mktime().'-'.gmmktime();
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;

View File

@@ -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 = ''; // Password for the end user
$pdfownerpass = NULL; // Password of the owner, created randomly if not defined
$pdfuserpass = ''; // Mot de passe pour l'utilisateur final
$pdfownerpass = NULL; // Mot de passe du proprietaire, cree aleatoirement si pas defini
$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 onto PDF
* Return height to use for Logo onot 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))
{
// Phone
// Tel
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))
{
// Phone
// Tel
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))
{
// Phone
// Tel
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";
// Phone
// Tel
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 (mm, pt, ...)
* @param string $unit Unit of height (mmn, 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);
// The start of the bottom of this page footer is positioned according to # of lines
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
$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)
{
// We add ref
// On ajoute la ref
if ($prodser->ref)
{
$prefix_prodserv = "";

View File

@@ -268,8 +268,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
{
// Note that having a user assigned to a task into a project user has no permission on, should not be possible
// because assignement on task can be done only on contact of project.
// If assignement was done and after, was removed from contact of project, then we can hide the line.
$showline=0;
// If assignement was done and after, was removed from contact of project, then we can hide the line.
$showline=0;
}
}
}
@@ -285,6 +285,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print '<tr '.$bc[$var].' id="row-'.$lines[$i]->id.'">'."\n";
// Project
if ($showproject)
{
print "<td>";
@@ -382,7 +383,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
if (! $showlineingray) $inc++;
$level++;
if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick);
if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, 0, $showalsopublicproj);
$level--;
$total += $lines[$i]->duration;
}
@@ -393,7 +394,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
}
}
if ($total>0 && $level==0)
if ($total>0)
{
print '<tr class="liste_total">';
print '<td class="liste_total">'.$langs->trans("Total").'</td>';
@@ -403,9 +404,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
print '<td></td>';
print '<td></td>';
print '<td></td>';
if ($addordertick) print '<td class="hideonsmartphone"></td>';
print '<td align="right" class="nowrap liste_total">'.convertSecondToTime($total, 'allhourmin').'</td>';
print '<td></td>';
if ($addordertick) print '<td class="hideonsmartphone"></td>';
print '</tr>';
}
@@ -500,7 +501,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
// Time spent
print '<td align="right">';
if ($lines[$i]->duration)
if ($lines[$i]->duration)
{
print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.'">';
print convertSecondToTime($lines[$i]->duration,'allhourmin');

View File

@@ -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] : $dbtablename);
$sharedelement=(! empty($params[1]) ? $params[1] : '');
$listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);

View File

@@ -114,7 +114,7 @@ abstract class DolibarrModules
$sql=str_replace('__ENTITY__', $conf->entity, $sql);
dol_syslog(get_class($this)."::_init ignoreerror=".$ignoreerror." sql=".$sql, LOG_DEBUG);
$result=$this->db->query($sql, $ignoreerror);
$result=$this->db->query($sql);
if (! $result)
{
if (! $ignoreerror)

View File

@@ -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,'\.(ods|odt)');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}
@@ -228,24 +228,34 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->COMMANDE_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
@@ -109,7 +109,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->posxdiscount=162;
$this->postotalht=174;
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
$this->posxpicture=$this->posxtva - 16; // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxpicture-=20;
@@ -153,7 +153,7 @@ class pdf_einstein extends ModelePDFCommandes
$outputlangs->load("products");
$outputlangs->load("orders");
$outputlangs->load("deliveries");
if ($conf->commande->dir_output)
{
$object->fetch_thirdparty();
@@ -228,15 +228,6 @@ class pdf_einstein extends ModelePDFCommandes
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -313,7 +304,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -409,7 +400,6 @@ class pdf_einstein extends ModelePDFCommandes
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
@@ -593,6 +583,20 @@ 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))
{
@@ -605,7 +609,7 @@ class pdf_einstein extends ModelePDFCommandes
$posy=$pdf->GetY()+1;
}*/
// Show planed date of delivery
// Show shipping date
if ($object->date_livraison)
{
$outputlangs->load("sendings");

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
@@ -109,7 +109,7 @@ class pdf_proforma extends ModelePDFCommandes
$this->posxdiscount=162;
$this->postotalht=174;
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
$this->posxpicture=$this->posxtva - 16; // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxpicture-=20;
@@ -227,15 +227,6 @@ class pdf_proforma extends ModelePDFCommandes
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -312,7 +303,7 @@ class pdf_proforma extends ModelePDFCommandes
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -408,7 +399,6 @@ class pdf_proforma extends ModelePDFCommandes
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -116,24 +116,15 @@ class pdf_strato extends ModelePDFContract
$outputlangs->load("dict");
$outputlangs->load("companies");
$outputlangs->load("contracts");
$outputlangs->load("interventions");
if ($conf->contrat->dir_output)
{
$object->fetch_thirdparty();
// Definition of $dir and $file
if ($object->specimen)
{
$dir = $conf->contrat->dir_output;
$file = $dir . "/SPECIMEN.pdf";
}
else
{
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->contrat->dir_output . "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
}
$objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->contrat->dir_output;
if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
if (! file_exists($dir))
{

View File

@@ -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,'\.(ods|odt)');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}
@@ -218,24 +218,34 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->EXPEDITION_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -267,7 +267,6 @@ class pdf_merou extends ModelePdfExpedition
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
@@ -475,7 +474,7 @@ class pdf_merou extends ModelePdfExpedition
else
{
$text=$this->emetteur->name;
$pdf->MultiCell(70, 3, $outputlangs->convToOutputCharset($text), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($text), 0, 'L');
}
//*********************Entete****************************

View File

@@ -240,7 +240,7 @@ class pdf_rouget extends ModelePdfExpedition
$pageposbefore=$pdf->getPage();
// Description de la ligne produit
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxqtyordered-10,3,$this->posxdesc,$curY,0,1);
pdf_writelinedesc($pdf,$object,$i,$outputlangs,150,3,$this->posxdesc,$curY,0,1);
$nexY = $pdf->GetY();
$pageposafter=$pdf->getPage();
@@ -264,7 +264,6 @@ class pdf_rouget extends ModelePdfExpedition
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -219,7 +219,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$texte.= '<table class="nobordernopadding" width="100%">';
// List of directories area
$texte.= '<tr><td valign="middle">';
$texte.= '<tr><td>';
$texttitle=$langs->trans("ListOfDirectories");
$listofdir=explode(',',preg_replace('/[\r\n]+/',',',trim($conf->global->FACTURE_ADDON_PDF_ODT_PATH)));
$listoffiles=array();
@@ -243,24 +243,34 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->FACTURE_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
@@ -109,7 +109,7 @@ class pdf_crabe extends ModelePDFFactures
$this->posxdiscount=162;
$this->postotalht=174;
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
$this->posxpicture=$this->posxtva - 16; // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxpicture-=20;
@@ -228,15 +228,6 @@ class pdf_crabe extends ModelePDFFactures
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -315,7 +306,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -387,7 +378,7 @@ class pdf_crabe extends ModelePDFFactures
if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100;
$vatrate=(string) $object->lines[$i]->tva_tx;
// Retrieve type from database for backward compatibility with old records
if ((! isset($localtax1_type) || $localtax1_type=='' || ! isset($localtax2_type) || $localtax2_type=='') // if tax type not defined
&& (! empty($localtax1_rate) || ! empty($localtax2_rate))) // and there is local tax
@@ -410,7 +401,6 @@ class pdf_crabe extends ModelePDFFactures
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -250,7 +250,7 @@ class ImportCsv extends ModeleImports
/**
* Return array of next record in input file.
*
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=string)
*/
function import_read_record()
{
@@ -383,7 +383,7 @@ class ImportCsv extends ModeleImports
{
// Set $newval with value to insert and set $listvalues with sql request part for insert
$newval='';
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field into input file is not empty string (so defined into input file), we get value
if ($arrayrecord[($key-1)]['type'] > 0) $newval=$arrayrecord[($key-1)]['val']; // If type of field is not null or '' but string
// Make some tests on $newval
@@ -441,46 +441,41 @@ class ImportCsv extends ModeleImports
{
if (empty($newval)) $newval='0';
}
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomercodeifauto')
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomercodeifnull')
{
if (strtolower($newval) == 'auto')
if (empty($newval) || $newval=='auto')
{
$this->thirpartyobject->get_codeclient(0,0);
$newval=$this->thirpartyobject->code_client;
//print 'code_client='.$newval;
}
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
}
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsuppliercodeifauto')
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsuppliercodeifnull')
{
if (strtolower($newval) == 'auto')
if (empty($newval) || $newval=='auto')
{
$newval=$this->thirpartyobject->get_codefournisseur(0,1);
$newval=$this->thirpartyobject->code_fournisseur;
//print 'code_fournisseur='.$newval;
}
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
}
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomeraccountancycodeifauto')
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getcustomeraccountancycodeifnull')
{
if (strtolower($newval) == 'auto')
if (empty($newval) || $newval=='auto')
{
$this->thirpartyobject->get_codecompta('customer');
$newval=$this->thirpartyobject->code_compta;
//print 'code_compta='.$newval;
}
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
}
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsupplieraccountancycodeifauto')
elseif ($objimport->array_import_convertvalue[0][$val]['rule']=='getsupplieraccountancycodeifnull')
{
if (strtolower($newval) == 'auto')
if (empty($newval) || $newval=='auto')
{
$this->thirpartyobject->get_codecompta('supplier');
$newval=$this->thirpartyobject->code_compta_fournisseur;
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
//print 'code_compta_fournisseur='.$newval;
}
if (empty($newval)) $arrayrecord[($key-1)]['type']=-1; // If we get empty value, we will use "null"
}
//print 'Val to use as insert is '.$newval.'<br>';
@@ -545,7 +540,6 @@ class ImportCsv extends ModeleImports
if ($listfields) { $listfields.=', '; $listvalues.=', '; }
$listfields.=$fieldname;
// Note: arrayrecord (and 'type') is filled with ->import_read_record called by import.php page before calling import_insert
if (empty($newval) && $arrayrecord[($key-1)]['type'] < 0) $listvalues.=($newval=='0'?$newval:"null");
elseif (empty($newval) && $arrayrecord[($key-1)]['type'] == 0) $listvalues.="''";
else $listvalues.="'".$this->db->escape($newval)."'";
@@ -659,7 +653,7 @@ function cleansep($value)
function tablewithentity($table)
{
global $db;
$resql=$db->DDLDescTable($table,'entity');
if ($resql)
{
@@ -668,7 +662,7 @@ function tablewithentity($table)
if ($obj) return 1;
else return 0;
}
else return -1;
else return -1;
}
?>

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2008 Chiptronik
@@ -223,24 +223,15 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
/*
// Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblines ; $i++)
{
if ($object->lines[$i]->remise_percent)
{
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
*/
// Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblines ; $i++)
{
if ($object->lines[$i]->remise_percent)
{
$this->atleastonediscount++;
}
}
*/
// New page
$pdf->AddPage();
@@ -316,7 +307,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -379,7 +370,6 @@ class pdf_typhon extends ModelePDFDeliveryOrder
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2010 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,6 +184,12 @@ 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",
@@ -192,96 +198,15 @@ 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");
'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");
$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_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_sql_end[$r] .=' WHERE p.fk_soc = s.rowid';
$this->export_sql_end[$r] .=' AND p.entity = '.$conf->entity;
@@ -303,47 +228,6 @@ 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.")",

View File

@@ -270,7 +270,7 @@ class modSociete extends DolibarrModules
$this->export_TypeFields_array[$r]=array('s.nom'=>"Text",'s.status'=>"Number",'s.client'=>"Boolean",'s.fournisseur'=>"Boolean",'s.datec'=>"Date",'s.tms'=>"Date",'s.code_client'=>"Text",'s.code_fournisseur'=>"Text",'s.code_compta'=>"Text",'s.code_compta_fournisseur'=>"Text",'s.address'=>"Text",'s.zip'=>"Text",'s.town'=>"Text",'p.libelle'=>"List:c_pays:libelle:libelle",'p.code'=>"Text",'s.phone'=>"Text",'s.fax'=>"Text",'s.url'=>"Text",'s.email'=>"Text",'s.default_lang'=>"Text",'s.siret'=>"Text",'s.siren'=>"Text",'s.ape'=>"Text",'s.idprof4'=>"Text",'s.idprof5'=>"Text",'s.idprof6'=>"Text",'s.tva_intra'=>"Text",'s.capital'=>"Number",'s.note_private'=>"Text",'s.note_public'=>"Text",'t.libelle'=>"Text",'ce.code'=>"List:c_effectif:libelle:code","cfj.libelle"=>"Text",'s.fk_prospectlevel'=>'List:c_prospectlevel:label:code','st.code'=>'List:c_stcomm:libelle:code','d.nom'=>'Text');
$this->export_entities_array[$r]=array(); // We define here only fields that use another picto
// Add extra fields
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe'";
$sql="SELECT name, label, type FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe'";
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
@@ -401,14 +401,14 @@ class modSociete extends DolibarrModules
's.fk_typent'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/ctypent.class.php','class'=>'Ctypent','method'=>'fetch','dict'=>'DictionnaryCompanyType'),
's.fk_pays'=>array('rule'=>'fetchidfromcodeid','classfile'=>'/core/class/cpays.class.php','class'=>'Cpays','method'=>'fetch','dict'=>'DictionnaryCountry'),
's.fk_stcomm'=>array('rule'=>'zeroifnull'),
's.code_client'=>array('rule'=>'getcustomercodeifauto'),
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifauto'),
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifauto'),
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifauto')
's.code_client'=>array('rule'=>'getcustomercodeifnull'),
's.code_fournisseur'=>array('rule'=>'getsuppliercodeifnull'),
's.code_compta'=>array('rule'=>'getcustomeraccountancycodeifnull'),
's.code_compta_fournisseur'=>array('rule'=>'getsupplieraccountancycodeifnull')
);
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.status'=>'^[0|1]','s.client'=>'^[0|1|2|3]','s.fournisseur'=>'^[0|1]','s.fk_typent'=>'id@'.MAIN_DB_PREFIX.'c_typent','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or empty or 'auto'",'s.code_fournisseur'=>"SU01-0001 or empty or 'auto'",'s.address'=>"61 jump street",'s.zip'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.phone'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note_private'=>"This is an example of private note for record",'s.note_public'=>"This is an example of public note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789');
$this->import_examplevalues_array[$r]=array('s.nom'=>"MyBigCompany",'s.status'=>"0 (closed) or 1 (active)",'s.client'=>'0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'0 or 1','s.datec'=>dol_print_date(dol_now(),'%Y-%m-%d'),'s.code_client'=>"CU01-0001 or auto",'s.code_fournisseur'=>"SU01-0001 or auto",'s.address'=>"61 jump street",'s.zip'=>"123456",'s.town'=>"Big town",'s.fk_pays'=>'US, FR, DE...','s.phone'=>"0101010101",'s.fax'=>"0101010102",'s.url'=>"http://mycompany.com",'s.email'=>"test@mycompany.com",'s.siret'=>"",'s.siren'=>"",'s.ape'=>"",'s.idprof4'=>"",'s.tva_intra'=>"FR0123456789",'s.capital'=>"10000",'s.note_private'=>"This is an example of private note for record",'s.note_public'=>"This is an example of public note for record",'s.fk_typent'=>"2",'s.fk_effectif'=>"3","s.fk_forme_juridique"=>"1",'s.fk_prospectlevel'=>'PL_MEDIUM','s.fk_stcomm'=>'0','s.default_lang'=>'en_US','s.barcode'=>'123456789');
// Import list of contact and attributes
$r++;

View File

@@ -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,'\.(ods|odt)');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}
@@ -332,24 +332,34 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->PROJECT_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -222,15 +222,12 @@ class pdf_baleine extends ModelePDFProjects
$pdf->MultiCell(20, 3, $dateend, 0, 'L');
$pageposafter=$pdf->getPage();
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
$nexY = $pdf->GetY();
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -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='nodefault';
$modele='baleine';
}
}
@@ -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/task/pdf/".$file,0);
$file=dol_buildpath($reldir."core/modules/project/pdf/".$file,0);
if (file_exists($file))
{
$filefound=1;

View File

@@ -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,'\.(ods|odt)');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}
@@ -333,24 +333,34 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';
@@ -421,7 +431,7 @@ class doc_generic_task_odt extends ModelePDFTask
{
//print "srctemplatepath=".$srctemplatepath; // Src filename
$newfile=basename($srctemplatepath);
$newfiletmp=preg_replace('/\.(ods|odt)/i','',$newfile);
$newfiletmp=preg_replace('/\.odt/i','',$newfile);
$newfiletmp=preg_replace('/template_/i','',$newfiletmp);
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
$newfiletmp=$objectref.'_'.$newfiletmp;
@@ -526,6 +536,7 @@ 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)

View File

@@ -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,'\.(ods|odt)');
$tmpfiles=dol_dir_list($tmpdir,'files',0,'\.odt');
if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles);
}
}
@@ -139,14 +139,17 @@ 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.= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
$texte.= '<table><tr><td>';
$texte.= '<textarea class="flat" cols="60" name="value1">';
$texte.=$conf->global->PROPALE_ADDON_PDF_ODT_PATH;
$texte.= '</textarea>';
$texte.= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte.= '</td>';
$texte.= '<td align="center">&nbsp; ';
$texte.= '<input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button">';
$texte.= '<br></div></div>';
$texte.= '</td>';
$texte.= '</tr>';
$texte.= '</table>';
// Scan directories
if (count($listofdir))
{
@@ -178,13 +181,22 @@ class doc_generic_proposal_odt extends ModelePDFPropales
}
}
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
@@ -153,7 +153,7 @@ class pdf_azur extends ModelePDFPropales
$outputlangs->load("products");
$nblignes = count($object->lines);
// Loop on each lines to detect if there is at least one image to show
$realpatharray=array();
if (! empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE))
@@ -161,7 +161,7 @@ class pdf_azur extends ModelePDFPropales
for ($i = 0 ; $i < $nblignes ; $i++)
{
if (empty($object->lines[$i]->fk_product)) continue;
$objphoto = new Product($this->db);
$objphoto->fetch($object->lines[$i]->fk_product);
@@ -185,7 +185,7 @@ class pdf_azur extends ModelePDFPropales
if ($conf->propal->dir_output)
{
$object->fetch_thirdparty();
// $deja_regle = 0;
// Definition of $dir and $file
@@ -254,15 +254,6 @@ class pdf_azur extends ModelePDFPropales
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -329,7 +320,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposbefore+1);
$pdf->setPage($pagenb+1);
$curY = $tab_top_newpage;
$showpricebeforepagebreak=0;
@@ -367,7 +358,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -384,7 +375,6 @@ class pdf_azur extends ModelePDFPropales
$nexY = $pdf->GetY();
$pageposafter=$pdf->getPage();
$pdf->setPage($pageposbefore);
$pdf->setTopMargin($this->marge_haute);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -466,7 +456,6 @@ class pdf_azur extends ModelePDFPropales
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);

View File

@@ -135,11 +135,17 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$texte.= '</td>';
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
$texte.= '<td valign="top" rowspan="2">';
$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>';

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 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
@@ -58,7 +58,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* Constructor
*
* @param DoliDB $db Database handler
* @param Object $object Supplier invoice
* @param Societe $object Supplier invoice
*/
function __construct($db,$object)
{
@@ -105,7 +105,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->posxdiscount=162;
$this->postotalht=174;
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
$this->posxpicture=$this->posxtva - 16; // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxpicture-=20;
@@ -225,15 +225,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -288,39 +279,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Description of product line
$curX = $this->posxdesc-1;
$showpricebeforepagebreak=1;
$pdf->startTransaction();
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,1);
$pageposafter=$pdf->getPage();
if ($pageposafter > $pageposbefore) // There is a pagebreak
{
$pdf->rollbackTransaction(true);
$pageposafter=$pageposbefore;
//print $pageposafter.'-'.$pageposbefore;exit;
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc);
$posyafter=$pdf->GetY();
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
{
if ($i == ($nblignes-1)) // No more lines, and no space left to show total, so we create a new page
{
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
}
}
else
{
// We found a page break
$showpricebeforepagebreak=0;
}
}
else // No pagebreak
{
$pdf->commitTransaction();
}
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc,1);
$nexY = $pdf->GetY();
$pageposafter=$pdf->getPage();
@@ -329,7 +288,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
// We suppose that a too long description is moved completely on next page
if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
if ($pageposafter > $pageposbefore) {
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
@@ -340,7 +299,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
{
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails);
$pdf->SetXY($this->posxtva, $curY);
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
$pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R');
}
// Unit price before discount
@@ -361,7 +320,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Total HT line
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
$pdf->SetXY($this->postotalht, $curY);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht, 3, $total_excl_tax, 0, 'R', 0);
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
$tvaligne=$object->lines[$i]->total_tva;
@@ -383,7 +342,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
@@ -408,7 +366,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
}
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
{
@@ -425,7 +382,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
$pagenb++;
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
}
}

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
@@ -110,7 +110,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->posxdiscount=162;
$this->postotalht=174;
//if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?16:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
$this->posxpicture=$this->posxtva - 16; // width of images
if ($this->page_largeur < 210) // To work with US executive format
{
$this->posxpicture-=20;
@@ -233,15 +233,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$this->atleastonediscount++;
}
}
if (empty($this->atleastonediscount))
{
$this->posxpicture+=($this->postotalht - $this->posxdiscount);
$this->posxtva+=($this->postotalht - $this->posxdiscount);
$this->posxup+=($this->postotalht - $this->posxdiscount);
$this->posxqty+=($this->postotalht - $this->posxdiscount);
$this->posxdiscount+=($this->postotalht - $this->posxdiscount);
//$this->postotalht;
}
// New page
$pdf->AddPage();
@@ -316,7 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->AddPage('','',true);
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
$pdf->setPage($pageposafter+1);
$pdf->setPage($pagenb+1);
}
}
else
@@ -410,7 +401,6 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Add line
if (! empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblignes - 1))
{
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1','color'=>array(210,210,210)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY+1, $this->page_largeur - $this->marge_droite, $nexY+1);
@@ -988,7 +978,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
else
{
$pdf->SetTextColor(255,0,0);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
$pdf->MultiCell(100, 3, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
}
$posy+=2;

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 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
@@ -18,17 +18,16 @@
*/
$langs->load("link");
if (empty($relativepathwithnofile)) $relativepathwithnofile='';
/*
* Confirm form to delete
* Confirm suppression
*/
if ($action == 'delete')
{
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
$ret = $form->form_confirm(
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param),
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int'),
$langs->trans('DeleteFile'),
$langs->trans('ConfirmDeleteFile'),
'confirm_deletefile',
@@ -59,11 +58,11 @@ $formfile->list_of_documents(
$modulepart,
$param,
0,
$relativepathwithnofile, // relative path with no file. For example "moduledir/0/1"
'',
$permission
);
print "<br>";
//List of links
$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'), $param);
$formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'));
print "<br>";

View File

@@ -74,7 +74,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
}
}
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id.($withproject?'&withproject=1':''));
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit;
}
}

View File

@@ -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 (is_object($object->linkto) && method_exists($object->linkto, 'add_to_abo') && $object->linkto->add_to_abo() < 0)
if ($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 (is_object($object->unlinkoff) && method_exists($object->unlinkoff, 'del_to_abo') && $object->unlinkoff->del_to_abo() < 0)
if ($object->unlinkoff->del_to_abo() < 0)
{
$this->error=$object->unlinkoff->error;
$this->errors=$object->unlinkoff->errors;

View File

@@ -303,13 +303,11 @@ 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('','datestart',1,1,'',"cronform");
else{
$form->select_date(dol_now(),'datestart',1,1,'',"cronform");
}
print "</td>";
print "<td>";

View File

@@ -24,6 +24,10 @@
* \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';

View File

@@ -128,7 +128,7 @@ if ($object->id)
}
else
{
print $langs->trans("ErrorUnknown");
print $langs->trans("UnkownError");
}
llxFooter();

View File

@@ -29,7 +29,7 @@
* \brief File that include conf.php file and commons lib like functions.lib.php
*/
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.2');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.5.1');
if (! defined('EURO')) define('EURO',chr(128));
// Define syslog constants

View File

@@ -219,9 +219,8 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), 'errors');
$error++;
}
if (! GETPOST('addline_predefined') && ( GETPOST('pu')==='')) // Unit price can be 0 but not ''
if (! GETPOST('addline_predefined') && (! GETPOST('pu') || GETPOST('pu')=='')) // Unit price can be 0 but not ''
{
setEventMessage($langs->trans($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('UnitPrice'))), 'errors');
$error++;
}
@@ -300,7 +299,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
setEventMessage($langs->trans("ErrorQtyTooLowForThisSupplier"), 'errors');
}
}
else if( GETPOST('pu')!=='' || GETPOST('amountttc')!=='' )
else
{
$type=$_POST["type"];
$desc=$_POST['dp_desc'];
@@ -327,7 +326,7 @@ else if ($action == 'addline' && $user->rights->fournisseur->commande->creer)
$ttc = price2num($_POST['amountttc']);
$ht = $ttc / (1 + ($tauxtva / 100));
$price_base_type = 'HT';
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type);
$result=$object->addline($desc, $ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, 0, 0, '', $remise_percent, $price_base_type, $ttc, $type);
}
}
}

View File

@@ -183,7 +183,7 @@ if ($object->id > 0)
}
else
{
print $langs->trans('ErrorUnknown');
print $langs->trans('UnkownError');
}

View File

@@ -28,6 +28,9 @@
* \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';

View File

@@ -1039,7 +1039,7 @@ else
$idGroupValid = $cp->getConfCP('userGroup');
$validator = new UserGroup($db,$idGroupValid);
$valideur = $validator->listUsersForGroup('',1);
$valideur = $validator->listUsersForGroup();
print '<td>';
$form->select_users($cp->fk_validator,"valideur",1,"",0,$valideur,'');

View File

@@ -6,11 +6,6 @@
-- Requests to clean corrupted database
-- delete foreign key that should never exists
ALTER TABLE llx_propal DROP FOREIGN KEY fk_propal_fk_currency;
ALTER TABLE llx_commande DROP FOREIGN KEY fk_commande_fk_currency;
ALTER TABLE llx_facture DROP FOREIGN KEY fk_facture_fk_currency;
delete from llx_facturedet where fk_facture in (select rowid from llx_facture where facnumber in ('(PROV)','ErrorBadMask'));
delete from llx_facture where facnumber in ('(PROV)','ErrorBadMask');
delete from llx_commandedet where fk_commande in (select rowid from llx_commande where ref in ('(PROV)','ErrorBadMask'));

View File

@@ -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 menu Setup -> Dictionnary -> Type of agenda events)
AGENDA_USE_EVENT_TYPE=Use events types (managed into Configuration->Dictionnary->llx_c_actioncomm)
##### 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) #####

View File

@@ -19,7 +19,6 @@ Language_en_US=English (United States)
Language_en_ZA=English (South Africa)
Language_es_ES=Spanish
Language_es_AR=Spanish (Argentina)
Language_es_CL=Spanish (Chile)
Language_es_HN=Spanish (Honduras)
Language_es_MX=Spanish (Mexico)
Language_es_PY=Spanish (Paraguay)

View File

@@ -34,7 +34,7 @@ ErrorFailedToOpenFile=Failed to open file %s
ErrorCanNotCreateDir=Can not create dir %s
ErrorCanNotReadDir=Can not read dir %s
ErrorConstantNotDefined=Parameter %s not defined
ErrorUnknown=Unknown error
ErrorUnknown=Unkown error
ErrorSQL=SQL Error
ErrorLogoFileNotFound=Logo file '%s' was not found
ErrorGoToGlobalSetup=Go to 'Company/Foundation' setup to fix this

View File

@@ -1,23 +0,0 @@
Module20Name=Cotizaciones
Module20Desc=Gestión de cotizaciones/propuestas comerciales
Permission21=Consultar cotizaciones
Permission22=Crear/modificar cotizaciones
Permission24=Validar cotizaciones
Permission25=Enviar las cotizaciones
Permission26=Cerrar cotizaciones
Permission27=Eliminar cotizaciones
Permission28=Exportar las cotizaciones
DictionnarySource=Orígenes de cotizaciones/pedidos
VATIsUsedDesc=El tipo de IVA propuesto por defecto en las creaciones de cotizaciones, facturas, pedidos, etc. Responde a la siguiente regla:<br>Si el vendedor no está sujeto a IVA, IVA por defecto=0. Final de regla.<br>Si el país del vendedor= país del comprador entonces IVA por defecto=IVA del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y el bien vendido= nuevo medio de transportes (auto, barco, avión), IVA por defecto=0 (el IVA debe ser pagado por comprador a la hacienda pública de su país y no al vendedor). Final de regla<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= particular o empresa sin NIF intracomunitario entonces IVA por defecto=IVA del producto vendido. Final de regla.<br>Si vendedor y comprador residen en la Comunidad Europea y comprador= empresa con NIF intracomunitario entonces IVA por defecto=0. Final de regla.<br>Si no, IVA propuesto por defecto=0. Final de regla.<br>
VATIsNotUsedDesc=El tipo de IVA propuesto por defecto es 0. Este es el caso de asociaciones, particulares o algunas pequeñas sociedades.
VATIsUsedExampleFR=En Francia, se trata de las sociedades u organismos que eligen un régimen fiscal general (General simplificado o General normal), régimen en el cual se declara el IVA.
Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Tolerancia de retraso antes de la alerta (en días) sobre cotizaciones a cerrar
Delays_MAIN_DELAY_PROPALS_TO_BILL=Tolerancia de retraso antes de la alerta (en días) sobre cotizaciones no facturadas
WebCalAddEventOnStatusPropal=Añadir evento en el calendario en el cambio de estado de las cotizaciones
PropalSetup=Configuración del módulo Cotizaciones
ProposalsNumberingModules=Módulos de numeración de cotizaciones
ProposalsPDFModules=Modelos de documentos de cotizaciones
HideTreadedPropal=Ocultar las cotizaciones procesados del listado
FreeLegalTextOnProposal=Texto libre en cotizaciones
WatermarkOnDraftProposal=Marca de agua en cotizaciones borrador (en caso de estar vacío)
FCKeditorForProductDetails=Creación/edición WYSIWIG de las líneas de detalle de los productos (en pedidos, cotizaciones, facturas, etc.)

View File

@@ -1,2 +0,0 @@
PropalValidatedInDolibarr=Cotización %s validada
ProposalSentByEMail=Cotización %s enviada por e-mail

View File

@@ -1 +0,0 @@
RelatedCommercialProposals=Cotizaciones asociadas

View File

@@ -1,5 +0,0 @@
BoxLastProposals=Últimas cotizaciones
BoxTitleLastPropals=Las %s últimas cotizaciones registradas
NoRecordedProposals=Sin cotizaciones registradas
BoxProposalsPerMonth=Cotizaciones por mes
ForProposals=Cotizaciones

Some files were not shown because too many files have changed in this diff Show More