Merge branch 'Upstream/develop'
This commit is contained in:
commit
b27cf2cbd6
@ -93,8 +93,8 @@ script:
|
|||||||
- php upgrade.php 3.5.0 3.6.0 >> upgrade.log
|
- php upgrade.php 3.5.0 3.6.0 >> upgrade.log
|
||||||
- php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log
|
- php upgrade2.php 3.5.0 3.6.0 >> upgrade2.log
|
||||||
- php upgrade.php 3.6.0 3.7.0 >> upgrade.log
|
- php upgrade.php 3.6.0 3.7.0 >> upgrade.log
|
||||||
- php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log
|
|
||||||
# - cat upgrade.log
|
# - cat upgrade.log
|
||||||
|
- php upgrade2.php 3.6.0 3.7.0 >> upgrade2.log
|
||||||
# - cat upgrade2.log
|
# - cat upgrade2.log
|
||||||
- cd ../..
|
- cd ../..
|
||||||
- date
|
- date
|
||||||
|
|||||||
@ -93,7 +93,15 @@ Dolibarr better:
|
|||||||
- Table llx_c_pays were renamed into llx_c_country.
|
- Table llx_c_pays were renamed into llx_c_country.
|
||||||
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
- Triggers *_BUILDDOC are removed. Building a doc is not a business event. For action after
|
||||||
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead.
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||||
|
For users:
|
||||||
|
- Fix: Can upload files on services.
|
||||||
|
- Fix: sql errors on updat fichinter
|
||||||
|
- Fix: debian script syntax error
|
||||||
|
- Fix: error "menu param is not inside list" into pos module.
|
||||||
|
- Fix: Salary payments are not reflected on the reporting sheets
|
||||||
|
|
||||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -153,16 +153,22 @@ from origin/upstream and origin/pristine.
|
|||||||
|
|
||||||
* Into root dir, launch:
|
* Into root dir, launch:
|
||||||
> debian/get-orig-source.sh
|
> debian/get-orig-source.sh
|
||||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this.
|
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||||
|
|
||||||
|
* Edit tgz file to remove
|
||||||
|
- includes/sRGB.icc
|
||||||
|
And rename file into
|
||||||
|
tcpdf_x.y.z+dfsg.tar.xz
|
||||||
|
(x.y.z = version, w start from 1 and is increased for each new import)
|
||||||
|
|
||||||
* Staying into git root directory, run
|
* Staying into git root directory, run
|
||||||
> git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz
|
> git-import-orig -vv ../tcpdf_x.y.z+dfsg.tar.xz
|
||||||
|
|
||||||
Note: If there was errors solved manually, you may need to make a git commit
|
Note: If there was errors solved manually, you may need to make a git commit
|
||||||
|
|
||||||
* Add an entry into debian/changelog
|
* Add an entry into debian/changelog
|
||||||
> dch -v x.y.z-dsfg-1 "My comment" will add entry.
|
> dch -v x.y.z+dsfg-1 "My comment" will add entry.
|
||||||
For example: dch -v x.y.z-dsfg-1 "New upstream release." for a new version
|
For example: dch -v x.y.z+dsfg-1 "New upstream release." for a new version
|
||||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||||
|
|
||||||
Warning: Date must have format reported by "date -R"
|
Warning: Date must have format reported by "date -R"
|
||||||
@ -229,7 +235,7 @@ from origin/upstream and origin/pristine.
|
|||||||
|
|
||||||
* If new upstream is available onto sourceforge, launch:
|
* If new upstream is available onto sourceforge, launch:
|
||||||
> debian/get-orig-source.sh
|
> debian/get-orig-source.sh
|
||||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this.
|
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" to solve this.
|
||||||
|
|
||||||
* Edit tgz file to remove
|
* Edit tgz file to remove
|
||||||
- ckeditor
|
- ckeditor
|
||||||
@ -248,8 +254,8 @@ x.y.z+dsfgw
|
|||||||
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
Note: If there was errors solved manually after get-orig-sources.sh, you may need to make a git commit
|
||||||
|
|
||||||
* Add an entry into debian/changelog
|
* Add an entry into debian/changelog
|
||||||
> dch -v x.y.z-w "My comment" will add entry.
|
> dch -v x.y.z+dfsg-w "My comment" will add entry.
|
||||||
For example: dch -v x.y.z-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
For example: dch -v x.y.z+dfsg-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
||||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||||
Then check/modify also the user/date signature:
|
Then check/modify also the user/date signature:
|
||||||
- Date must have format reported by "date -R"
|
- Date must have format reported by "date -R"
|
||||||
|
|||||||
@ -1,300 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#----------------------------------------------------------------------------
|
|
||||||
# \file build/makepack-dolibarrlang.pl
|
|
||||||
# \brief Package builder (tgz, zip, rpm, deb, exe)
|
|
||||||
# \author (c)2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
|
||||||
#----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
use Cwd;
|
|
||||||
|
|
||||||
$PROJECT = "dolibarr";
|
|
||||||
|
|
||||||
@LISTETARGET = ("TGZ"); # Possible packages
|
|
||||||
%REQUIREMENTTARGET = ( # Tool requirement for each package
|
|
||||||
"TGZ" => "tar",
|
|
||||||
"ZIP" => "7z",
|
|
||||||
"EXE" => "makensis.exe"
|
|
||||||
);
|
|
||||||
%ALTERNATEPATH = (
|
|
||||||
"7z" => "7-ZIP",
|
|
||||||
"makensis.exe" => "NSIS"
|
|
||||||
);
|
|
||||||
|
|
||||||
use vars qw/ $REVISION $VERSION /;
|
|
||||||
$REVISION = '1.10';
|
|
||||||
$VERSION = "1.0 (build $REVISION)";
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
# MAIN
|
|
||||||
#------------------------------------------------------------------------------
|
|
||||||
( $DIR = $0 ) =~ s/([^\/\\]+)$//;
|
|
||||||
( $PROG = $1 ) =~ s/\.([^\.]*)$//;
|
|
||||||
$Extension = $1;
|
|
||||||
$DIR ||= '.';
|
|
||||||
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
|
||||||
|
|
||||||
# Detect OS type
|
|
||||||
# --------------
|
|
||||||
if ( "$^O" =~ /linux/i || ( -d "/etc" && -d "/var" && "$^O" !~ /cygwin/i ) ) {
|
|
||||||
$OS = 'linux';
|
|
||||||
$CR = '';
|
|
||||||
}
|
|
||||||
elsif ( -d "/etc" && -d "/Users" ) { $OS = 'macosx'; $CR = ''; }
|
|
||||||
elsif ( "$^O" =~ /cygwin/i || "$^O" =~ /win32/i ) {
|
|
||||||
$OS = 'windows';
|
|
||||||
$CR = "\r";
|
|
||||||
}
|
|
||||||
if ( !$OS ) {
|
|
||||||
print "$PROG.$Extension was not able to detect your OS.\n";
|
|
||||||
print "Can't continue.\n";
|
|
||||||
print "$PROG.$Extension aborted.\n";
|
|
||||||
sleep 2;
|
|
||||||
exit 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Define buildroot
|
|
||||||
# ----------------
|
|
||||||
if ( $OS =~ /linux/ ) {
|
|
||||||
$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "/tmp";
|
|
||||||
}
|
|
||||||
if ( $OS =~ /macos/ ) {
|
|
||||||
$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "/tmp";
|
|
||||||
}
|
|
||||||
if ( $OS =~ /windows/ ) {
|
|
||||||
$TEMP = $ENV{"TEMP"} || $ENV{"TMP"} || "c:/temp";
|
|
||||||
$PROGPATH = $ENV{"ProgramFiles"};
|
|
||||||
}
|
|
||||||
if ( !$TEMP || !-d $TEMP ) {
|
|
||||||
print "Error: A temporary directory can not be find.\n";
|
|
||||||
print "Check that TEMP or TMP environment variable is set correctly.\n";
|
|
||||||
print "makepack-dolibarrlang.pl aborted.\n";
|
|
||||||
sleep 2;
|
|
||||||
exit 2;
|
|
||||||
}
|
|
||||||
$BUILDROOT = "$TEMP/dolibarr-buildroot";
|
|
||||||
|
|
||||||
my $copyalreadydone = 0;
|
|
||||||
my $batch = 0;
|
|
||||||
|
|
||||||
print "Makepack langs version $VERSION\n";
|
|
||||||
print "Enter language code to package (en_US, fr_FR, ...) : ";
|
|
||||||
$PROJECT = <STDIN>;
|
|
||||||
chomp($PROJECT);
|
|
||||||
|
|
||||||
# Ask and set version $MAJOR and $MINOR
|
|
||||||
print "Enter value for version: ";
|
|
||||||
$PROJVERSION = <STDIN>;
|
|
||||||
chomp($PROJVERSION);
|
|
||||||
( $MAJOR, $MINOR ) = split( /\./, $PROJVERSION, 2 );
|
|
||||||
if ( $MINOR eq '' ) {
|
|
||||||
print "Enter value for minor version: ";
|
|
||||||
$MINOR = <STDIN>;
|
|
||||||
chomp($MINOR);
|
|
||||||
}
|
|
||||||
|
|
||||||
$FILENAME = "$PROJECT";
|
|
||||||
$FILENAMETGZ = "lang_$PROJECT-$MAJOR.$MINOR";
|
|
||||||
if ( -d "/usr/src/redhat" ) {
|
|
||||||
|
|
||||||
# redhat
|
|
||||||
$RPMDIR = "/usr/src/redhat";
|
|
||||||
}
|
|
||||||
if ( -d "/usr/src/RPM" ) {
|
|
||||||
|
|
||||||
# mandrake
|
|
||||||
$RPMDIR = "/usr/src/RPM";
|
|
||||||
}
|
|
||||||
|
|
||||||
$SOURCE = "$DIR/../../dolibarr";
|
|
||||||
$DESTI = "$SOURCE/build";
|
|
||||||
|
|
||||||
# Choose package targets
|
|
||||||
#-----------------------
|
|
||||||
$target = "ZIP"; # Les langs sont au format zip
|
|
||||||
if ($target) {
|
|
||||||
$CHOOSEDTARGET{ uc($target) } = 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
my $found = 0;
|
|
||||||
my $NUM_SCRIPT;
|
|
||||||
while ( !$found ) {
|
|
||||||
my $cpt = 0;
|
|
||||||
printf( " %d - %3s (%s)\n",
|
|
||||||
$cpt, "All", "Need " . join( ",", values %REQUIREMENTTARGET ) );
|
|
||||||
foreach my $target (@LISTETARGET) {
|
|
||||||
$cpt++;
|
|
||||||
printf( " %d - %3s (%s)\n",
|
|
||||||
$cpt, $target, "Need " . $REQUIREMENTTARGET{$target} );
|
|
||||||
}
|
|
||||||
|
|
||||||
# Are asked to select the file to move
|
|
||||||
print "Choose one package number or several separated with space: ";
|
|
||||||
$NUM_SCRIPT = <STDIN>;
|
|
||||||
chomp($NUM_SCRIPT);
|
|
||||||
if ( $NUM_SCRIPT =~ s/-//g ) {
|
|
||||||
|
|
||||||
# Do not do copy
|
|
||||||
$copyalreadydone = 1;
|
|
||||||
}
|
|
||||||
if ( $NUM_SCRIPT !~ /^[0-$cpt\s]+$/ ) {
|
|
||||||
print "This is not a valid package number list.\n";
|
|
||||||
$found = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$found = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
print "\n";
|
|
||||||
if ($NUM_SCRIPT) {
|
|
||||||
foreach my $num ( split( /\s+/, $NUM_SCRIPT ) ) {
|
|
||||||
$CHOOSEDTARGET{ $LISTETARGET[ $num - 1 ] } = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
foreach my $key (@LISTETARGET) {
|
|
||||||
$CHOOSEDTARGET{$key} = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Test if requirement is ok
|
|
||||||
#--------------------------
|
|
||||||
foreach my $target ( keys %CHOOSEDTARGET ) {
|
|
||||||
foreach my $req ( split( /[,\s]/, $REQUIREMENTTARGET{$target} ) ) {
|
|
||||||
|
|
||||||
# Test
|
|
||||||
print "Test requirement for target $target: Search '$req'... ";
|
|
||||||
$ret = `"$req" 2>&1`;
|
|
||||||
$coderetour = $?;
|
|
||||||
$coderetour2 = $coderetour >> 8;
|
|
||||||
if (
|
|
||||||
$coderetour != 0
|
|
||||||
&& ( ( $coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i )
|
|
||||||
|| ( $coderetour2 == 127 && $OS !~ /windows/ ) )
|
|
||||||
&& $PROGPATH
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
# Not found error, we try in PROGPATH
|
|
||||||
$ret = `"$PROGPATH/$ALTERNATEPATH{$req}/$req\" 2>&1`;
|
|
||||||
$coderetour = $?;
|
|
||||||
$coderetour2 = $coderetour >> 8;
|
|
||||||
$REQUIREMENTTARGET{$target} = "$PROGPATH/$ALTERNATEPATH{$req}/$req";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
$coderetour != 0
|
|
||||||
&& ( ( $coderetour2 == 1 && $OS =~ /windows/ && $ret !~ /Usage/i )
|
|
||||||
|| ( $coderetour2 == 127 && $OS !~ /windows/ ) )
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
# Not found error
|
|
||||||
print
|
|
||||||
"Not found\nCan't build target $target. Requirement '$req' not found in PATH\n";
|
|
||||||
$CHOOSEDTARGET{$target} = -1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
# Pas erreur ou erreur autre que programme absent
|
|
||||||
print " Found " . $REQUIREMENTTARGET{$target} . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print "\n";
|
|
||||||
|
|
||||||
# Check if there is at least on target to build
|
|
||||||
#----------------------------------------------
|
|
||||||
$nboftargetok = 0;
|
|
||||||
foreach my $target ( keys %CHOOSEDTARGET ) {
|
|
||||||
if ( $CHOOSEDTARGET{$target} < 0 ) { next; }
|
|
||||||
$nboftargetok++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($nboftargetok) {
|
|
||||||
|
|
||||||
# Update buildroot
|
|
||||||
#-----------------
|
|
||||||
if ( !$copyalreadydone ) {
|
|
||||||
print "Delete directory $BUILDROOT\n";
|
|
||||||
$ret = `rm -fr "$BUILDROOT"`;
|
|
||||||
mkdir "$BUILDROOT";
|
|
||||||
mkdir "$BUILDROOT/htdocs";
|
|
||||||
mkdir "$BUILDROOT/htdocs/langs";
|
|
||||||
mkdir "$BUILDROOT/htdocs/langs/$PROJECT";
|
|
||||||
|
|
||||||
print "Copy $SOURCE into $BUILDROOT\n";
|
|
||||||
mkdir "$BUILDROOT";
|
|
||||||
$ret =
|
|
||||||
`cp -pr "$SOURCE/htdocs/langs/$PROJECT" "$BUILDROOT/htdocs/langs"`;
|
|
||||||
}
|
|
||||||
print "Clean $BUILDROOT\n";
|
|
||||||
$ret =
|
|
||||||
`rm -fr $BUILDROOT/htdocs/langs/$PROJECT/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/*/Thumbs.db $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/Thumbs.db`;
|
|
||||||
$ret =
|
|
||||||
`rm -fr $BUILDROOT/htdocs/langs/$PROJECT/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/*/CVS* $BUILDROOT/htdocs/langs/$PROJECT/*/*/*/*/*/CVS*`;
|
|
||||||
|
|
||||||
# Build package for each target
|
|
||||||
#------------------------------
|
|
||||||
foreach my $target ( keys %CHOOSEDTARGET )
|
|
||||||
{
|
|
||||||
if ( $CHOOSEDTARGET{$target} < 0 ) { next; }
|
|
||||||
|
|
||||||
print "\nBuild package for target $target\n";
|
|
||||||
|
|
||||||
if ( $target eq 'TGZ' )
|
|
||||||
{
|
|
||||||
unlink $FILENAMETGZ . tgz;
|
|
||||||
|
|
||||||
# unlink $BUILDROOT/$FILENAMETGZ.tgz;
|
|
||||||
print "Compress $BUILDROOT/htdocs into $FILENAMETGZ.tgz...\n";
|
|
||||||
$cmd =
|
|
||||||
"tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar.exclude\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$FILENAMETGZ.tgz\" htdocs";
|
|
||||||
$ret = `$cmd`;
|
|
||||||
|
|
||||||
# $cmd="tar --exclude-vcs --exclude-from \"$DESTI/tgz/tar.exclude\" --directory \"$BUILDROOT\" --mode=go-w --group=500 --owner=500 -czvf \"$BUILDROOT/$FILENAMETGZ.tgz\" htdocs\n";
|
|
||||||
# $ret=`$cmd`;
|
|
||||||
if ( $OS =~ /windows/i ) {
|
|
||||||
print "Move $FILENAMETGZ.tgz to $DESTI/$FILENAMETGZ.tgz\n";
|
|
||||||
$ret = `mv "$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
|
|
||||||
|
|
||||||
# $ret=`mv "$BUILDROOT/$FILENAMETGZ.tgz" "$DESTI/$FILENAMETGZ.tgz"`;
|
|
||||||
}
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $target eq 'ZIP' )
|
|
||||||
{
|
|
||||||
unlink $FILENAMEZIP . zip;
|
|
||||||
print "Compress $FILENAMETGZ into $FILENAMEZIP.zip...\n";
|
|
||||||
chdir("$BUILDROOT");
|
|
||||||
|
|
||||||
#print "cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*\n";
|
|
||||||
#$ret=`cd $BUILDROOTNT & 7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
|
|
||||||
$ret =
|
|
||||||
`7z a -r -tzip -mx $BUILDROOT/$FILENAMEZIP.zip $FILENAMETGZ\\*.*`;
|
|
||||||
print "Move $FILENAMEZIP.zip to $DESTI\n";
|
|
||||||
rename( "$BUILDROOT/$FILENAMEZIP.zip", "$DESTI/$FILENAMEZIP.zip" );
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print "\n----- Summary -----\n";
|
|
||||||
foreach my $target ( keys %CHOOSEDTARGET ) {
|
|
||||||
if ( $CHOOSEDTARGET{$target} < 0 ) {
|
|
||||||
print "Package $target not built (bad requirement).\n";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
print "Package $target built succeessfully in $DESTI\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !$btach ) {
|
|
||||||
print "\nPress key to finish...";
|
|
||||||
my $WAITKEY = <STDIN>;
|
|
||||||
}
|
|
||||||
|
|
||||||
0;
|
|
||||||
@ -243,6 +243,10 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
<rule ref="PEAR.NamingConventions.ValidFunctionName" />
|
||||||
|
|
||||||
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNameInvalid">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
@ -253,13 +257,13 @@
|
|||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCaptial">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.FunctionNoCaptial">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
||||||
|
|
||||||
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
|
<rule ref="PEAR.WhiteSpace.ObjectOperatorIndent" />
|
||||||
|
|||||||
@ -197,12 +197,7 @@ if ($resql)
|
|||||||
|
|
||||||
$newtitle=$langs->trans($title);
|
$newtitle=$langs->trans($title);
|
||||||
|
|
||||||
$tabactive='';
|
$tabactive='cardlist';
|
||||||
if ($action == 'show_month') $tabactive='cardmonth';
|
|
||||||
if ($action == 'show_week') $tabactive='cardweek';
|
|
||||||
if ($action == 'show_day') $tabactive='cardday';
|
|
||||||
if ($action == 'show_list') $tabactive='cardlist';
|
|
||||||
if ($action == 'show_peruser') $tabactive='cardperuser';
|
|
||||||
|
|
||||||
$head = calendars_prepare_head($param);
|
$head = calendars_prepare_head($param);
|
||||||
|
|
||||||
|
|||||||
@ -98,11 +98,10 @@ if ($action == 'add')
|
|||||||
$result=$obj->add_to_target($id,$filtersarray);
|
$result=$obj->add_to_target($id,$filtersarray);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
|
setEventMessage($langs->trans("XTargetsAdded",$result),'mesgs');
|
||||||
|
|
||||||
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
header("Location: ".$_SERVER['PHP_SELF']."?id=".$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -167,7 +166,6 @@ if ($_POST["button_removefilter"])
|
|||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
|
llxHeader('',$langs->trans("Mailing"),'EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing');
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -306,12 +304,14 @@ if ($object->fetch($id) >= 0)
|
|||||||
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
|
print img_object($langs->trans("Module").': '.get_class($obj),$obj->picto).' '.$obj->getDesc();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
/*
|
try {
|
||||||
print '<td width=\"100\">';
|
$nbofrecipient=$obj->getNbOfRecipients('');
|
||||||
print $modulename;
|
}
|
||||||
print "</td>";
|
catch(Exception $e)
|
||||||
*/
|
{
|
||||||
$nbofrecipient=$obj->getNbOfRecipients('');
|
dol_syslog($e->getMessage(), LOG_ERR);
|
||||||
|
}
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($nbofrecipient >= 0)
|
if ($nbofrecipient >= 0)
|
||||||
{
|
{
|
||||||
@ -324,7 +324,13 @@ if ($object->fetch($id) >= 0)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="left">';
|
print '<td align="left">';
|
||||||
$filter=$obj->formFilter();
|
try {
|
||||||
|
$filter=$obj->formFilter();
|
||||||
|
}
|
||||||
|
catch(Exception $e)
|
||||||
|
{
|
||||||
|
dol_syslog($e->getMessage(), LOG_ERR);
|
||||||
|
}
|
||||||
if ($filter) print $filter;
|
if ($filter) print $filter;
|
||||||
else print $langs->trans("None");
|
else print $langs->trans("None");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -421,7 +427,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ligne des champs de filtres
|
// Ligne des champs de filtres
|
||||||
@ -446,7 +452,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Date sending
|
// Date sending
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print ' ';
|
print ' ';
|
||||||
@ -530,7 +536,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
print $object::libStatutDest($obj->statut,2);
|
print $object::libStatutDest($obj->statut,2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sreach Icon
|
//Sreach Icon
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -538,6 +539,69 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Salaries
|
||||||
|
*/
|
||||||
|
|
||||||
|
print '<tr><td colspan="4">'.$langs->trans("Salaries").'</td></tr>';
|
||||||
|
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount, u.firstname, u.lastname, p.fk_user";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user";
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
if (! empty($date_start) && ! empty($date_end))
|
||||||
|
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
|
||||||
|
|
||||||
|
$sql.= " GROUP BY u.rowid";
|
||||||
|
$sql.= " ORDER BY u.firstname";
|
||||||
|
|
||||||
|
dol_syslog("get payment salaries sql=".$sql);
|
||||||
|
$result=$db->query($sql);
|
||||||
|
$subtotal_ht = 0;
|
||||||
|
$subtotal_ttc = 0;
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
$var=true;
|
||||||
|
$i = 0;
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
$total_ht -= $obj->amount;
|
||||||
|
$total_ttc -= $obj->amount;
|
||||||
|
$subtotal_ht += $obj->amount;
|
||||||
|
$subtotal_ttc += $obj->amount;
|
||||||
|
|
||||||
|
$var = !$var;
|
||||||
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
|
|
||||||
|
print "<td>".$langs->trans("Salaries")." <a href=\"".DOL_URL_ROOT."/compta/salaries/index.php?filtre=s.fk_user=".$obj->fk_user."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
|
||||||
|
|
||||||
|
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||||
|
print '<td align="right">'.price(-$obj->amount).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$var = !$var;
|
||||||
|
print "<tr ".$bc[$var]."><td> </td>";
|
||||||
|
print '<td colspan="3">'.$langs->trans("None").'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
print '<tr class="liste_total">';
|
||||||
|
if ($modecompta == 'CREANCES-DETTES')
|
||||||
|
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
|
||||||
|
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VAT
|
* VAT
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||||
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -469,6 +470,44 @@ $parameters["mode"] = $modecompta;
|
|||||||
$hookmanager->initHooks(array('externalbalance'));
|
$hookmanager->initHooks(array('externalbalance'));
|
||||||
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('addStatisticLine',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Salaries
|
||||||
|
*/
|
||||||
|
$subtotal_ht = 0;
|
||||||
|
$subtotal_ttc = 0;
|
||||||
|
$sql = "SELECT p.label as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as p";
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
$sql.= " GROUP BY p.label, dm";
|
||||||
|
|
||||||
|
dol_syslog("get social salaries payments sql=".$sql);
|
||||||
|
$result=$db->query($sql);
|
||||||
|
if ($result)
|
||||||
|
{
|
||||||
|
$num = $db->num_rows($result);
|
||||||
|
$var=false;
|
||||||
|
$i = 0;
|
||||||
|
if ($num)
|
||||||
|
{
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
|
if (! isset($decaiss[$obj->dm])) $decaiss[$obj->dm]=0;
|
||||||
|
$decaiss[$obj->dm] += $obj->amount;
|
||||||
|
|
||||||
|
if (! isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm]=0;
|
||||||
|
$decaiss_ttc[$obj->dm] += $obj->amount;
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($db);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Show result array
|
* Show result array
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -71,8 +71,8 @@ $form = new Form($db);
|
|||||||
$salstatic = new PaymentSalary($db);
|
$salstatic = new PaymentSalary($db);
|
||||||
$userstatic = new User($db);
|
$userstatic = new User($db);
|
||||||
|
|
||||||
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm, s.fk_typepayment as type,";
|
$sql = "SELECT u.rowid as uid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev as dm, s.fk_typepayment as type, s.num_payment,";
|
||||||
$sql.= " s.num_payment, pst.code as payment_code";
|
$sql.= " pst.code as payment_code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
$sql.= " FROM ".MAIN_DB_PREFIX."payment_salary as s";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id,";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pst ON s.fk_typepayment = pst.id,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
$sql.= " ".MAIN_DB_PREFIX."user as u";
|
||||||
@ -87,7 +87,7 @@ if ($filtre) {
|
|||||||
if ($typeid) {
|
if ($typeid) {
|
||||||
$sql .= " AND s.fk_typepayment=".$typeid;
|
$sql .= " AND s.fk_typepayment=".$typeid;
|
||||||
}
|
}
|
||||||
$sql.= " GROUP BY s.rowid, s.fk_typepayment, s.amount, s.datev, s.label";
|
//$sql.= " GROUP BY u.rowid, u.lastname, u.firstname, s.rowid, s.fk_user, s.amount, s.label, s.datev, s.fk_typepayment, s.num_payment, pst.code";
|
||||||
$sql.= $db->order($sortfield,$sortorder);
|
$sql.= $db->order($sortfield,$sortorder);
|
||||||
$sql.= $db->plimit($limit+1,$offset);
|
$sql.= $db->plimit($limit+1,$offset);
|
||||||
|
|
||||||
@ -174,6 +174,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2013 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) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -25,31 +26,88 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parent class of boxes
|
* Class ModeleBoxes
|
||||||
|
*
|
||||||
|
* Boxes parent class
|
||||||
*/
|
*/
|
||||||
class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" boxes
|
class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" boxes
|
||||||
{
|
{
|
||||||
var $db;
|
/**
|
||||||
var $error='';
|
* @var DoliDB Database handler
|
||||||
var $max=5;
|
*/
|
||||||
var $enabled=1;
|
public $db;
|
||||||
|
|
||||||
var $rowid;
|
|
||||||
var $id;
|
|
||||||
var $position;
|
|
||||||
var $box_order;
|
|
||||||
var $fk_user;
|
|
||||||
var $sourcefile;
|
|
||||||
var $class;
|
|
||||||
var $box_id;
|
|
||||||
var $note;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* @var string Error message
|
||||||
|
*/
|
||||||
|
public $error = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Maximum lines
|
||||||
|
*/
|
||||||
|
public $max = 5;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Status
|
||||||
|
*/
|
||||||
|
public $enabled=1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Box definition database ID
|
||||||
|
*/
|
||||||
|
public $rowid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
* @deprecated Same as box_id?
|
||||||
|
*/
|
||||||
|
public $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Position?
|
||||||
|
*/
|
||||||
|
public $position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Display order
|
||||||
|
*/
|
||||||
|
public $box_order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int User ID
|
||||||
|
*/
|
||||||
|
public $fk_user;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Source file
|
||||||
|
*/
|
||||||
|
public $sourcefile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Class name
|
||||||
|
*/
|
||||||
|
public $class;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string ID
|
||||||
|
*/
|
||||||
|
public $box_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Alphanumeric ID
|
||||||
|
*/
|
||||||
|
public $boxcode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Note
|
||||||
|
*/
|
||||||
|
public $note;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $param More parameters
|
* @param string $param More parameters
|
||||||
*/
|
*/
|
||||||
function __construct($db,$param='')
|
function __construct($db,$param='')
|
||||||
{
|
{
|
||||||
@ -57,9 +115,9 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return last error message
|
* Return last error message
|
||||||
*
|
*
|
||||||
* @return string Error message
|
* @return string Error message
|
||||||
*/
|
*/
|
||||||
function error()
|
function error()
|
||||||
{
|
{
|
||||||
@ -68,10 +126,11 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a box line from its rowid
|
* Load a box line from its rowid
|
||||||
*
|
*
|
||||||
* @param int $rowid Row id to load
|
* @param int $rowid Row id to load
|
||||||
* @return int <0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($rowid)
|
function fetch($rowid)
|
||||||
{
|
{
|
||||||
@ -110,11 +169,12 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty"
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
|
*Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
|
||||||
*
|
*
|
||||||
* @param array $head Array with properties of box title
|
* @param array $head Array with properties of box title
|
||||||
* @param array $contents Array with properties of box lines
|
* @param array $contents Array with properties of box lines
|
||||||
* @return void
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function showBox($head, $contents)
|
function showBox($head, $contents)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
* Parent class for class inheritance lines of business objects
|
* Parent class for class inheritance lines of business objects
|
||||||
* This class is useless for the moment so no inherit are done on it
|
* This class is useless for the moment so no inherit are done on it
|
||||||
*/
|
*/
|
||||||
abstract class CommonObjectLine
|
abstract class CommonObjectLine extends CommonObject
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Call trigger based on this instance
|
* Call trigger based on this instance
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (c) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (c) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (c) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
|
* Copyright (C) 2013 Charles-Fr BENKE <charles.fr@benke.fr>
|
||||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (c) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -270,7 +270,7 @@ class FormFile
|
|||||||
if (! empty($iconPDF)) {
|
if (! empty($iconPDF)) {
|
||||||
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
return $this->getDocumentsLink($modulepart, $modulesubdir, $filedir);
|
||||||
}
|
}
|
||||||
$printer = ($user->rights->printipp->read && $conf->printipp->enabled)?true:false;
|
$printer = (!empty($user->rights->printipp->read) && !empty($conf->printipp->enabled))?true:false;
|
||||||
$hookmanager->initHooks(array('formfile'));
|
$hookmanager->initHooks(array('formfile'));
|
||||||
$forname='builddoc';
|
$forname='builddoc';
|
||||||
$out='';
|
$out='';
|
||||||
@ -514,11 +514,11 @@ class FormFile
|
|||||||
$out.= $genbutton;
|
$out.= $genbutton;
|
||||||
$out.= '</th>';
|
$out.= '</th>';
|
||||||
|
|
||||||
if($hookmanager->hooks['formfile'])
|
if (!empty($hookmanager->hooks['formfile']))
|
||||||
{
|
{
|
||||||
foreach($hookmanager->hooks['formfile'] as $module)
|
foreach($hookmanager->hooks['formfile'] as $module)
|
||||||
{
|
{
|
||||||
if(method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
|
if (method_exists($module, 'formBuilddocLineOptions')) $out .= '<th></th>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$out.= '</tr>';
|
$out.= '</tr>';
|
||||||
|
|||||||
@ -126,6 +126,11 @@ function fichinter_admin_prepare_head()
|
|||||||
$head[$h][2] = 'attributes';
|
$head[$h][2] = 'attributes';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
$head[$h][0] = DOL_URL_ROOT.'/fichinter/admin/fichinterdet_extrafields.php';
|
||||||
|
$head[$h][1] = $langs->trans("ExtraFields");
|
||||||
|
$head[$h][2] = 'attributesdet';
|
||||||
|
$h++;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
complete_head_from_modules($conf,$langs,null,$head,$h,'fichinter_admin','remove');
|
complete_head_from_modules($conf,$langs,null,$head,$h,'fichinter_admin','remove');
|
||||||
|
|||||||
@ -597,7 +597,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
global $conf, $db, $user, $langs;
|
global $conf, $db, $user, $langs;
|
||||||
global $object, $hookmanager;
|
global $object, $hookmanager;
|
||||||
|
|
||||||
$error=0;
|
$reshook=0;
|
||||||
$file_name = $dest_file;
|
$file_name = $dest_file;
|
||||||
|
|
||||||
if (empty($nohook))
|
if (empty($nohook))
|
||||||
@ -663,8 +663,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security:
|
// Security:
|
||||||
// On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans
|
// On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans les noms de fichiers.
|
||||||
// les noms de fichiers.
|
|
||||||
if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file))
|
if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file))
|
||||||
{
|
{
|
||||||
dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING);
|
dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING);
|
||||||
@ -677,7 +676,13 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
$reshook=$hookmanager->executeHooks('moveUploadedFile', $parameters, $object);
|
$reshook=$hookmanager->executeHooks('moveUploadedFile', $parameters, $object);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($reshook))
|
if ($reshook < 0) // At least one blocking error returned by one hook
|
||||||
|
{
|
||||||
|
$errmsg = join(',', $hookmanager->errors);
|
||||||
|
if (empty($errmsg)) $errmsg = 'ErrorReturnedBySomeHooks'; // Should not occurs. Added if hook is bugged and does not set ->errors when there is error.
|
||||||
|
return $errmsg;
|
||||||
|
}
|
||||||
|
elseif (empty($reshook))
|
||||||
{
|
{
|
||||||
// The file functions must be in OS filesystem encoding.
|
// The file functions must be in OS filesystem encoding.
|
||||||
$src_file_osencoded=dol_osencode($src_file);
|
$src_file_osencoded=dol_osencode($src_file);
|
||||||
@ -710,8 +715,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
return -3; // Unknown error
|
return -3; // Unknown error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return $reshook;
|
return 1; // Success
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -802,12 +807,12 @@ function dol_delete_dir($dir,$nophperrors=0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a directory $dir and its subdirectories (or only files and subdirectories)
|
* Remove a directory $dir and its subdirectories (or only files and subdirectories)
|
||||||
*
|
*
|
||||||
* @param string $dir Dir to delete
|
* @param string $dir Dir to delete
|
||||||
* @param int $count Counter to count nb of deleted elements
|
* @param int $count Counter to count nb of deleted elements
|
||||||
* @param int $nophperrors Disable all PHP output errors
|
* @param int $nophperrors Disable all PHP output errors
|
||||||
* @param int $onlysub Delete only files and subdir, not main directory
|
* @param int $onlysub Delete only files and subdir, not main directory
|
||||||
* @return int Number of files and directory removed
|
* @return int Number of files and directory removed
|
||||||
*/
|
*/
|
||||||
function dol_delete_dir_recursive($dir,$count=0,$nophperrors=0,$onlysub=0)
|
function dol_delete_dir_recursive($dir,$count=0,$nophperrors=0,$onlysub=0)
|
||||||
@ -837,7 +842,7 @@ function dol_delete_dir_recursive($dir,$count=0,$nophperrors=0,$onlysub=0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
|
|
||||||
if (empty($onlysub))
|
if (empty($onlysub))
|
||||||
{
|
{
|
||||||
dol_delete_dir($dir,$nophperrors);
|
dol_delete_dir($dir,$nophperrors);
|
||||||
|
|||||||
@ -651,7 +651,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
|||||||
* @param int $marge_gauche Margin left (no more used)
|
* @param int $marge_gauche Margin left (no more used)
|
||||||
* @param int $page_hauteur Page height (no more used)
|
* @param int $page_hauteur Page height (no more used)
|
||||||
* @param Object $object Object shown in PDF
|
* @param Object $object Object shown in PDF
|
||||||
* @param int $showdetails Show company details into footer. This param seems to not be used by standard version.
|
* @param int $showdetails Show company details into footer. This param seems to not be used by standard version. (1=Show address, 2=Show managers, 3=Both)
|
||||||
* @param int $hidefreetext 1=Hide free text, 0=Show free text
|
* @param int $hidefreetext 1=Hide free text, 0=Show free text
|
||||||
* @return int Return height of bottom margin including footer text
|
* @return int Return height of bottom margin including footer text
|
||||||
*/
|
*/
|
||||||
@ -681,10 +681,10 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
|||||||
}
|
}
|
||||||
|
|
||||||
// First line of company infos
|
// First line of company infos
|
||||||
|
$line1=""; $line2=""; $line3=""; $line4="";
|
||||||
|
|
||||||
if ($showdetails)
|
if ($showdetails && 1)
|
||||||
{
|
{
|
||||||
$line1="";
|
|
||||||
// Company name
|
// Company name
|
||||||
if ($fromcompany->name)
|
if ($fromcompany->name)
|
||||||
{
|
{
|
||||||
@ -716,7 +716,6 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
|||||||
$line1.=($line1?" - ":"").$outputlangs->transnoentities("Fax").": ".$fromcompany->fax;
|
$line1.=($line1?" - ":"").$outputlangs->transnoentities("Fax").": ".$fromcompany->fax;
|
||||||
}
|
}
|
||||||
|
|
||||||
$line2="";
|
|
||||||
// URL
|
// URL
|
||||||
if ($fromcompany->url)
|
if ($fromcompany->url)
|
||||||
{
|
{
|
||||||
@ -728,9 +727,16 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
|||||||
$line2.=($line2?" - ":"").$fromcompany->email;
|
$line2.=($line2?" - ":"").$fromcompany->email;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (($showdetails && 2) || ($fromcompany->country_code == 'DE'))
|
||||||
|
{
|
||||||
|
// Managers
|
||||||
|
if ($fromcompany->managers)
|
||||||
|
{
|
||||||
|
$line2.=($line2?" - ":"").$fromcompany->managers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Line 3 of company infos
|
// Line 3 of company infos
|
||||||
$line3="";
|
|
||||||
// Juridical status
|
// Juridical status
|
||||||
if ($fromcompany->forme_juridique_code)
|
if ($fromcompany->forme_juridique_code)
|
||||||
{
|
{
|
||||||
@ -757,7 +763,6 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Line 4 of company infos
|
// Line 4 of company infos
|
||||||
$line4="";
|
|
||||||
// Prof Id 3
|
// Prof Id 3
|
||||||
if ($fromcompany->idprof3)
|
if ($fromcompany->idprof3)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1217,7 +1217,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu);
|
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu);
|
||||||
|
|
||||||
// We update newmenu for special dynamic menus
|
// We update newmenu for special dynamic menus
|
||||||
if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
|
if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, label, courant, rappro, courant";
|
$sql = "SELECT rowid, label, courant, rappro, courant";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
@ -1247,7 +1247,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP
|
if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP
|
||||||
{
|
{
|
||||||
$MAXFTP=20;
|
$MAXFTP=20;
|
||||||
$i=1;
|
$i=1;
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -21,48 +22,184 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/core/modules/DolibarrModules.class.php
|
* \file htdocs/core/modules/DolibarrModules.class.php
|
||||||
* \brief File of parent class of module descriptor class files
|
* \brief File of parent class of module descriptor class files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parent class of module descriptor class files
|
* Class DolibarrModules
|
||||||
|
*
|
||||||
|
* Parent class for module descriptor class files
|
||||||
*/
|
*/
|
||||||
abstract class DolibarrModules
|
abstract class DolibarrModules
|
||||||
{
|
{
|
||||||
//! Database handler
|
|
||||||
var $db;
|
|
||||||
//! Relative path to module style sheet
|
|
||||||
var $style_sheet = ''; // deprecated
|
|
||||||
//! Path to create when module activated
|
|
||||||
var $dirs = array();
|
|
||||||
//! Tableau des boites
|
|
||||||
var $boxes;
|
|
||||||
//! Tableau des constantes
|
|
||||||
var $const;
|
|
||||||
//! Tableau des droits
|
|
||||||
var $rights;
|
|
||||||
//! Tableau des menus
|
|
||||||
var $menu=array();
|
|
||||||
//! Module parts array
|
|
||||||
var $module_parts=array();
|
|
||||||
//! Tableau des documents ???
|
|
||||||
var $docs;
|
|
||||||
|
|
||||||
var $dbversion = "-";
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to enable a module. Insert into database all constants, boxes of module
|
* @var DoliDb Database handler
|
||||||
*
|
|
||||||
* @param array $array_sql Array of SQL requests to execute when enabling module
|
|
||||||
* @param string $options String with options when disabling module ('newboxdefonly|noboxes')
|
|
||||||
* @return int 1 if OK, 0 if KO
|
|
||||||
*/
|
*/
|
||||||
|
public $db;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Relative path to module style sheet
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
public $style_sheet = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Paths to create when module is activated
|
||||||
|
*/
|
||||||
|
public $dirs = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Module boxes
|
||||||
|
*/
|
||||||
|
public $boxes = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Module constants
|
||||||
|
*/
|
||||||
|
public $const = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Module access rights
|
||||||
|
*/
|
||||||
|
public $rights;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module access rights family
|
||||||
|
*/
|
||||||
|
public $rights_class;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Module menu entries
|
||||||
|
*/
|
||||||
|
public $menu = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array Module parts
|
||||||
|
* array(
|
||||||
|
* // Set this to 1 if module has its own trigger directory (/mymodule/core/triggers)
|
||||||
|
* 'triggers' => 0,
|
||||||
|
* // Set this to 1 if module has its own login method directory (/mymodule/core/login)
|
||||||
|
* 'login' => 0,
|
||||||
|
* // Set this to 1 if module has its own substitution function file (/mymodule/core/substitutions)
|
||||||
|
* 'substitutions' => 0,
|
||||||
|
* // Set this to 1 if module has its own menus handler directory (/mymodule/core/menus)
|
||||||
|
* 'menus' => 0,
|
||||||
|
* // Set this to 1 if module has its own theme directory (/mymodule/theme)
|
||||||
|
* 'theme' => 0,
|
||||||
|
* // Set this to 1 if module overwrite template dir (/mymodule/core/tpl)
|
||||||
|
* 'tpl' => 0,
|
||||||
|
* // Set this to 1 if module has its own barcode directory (/mymodule/core/modules/barcode)
|
||||||
|
* 'barcode' => 0,
|
||||||
|
* // Set this to 1 if module has its own models directory (/mymodule/core/modules/xxx)
|
||||||
|
* 'models' => 0,
|
||||||
|
* // Set this to relative path of css file if module has its own css file
|
||||||
|
* 'css' => '/mymodule/css/mymodule.css.php',
|
||||||
|
* // Set this to relative path of js file if module must load a js on all pages
|
||||||
|
* 'js' => '/mymodule/js/mymodule.js',
|
||||||
|
* // Set here all hooks context managed by module
|
||||||
|
* 'hooks' => array('hookcontext1','hookcontext2'),
|
||||||
|
* // Set here all workflow context managed by module
|
||||||
|
* 'workflow' => array(
|
||||||
|
* 'WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2' = >array(
|
||||||
|
* 'enabled' => '! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)',
|
||||||
|
* 'picto'=>'yourpicto@mymodule'
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public $module_parts = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module documents ?
|
||||||
|
* @deprecated Seems unused anywhere
|
||||||
|
*/
|
||||||
|
public $docs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string ?
|
||||||
|
* @deprecated Seems unused anywhere
|
||||||
|
*/
|
||||||
|
public $dbversion = "-";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Error message
|
||||||
|
*/
|
||||||
|
public $error;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Module unique ID
|
||||||
|
*/
|
||||||
|
public $numero;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module name
|
||||||
|
*/
|
||||||
|
public $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module version
|
||||||
|
*/
|
||||||
|
public $version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module description
|
||||||
|
*/
|
||||||
|
public $description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string[] Module language files
|
||||||
|
*/
|
||||||
|
public $langfiles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module export code
|
||||||
|
*/
|
||||||
|
public $export_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module export label
|
||||||
|
*/
|
||||||
|
public $export_label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module import code
|
||||||
|
*/
|
||||||
|
public $import_code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module import label
|
||||||
|
*/
|
||||||
|
public $import_label;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string Module constant name
|
||||||
|
*/
|
||||||
|
public $const_name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool Module can't be disabled
|
||||||
|
*/
|
||||||
|
public $always_enabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool Module is enabled globally (Multicompany support)
|
||||||
|
*/
|
||||||
|
public $core_enabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables a module.
|
||||||
|
* Inserts all informations into database
|
||||||
|
*
|
||||||
|
* @param string[] $array_sql SQL requests to be executed when enabling module
|
||||||
|
* @param string $options String with options when disabling module ('newboxdefonly|noboxes')
|
||||||
|
*
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
|
*/
|
||||||
function _init($array_sql, $options='')
|
function _init($array_sql, $options='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf;
|
||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -98,18 +235,13 @@ abstract class DolibarrModules
|
|||||||
if (! $err)
|
if (! $err)
|
||||||
{
|
{
|
||||||
$val=$array_sql[$i];
|
$val=$array_sql[$i];
|
||||||
$sql='';
|
$sql=$val;
|
||||||
$ignoreerror=0;
|
$ignoreerror=0;
|
||||||
if (is_array($val))
|
if (is_array($val))
|
||||||
{
|
{
|
||||||
$sql=$val['sql'];
|
$sql=$val['sql'];
|
||||||
$ignoreerror=$val['ignoreerror'];
|
$ignoreerror=$val['ignoreerror'];
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
$sql=$val;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add current entity id
|
// Add current entity id
|
||||||
$sql=str_replace('__ENTITY__', $conf->entity, $sql);
|
$sql=str_replace('__ENTITY__', $conf->entity, $sql);
|
||||||
|
|
||||||
@ -144,15 +276,15 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fonction de desactivation. Supprime de la base les constantes et boites du module
|
* Disable function. Deletes the module constant and boxes from the database.
|
||||||
*
|
*
|
||||||
* @param array $array_sql Array of SQL requests to execute when disable module
|
* @param string[] $array_sql SQL requests to be executed when module is disabled
|
||||||
* @param string $options String with options when disabling module ('newboxdefonly|noboxes')
|
* @param string $options Options when disabling module ('newboxdefonly|noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
*
|
||||||
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function _remove($array_sql, $options='')
|
function _remove($array_sql, $options='')
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -212,10 +344,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne le nom traduit du module si la traduction existe dans admin.lang,
|
* Gives the translated module name if translation exists in admin.lang or the default module name.
|
||||||
* sinon le nom defini par defaut dans le module.
|
|
||||||
*
|
*
|
||||||
* @return string Nom du module traduit
|
* @return string Translated module name
|
||||||
*/
|
*/
|
||||||
function getName()
|
function getName()
|
||||||
{
|
{
|
||||||
@ -224,22 +355,21 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
if ($langs->trans("Module".$this->numero."Name") != ("Module".$this->numero."Name"))
|
if ($langs->trans("Module".$this->numero."Name") != ("Module".$this->numero."Name"))
|
||||||
{
|
{
|
||||||
// Si traduction du nom du module existe
|
// If module name translation exists
|
||||||
return $langs->trans("Module".$this->numero."Name");
|
return $langs->trans("Module".$this->numero."Name");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If translation of module with its numero does not exists, we take its name
|
// If module name translation using it's unique id does not exists, we take its name
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne la description traduite du module si la traduction existe dans admin.lang,
|
* Gives the translated module description if translation exists in admin.lang or the default module description
|
||||||
* sinon la description definie par defaut dans le module
|
|
||||||
*
|
*
|
||||||
* @return string Nom du module traduit
|
* @return string Translated module description
|
||||||
*/
|
*/
|
||||||
function getDesc()
|
function getDesc()
|
||||||
{
|
{
|
||||||
@ -248,24 +378,23 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
if ($langs->trans("Module".$this->numero."Desc") != ("Module".$this->numero."Desc"))
|
if ($langs->trans("Module".$this->numero."Desc") != ("Module".$this->numero."Desc"))
|
||||||
{
|
{
|
||||||
// Si traduction de la description du module existe
|
// If module description translation exists
|
||||||
return $langs->trans("Module".$this->numero."Desc");
|
return $langs->trans("Module".$this->numero."Desc");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Si traduction de la description du module n'existe pas, on prend definition en dur dans module
|
// If module description translation using it's unique id does not exists, we take its description
|
||||||
return $this->description;
|
return $this->description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return module version.
|
* Gives module version
|
||||||
* Pour les modules a l'etat 'experimental', retourne la traduction de 'experimental'
|
* For 'experimental' modules, gives 'experimental' translation
|
||||||
* Pour les modules 'dolibarr', retourne la version de Dolibarr
|
* For 'dolibarr' modules, gives Dolibarr version
|
||||||
* Pour les autres modules, retourne la version du module
|
|
||||||
*
|
*
|
||||||
* @return string Version du module
|
* @return string Module version
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
{
|
{
|
||||||
@ -281,9 +410,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a module is a core or external module
|
* Tells if module is core or external
|
||||||
*
|
*
|
||||||
* @return string 'core', 'external' or 'unknown'
|
* @return string 'core', 'external' or 'unknown'
|
||||||
*/
|
*/
|
||||||
function isCoreOrExternalModule()
|
function isCoreOrExternalModule()
|
||||||
{
|
{
|
||||||
@ -295,9 +424,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of lang files related to module
|
* Gives module related language files list
|
||||||
*
|
*
|
||||||
* @return array Array of lang files
|
* @return string[] Language files list
|
||||||
*/
|
*/
|
||||||
function getLangFilesArray()
|
function getLangFilesArray()
|
||||||
{
|
{
|
||||||
@ -305,10 +434,11 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return translated label of a export dataset
|
* Gives translated label of an export dataset
|
||||||
*
|
*
|
||||||
* @param int $r Index of dataset
|
* @param int $r Dataset index
|
||||||
* @return string Label of databaset
|
*
|
||||||
|
* @return string Translated databaset label
|
||||||
*/
|
*/
|
||||||
function getExportDatasetLabel($r)
|
function getExportDatasetLabel($r)
|
||||||
{
|
{
|
||||||
@ -329,10 +459,11 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return translated label of an import dataset
|
* Gives translated label of an import dataset
|
||||||
*
|
*
|
||||||
* @param int $r Index of dataset
|
* @param int $r Dataset index
|
||||||
* @return string Label of databaset
|
*
|
||||||
|
* @return string Translated dataset label
|
||||||
*/
|
*/
|
||||||
function getImportDatasetLabel($r)
|
function getImportDatasetLabel($r)
|
||||||
{
|
{
|
||||||
@ -354,9 +485,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert constant to activate module
|
* Insert constants for module activation
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function _active()
|
function _active()
|
||||||
{
|
{
|
||||||
@ -389,10 +520,10 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove activation line
|
* Module deactivation
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
**/
|
*/
|
||||||
function _unactive()
|
function _unactive()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
@ -414,24 +545,24 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create tables and keys required by module.
|
* Create tables and keys required by module.
|
||||||
* Files module.sql and module.key.sql with create table and create keys
|
* Files module.sql and module.key.sql with create table and create keys
|
||||||
* commands must be stored in directory reldir='/module/sql/'
|
* commands must be stored in directory reldir='/module/sql/'
|
||||||
* This function is called by this->init
|
* This function is called by this->init
|
||||||
*
|
*
|
||||||
* @param string $reldir Relative directory where to scan files
|
* @param string $reldir Relative directory where to scan files
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function _load_tables($reldir)
|
function _load_tables($reldir)
|
||||||
{
|
{
|
||||||
global $db,$conf;
|
global $conf;
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
$dirfound=0;
|
$dirfound=0;
|
||||||
|
|
||||||
if (empty($reldir)) return 1;
|
if (empty($reldir)) return 1;
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT .'/core/lib/admin.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||||
|
|
||||||
$ok = 1;
|
$ok = 1;
|
||||||
foreach($conf->file->dol_document_root as $dirroot)
|
foreach($conf->file->dol_document_root as $dirroot)
|
||||||
@ -508,14 +639,15 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert boxes into llx_boxes_def
|
* Adds boxes
|
||||||
*
|
*
|
||||||
* @param string $option String with options when disabling module ('newboxdefonly'=insert only boxes definition)
|
* @param string $option Options when disabling module ('newboxdefonly'=insert only boxes definition)
|
||||||
* @return int Nb of errors (0 if OK)
|
*
|
||||||
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_boxes($option='')
|
function insert_boxes($option='')
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
|
||||||
|
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -605,9 +737,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete boxes
|
* Removes boxes
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_boxes()
|
function delete_boxes()
|
||||||
{
|
{
|
||||||
@ -657,9 +789,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove links to new module page present in llx_const
|
* Removes tabs
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_tabs()
|
function delete_tabs()
|
||||||
{
|
{
|
||||||
@ -682,9 +814,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add links of new pages from modules in llx_const
|
* Adds tabs
|
||||||
*
|
*
|
||||||
* @return int Number of errors (0 if ok)
|
* @return int Error count (0 if ok)
|
||||||
*/
|
*/
|
||||||
function insert_tabs()
|
function insert_tabs()
|
||||||
{
|
{
|
||||||
@ -717,13 +849,7 @@ abstract class DolibarrModules
|
|||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
dol_syslog(get_class($this)."::insert_tabs", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
/* Allow duplicate key
|
|
||||||
if (! $resql)
|
|
||||||
{
|
|
||||||
$err++;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -732,9 +858,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert constants defined into $this->const array into table llx_const
|
* Adds constants
|
||||||
*
|
*
|
||||||
* @return int Number of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_const()
|
function insert_const()
|
||||||
{
|
{
|
||||||
@ -799,9 +925,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove constants with tags deleteonunactive
|
* Removes constants tagged 'deleteonunactive'
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, 0 if OK
|
* @return int <0 if KO, 0 if OK
|
||||||
*/
|
*/
|
||||||
function delete_const()
|
function delete_const()
|
||||||
{
|
{
|
||||||
@ -832,11 +958,12 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert permissions definitions related to the module into llx_rights_def
|
* Adds access rights
|
||||||
*
|
*
|
||||||
* @param int $reinitadminperms If 1, we also grant them to all admin users
|
* @param int $reinitadminperms If 1, we also grant them to all admin users
|
||||||
* @param int $force_entity Force current entity
|
* @param int $force_entity Force current entity
|
||||||
* @return int Number of error (0 if OK)
|
*
|
||||||
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_permissions($reinitadminperms=0, $force_entity=null)
|
function insert_permissions($reinitadminperms=0, $force_entity=null)
|
||||||
{
|
{
|
||||||
@ -928,7 +1055,7 @@ abstract class DolibarrModules
|
|||||||
if ($reinitadminperms)
|
if ($reinitadminperms)
|
||||||
{
|
{
|
||||||
if (! class_exists('User')) {
|
if (! class_exists('User')) {
|
||||||
require DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
|
||||||
}
|
}
|
||||||
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 1";
|
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."user WHERE admin = 1";
|
||||||
dol_syslog(get_class($this)."::insert_permissions Search all admin users", LOG_DEBUG);
|
dol_syslog(get_class($this)."::insert_permissions Search all admin users", LOG_DEBUG);
|
||||||
@ -972,9 +1099,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete permissions
|
* Removes access rights
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_permissions()
|
function delete_permissions()
|
||||||
{
|
{
|
||||||
@ -997,15 +1124,15 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert menus entries found into $this->menu into llx_menu*
|
* Adds menu entries
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_menus()
|
function insert_menus()
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/menubase.class.php';
|
||||||
|
|
||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
@ -1101,9 +1228,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove menus entries
|
* Removes menu entries
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_menus()
|
function delete_menus()
|
||||||
{
|
{
|
||||||
@ -1127,9 +1254,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create directories required by module
|
* Creates directories
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function create_dirs()
|
function create_dirs()
|
||||||
{
|
{
|
||||||
@ -1185,11 +1312,12 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert directories in llx_const
|
* Adds directories definitions
|
||||||
*
|
*
|
||||||
* @param string $name Name
|
* @param string $name Name
|
||||||
* @param string $dir Directory
|
* @param string $dir Directory
|
||||||
* @return int Nb of errors (0 if OK)
|
*
|
||||||
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_dirs($name,$dir)
|
function insert_dirs($name,$dir)
|
||||||
{
|
{
|
||||||
@ -1214,7 +1342,7 @@ abstract class DolibarrModules
|
|||||||
$sql.= " VALUES (".$this->db->encrypt($name,1).",'chaine',".$this->db->encrypt($dir,1).",'Directory for module ".$this->name."','0',".$conf->entity.")";
|
$sql.= " VALUES (".$this->db->encrypt($name,1).",'chaine',".$this->db->encrypt($dir,1).",'Directory for module ".$this->name."','0',".$conf->entity.")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::insert_dirs", LOG_DEBUG);
|
dol_syslog(get_class($this)."::insert_dirs", LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1228,9 +1356,9 @@ abstract class DolibarrModules
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove directory entries
|
* Removes directories
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_dirs()
|
function delete_dirs()
|
||||||
{
|
{
|
||||||
@ -1253,23 +1381,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert activation of generic parts from modules in llx_const
|
* Adds generic parts
|
||||||
* Input entry use $this->module_parts = array(
|
|
||||||
* 'triggers' => 0, // Set this to 1 if module has its own trigger directory (/mymodule/core/triggers)
|
|
||||||
* 'login' => 0, // Set this to 1 if module has its own login method directory (/mymodule/core/login)
|
|
||||||
* 'substitutions' => 0, // Set this to 1 if module has its own substitution function file (/mymodule/core/substitutions)
|
|
||||||
* 'menus' => 0, // Set this to 1 if module has its own menus handler directory (/mymodule/core/menus)
|
|
||||||
* 'theme' => 0, // Set this to 1 if module has its own theme directory (/mymodule/theme)
|
|
||||||
* 'tpl' => 0, // Set this to 1 if module overwrite template dir (/mymodule/core/tpl)
|
|
||||||
* 'barcode' => 0, // Set this to 1 if module has its own barcode directory (/mymodule/core/modules/barcode)
|
|
||||||
* 'models' => 0, // Set this to 1 if module has its own models directory (/mymodule/core/modules/xxx)
|
|
||||||
* 'css' => '/mymodule/css/mymodule.css.php', // Set this to relative path of css file if module has its own css file
|
|
||||||
* 'js' => '/mymodule/js/mymodule.js', // Set this to relative path of js file if module must load a js on all pages
|
|
||||||
* 'hooks' => array('hookcontext1','hookcontext2') // Set here all hooks context managed by module
|
|
||||||
* 'workflow' => array('WORKFLOW_MODULE1_YOURACTIONTYPE_MODULE2'=>array('enabled'=>'! empty($conf->module1->enabled) && ! empty($conf->module2->enabled)', 'picto'=>'yourpicto@mymodule') // Set here all workflow context managed by module
|
|
||||||
* )
|
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_module_parts()
|
function insert_module_parts()
|
||||||
{
|
{
|
||||||
@ -1338,9 +1452,9 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove activation of generic parts of modules from llx_const
|
* Removes generic parts
|
||||||
*
|
*
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Error count (0 if OK)
|
||||||
*/
|
*/
|
||||||
function delete_module_parts()
|
function delete_module_parts()
|
||||||
{
|
{
|
||||||
@ -1368,7 +1482,6 @@ abstract class DolibarrModules
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $err;
|
return $err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -352,7 +352,8 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
global $conf;
|
global $conf;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
//return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
|
//$showdetails=0;
|
||||||
|
//return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
$paramfreetext='BANK_CHEQUERECEIPT_FREE_TEXT';
|
$paramfreetext='BANK_CHEQUERECEIPT_FREE_TEXT';
|
||||||
$marge_basse=$this->marge_basse;
|
$marge_basse=$this->marge_basse;
|
||||||
$marge_gauche=$this->marge_gauche;
|
$marge_gauche=$this->marge_gauche;
|
||||||
|
|||||||
@ -1271,7 +1271,8 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1228,7 +1228,8 @@ class pdf_proforma extends ModelePDFCommandes
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -610,7 +610,8 @@ class pdf_strato extends ModelePDFContract
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'CONTRACT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'CONTRACT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -657,7 +657,8 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1455,7 +1455,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -595,7 +595,8 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -358,7 +358,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
//$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
//$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails);
|
||||||
$pdf->SetXY($this->posxqty, $curY);
|
$pdf->SetXY($this->posxqty, $curY);
|
||||||
$pdf->MultiCell($this->posxremainingqty - $this->posxqty, 3, $object->lines[$i]->qty_shipped, 0, 'R');
|
$pdf->MultiCell($this->posxremainingqty - $this->posxqty, 3, $object->lines[$i]->qty_shipped, 0, 'R');
|
||||||
|
|
||||||
// Remaining to ship
|
// Remaining to ship
|
||||||
$pdf->SetXY($this->posxremainingqty, $curY);
|
$pdf->SetXY($this->posxremainingqty, $curY);
|
||||||
$qtyRemaining = $object->lines[$i]->qty_asked - $object->commande->expeditions[$object->lines[$i]->fk_origin_line];
|
$qtyRemaining = $object->lines[$i]->qty_asked - $object->commande->expeditions[$object->lines[$i]->fk_origin_line];
|
||||||
@ -613,7 +613,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||||
$pdf->MultiCell($this->posxcomm - $this->posxdesc,2, $outputlangs->transnoentities("Designation"),'','L');
|
$pdf->MultiCell($this->posxcomm - $this->posxdesc,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modif SEB pour avoir une col en plus pour les commentaires clients
|
// Modif SEB pour avoir une col en plus pour les commentaires clients
|
||||||
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
|
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
|
||||||
if (empty($hidetop)) {
|
if (empty($hidetop)) {
|
||||||
@ -863,7 +863,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -219,6 +219,7 @@ class modProduct extends DolibarrModules
|
|||||||
'pr.price_min'=>"MinPriceHT",'pr.price_min_ttc'=>"MinPriceTTC",
|
'pr.price_min'=>"MinPriceHT",'pr.price_min_ttc'=>"MinPriceTTC",
|
||||||
'pr.tva_tx'=>'VATRate',
|
'pr.tva_tx'=>'VATRate',
|
||||||
'pr.date_price'=>'DateCreation');
|
'pr.date_price'=>'DateCreation');
|
||||||
|
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.length'=>"Number",'p.surface'=>"Number",'p.volume'=>"Number",'p.weight'=>"Number",'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date');
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
||||||
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
||||||
'pr.price_ttc'=>"product",
|
'pr.price_ttc'=>"product",
|
||||||
|
|||||||
@ -137,13 +137,13 @@ class modService extends DolibarrModules
|
|||||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
$this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
$this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
$this->export_permission[$r]=array(array("service","export"));
|
$this->export_permission[$r]=array(array("service","export"));
|
||||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
|
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
|
||||||
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
|
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
|
||||||
$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
|
$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.duration'=>"Duree",'p.datec'=>'Date','p.tms'=>'Date');
|
||||||
if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Number'));
|
if (! empty($conf->stock->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.stock'=>'Number'));
|
||||||
if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text'));
|
if (! empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r]=array_merge($this->export_TypeFields_array[$r],array('p.barcode'=>'Text'));
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.tobuy'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
||||||
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'service'));
|
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'service'));
|
||||||
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'service'));
|
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'service'));
|
||||||
// Add extra fields
|
// Add extra fields
|
||||||
@ -182,6 +182,7 @@ class modService extends DolibarrModules
|
|||||||
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
'pr.price_min'=>"MinPriceLevelUnitPriceHT",'pr.price_min_ttc'=>"MinPriceLevelUnitPriceTTC",
|
||||||
'pr.tva_tx'=>'PriceLevelVATRate',
|
'pr.tva_tx'=>'PriceLevelVATRate',
|
||||||
'pr.date_price'=>'DateCreation');
|
'pr.date_price'=>'DateCreation');
|
||||||
|
//$this->export_TypeFields_array[$r]=array('p.ref'=>"Text",'p.label'=>"Text",'p.description'=>"Text",'p.url'=>"Text",'p.accountancy_code_sell'=>"Text",'p.accountancy_code_buy'=>"Text",'p.note'=>"Text",'p.length'=>"Number",'p.surface'=>"Number",'p.volume'=>"Number",'p.weight'=>"Number",'p.customcode'=>'Text','p.price_base_type'=>"Text",'p.price'=>"Number",'p.price_ttc'=>"Number",'p.tva_tx'=>'Number','p.tosell'=>"Boolean",'p.tobuy'=>"Boolean",'p.datec'=>'Date','p.tms'=>'Date');
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",
|
||||||
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
'pr.price_base_type'=>"product",'pr.price_level'=>"product",'pr.price'=>"product",
|
||||||
'pr.price_ttc'=>"product",
|
'pr.price_ttc'=>"product",
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->const[$r][4] = 1;
|
$this->const[$r][4] = 1;
|
||||||
$r++;
|
$r++;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->const[$r][0] = "SOCIETE_ADD_REF_IN_LIST";
|
$this->const[$r][0] = "SOCIETE_ADD_REF_IN_LIST";
|
||||||
$this->const[$r][1] = "yesno";
|
$this->const[$r][1] = "yesno";
|
||||||
$this->const[$r][2] = "0";
|
$this->const[$r][2] = "0";
|
||||||
@ -320,7 +320,7 @@ class modSociete extends DolibarrModules
|
|||||||
$this->export_label[$r]='ExportDataset_company_2';
|
$this->export_label[$r]='ExportDataset_company_2';
|
||||||
$this->export_icon[$r]='contact';
|
$this->export_icon[$r]='contact';
|
||||||
$this->export_permission[$r]=array(array("societe","contact","export"));
|
$this->export_permission[$r]=array(array("societe","contact","export"));
|
||||||
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','p.libelle'=>"Country",'p.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer 0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'Supplier 0 or 1');
|
$this->export_fields_array[$r]=array('c.rowid'=>"IdContact",'c.civility'=>"CivilityCode",'c.lastname'=>'Lastname','c.firstname'=>'Firstname','c.poste'=>'PostOrFunction','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.zip'=>"Zip",'c.town'=>"Town",'d.nom'=>'State','co.label'=>"Country",'co.code'=>"CountryCode",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.phone_mobile'=>"Mobile",'c.email'=>"EMail",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.status'=>"Status",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode", 's.client'=>'Customer 0 (no customer no prospect)/1 (customer)/2 (prospect)/3 (customer and prospect)','s.fournisseur'=>'Supplier 0 or 1');
|
||||||
$this->export_TypeFields_array[$r]=array('c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.cp'=>"Text",'c.ville'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Text",'s.fournisseur'=>"Text");
|
$this->export_TypeFields_array[$r]=array('c.civility'=>"List:c_civility:label:code",'c.lastname'=>'Text','c.firstname'=>'Text','c.poste'=>'Text','c.datec'=>"Date",'c.priv'=>"Boolean",'c.address'=>"Text",'c.cp'=>"Text",'c.ville'=>"Text",'d.nom'=>'Text','co.label'=>"List:c_country:label:rowid",'co.code'=>"Text",'c.phone'=>"Text",'c.fax'=>"Text",'c.email'=>"Text",'s.rowid'=>"List:societe:nom",'s.nom'=>"Text",'s.status'=>"Status",'s.client'=>"Text",'s.fournisseur'=>"Text");
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company", 's.fournisseur'=>"company"); // We define here only fields that use another picto
|
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company", 's.client'=>"company", 's.fournisseur'=>"company"); // We define here only fields that use another picto
|
||||||
if (empty($conf->fournisseur->enabled))
|
if (empty($conf->fournisseur->enabled))
|
||||||
|
|||||||
@ -295,7 +295,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
|
|
||||||
$pdf->Output($file,'F');
|
$pdf->Output($file,'F');
|
||||||
|
|
||||||
// Add pdfgeneration hook
|
// Add pdfgeneration hook
|
||||||
if (! is_object($hookmanager))
|
if (! is_object($hookmanager))
|
||||||
{
|
{
|
||||||
@ -306,7 +306,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
global $action;
|
global $action;
|
||||||
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
@ -454,7 +454,8 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1362,7 +1362,8 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1052,7 +1052,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0)
|
function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -701,7 +701,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
foreach( $this->localtax1 as $localtax_type => $localtax_rate )
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
@ -733,7 +733,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
foreach( $this->localtax2 as $localtax_type => $localtax_rate )
|
||||||
{
|
{
|
||||||
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
if (in_array((string) $localtax_type, array('2','4','6'))) continue;
|
||||||
|
|
||||||
foreach( $localtax_rate as $tvakey => $tvaval )
|
foreach( $localtax_rate as $tvakey => $tvaval )
|
||||||
{
|
{
|
||||||
if ($tvakey != 0) // On affiche pas taux 0
|
if ($tvakey != 0) // On affiche pas taux 0
|
||||||
@ -1105,7 +1105,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
*/
|
*/
|
||||||
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
|
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
|
||||||
{
|
{
|
||||||
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
|
$showdetails=0;
|
||||||
|
return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_ORDER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes')
|
|||||||
setEventMessage($langs->trans("ErrorFailedToDeleteLink", $link->label), 'errors');
|
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.(!empty($withproject)?'&withproject=1':''));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -839,7 +839,8 @@ if ($step == 4 && $datatoexport)
|
|||||||
if (isset($objexport->array_export_fields[0][$code]))
|
if (isset($objexport->array_export_fields[0][$code]))
|
||||||
{
|
{
|
||||||
$list.=($list?', ':'');
|
$list.=($list?', ':'');
|
||||||
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
|
if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/',$array_filtervalue[$code])) $list.=$langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'');
|
||||||
|
else $list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1070,7 +1071,8 @@ if ($step == 5 && $datatoexport)
|
|||||||
if (isset($objexport->array_export_fields[0][$code]))
|
if (isset($objexport->array_export_fields[0][$code]))
|
||||||
{
|
{
|
||||||
$list.=($list?', ':'');
|
$list.=($list?', ':'');
|
||||||
$list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
|
if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/',$array_filtervalue[$code])) $list.=$langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'');
|
||||||
|
else $list.=$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code])?$array_filtervalue[$code]:'')."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
159
htdocs/fichinter/admin/fichinterdet_extrafields.php
Normal file
159
htdocs/fichinter/admin/fichinterdet_extrafields.php
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||||
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
|
* 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
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file htdocs/fichinter/admin/fichinter_extrafields.php
|
||||||
|
* \ingroup fichinter
|
||||||
|
* \brief Page to setup extra fields of ficheinter
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
require '../../main.inc.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||||
|
|
||||||
|
$langs->load("companies");
|
||||||
|
$langs->load("admin");
|
||||||
|
$langs->load("members");
|
||||||
|
$langs->load('interventions');
|
||||||
|
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
|
// List of supported format
|
||||||
|
$tmptype2label=ExtraFields::$type2label;
|
||||||
|
$type2label=array('');
|
||||||
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||||
|
|
||||||
|
$action=GETPOST('action', 'alpha');
|
||||||
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
|
$elementtype='fichinterdet'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
if (!$user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
|
require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
llxHeader();
|
||||||
|
|
||||||
|
$textobject=$langs->transnoentitiesnoconv("Interventions");
|
||||||
|
|
||||||
|
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||||
|
print_fiche_titre($langs->trans("InterventionsSetup"),$linkback,'setup');
|
||||||
|
|
||||||
|
|
||||||
|
$head=fichinter_admin_prepare_head();
|
||||||
|
|
||||||
|
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), 0, 'intervention');
|
||||||
|
|
||||||
|
|
||||||
|
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||||
|
print '<br>';
|
||||||
|
|
||||||
|
// Load attribute_label
|
||||||
|
$extrafields->fetch_name_optionals_label($elementtype);
|
||||||
|
|
||||||
|
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td align="center">'.$langs->trans("Position").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Label").'</td>';
|
||||||
|
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
|
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||||
|
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||||
|
print '<td width="80"> </td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
|
||||||
|
$var=True;
|
||||||
|
foreach($extrafields->attribute_type as $key => $value)
|
||||||
|
{
|
||||||
|
$var=!$var;
|
||||||
|
print "<tr ".$bc[$var].">";
|
||||||
|
print "<td>".$extrafields->attribute_pos[$key]."</td>\n";
|
||||||
|
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||||
|
print "<td>".$key."</td>\n";
|
||||||
|
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||||
|
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||||
|
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||||
|
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||||
|
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||||
|
print "</tr>";
|
||||||
|
// $i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
|
// Buttons
|
||||||
|
if ($action != 'create' && $action != 'edit')
|
||||||
|
{
|
||||||
|
print '<div class="tabsAction">';
|
||||||
|
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute")."</a>";
|
||||||
|
print "</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* Creation d'un champ optionnel
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
if ($action == 'create')
|
||||||
|
{
|
||||||
|
print "<br>";
|
||||||
|
print_titre($langs->trans('NewAttribute'));
|
||||||
|
|
||||||
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************** */
|
||||||
|
/* */
|
||||||
|
/* Edition d'un champ optionnel */
|
||||||
|
/* */
|
||||||
|
/* ************************************************************************** */
|
||||||
|
if ($action == 'edit' && ! empty($attrname))
|
||||||
|
{
|
||||||
|
print "<br>";
|
||||||
|
print_titre($langs->trans("FieldEdition", $attrname));
|
||||||
|
|
||||||
|
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
@ -167,6 +167,17 @@ class Fichinter extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (! $resql) $error++;
|
if (! $resql) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
|
{
|
||||||
|
|
||||||
|
$result=$this->insertExtraFields();
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Add linked object
|
// Add linked object
|
||||||
if (! $error && $this->origin && $this->origin_id)
|
if (! $error && $this->origin && $this->origin_id)
|
||||||
{
|
{
|
||||||
@ -224,7 +235,7 @@ class Fichinter extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter SET ";
|
||||||
$sql.= ", description = '".$this->db->escape($this->description)."'";
|
$sql.= "description = '".$this->db->escape($this->description)."'";
|
||||||
$sql.= ", duree = ".$this->duree;
|
$sql.= ", duree = ".$this->duree;
|
||||||
$sql.= ", fk_projet = ".$this->fk_project;
|
$sql.= ", fk_projet = ".$this->fk_project;
|
||||||
$sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
$sql.= ", note_private = ".($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
|
||||||
@ -853,11 +864,12 @@ class Fichinter extends CommonObject
|
|||||||
* @param string $desc Line description
|
* @param string $desc Line description
|
||||||
* @param date $date_intervention Intervention date
|
* @param date $date_intervention Intervention date
|
||||||
* @param int $duration Intervention duration
|
* @param int $duration Intervention duration
|
||||||
|
* @param array $array_option Array option
|
||||||
* @return int >0 if ok, <0 if ko
|
* @return int >0 if ok, <0 if ko
|
||||||
*/
|
*/
|
||||||
function addline($user,$fichinterid, $desc, $date_intervention, $duration)
|
function addline($user,$fichinterid, $desc, $date_intervention, $duration, $array_option='')
|
||||||
{
|
{
|
||||||
dol_syslog("Fichinter::Addline $fichinterid, $desc, $date_intervention, $duration");
|
dol_syslog(get_class($this)."::addline $fichinterid, $desc, $date_intervention, $duration");
|
||||||
|
|
||||||
if ($this->statut == 0)
|
if ($this->statut == 0)
|
||||||
{
|
{
|
||||||
@ -871,8 +883,13 @@ class Fichinter extends CommonObject
|
|||||||
$line->datei = $date_intervention;
|
$line->datei = $date_intervention;
|
||||||
$line->duration = $duration;
|
$line->duration = $duration;
|
||||||
|
|
||||||
|
if (is_array($array_option) && count($array_option)>0) {
|
||||||
|
$line->array_options=$array_option;
|
||||||
|
}
|
||||||
|
|
||||||
$result=$line->insert($user);
|
$result=$line->insert($user);
|
||||||
if ($result > 0)
|
|
||||||
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
@ -987,6 +1004,9 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
var $duration; // Duree de l'intervention
|
var $duration; // Duree de l'intervention
|
||||||
var $rang = 0;
|
var $rang = 0;
|
||||||
|
|
||||||
|
public $element='fichinterdet';
|
||||||
|
public $table_element='fichinterdet';
|
||||||
|
public $fk_element='fk_fichinter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -1017,6 +1037,7 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
{
|
{
|
||||||
$objp = $this->db->fetch_object($result);
|
$objp = $this->db->fetch_object($result);
|
||||||
$this->rowid = $objp->rowid;
|
$this->rowid = $objp->rowid;
|
||||||
|
$this->id = $objp->rowid;
|
||||||
$this->fk_fichinter = $objp->fk_fichinter;
|
$this->fk_fichinter = $objp->fk_fichinter;
|
||||||
$this->datei = $this->db->jdate($objp->datei);
|
$this->datei = $this->db->jdate($objp->datei);
|
||||||
$this->desc = $objp->description;
|
$this->desc = $objp->description;
|
||||||
@ -1082,7 +1103,21 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
$this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'fichinterdet');
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
|
{
|
||||||
|
$this->id=$this->rowid;
|
||||||
|
$result=$this->insertExtraFields();
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$result=$this->update_total();
|
$result=$this->update_total();
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->rang=$rangToUse;
|
$this->rang=$rangToUse;
|
||||||
@ -1140,6 +1175,17 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||||
|
{
|
||||||
|
$this->id=$this->rowid;
|
||||||
|
$result=$this->insertExtraFields();
|
||||||
|
if ($result < 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$result=$this->update_total();
|
$result=$this->update_total();
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -196,6 +196,13 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
$object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']);
|
$object->linked_objects = array_merge($object->linked_objects, $_POST['other_linked_objects']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Extrafields
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||||
|
|
||||||
|
$object->array_options = $array_option;
|
||||||
|
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
@ -266,12 +273,20 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
$duration = 0;
|
$duration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$predef = '';
|
||||||
|
// Extrafields
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline, $predef);
|
||||||
|
|
||||||
|
|
||||||
$result = $object->addline(
|
$result = $object->addline(
|
||||||
$user,
|
$user,
|
||||||
$id,
|
$id,
|
||||||
$desc,
|
$desc,
|
||||||
$date_intervention,
|
$date_intervention,
|
||||||
$duration
|
$duration,
|
||||||
|
$array_option
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -298,6 +313,13 @@ else if ($action == 'add' && $user->rights->ficheinter->creer)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Extrafields
|
||||||
|
$extrafields = new ExtraFields($db);
|
||||||
|
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
$array_option = $extrafields->getOptionalsFromPost($extralabels);
|
||||||
|
|
||||||
|
$object->array_options = $array_option;
|
||||||
|
|
||||||
$result = $object->create($user);
|
$result = $object->create($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
@ -433,12 +455,19 @@ else if ($action == "addline" && $user->rights->ficheinter->creer)
|
|||||||
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
|
$date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int'));
|
||||||
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
|
$duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int'));
|
||||||
|
|
||||||
|
|
||||||
|
// Extrafields
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||||
|
|
||||||
$result=$object->addline(
|
$result=$object->addline(
|
||||||
$user,
|
$user,
|
||||||
$id,
|
$id,
|
||||||
$desc,
|
$desc,
|
||||||
$date_intervention,
|
$date_intervention,
|
||||||
$duration
|
$duration,
|
||||||
|
$array_option
|
||||||
);
|
);
|
||||||
|
|
||||||
// Define output language
|
// Define output language
|
||||||
@ -524,6 +553,13 @@ else if ($action == 'updateline' && $user->rights->ficheinter->creer && GETPOST(
|
|||||||
$objectline->datei = $date_inter;
|
$objectline->datei = $date_inter;
|
||||||
$objectline->desc = $desc;
|
$objectline->desc = $desc;
|
||||||
$objectline->duration = $duration;
|
$objectline->duration = $duration;
|
||||||
|
|
||||||
|
// Extrafields
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
$array_option = $extrafieldsline->getOptionalsFromPost($extralabelsline);
|
||||||
|
$objectline->array_options = $array_option;
|
||||||
|
|
||||||
$result = $objectline->update($user);
|
$result = $objectline->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -1433,6 +1469,18 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
$line = new FichinterLigne($db);
|
||||||
|
$line->fetch($objp->rowid);
|
||||||
|
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element);
|
||||||
|
|
||||||
|
$line->fetch_optionals($line->rowid, $extralabelslines);
|
||||||
|
|
||||||
|
print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>5));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Line in update mode
|
// Line in update mode
|
||||||
@ -1461,6 +1509,17 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
print '<td align="center" colspan="5" valign="center"><input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">';
|
||||||
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
|
print '<br><input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||||
print '</tr>' . "\n";
|
print '</tr>' . "\n";
|
||||||
|
|
||||||
|
$line = new FichinterLigne($db);
|
||||||
|
$line->fetch($objp->rowid);
|
||||||
|
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element);
|
||||||
|
$line->fetch_optionals($line->rowid, $extralabelslines);
|
||||||
|
|
||||||
|
print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
@ -1511,7 +1570,16 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
|
print '<td align="center" valign="middle" colspan="4"><input type="submit" class="button" value="'.$langs->trans('Add').'" name="addline"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
//Line extrafield
|
||||||
|
|
||||||
|
$lineadd = new FichinterLigne($db);
|
||||||
|
|
||||||
|
$extrafieldsline = new ExtraFields($db);
|
||||||
|
$extralabelslines=$extrafieldsline->fetch_name_optionals_label($lineadd->table_element);
|
||||||
|
|
||||||
|
print $lineadd->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5));
|
||||||
|
|
||||||
if (! $num) print '</table>';
|
if (! $num) print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ ALTER TABLE llx_societe ADD COLUMN localtax2_value double(6,3) after localtax2_a
|
|||||||
-- Change on table c_pays
|
-- Change on table c_pays
|
||||||
ALTER TABLE llx_c_pays RENAME TO llx_c_country;
|
ALTER TABLE llx_c_pays RENAME TO llx_c_country;
|
||||||
|
|
||||||
ALTER TABLE llx_c_country CHANGE libelle label VARCHAR(50);
|
ALTER TABLE llx_c_country CHANGE COLUMN libelle label VARCHAR(50);
|
||||||
|
|
||||||
ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country (rowid);
|
ALTER TABLE llx_c_ziptown ADD CONSTRAINT fk_c_ziptown_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country (rowid);
|
||||||
ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country (rowid);
|
ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_country (rowid);
|
||||||
@ -101,6 +101,7 @@ ALTER TABLE llx_product MODIFY COLUMN fk_barcode_type INTEGER NULL DEFAULT NULL;
|
|||||||
-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_barcode_type SET DEFAULT NULL;
|
-- VPGSQL8.2 ALTER TABLE llx_product ALTER COLUMN fk_barcode_type SET DEFAULT NULL;
|
||||||
UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0;
|
UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type = 0;
|
||||||
ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type);
|
ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type);
|
||||||
|
UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELECT rowid from llx_c_barcode_type);
|
||||||
ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid);
|
ALTER TABLE llx_product ADD CONSTRAINT fk_product_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid);
|
||||||
|
|
||||||
|
|
||||||
@ -972,19 +973,18 @@ CREATE TABLE llx_holiday_types (
|
|||||||
deleteAt DATETIME,
|
deleteAt DATETIME,
|
||||||
nbCongesDeducted varchar(255) NOT NULL,
|
nbCongesDeducted varchar(255) NOT NULL,
|
||||||
nbCongesEveryMonth varchar(255) NOT NULL
|
nbCongesEveryMonth varchar(255) NOT NULL
|
||||||
);
|
|
||||||
|
|
||||||
-- Change on table c_civilite
|
|
||||||
DROP INDEX uk_c_civilite ON llx_c_civilite;
|
|
||||||
ALTER TABLE llx_c_civilite RENAME TO llx_c_civility;
|
|
||||||
ALTER TABLE llx_c_civility CHANGE civilite label VARCHAR(50);
|
|
||||||
ALTER TABLE llx_c_civility ADD UNIQUE INDEX uk_c_civility(code);
|
|
||||||
ALTER TABLE llx_adherent CHANGE civilite civility VARCHAR(6);
|
|
||||||
ALTER TABLE llx_socpeople CHANGE civilite civility VARCHAR(6);
|
|
||||||
ALTER TABLE llx_user CHANGE civilite civility VARCHAR(6);
|
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|
||||||
ALTER TABLE llx_c_type_fees CHANGE libelle label VARCHAR(30);
|
-- Change on table c_civilite
|
||||||
|
ALTER TABLE llx_c_civilite DROP INDEX uk_c_civilite;
|
||||||
|
ALTER TABLE llx_c_civilite RENAME TO llx_c_civility;
|
||||||
|
ALTER TABLE llx_c_civility CHANGE COLUMN civilite label VARCHAR(50);
|
||||||
|
ALTER TABLE llx_c_civility ADD UNIQUE INDEX uk_c_civility(code);
|
||||||
|
ALTER TABLE llx_adherent CHANGE COLUMN civilite civility VARCHAR(6);
|
||||||
|
ALTER TABLE llx_socpeople CHANGE COLUMN civilite civility VARCHAR(6);
|
||||||
|
ALTER TABLE llx_user CHANGE COLUMN civilite civility VARCHAR(6);
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_type_fees CHANGE COLUMN libelle label VARCHAR(30);
|
||||||
ALTER TABLE llx_c_type_fees ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER label;
|
ALTER TABLE llx_c_type_fees ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER label;
|
||||||
|
|
||||||
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element);
|
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element);
|
||||||
@ -992,3 +992,17 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_element (fk_element);
|
|||||||
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_task (fk_task);
|
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_task (fk_task);
|
||||||
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_date (task_date);
|
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_date (task_date);
|
||||||
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_datehour);
|
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_datehour);
|
||||||
|
|
||||||
|
|
||||||
|
-- add extrafield on ficheinter lines
|
||||||
|
CREATE TABLE llx_fichinterdet_extrafields
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
fk_object integer NOT NULL,
|
||||||
|
import_key varchar(14) -- import key
|
||||||
|
) ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- Copyright (C) 2013 Florian Henry <florian.henry@open-cocncept.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
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields (fk_object);
|
||||||
25
htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql
Normal file
25
htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
-- ===================================================================
|
||||||
|
-- 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
|
||||||
|
-- the Free Software Foundation; either version 3 of the License, or
|
||||||
|
-- (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This program is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
-- GNU General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
--
|
||||||
|
-- ===================================================================
|
||||||
|
|
||||||
|
CREATE TABLE llx_fichinterdet_extrafields
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
fk_object integer NOT NULL,
|
||||||
|
import_key varchar(14) -- import key
|
||||||
|
) ENGINE=innodb;
|
||||||
@ -83,6 +83,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_extrafields FOR EACH
|
|||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture_fourn FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_facture_fourn FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_fichinter FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_fichinter FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_fichinterdet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_livraison FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_livraison FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_localtax FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_localtax FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_menu FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_menu FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
|
||||||
|
|||||||
@ -1082,6 +1082,7 @@ NotificationsDesc=EMails notifications feature allows you to silently send autom
|
|||||||
ModelModules=Documents templates
|
ModelModules=Documents templates
|
||||||
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...)
|
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT or .ODS files for OpenOffice, KOffice, TextEdit,...)
|
||||||
WatermarkOnDraft=Watermark on draft document
|
WatermarkOnDraft=Watermark on draft document
|
||||||
|
JSOnPaimentBill=Activate feature to autofill payment lines on payment form
|
||||||
CompanyIdProfChecker=Rules on Professional Ids
|
CompanyIdProfChecker=Rules on Professional Ids
|
||||||
MustBeUnique=Must be unique ?
|
MustBeUnique=Must be unique ?
|
||||||
MustBeMandatory=Mandatory to create third parties ?
|
MustBeMandatory=Mandatory to create third parties ?
|
||||||
|
|||||||
@ -125,7 +125,7 @@ BankAccountNumber=Account number
|
|||||||
BankAccountNumberKey=Key
|
BankAccountNumberKey=Key
|
||||||
SpecialCode=Special code
|
SpecialCode=Special code
|
||||||
ExportStringFilter=%% allows replacing one or more characters in the text
|
ExportStringFilter=%% allows replacing one or more characters in the text
|
||||||
ExportDateFilter='YYYY' 'YYYYMM' 'YYYYMMDD': filters by one year/month/day<br>'YYYY+YYYY' 'YYYYMM+YYYYMM' 'YYYYMMDD+YYYYMMDD': filters over a range of years/months/days<br>'>YYYY' '>YYYYMM' '>YYYYMMDD': filters on the following years/months/days<br>'<YYYY' '<YYYYMM' '<YYYYMMDD': filters on the previous years/months/days
|
ExportDateFilter=YYYY, YYYYMM, YYYYMMDD : filters by one year/month/day<br>YYYY+YYYY, YYYYMM+YYYYMM, YYYYMMDD+YYYYMMDD : filters over a range of years/months/days<br> > YYYY, > YYYYMM, > YYYYMMDD : filters on all following years/months/days<br> < YYYY, < YYYYMM, < YYYYMMDD : filters on all previous years/months/days
|
||||||
ExportNumericFilter='NNNNN' filters by one value<br>'NNNNN+NNNNN' filters over a range of values<br>'>NNNNN' filters by lower values<br>'>NNNNN' filters by higher values
|
ExportNumericFilter='NNNNN' filters by one value<br>'NNNNN+NNNNN' filters over a range of values<br>'>NNNNN' filters by lower values<br>'>NNNNN' filters by higher values
|
||||||
## filters
|
## filters
|
||||||
SelectFilterFields=If you want to filter on some values, just input values here.
|
SelectFilterFields=If you want to filter on some values, just input values here.
|
||||||
|
|||||||
@ -53,6 +53,7 @@ class Project extends CommonObject
|
|||||||
var $statuts;
|
var $statuts;
|
||||||
var $oldcopy;
|
var $oldcopy;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -252,7 +253,7 @@ class Project extends CommonObject
|
|||||||
$result = 1;
|
$result = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
$result = -1;
|
$result = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user