Merge branch '3.6' of github.com:Dolibarr/dolibarr into 3.6
This commit is contained in:
commit
386f4bd82e
@ -21,7 +21,7 @@ NuSoap 0.9.5 LGPL 2.1+ Yes
|
|||||||
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
odtPHP 1.0.1 GPL-2+ b Yes Library to build/edit ODT files
|
||||||
PHPExcel 1.7.6 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
PHPExcel 1.7.6 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||||
TCPDF 6.0.021 LGPL-3+ Yes PDF generation
|
TCPDF 6.0.093 LGPL-3+ Yes PDF generation
|
||||||
|
|
||||||
JS libraries:
|
JS libraries:
|
||||||
jQuery 1.8.2 MIT License Yes JS library
|
jQuery 1.8.2 MIT License Yes JS library
|
||||||
|
|||||||
56
ChangeLog
56
ChangeLog
@ -2,6 +2,32 @@
|
|||||||
English Dolibarr ChangeLog
|
English Dolibarr ChangeLog
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
***** 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.
|
||||||
|
- Fix: Unsubscribe emailing not working.
|
||||||
|
- Fix: Trigger on create category call failed because user is not passed on card.
|
||||||
|
- Fix: list event view lost type event filter.
|
||||||
|
- Fix: Save also code event.
|
||||||
|
- Fix: VAT payment - Add control on field date value.
|
||||||
|
- Fix: Salaries payment - Field date value is now required and add control on it.
|
||||||
|
- Fix: Iban was used instead of Bic into SEPA file.
|
||||||
|
- Fix: Must unaccent strings into SEPA file.
|
||||||
|
- Fix: Extrafield feature select from table should try to translate multiple column when not needed
|
||||||
|
- Fix: cents for indian ruppes are calle paisa and paise.
|
||||||
|
- Fix: Invoices payments may be older than invoices.
|
||||||
|
- Fix: Withdrawal total amount is double
|
||||||
|
- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line
|
||||||
|
- Fix: Web service categorie WDSL declaration is correct
|
||||||
|
- Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined
|
||||||
|
- Fix: Category creation failed and no message output
|
||||||
|
- Fix: Lanf for Payment Type
|
||||||
|
- Fix: PHPCheckstyle 1.5.5
|
||||||
|
|
||||||
***** ChangeLog for 3.6 compared to 3.5.* *****
|
***** ChangeLog for 3.6 compared to 3.5.* *****
|
||||||
For users:
|
For users:
|
||||||
- New: Update ckeditor to version 4.
|
- New: Update ckeditor to version 4.
|
||||||
@ -111,9 +137,34 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f
|
|||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
***** ChangeLog for 3.5.5 compared to 3.5.4 *****
|
||||||
|
Fix: Holiday module was broken. Initializaion of amount of holidays failed.
|
||||||
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||||
Fix: Fusion PDF button on unpaid invoice is no more displayed
|
Fix: Fusion PDF button on unpaid invoice is no more displayed.
|
||||||
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click)
|
Fix: Unpaid invoice launch fusion PDF action even if it is only search (with enter keyboard input instead of lens click).
|
||||||
|
Fix: Pb when showing log list of holiday module with some mysql versions.
|
||||||
|
Fix: Error with bad timezone pushed by some browsers.
|
||||||
|
Fix: shipping list SQL request was not filtering on shipping element
|
||||||
|
Fix: debian package provided by dolibarr team must use embedded libraries.
|
||||||
|
Fix: [ bug #1528 ] Leopard Services numeration module description is not translated.
|
||||||
|
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas.
|
||||||
|
Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances.
|
||||||
|
Fix: Update impayees.php
|
||||||
|
Fix: Link product, In list view and label product.
|
||||||
|
Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
|
||||||
|
Fix: When disabled, all fields to add time into task line must be disabled.
|
||||||
|
Fix: Missing include files.lib.php in some pages that use dol_delete_recursive
|
||||||
|
Fix: [ bug #1558 ] Product/service edit page title shows new Ref instead of old ref.
|
||||||
|
Fix: [ bug #1553 ] Saving User displays setup removes menu.
|
||||||
|
Fix: [ bug #1544 ] Can remove date from invoice.
|
||||||
|
Fix: list event view lost type event filter.
|
||||||
|
Fix: Add code save on create event.
|
||||||
|
Fix: SQL injection.
|
||||||
|
Fix: [ bug #1589 ] Menu type in "Edit menu" page is not translated
|
||||||
|
Fix: [ bug #1591 ] Linked object block shows Total HT/TTC even if not having permission to read them
|
||||||
|
Fix: [ bug #1577 ] When creating new Private individual third, selected third type is ignored
|
||||||
|
Fix: [ bug #1555 ] Update accountancy code of products does not throw PRODUCT_MODIFY trigger
|
||||||
|
Fix: [ bug #1548 ] Supplier payment card shows type in French
|
||||||
|
Fix: [ bug #1546 ] Incorrect page number when searching in the list of bank transactions
|
||||||
|
|
||||||
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
|
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
|
||||||
Fix: Hide title of event when agenda module disabled.
|
Fix: Hide title of event when agenda module disabled.
|
||||||
@ -423,6 +474,7 @@ Fix: Add a limit into list to avoid browser to hang when database is too large.
|
|||||||
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
|
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
|
||||||
Fix: Agenda and Banks module were not working with multicompany module
|
Fix: Agenda and Banks module were not working with multicompany module
|
||||||
Fix: [ bug #1317 ] Removing a category does not remove all child categories
|
Fix: [ bug #1317 ] Removing a category does not remove all child categories
|
||||||
|
Fix: [ bug #1380 ] Customer invoices are not grouped in company results report.
|
||||||
|
|
||||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
||||||
Fix: field's problem into company's page (RIB).
|
Fix: field's problem into company's page (RIB).
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
|
dolibarr (3.6.1-3) unstable; urgency=low
|
||||||
|
|
||||||
|
[ Laurent Destailleur (eldy) ]
|
||||||
|
* New upstream release.
|
||||||
|
|
||||||
|
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Tue, 23 Sep 2014 12:00:00 +0100
|
||||||
|
|
||||||
dolibarr (3.6.0-3) unstable; urgency=low
|
dolibarr (3.6.0-3) unstable; urgency=low
|
||||||
|
|
||||||
[ Laurent Destailleur (eldy) ]
|
[ Laurent Destailleur (eldy) ]
|
||||||
|
|||||||
@ -68,4 +68,4 @@ Description: Web based software to manage a company or foundation
|
|||||||
PDF exports,
|
PDF exports,
|
||||||
And a lot more modules...
|
And a lot more modules...
|
||||||
.
|
.
|
||||||
You can also add third parties external modules or develop yours.
|
You can also add external modules from third parties or develop yours.
|
||||||
|
|||||||
@ -61,7 +61,7 @@ License: GPL-3+
|
|||||||
Files: htdocs/includes/adodbtime/*
|
Files: htdocs/includes/adodbtime/*
|
||||||
Copyright: 2003-2005, John Lim
|
Copyright: 2003-2005, John Lim
|
||||||
unknown, jackbbs
|
unknown, jackbbs
|
||||||
License: BSD
|
License: BSD-3-Clause
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
modification, are permitted provided that the following conditions
|
modification, are permitted provided that the following conditions
|
||||||
are met:
|
are met:
|
||||||
@ -272,7 +272,7 @@ Comment:
|
|||||||
|
|
||||||
Files: htdocs/includes/jquery/plugins/flot/*
|
Files: htdocs/includes/jquery/plugins/flot/*
|
||||||
Copyright: Flot team
|
Copyright: Flot team
|
||||||
License: Public Domain
|
License: Public-Domain
|
||||||
This work is not subject to copyright in any jurisdiction
|
This work is not subject to copyright in any jurisdiction
|
||||||
Comment:
|
Comment:
|
||||||
Those files are not shipped in the binary package because we configure
|
Those files are not shipped in the binary package because we configure
|
||||||
|
|||||||
@ -129,7 +129,7 @@ case "$1" in
|
|||||||
then
|
then
|
||||||
# Create an empty conf.php with permission to web server
|
# Create an empty conf.php with permission to web server
|
||||||
setup_empty_conf
|
setup_empty_conf
|
||||||
else
|
#else
|
||||||
# File already exist. We add params not found.
|
# File already exist. We add params not found.
|
||||||
#echo Add new params to overwrite path to use shared libraries/fonts
|
#echo Add new params to overwrite path to use shared libraries/fonts
|
||||||
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
#grep -q -c "dolibarr_lib_ADODB_PATH" $config || [ ! -d "/usr/share/php/adodb" ] || echo "<?php \$dolibarr_lib_ADODB_PATH='/usr/share/php/adodb'; ?>" >> $config
|
||||||
|
|||||||
@ -8,16 +8,20 @@ echo "tmpdir = $tmpdir"
|
|||||||
if [ -n "$1" ]; then
|
if [ -n "$1" ]; then
|
||||||
uscan_opts="--download-version=$1"
|
uscan_opts="--download-version=$1"
|
||||||
fi
|
fi
|
||||||
uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
#uscan --noconf --force-download --no-symlink --verbose --destdir=$tmpdir $uscan_opts
|
||||||
|
|
||||||
cd $tmpdir
|
cd $tmpdir
|
||||||
|
|
||||||
|
# Other method to download (comment uscan if you use this)
|
||||||
|
wget http://www.dolibarr.org/files/stable/standard/dolibarr-3.5.4.tgz
|
||||||
|
|
||||||
|
# Rename file to add +dfsg
|
||||||
tgzfile=$(echo *.tgz)
|
tgzfile=$(echo *.tgz)
|
||||||
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')
|
version=$(echo "$tgzfile" | perl -pi -e 's/^dolibarr-//; s/\.tgz$//; s/_/./g; s/\+nmu1//; ')
|
||||||
|
|
||||||
cd - >/dev/null
|
cd - >/dev/null
|
||||||
|
|
||||||
mv $tmpdir/dolibarr-${version}.tgz ../
|
mv $tmpdir/dolibarr-${version}.tgz ../
|
||||||
echo "File ../dolibarr-${version}.tgz is ready for git-import"
|
echo "File ../dolibarr-${version}.tgz is ready for git-import-orig"
|
||||||
|
|
||||||
rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
|
|||||||
@ -17,9 +17,9 @@
|
|||||||
; ----- Change this -----
|
; ----- Change this -----
|
||||||
AppName=DoliWamp
|
AppName=DoliWamp
|
||||||
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
; DoliWamp-x.x.x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
AppVerName=DoliWamp-3.6.0
|
AppVerName=DoliWamp-3.6.1
|
||||||
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
; DoliWamp-x.x x or DoliWamp-x.x.x-alpha or DoliWamp-x.x.x-beta or DoliWamp-x.x.x-rc or DoliWamp-x.x.x
|
||||||
OutputBaseFilename=DoliWamp-3.6.0
|
OutputBaseFilename=DoliWamp-3.6.1
|
||||||
; ----- End of change
|
; ----- End of change
|
||||||
;OutputManifestFile=build\doliwampbuild.log
|
;OutputManifestFile=build\doliwampbuild.log
|
||||||
; Define full path from which all relative path are defined
|
; Define full path from which all relative path are defined
|
||||||
@ -32,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
|
|||||||
AppSupportURL=http://www.dolibarr.org
|
AppSupportURL=http://www.dolibarr.org
|
||||||
AppUpdatesURL=http://www.dolibarr.org
|
AppUpdatesURL=http://www.dolibarr.org
|
||||||
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
|
||||||
AppCopyright=Copyright (C) 2008-2013 Laurent Destailleur, NLTechno
|
AppCopyright=Copyright (C) 2008-2014 Laurent Destailleur, NLTechno
|
||||||
DefaultDirName=c:\dolibarr
|
DefaultDirName=c:\dolibarr
|
||||||
DefaultGroupName=Dolibarr
|
DefaultGroupName=Dolibarr
|
||||||
;LicenseFile=COPYING
|
;LicenseFile=COPYING
|
||||||
@ -108,8 +108,8 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m
|
|||||||
; Mysql data files (does not overwrite if exists)
|
; Mysql data files (does not overwrite if exists)
|
||||||
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db"
|
||||||
; Dolibarr
|
; Dolibarr
|
||||||
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,documents\*,nltechno*\*,includes\ckeditor\_source\*,includes\savant\*,includes\phpmailer\*,jquery\plugins\template\*,PHPExcel\Shared\PDF\*,PHPExcel\Shared\PCLZip\*,tcpdf\fonts\dejavu-fonts-ttf-2.33\*,tcpdf\fonts\freefont-20100919\*,tcpdf\fonts\utils\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\conf.php.sav,*\install.forced.php"
|
||||||
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*"
|
Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,vagrant\*,xdebug\*"
|
||||||
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png"
|
||||||
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php"
|
||||||
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
|
Source: "*.*"; DestDir: "{app}\www\dolibarr"; Flags: ignoreversion; Excludes: ".gitignore,.project,CVS\*,Thumbs.db,default.properties,install.lock"
|
||||||
|
|||||||
@ -442,6 +442,7 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/teclib*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||||
@ -460,8 +461,8 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/license.txt`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PCLZip`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.33`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-20100919`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`;
|
||||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/savant`;
|
||||||
@ -610,9 +611,6 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
|
||||||
|
|
||||||
#print "Create directory $RPMDIR\n";
|
|
||||||
#$ret=`mkdir -p "$RPMDIR"`;
|
|
||||||
|
|
||||||
print "Remove target ".$FILENAMERPM."...\n";
|
print "Remove target ".$FILENAMERPM."...\n";
|
||||||
unlink("$NEWDESTI/".$FILENAMERPM);
|
unlink("$NEWDESTI/".$FILENAMERPM);
|
||||||
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
|
||||||
@ -620,13 +618,13 @@ if ($nboftargetok) {
|
|||||||
|
|
||||||
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
|
||||||
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
|
||||||
|
|
||||||
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
|
print "Copy $BUILDROOT/$PROJECT to $BUILDROOT/$FILENAMETGZ2\n";
|
||||||
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
|
||||||
$ret=`$cmd`;
|
$ret=`$cmd`;
|
||||||
|
|
||||||
# Set owners
|
# Removed files we don't need
|
||||||
#print "Set owners on files/dir\n";
|
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
|
||||||
#$ret=`chown -R root.root $BUILDROOT/$FILENAMETGZ2`;
|
|
||||||
|
|
||||||
print "Set permissions on files/dir\n";
|
print "Set permissions on files/dir\n";
|
||||||
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
|
||||||
@ -747,10 +745,18 @@ if ($nboftargetok) {
|
|||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/rpm`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/build/zip`;
|
||||||
# Removed duplicate license files
|
# Removed duplicate license files
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/LICENSE.md`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/scayt/LICENSE.md`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source/plugins/wsc/LICENSE.md`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/LICENSE.md`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/scayt/LICENSE.md`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/plugins/wsc/LICENSE.md`;
|
||||||
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/jquery/plugins/flot/LICENSE.txt`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-2.34/LICENSE`;
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/tcpdf/fonts/freefont-20120503/COPYING`;
|
||||||
|
# Removed files we don't need
|
||||||
|
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/_source`;
|
||||||
|
|
||||||
# Rename upstream changelog to match debian rules
|
# Rename upstream changelog to match debian rules
|
||||||
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
|
||||||
|
|
||||||
|
|||||||
@ -36,14 +36,13 @@ complete release of Dolibarr, step by step.
|
|||||||
- Update version number with x.y.z in build/exe/doliwamp/doliwamp.iss
|
- Update version number with x.y.z in build/exe/doliwamp/doliwamp.iss
|
||||||
- Update version number with x.y.z in build/rpm/*.spec
|
- Update version number with x.y.z in build/rpm/*.spec
|
||||||
- Commit all changes.
|
- Commit all changes.
|
||||||
- Add a Tag (x.y.z)
|
|
||||||
|
|
||||||
- Build Dolibarr and DoliWamp packages with makepack-dolibarr.pl
|
- Build Dolibarr and DoliWamp packages with makepack-dolibarr.pl
|
||||||
- Check content of built packages.
|
- Check content of built packages.
|
||||||
- Move build files into www.dolibarr.org web site
|
- Move build files into www.dolibarr.org web site
|
||||||
(/home/dolibarr/wwwroot/files/stable).
|
(/home/dolibarr/wwwroot/files/stable).
|
||||||
- Run makepack-dolibarr.pl again with option to publish files on
|
- Run makepack-dolibarr.pl again with option to publish files on
|
||||||
sourceforge.
|
sourceforge. This will also add official tag.
|
||||||
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
|
- Edit symbolic links in directory "/home/dolibarr/wwwroot/files/stable/xxx"
|
||||||
on server to point to new files (used by some web sites).
|
on server to point to new files (used by some web sites).
|
||||||
|
|
||||||
|
|||||||
@ -333,6 +333,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@ -569,6 +569,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@ -338,6 +338,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
@ -349,6 +349,9 @@ fi
|
|||||||
|
|
||||||
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 24 2014 Laurent Destailleur 3.6.1-0.3
|
||||||
|
- Upstream release
|
||||||
|
|
||||||
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
* Wed Jul 15 2014 Laurent Destailleur 3.6.0-0.3
|
||||||
- Upstream release
|
- Upstream release
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
htdocs/.gitignore
vendored
1
htdocs/.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
/custom*
|
/custom*
|
||||||
/extensions*
|
/extensions*
|
||||||
/nltechno*
|
/nltechno*
|
||||||
|
/teclib*
|
||||||
/bootstrap*
|
/bootstrap*
|
||||||
/google*
|
/google*
|
||||||
/multicompany*
|
/multicompany*
|
||||||
|
|||||||
@ -94,7 +94,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
/**
|
/**
|
||||||
* Load data control
|
* Load data control
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id of object
|
* @param int $id Id of object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -228,7 +228,7 @@ abstract class ActionsAdherentCardCommon
|
|||||||
/**
|
/**
|
||||||
* Set content of ->tpl array, to use into template
|
* Set content of ->tpl array, to use into template
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return string HTML output
|
* @return string HTML output
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
|||||||
/**
|
/**
|
||||||
* Assign custom values for canvas
|
* Assign custom values for canvas
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1081,7 +1081,7 @@ class Adherent extends CommonObject
|
|||||||
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
if ($rowid) $sql.= " AND d.rowid=".$rowid;
|
||||||
elseif ($ref || $fk_soc) {
|
elseif ($ref || $fk_soc) {
|
||||||
$sql.= " AND d.entity IN (".getEntity().")";
|
$sql.= " AND d.entity IN (".getEntity().")";
|
||||||
if ($ref) $sql.= " AND d.rowid='".$ref."'";
|
if ($ref) $sql.= " AND d.rowid='".$this->db->escape($ref)."'";
|
||||||
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
elseif ($fk_soc) $sql.= " AND d.fk_soc='".$fk_soc."'";
|
||||||
}
|
}
|
||||||
elseif ($ref_ext)
|
elseif ($ref_ext)
|
||||||
|
|||||||
@ -328,6 +328,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
{
|
{
|
||||||
if (GETPOST('deletephoto'))
|
if (GETPOST('deletephoto'))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
$fileimg=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/'.$object->photo;
|
$fileimg=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/'.$object->photo;
|
||||||
$dirthumbs=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/thumbs';
|
$dirthumbs=$conf->adherent->dir_output.'/'.get_exdir($object->id,2,0,1).'/photos/thumbs';
|
||||||
dol_delete_file($fileimg);
|
dol_delete_file($fileimg);
|
||||||
|
|||||||
@ -534,4 +534,3 @@ print '<br>';
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -473,7 +473,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
if (isset($_POST["country"]) && $_POST["country"]=='0') {
|
if (isset($_POST["country"]) && $_POST["country"]=='0')
|
||||||
|
{
|
||||||
$ok=0;
|
$ok=0;
|
||||||
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors');
|
setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")),'errors');
|
||||||
}
|
}
|
||||||
@ -532,6 +533,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
|
|||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result) // Add is ok
|
if ($result) // Add is ok
|
||||||
{
|
{
|
||||||
|
setEventMessage($langs->transnoentities("RecordSaved"));
|
||||||
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -500,7 +500,7 @@ print "</tr>\n";
|
|||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
foreach ($def as $reldir)
|
foreach ($dirmodels as $reldir)
|
||||||
{
|
{
|
||||||
foreach (array('','/doc') as $valdir)
|
foreach (array('','/doc') as $valdir)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -219,6 +219,10 @@ if (function_exists("ldap_connect"))
|
|||||||
$info=$object->_load_ldap_info();
|
$info=$object->_load_ldap_info();
|
||||||
$dn=$object->_load_ldap_dn($info);
|
$dn=$object->_load_ldap_dn($info);
|
||||||
|
|
||||||
|
// Get a gid number for objectclass PosixGroup
|
||||||
|
if(in_array('posixGroup',$info['objectclass']))
|
||||||
|
$info['gidNumber'] = $ldap->getNextGroupGid();
|
||||||
|
|
||||||
$result1=$ldap->delete($dn); // To be sure to delete existing records
|
$result1=$ldap->delete($dn); // To be sure to delete existing records
|
||||||
$result2=$ldap->add($dn,$info,$user); // Now the test
|
$result2=$ldap->add($dn,$info,$user); // Now the test
|
||||||
$result3=$ldap->delete($dn); // Clean what we did
|
$result3=$ldap->delete($dn); // Clean what we did
|
||||||
|
|||||||
@ -206,9 +206,9 @@ else
|
|||||||
// Add vat rates examples specific to country
|
// Add vat rates examples specific to country
|
||||||
$vat_rates=array();
|
$vat_rates=array();
|
||||||
|
|
||||||
$sql.="SELECT taux as vat_rate";
|
$sql="SELECT taux as vat_rate";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
$sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
|
||||||
$sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux != 0";
|
$sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux <> 0";
|
||||||
$sql.=" ORDER BY t.taux ASC";
|
$sql.=" ORDER BY t.taux ASC";
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -317,7 +317,7 @@ if ($action == 'create')
|
|||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans('Type').'</td><td>';
|
||||||
if ($parent_rowid)
|
if ($parent_rowid)
|
||||||
{
|
{
|
||||||
print 'Left';
|
print $langs->trans('Left');
|
||||||
print '<input type="hidden" name="type" value="left">';
|
print '<input type="hidden" name="type" value="left">';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -143,4 +143,3 @@ print '</table>';
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
@ -329,7 +329,7 @@ if ($virtualdiffersfromphysical)
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -124,4 +124,5 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -130,4 +130,3 @@ else
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
@ -379,4 +379,3 @@ print '</table>';
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -118,5 +118,3 @@ print info_admin($langs->trans("SystemInfoDesc")).'<br>';
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -350,4 +350,3 @@ print "<br><br>";
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -166,4 +166,3 @@ if (preg_match('/^confirm/i',$choice))
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
include_once $dolibarr_main_document_root.'/core/lib/files.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
@ -174,4 +174,3 @@ if (! empty($result['return']))
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_b
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -146,4 +146,3 @@ print '</table>';
|
|||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -55,6 +55,8 @@ print '</div>';
|
|||||||
print '<div class="principal">';
|
print '<div class="principal">';
|
||||||
|
|
||||||
$page=GETPOST('menu','alpha');
|
$page=GETPOST('menu','alpha');
|
||||||
|
if (empty($page)) $page='facturation';
|
||||||
|
|
||||||
if (in_array(
|
if (in_array(
|
||||||
$page,
|
$page,
|
||||||
array(
|
array(
|
||||||
|
|||||||
@ -75,4 +75,3 @@ include_once 'affPied.php';
|
|||||||
|
|
||||||
print '</div></div></div>'."\n";
|
print '</div></div></div>'."\n";
|
||||||
print '</body></html>'."\n";
|
print '</body></html>'."\n";
|
||||||
?>
|
|
||||||
@ -191,5 +191,3 @@ $obj_facturation->paiementLe('RESET');
|
|||||||
|
|
||||||
// Affichage des templates
|
// Affichage des templates
|
||||||
require ('tpl/facturation1.tpl.php');
|
require ('tpl/facturation1.tpl.php');
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -39,6 +39,7 @@ if ( $_SESSION['uid'] > 0 )
|
|||||||
}
|
}
|
||||||
|
|
||||||
$usertxt=GETPOST('user','',1);
|
$usertxt=GETPOST('user','',1);
|
||||||
|
$err=GETPOST("err");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -64,7 +65,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);
|
|||||||
|
|
||||||
<div class="contenu">
|
<div class="contenu">
|
||||||
<div class="principal_login">
|
<div class="principal_login">
|
||||||
<?php if (! empty($_GET["err"])) print $_GET["err"]."<br><br>\n"; ?>
|
<?php if ($err) print dol_escape_htmltag($err)."<br><br>\n"; ?>
|
||||||
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Identification"); ?></legend>
|
<fieldset class="cadre_facturation"><legend class="titre1"><?php echo $langs->trans("Identification"); ?></legend>
|
||||||
<form id="frmLogin" method="POST" action="index_verif.php">
|
<form id="frmLogin" method="POST" action="index_verif.php">
|
||||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||||
|
|||||||
@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
|||||||
}
|
}
|
||||||
print '</li></ul>';
|
print '</li></ul>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
?>
|
|
||||||
@ -137,7 +137,7 @@ class Categorie extends CommonObject
|
|||||||
* -3 : categorie invalide
|
* -3 : categorie invalide
|
||||||
* -4 : category already exists
|
* -4 : category already exists
|
||||||
*/
|
*/
|
||||||
function create($user='')
|
function create($user)
|
||||||
{
|
{
|
||||||
global $conf,$langs,$hookmanager;
|
global $conf,$langs,$hookmanager;
|
||||||
$langs->load('categories');
|
$langs->load('categories');
|
||||||
|
|||||||
@ -138,11 +138,13 @@ if ($action == 'add' && $user->rights->categorie->creer)
|
|||||||
// Create category in database
|
// Create category in database
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result = $object->create();
|
$result = $object->create($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$action = 'confirmed';
|
$action = 'confirmed';
|
||||||
$_POST["addcat"] = '';
|
$_POST["addcat"] = '';
|
||||||
|
} else {
|
||||||
|
setEventMessage($object->error,'errors');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -520,4 +520,3 @@ if($object->type == 4)
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
@ -140,6 +140,7 @@ class ActionComm extends CommonObject
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$this->type_id=$cactioncomm->id;
|
$this->type_id=$cactioncomm->id;
|
||||||
|
$this->code=$cactioncomm->code;
|
||||||
}
|
}
|
||||||
else if ($result == 0)
|
else if ($result == 0)
|
||||||
{
|
{
|
||||||
@ -283,7 +284,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||||
$sql.= " a.fk_element, a.elementtype,";
|
$sql.= " a.fk_element, a.elementtype,";
|
||||||
$sql.= " a.priority, a.fulldayevent, a.location, a.transparency,";
|
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
|
$sql.= " c.id as type_id, c.code as type_code, c.libelle,";
|
||||||
$sql.= " s.nom as socname,";
|
$sql.= " s.nom as socname,";
|
||||||
$sql.= " u.firstname, u.lastname as lastname";
|
$sql.= " u.firstname, u.lastname as lastname";
|
||||||
@ -877,7 +878,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " a.fk_user_action, a.fk_user_done,";
|
$sql.= " a.fk_user_action, a.fk_user_done,";
|
||||||
$sql.= " a.fk_contact, a.percent as percentage,";
|
$sql.= " a.fk_contact, a.percent as percentage,";
|
||||||
$sql.= " a.fk_element, a.elementtype,";
|
$sql.= " a.fk_element, a.elementtype,";
|
||||||
$sql.= " a.priority, a.fulldayevent, a.location,";
|
$sql.= " a.priority, a.fulldayevent, a.location, a.punctual, a.transparency,";
|
||||||
$sql.= " u.firstname, u.lastname,";
|
$sql.= " u.firstname, u.lastname,";
|
||||||
$sql.= " s.nom as socname,";
|
$sql.= " s.nom as socname,";
|
||||||
$sql.= " c.id as type_id, c.code as type_code, c.libelle";
|
$sql.= " c.id as type_id, c.code as type_code, c.libelle";
|
||||||
@ -1070,4 +1071,3 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -966,7 +966,7 @@ llxFooter();
|
|||||||
* @param int $year Year
|
* @param int $year Year
|
||||||
* @param int $monthshown Current month shown in calendar view
|
* @param int $monthshown Current month shown in calendar view
|
||||||
* @param string $style Style to use for this day
|
* @param string $style Style to use for this day
|
||||||
* @param array &$eventarray Array of events
|
* @param array $eventarray Array of events
|
||||||
* @param int $maxprint Nb of actions to show each day on month view (0 means no limit)
|
* @param int $maxprint Nb of actions to show each day on month view (0 means no limit)
|
||||||
* @param int $maxnbofchar Nb of characters to show for event line
|
* @param int $maxnbofchar Nb of characters to show for event line
|
||||||
* @param string $newparam Parameters on current URL
|
* @param string $newparam Parameters on current URL
|
||||||
|
|||||||
@ -195,7 +195,7 @@ if ($resql)
|
|||||||
$head = calendars_prepare_head('');
|
$head = calendars_prepare_head('');
|
||||||
|
|
||||||
dol_fiche_head($head, 'card', $langs->trans('Events'), 0, 'list');
|
dol_fiche_head($head, 'card', $langs->trans('Events'), 0, 'list');
|
||||||
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,-1);
|
print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,-1,$actioncode);
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
// Add link to show birthdays
|
// Add link to show birthdays
|
||||||
|
|||||||
@ -933,4 +933,3 @@ dol_htmloutput_mesg('',$mesgs);
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
|
||||||
|
|||||||
@ -612,12 +612,12 @@ else if ($action == 'addline' && $user->rights->propal->creer) {
|
|||||||
// On defini prix unitaire
|
// On defini prix unitaire
|
||||||
if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->client->price_level)
|
if (! empty($conf->global->PRODUIT_MULTIPRICES) && $object->client->price_level)
|
||||||
{
|
{
|
||||||
$pu_ht = $prod->multiprices [$object->client->price_level];
|
$pu_ht = $prod->multiprices[$object->client->price_level];
|
||||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||||
}
|
}
|
||||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2010-2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2012-214 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -797,7 +797,10 @@ class Propal extends CommonObject
|
|||||||
$fk_parent_line,
|
$fk_parent_line,
|
||||||
$this->lines[$i]->fk_fournprice,
|
$this->lines[$i]->fk_fournprice,
|
||||||
$this->lines[$i]->pa_ht,
|
$this->lines[$i]->pa_ht,
|
||||||
$this->lines[$i]->label
|
$this->lines[$i]->label,
|
||||||
|
$this->lines[$i]->date_start,
|
||||||
|
$this->lines[$i]->date_end,
|
||||||
|
$this->lines[$i]->array_options
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@ -932,6 +935,10 @@ class Propal extends CommonObject
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
// get extrafields so they will be clone
|
||||||
|
foreach($this->lines as $line)
|
||||||
|
$line->fetch_optionals($line->rowid);
|
||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$objFrom = dol_clone($this);
|
$objFrom = dol_clone($this);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* 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
|
||||||
@ -27,6 +28,8 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
$langs = $GLOBALS['langs'];
|
$langs = $GLOBALS['langs'];
|
||||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||||
|
|
||||||
@ -52,17 +55,23 @@ foreach($linkedObjectBlock as $object)
|
|||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/propal.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowPropal"),"propal").' '.$object->ref; ?></a></td>
|
<a href="<?php echo DOL_URL_ROOT.'/comm/propal.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowPropal"),"propal").' '.$object->ref; ?></a></td>
|
||||||
<td><?php echo $object->ref_client; ?></td>
|
<td><?php echo $object->ref_client; ?></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->propale->lire) {
|
||||||
|
$total = $total + $object->total_ht;
|
||||||
|
echo price($object->total_ht);
|
||||||
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$total = $total + $object->total_ht;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="liste_total">
|
<tr class="liste_total">
|
||||||
<td align="left" colspan="3"><?php echo $langs->trans('TotalHT'); ?></td>
|
<td align="left" colspan="3"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||||
<td align="right"><?php echo price($total); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->propale->lire) {
|
||||||
|
echo price($total);
|
||||||
|
} ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
* Copyright (C) 2011 Jean Heimburger <jean@tiaris.info>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
@ -291,6 +291,13 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set new ref and current status
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$this->ref = $num;
|
||||||
|
$this->statut = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
@ -301,13 +308,6 @@ class Commande extends CommonOrder
|
|||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new ref and current status
|
|
||||||
if (! $error)
|
|
||||||
{
|
|
||||||
$this->ref = $num;
|
|
||||||
$this->statut = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
@ -725,7 +725,8 @@ class Commande extends CommonOrder
|
|||||||
$fk_parent_line,
|
$fk_parent_line,
|
||||||
$this->lines[$i]->fk_fournprice,
|
$this->lines[$i]->fk_fournprice,
|
||||||
$this->lines[$i]->pa_ht,
|
$this->lines[$i]->pa_ht,
|
||||||
$this->lines[$i]->label
|
$this->lines[$i]->label,
|
||||||
|
$this->lines[$i]->array_options
|
||||||
);
|
);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -863,6 +864,10 @@ class Commande extends CommonOrder
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
// get extrafields so they will be clone
|
||||||
|
foreach($this->lines as $line)
|
||||||
|
$line->fetch_optionals($line->rowid);
|
||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$objFrom = dol_clone($this);
|
$objFrom = dol_clone($this);
|
||||||
|
|
||||||
|
|||||||
@ -185,7 +185,7 @@ else
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
|
||||||
?>
|
|
||||||
|
|||||||
@ -269,10 +269,12 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
|||||||
if ($ret < 0)
|
if ($ret < 0)
|
||||||
$error ++;
|
$error ++;
|
||||||
|
|
||||||
if (! $error) {
|
if (! $error)
|
||||||
|
{
|
||||||
$object_id = $object->create($user);
|
$object_id = $object->create($user);
|
||||||
|
|
||||||
if ($object_id > 0) {
|
if ($object_id > 0)
|
||||||
|
{
|
||||||
dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
|
dol_include_once('/' . $element . '/class/' . $subelement . '.class.php');
|
||||||
|
|
||||||
$classname = ucfirst($subelement);
|
$classname = ucfirst($subelement);
|
||||||
@ -280,15 +282,20 @@ else if ($action == 'add' && $user->rights->commande->creer) {
|
|||||||
|
|
||||||
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
|
dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines");
|
||||||
$result = $srcobject->fetch($object->origin_id);
|
$result = $srcobject->fetch($object->origin_id);
|
||||||
if ($result > 0) {
|
if ($result > 0)
|
||||||
|
{
|
||||||
$lines = $srcobject->lines;
|
$lines = $srcobject->lines;
|
||||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines'))
|
if (empty($lines) && method_exists($srcobject, 'fetch_lines'))
|
||||||
$lines = $srcobject->fetch_lines();
|
{
|
||||||
|
$srcobject->fetch_lines();
|
||||||
|
$lines = $srcobject->lines;
|
||||||
|
}
|
||||||
|
|
||||||
$fk_parent_line = 0;
|
$fk_parent_line = 0;
|
||||||
$num = count($lines);
|
$num = count($lines);
|
||||||
|
|
||||||
for($i = 0; $i < $num; $i ++) {
|
for($i = 0; $i < $num; $i ++)
|
||||||
|
{
|
||||||
$label = (! empty($lines [$i]->label) ? $lines [$i]->label : '');
|
$label = (! empty($lines [$i]->label) ? $lines [$i]->label : '');
|
||||||
$desc = (! empty($lines [$i]->desc) ? $lines [$i]->desc : $lines [$i]->libelle);
|
$desc = (! empty($lines [$i]->desc) ? $lines [$i]->desc : $lines [$i]->libelle);
|
||||||
$product_type = (! empty($lines [$i]->product_type) ? $lines [$i]->product_type : 0);
|
$product_type = (! empty($lines [$i]->product_type) ? $lines [$i]->product_type : 0);
|
||||||
@ -581,8 +588,8 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
|
|||||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
||||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
$price_min = $prod->multiprices_min [$object->client->price_level];
|
||||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
||||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
if (isset($prod->multiprices_tva_tx[$object->client->price_level])) $tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
||||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
if (isset($prod->multiprices_recuperableonly[$object->client->price_level])) $tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
||||||
}
|
}
|
||||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,7 +34,7 @@ $langs->load("sendings");
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid=0;
|
$socid=0;
|
||||||
$comid = isset($_GET["id"])?$_GET["id"]:'';
|
$comid = GETPOST("id",'int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result=restrictedArea($user,'commande',$comid,'');
|
$result=restrictedArea($user,'commande',$comid,'');
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ $result=restrictedArea($user,'commande',$comid,'');
|
|||||||
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
llxHeader('',$langs->trans('Order'),'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes');
|
||||||
|
|
||||||
$commande = new Commande($db);
|
$commande = new Commande($db);
|
||||||
$commande->fetch($_GET["id"]);
|
$commande->fetch($comid);
|
||||||
$commande->info($_GET["id"]);
|
$commande->info($comid);
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($commande->socid);
|
$soc->fetch($commande->socid);
|
||||||
|
|
||||||
|
|||||||
@ -340,7 +340,7 @@ if ($resql)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
|
||||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
|
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_commande),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
|
||||||
print img_picto($langs->trans("Late"),"warning");
|
print img_picto($langs->trans("Late"),"warning");
|
||||||
if(!empty($objp->note_private))
|
if(!empty($objp->note_private))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $langs->load('companies');
|
|||||||
if (! $user->rights->facture->creer)
|
if (! $user->rights->facture->creer)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
|
$id = (GETPOST('id')?GETPOST('id','int'):GETPOST("facid")); // For backward compatibility
|
||||||
$ref = GETPOST('ref','alpha');
|
$ref = GETPOST('ref','alpha');
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$confirm = GETPOST('confirm','alpha');
|
$confirm = GETPOST('confirm','alpha');
|
||||||
@ -219,7 +219,11 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
|
|||||||
$objectsrc->setStatut(3);
|
$objectsrc->setStatut(3);
|
||||||
}
|
}
|
||||||
$lines = $objectsrc->lines;
|
$lines = $objectsrc->lines;
|
||||||
if (empty($lines) && method_exists($objectsrc,'fetch_lines')) $lines = $objectsrc->fetch_lines();
|
if (empty($lines) && method_exists($objectsrc, 'fetch_lines'))
|
||||||
|
{
|
||||||
|
$objectsrc->fetch_lines();
|
||||||
|
$lines = $objectsrc->lines;
|
||||||
|
}
|
||||||
$fk_parent_line=0;
|
$fk_parent_line=0;
|
||||||
$num=count($lines);
|
$num=count($lines);
|
||||||
for ($i=0;$i<$num;$i++)
|
for ($i=0;$i<$num;$i++)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* 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
|
||||||
@ -22,6 +23,8 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
$langs = $GLOBALS['langs'];
|
$langs = $GLOBALS['langs'];
|
||||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||||
|
|
||||||
@ -47,17 +50,23 @@ foreach($linkedObjectBlock as $object)
|
|||||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/commande/fiche.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
<a href="<?php echo DOL_URL_ROOT.'/commande/fiche.php?id='.$object->id ?>"><?php echo img_object($langs->trans("ShowOrder"),"order").' '.$object->ref; ?></a></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->commande->lire) {
|
||||||
|
$total = $total + $object->total_ht;
|
||||||
|
echo price($object->total_ht);
|
||||||
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$total = $total + $object->total_ht;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<tr class="liste_total">
|
<tr class="liste_total">
|
||||||
<td align="left" colspan="2"><?php echo $langs->trans('TotalHT'); ?></td>
|
<td align="left" colspan="2"><?php echo $langs->trans('TotalHT'); ?></td>
|
||||||
<td align="right"><?php echo price($total); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->commande->lire) {
|
||||||
|
echo price($total);
|
||||||
|
} ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@@2byte.es>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012-2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
* Copyright (C) 2011-2014 Alexandre Spangaro <alexandre.spangaro@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
|
||||||
@ -259,17 +259,22 @@ if ($id > 0 || ! empty($ref))
|
|||||||
//Total pages
|
//Total pages
|
||||||
$totalPages = ceil($total_lines/$viewline);
|
$totalPages = ceil($total_lines/$viewline);
|
||||||
|
|
||||||
if ($page > 0)
|
if ($totalPages == 0) {
|
||||||
{
|
$page = 0;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if ($page > 0) {
|
||||||
$limitsql = ($totalPages - $page) * $viewline;
|
$limitsql = ($totalPages - $page) * $viewline;
|
||||||
if ($limitsql < $viewline) $limitsql = $viewline;
|
if ($limitsql < $viewline) {
|
||||||
$nbline = $limitsql;
|
$limitsql = $viewline;
|
||||||
}
|
}
|
||||||
else
|
$nbline = $limitsql;
|
||||||
{
|
} else {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$limitsql = $nbline;
|
$limitsql = $nbline;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//print $limitsql.'-'.$page.'-'.$viewline;
|
//print $limitsql.'-'.$page.'-'.$viewline;
|
||||||
|
|
||||||
// Onglets
|
// Onglets
|
||||||
|
|||||||
@ -34,7 +34,7 @@ $langs->load("categories");
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
$id=GETPOST('id');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -56,6 +56,7 @@ $search_ref=GETPOST('search_ref','alpha');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
$tripandexpense_static=new Deplacement($db);
|
$tripandexpense_static=new Deplacement($db);
|
||||||
|
$userstatic = new User($db);
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
@ -132,12 +133,23 @@ if ($resql)
|
|||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
|
// Id
|
||||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.'</a></td>';
|
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowTrip"),"trip").' '.$obj->rowid.'</a></td>';
|
||||||
|
// Type
|
||||||
print '<td>'.$langs->trans($obj->type).'</td>';
|
print '<td>'.$langs->trans($obj->type).'</td>';
|
||||||
|
// Date
|
||||||
print '<td>'.dol_print_date($db->jdate($obj->dd),'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($obj->dd),'day').'</td>';
|
||||||
print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->firstname.' '.$obj->name.'</a></td>';
|
// User
|
||||||
|
print '<td align="left">';
|
||||||
|
$userstatic->id = $obj->rowid;
|
||||||
|
$userstatic->lastname = $obj->lastname;
|
||||||
|
$userstatic->firstname = $obj->firstname;
|
||||||
|
print $userstatic->getNomUrl(1);
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
if ($obj->socid) print '<td>'.$soc->getNomUrl(1).'</td>';
|
if ($obj->socid) print '<td>'.$soc->getNomUrl(1).'</td>';
|
||||||
else print '<td> </td>';
|
else print '<td> </td>';
|
||||||
|
|
||||||
print '<td align="right">'.$obj->km.'</td>';
|
print '<td align="right">'.$obj->km.'</td>';
|
||||||
|
|
||||||
$tripandexpense_static->statut=$obj->fk_statut;
|
$tripandexpense_static->statut=$obj->fk_statut;
|
||||||
|
|||||||
@ -248,18 +248,23 @@ else if ($action == 'setmode' && $user->rights->facture->creer) {
|
|||||||
dol_print_error($db, $object->error);
|
dol_print_error($db, $object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setinvoicedate' && $user->rights->facture->creer) {
|
else if ($action == 'setinvoicedate' && $user->rights->facture->creer)
|
||||||
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$old_date_lim_reglement = $object->date_lim_reglement;
|
$old_date_lim_reglement = $object->date_lim_reglement;
|
||||||
$object->date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
|
$date = dol_mktime(12, 0, 0, $_POST['invoicedatemonth'], $_POST['invoicedateday'], $_POST['invoicedateyear']);
|
||||||
|
if (empty($date))
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
|
||||||
|
header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id.'&action=editinvoicedate');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
$object->date=$date;
|
||||||
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
||||||
if ($new_date_lim_reglement > $old_date_lim_reglement)
|
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement;
|
||||||
$object->date_lim_reglement = $new_date_lim_reglement;
|
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date;
|
||||||
if ($object->date_lim_reglement < $object->date)
|
|
||||||
$object->date_lim_reglement = $object->date;
|
|
||||||
$result = $object->update($user);
|
$result = $object->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
dol_print_error($db, $object->error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
||||||
@ -267,18 +272,14 @@ else if ($action == 'setconditions' && $user->rights->facture->creer) {
|
|||||||
$object->cond_reglement_code = 0; // To clean property
|
$object->cond_reglement_code = 0; // To clean property
|
||||||
$object->cond_reglement_id = 0; // To clean property
|
$object->cond_reglement_id = 0; // To clean property
|
||||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||||
if ($result < 0)
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
dol_print_error($db, $object->error);
|
|
||||||
|
|
||||||
$old_date_lim_reglement = $object->date_lim_reglement;
|
$old_date_lim_reglement = $object->date_lim_reglement;
|
||||||
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
$new_date_lim_reglement = $object->calculate_date_lim_reglement();
|
||||||
if ($new_date_lim_reglement > $old_date_lim_reglement)
|
if ($new_date_lim_reglement > $old_date_lim_reglement) $object->date_lim_reglement = $new_date_lim_reglement;
|
||||||
$object->date_lim_reglement = $new_date_lim_reglement;
|
if ($object->date_lim_reglement < $object->date) $object->date_lim_reglement = $object->date;
|
||||||
if ($object->date_lim_reglement < $object->date)
|
|
||||||
$object->date_lim_reglement = $object->date;
|
|
||||||
$result = $object->update($user);
|
$result = $object->update($user);
|
||||||
if ($result < 0)
|
if ($result < 0) dol_print_error($db, $object->error);
|
||||||
dol_print_error($db, $object->error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
|
else if ($action == 'setpaymentterm' && $user->rights->facture->creer) {
|
||||||
@ -923,7 +924,11 @@ else if ($action == 'add' && $user->rights->facture->creer)
|
|||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$lines = $srcobject->lines;
|
$lines = $srcobject->lines;
|
||||||
if (empty($lines) && method_exists($srcobject, 'fetch_lines')) $lines = $srcobject->fetch_lines();
|
if (empty($lines) && method_exists($srcobject, 'fetch_lines'))
|
||||||
|
{
|
||||||
|
$srcobject->fetch_lines();
|
||||||
|
$lines = $srcobject->lines;
|
||||||
|
}
|
||||||
|
|
||||||
$fk_parent_line=0;
|
$fk_parent_line=0;
|
||||||
$num=count($lines);
|
$num=count($lines);
|
||||||
@ -1143,12 +1148,10 @@ else if ($action == 'addline' && $user->rights->facture->creer)
|
|||||||
// We define price for product
|
// We define price for product
|
||||||
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level))
|
if (! empty($conf->global->PRODUIT_MULTIPRICES) && ! empty($object->client->price_level))
|
||||||
{
|
{
|
||||||
$pu_ht = $prod->multiprices [$object->client->price_level];
|
$pu_ht = $prod->multiprices[$object->client->price_level];
|
||||||
$pu_ttc = $prod->multiprices_ttc [$object->client->price_level];
|
$pu_ttc = $prod->multiprices_ttc[$object->client->price_level];
|
||||||
$price_min = $prod->multiprices_min [$object->client->price_level];
|
$price_min = $prod->multiprices_min[$object->client->price_level];
|
||||||
$price_base_type = $prod->multiprices_base_type [$object->client->price_level];
|
$price_base_type = $prod->multiprices_base_type[$object->client->price_level];
|
||||||
$tva_tx=$prod->multiprices_tva_tx[$object->client->price_level];
|
|
||||||
$tva_npr=$prod->multiprices_recuperableonly[$object->client->price_level];
|
|
||||||
}
|
}
|
||||||
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
elseif (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
|
||||||
{
|
{
|
||||||
@ -1819,15 +1822,7 @@ $now = dol_now();
|
|||||||
|
|
||||||
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
|
llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes');
|
||||||
|
|
||||||
print '
|
|
||||||
<script type="text/javascript" language="javascript">
|
|
||||||
jQuery(document).ready(function() {
|
|
||||||
jQuery("#linktoorder").click(function() {
|
|
||||||
jQuery("#commande").toggle();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* *******************************************************************
|
* *******************************************************************
|
||||||
@ -2218,7 +2213,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
|
print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td colspan="2">';
|
||||||
$form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id');
|
$form->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id', 'CRDT');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
@ -3158,10 +3153,13 @@ if ($action == 'create')
|
|||||||
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editmode&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
if ($action == 'editmode') {
|
if ($action == 'editmode')
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id');
|
{
|
||||||
} else {
|
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT');
|
||||||
$form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'none');
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none', 'CRDT');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -3538,15 +3536,26 @@ if ($action == 'create')
|
|||||||
// Linked object block
|
// Linked object block
|
||||||
$somethingshown = $object->showLinkedObjectBlock();
|
$somethingshown = $object->showLinkedObjectBlock();
|
||||||
|
|
||||||
if (empty($somethingshown) && $object->statut > 0) {
|
if (empty($somethingshown) && ! empty($conf->commande->enabled))
|
||||||
|
{
|
||||||
print '<br><a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
print '<br><a href="#" id="linktoorder">' . $langs->trans('LinkedOrder') . '</a>';
|
||||||
|
|
||||||
|
print '
|
||||||
|
<script type="text/javascript" language="javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
jQuery("#linktoorder").click(function() {
|
||||||
|
jQuery("#commande").toggle();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
';
|
||||||
|
|
||||||
print '<div id="commande" style="display:none">';
|
print '<div id="commande" style="display:none">';
|
||||||
|
|
||||||
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_client, c.total_ht";
|
$sql = "SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_client, c.total_ht";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
|
||||||
$sql .= ", " . MAIN_DB_PREFIX . "commande as c";
|
$sql .= ", " . MAIN_DB_PREFIX . "commande as c";
|
||||||
$sql .= ' WHERE c.fk_soc = ' . $soc->id . '';
|
$sql .= ' WHERE c.fk_soc = s.rowid AND c.fk_soc = ' . $soc->id . '';
|
||||||
|
|
||||||
$resqlorderlist = $db->query($sql);
|
$resqlorderlist = $db->query($sql);
|
||||||
if ($resqlorderlist) {
|
if ($resqlorderlist) {
|
||||||
|
|||||||
@ -420,4 +420,3 @@ elseif (file_exists($fileimagebis))
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
?>
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012-2014 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
* Copyright (C) 2013 Cedric Gross <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
@ -391,7 +391,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->lines[$i]->fk_fournprice,
|
$this->lines[$i]->fk_fournprice,
|
||||||
$this->lines[$i]->pa_ht,
|
$this->lines[$i]->pa_ht,
|
||||||
$this->lines[$i]->label,
|
$this->lines[$i]->label,
|
||||||
''
|
$this->lines[$i]->array_options
|
||||||
);
|
);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -593,6 +593,10 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
// get extrafields so they will be clone
|
||||||
|
foreach($this->lines as $line)
|
||||||
|
$line->fetch_optionals($line->rowid);
|
||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$objFrom = dol_clone($this);
|
$objFrom = dol_clone($this);
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2014 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) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
@ -467,7 +467,11 @@ if ($object->id > 0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($num == 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
if ($num == 0)
|
||||||
|
{
|
||||||
|
if ($object->statut > 0) print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("AlreadyPayed")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||||
|
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("Draft")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||||
|
}
|
||||||
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
else print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("RequestAlreadyDone")).'">'.$langs->trans("MakeWithdrawRequest").'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
|
* 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
|
||||||
@ -22,6 +23,8 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
global $user;
|
||||||
|
|
||||||
$langs = $GLOBALS['langs'];
|
$langs = $GLOBALS['langs'];
|
||||||
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||||
|
|
||||||
@ -47,16 +50,22 @@ foreach($linkedObjectBlock as $object)
|
|||||||
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
<tr <?php echo $GLOBALS['bc'][$var]; ?> ><td>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
<a href="<?php echo DOL_URL_ROOT.'/compta/facture.php?facid='.$object->id ?>"><?php echo img_object($langs->trans("ShowBill"),"bill").' '.$object->ref; ?></a></td>
|
||||||
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
<td align="center"><?php echo dol_print_date($object->date,'day'); ?></td>
|
||||||
<td align="right"><?php echo price($object->total_ht); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->facture->lire) {
|
||||||
|
$total = $total + $object->total_ht;
|
||||||
|
echo price($object->total_ht);
|
||||||
|
} ?></td>
|
||||||
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
<td align="right"><?php echo $object->getLibStatut(3); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$total = $total + $object->total_ht;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr class="liste_total">
|
<tr class="liste_total">
|
||||||
<td align="left" colspan="2"><?php echo $langs->trans("TotalHT"); ?></td>
|
<td align="left" colspan="2"><?php echo $langs->trans("TotalHT"); ?></td>
|
||||||
<td align="right"><?php echo price($total); ?></td>
|
<td align="right"><?php
|
||||||
|
if ($user->rights->facture->lire) {
|
||||||
|
echo price($total);
|
||||||
|
} ?></td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -108,8 +108,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
|||||||
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
if ($datepaye && ($datepaye < $tmpinvoice->date))
|
||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$error++;
|
//$error++;
|
||||||
setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors');
|
setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
|
* Copyright (C) 2014 Ferran Marcet <fmarcet@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
|
||||||
@ -164,7 +165,7 @@ class BonPrelevement extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Add line to withdrawal
|
* Add line to withdrawal
|
||||||
*
|
*
|
||||||
* @param int &$line_id id line to add
|
* @param int $line_id id line to add
|
||||||
* @param int $client_id id invoice customer
|
* @param int $client_id id invoice customer
|
||||||
* @param string $client_nom name of cliente
|
* @param string $client_nom name of cliente
|
||||||
* @param int $amount amount of invoice
|
* @param int $amount amount of invoice
|
||||||
@ -917,7 +918,7 @@ class BonPrelevement extends CommonObject
|
|||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_bons (";
|
||||||
$sql.= " ref, entity, datec";
|
$sql.= " ref, entity, datec";
|
||||||
$sql.= ") VALUES (";
|
$sql.= ") VALUES (";
|
||||||
$sql.= "'".$ref."'";
|
$sql.= "'".$this->db->escape($ref)."'";
|
||||||
$sql.= ", ".$conf->entity;
|
$sql.= ", ".$conf->entity;
|
||||||
$sql.= ", '".$this->db->idate($now)."'";
|
$sql.= ", '".$this->db->idate($now)."'";
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
@ -1219,10 +1220,10 @@ class BonPrelevement extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a withdrawal file. Generation Formats:
|
* Generate a withdrawal file.
|
||||||
* France: CFONB
|
* Generation Formats:
|
||||||
* Spain: AEB19 (if external module EsAEB is enabled)
|
* - Europe: SEPA (France: CFONB no more supported, Spain: AEB19 if external module EsAEB is enabled)
|
||||||
* Others: Warning message
|
* - Others countries: Warning message
|
||||||
* File is generated with name this->filename
|
* File is generated with name this->filename
|
||||||
*
|
*
|
||||||
* @return int 0 if OK, <0 if KO
|
* @return int 0 if OK, <0 if KO
|
||||||
@ -1411,7 +1412,7 @@ class BonPrelevement extends CommonObject
|
|||||||
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
|
fputs($this->file, ' </CstmrDrctDbtInitn>'.$CrLf);
|
||||||
fputs($this->file, '</Document>'.$CrLf);
|
fputs($this->file, '</Document>'.$CrLf);
|
||||||
|
|
||||||
$sql = "SELECT pl.amount";
|
/*$sql = "SELECT pl.amount";
|
||||||
$sql.= " FROM";
|
$sql.= " FROM";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
$sql.= " ".MAIN_DB_PREFIX."prelevement_lignes as pl,";
|
||||||
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
|
$sql.= " ".MAIN_DB_PREFIX."facture as f,";
|
||||||
@ -1437,7 +1438,7 @@ class BonPrelevement extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$result = -2;
|
$result = -2;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1574,7 +1575,7 @@ class BonPrelevement extends CommonObject
|
|||||||
* @param string $row_bic rib.bic AS bic,
|
* @param string $row_bic rib.bic AS bic,
|
||||||
* @param string $row_datec soc.datec,
|
* @param string $row_datec soc.datec,
|
||||||
* @param string $row_drum soc.rowid AS drum
|
* @param string $row_drum soc.rowid AS drum
|
||||||
* @return void
|
* @return string Return string with SEPA part DrctDbtTxInf
|
||||||
*/
|
*/
|
||||||
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
|
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
|
||||||
{
|
{
|
||||||
@ -1598,15 +1599,15 @@ class BonPrelevement extends CommonObject
|
|||||||
$XML_DEBITOR .=' </DrctDbtTx>'.$CrLf;
|
$XML_DEBITOR .=' </DrctDbtTx>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <DbtrAgt>'.$CrLf;
|
$XML_DEBITOR .=' <DbtrAgt>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <FinInstnId>'.$CrLf;
|
$XML_DEBITOR .=' <FinInstnId>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <BIC>'.$row_iban.'</BIC>'.$CrLf;
|
$XML_DEBITOR .=' <BIC>'.$row_bic.'</BIC>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Nm>'.strtoupper($row_nom).'</Nm>'.$CrLf;
|
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <AdrLine>'.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .=' <AdrLine>'.strtr($row_adr, array(CHR(13) => ", ", CHR(10) => "")).'</AdrLine>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <AdrLine>'.$row_zip.' '.$row_town.'</AdrLine>'.$CrLf;
|
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
|
||||||
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
|
||||||
@ -1689,7 +1690,8 @@ class BonPrelevement extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write sender of request (me)
|
* Write sender of request (me).
|
||||||
|
* Note: The tag PmtInf is opened here but closed into caller
|
||||||
*
|
*
|
||||||
* @param string $configuration conf
|
* @param string $configuration conf
|
||||||
* @param date $ladate Date
|
* @param date $ladate Date
|
||||||
|
|||||||
@ -78,19 +78,19 @@ $sql.= " AND f.entity = ".$conf->entity;
|
|||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
if ($search_line)
|
if ($search_line)
|
||||||
{
|
{
|
||||||
$sql.= " AND pl.rowid = '".$search_line."'";
|
$sql.= " AND pl.rowid = '".$db->escape($search_line)."'";
|
||||||
}
|
}
|
||||||
if ($search_bon)
|
if ($search_bon)
|
||||||
{
|
{
|
||||||
$sql.= " AND p.ref LIKE '%".$search_bon."%'";
|
$sql.= " AND p.ref LIKE '%".$db->escape($search_bon)."%'";
|
||||||
}
|
}
|
||||||
if ($search_code)
|
if ($search_code)
|
||||||
{
|
{
|
||||||
$sql.= " AND s.code_client LIKE '%".$search_code."%'";
|
$sql.= " AND s.code_client LIKE '%".$db->escape($search_code)."%'";
|
||||||
}
|
}
|
||||||
if ($search_societe)
|
if ($search_societe)
|
||||||
{
|
{
|
||||||
$sql .= " AND s.nom LIKE '%".$search_societe."%'";
|
$sql .= " AND s.nom LIKE '%".$db->escape($search_societe)."%'";
|
||||||
}
|
}
|
||||||
$sql.=$db->order($sortfield,$sortorder);
|
$sql.=$db->order($sortfield,$sortorder);
|
||||||
$sql.=$db->plimit($conf->liste_limit+1, $offset);
|
$sql.=$db->plimit($conf->liste_limit+1, $offset);
|
||||||
@ -104,7 +104,7 @@ if ($result)
|
|||||||
$urladd = "&statut=".$statut;
|
$urladd = "&statut=".$statut;
|
||||||
$urladd .= "&search_bon=".$search_bon;
|
$urladd .= "&search_bon=".$search_bon;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("WithdrawalsLines"), $page, "liste.php", $urladd, $sortfield, $sortorder, '', $num);
|
print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num);
|
||||||
|
|
||||||
print"\n<!-- debut table -->\n";
|
print"\n<!-- debut table -->\n";
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
|
|||||||
@ -76,7 +76,8 @@ $sql.= " AND pl.fk_prelevement_bons = p.rowid";
|
|||||||
$sql.= " AND pl.fk_soc = s.rowid";
|
$sql.= " AND pl.fk_soc = s.rowid";
|
||||||
$sql.= " AND p.entity = ".$conf->entity;
|
$sql.= " AND p.entity = ".$conf->entity;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
|
$sql.= " ".$db->order($sortfield, $sortorder);
|
||||||
|
$sql.= " ".$db->plimit($conf->liste_limit+1, $offset);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $langs->load("companies");
|
|||||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = $_GET["socid"];
|
$socid = GETPOST("socid",'int');
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
|
|||||||
@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -80,7 +80,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
$sal->num_payment=GETPOST("num_payment");
|
$sal->num_payment=GETPOST("num_payment");
|
||||||
$sal->fk_user_creat=$user->id;
|
$sal->fk_user_creat=$user->id;
|
||||||
|
|
||||||
if (empty($datep) || empty($datesp) || empty($dateep))
|
if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep))
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Date")),'errors');
|
||||||
$error++;
|
$error++;
|
||||||
@ -219,7 +219,7 @@ if ($action == 'create')
|
|||||||
print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
|
print $form->select_date((empty($datep)?-1:$datep),"datep",'','','','add',1,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("DateValue").'</td><td>';
|
print '<tr><td class="fieldrequired">'.$langs->trans("DateValue").'</td><td>';
|
||||||
print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
|
print $form->select_date((empty($datev)?-1:$datev),"datev",'','','','add',1,1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
|
||||||
@ -176,6 +176,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|||||||
@ -300,7 +300,7 @@ if ($id > 0)
|
|||||||
* Payments
|
* Payments
|
||||||
*/
|
*/
|
||||||
$sql = "SELECT p.rowid, p.num_paiement, datep as dp, p.amount,";
|
$sql = "SELECT p.rowid, p.num_paiement, datep as dp, p.amount,";
|
||||||
$sql.= "c.libelle as paiement_type";
|
$sql.= "c.code as type_code,c.libelle as paiement_type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."paiementcharge as p";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."c_paiement as c ";
|
$sql.= ", ".MAIN_DB_PREFIX."c_paiement as c ";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
$sql.= ", ".MAIN_DB_PREFIX."chargesociales as cs";
|
||||||
@ -333,7 +333,8 @@ if ($id > 0)
|
|||||||
print "<tr ".$bc[$var]."><td>";
|
print "<tr ".$bc[$var]."><td>";
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
print '<a href="'.DOL_URL_ROOT.'/compta/payment_sc/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.'</a></td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
print '<td>'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
|
||||||
print "<td>".$objp->paiement_type.' '.$objp->num_paiement."</td>\n";
|
$labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type;
|
||||||
|
print "<td>".$labeltype.' '.$objp->num_paiement."</td>\n";
|
||||||
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
print '<td align="right">'.price($objp->amount)."</td><td> ".$langs->trans("Currency".$conf->currency)."</td>\n";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
$totalpaye += $objp->amount;
|
$totalpaye += $objp->amount;
|
||||||
|
|||||||
@ -72,6 +72,16 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
$tva->label=GETPOST("label");
|
$tva->label=GETPOST("label");
|
||||||
$tva->note=GETPOST("note");
|
$tva->note=GETPOST("note");
|
||||||
|
|
||||||
|
if (empty($tva->datev))
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DateValue")),'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
if (empty($tva->datep))
|
||||||
|
{
|
||||||
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("DatePayment")),'errors');
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
if (empty($tva->type_payment) || $tva->type_payment < 0)
|
if (empty($tva->type_payment) || $tva->type_payment < 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors');
|
setEventMessage($langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentMode")),'errors');
|
||||||
|
|||||||
@ -94,7 +94,7 @@ abstract class ActionsContactCardCommon
|
|||||||
/**
|
/**
|
||||||
* Load data control
|
* Load data control
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id of object
|
* @param int $id Id of object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -228,7 +228,7 @@ abstract class ActionsContactCardCommon
|
|||||||
/**
|
/**
|
||||||
* Set content of ->tpl array, to use into template
|
* Set content of ->tpl array, to use into template
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return string HTML output
|
* @return string HTML output
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
|
|||||||
/**
|
/**
|
||||||
* Assign custom values for canvas
|
* Assign custom values for canvas
|
||||||
*
|
*
|
||||||
* @param string &$action Type of action
|
* @param string $action Type of action
|
||||||
* @param int $id Id
|
* @param int $id Id
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -31,22 +31,22 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
|
|||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$contactid = isset($_GET["id"])?$_GET["id"]:'';
|
$contactid = GETPOST("id",'int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
$result = restrictedArea($user, 'contact', $contactid, 'socpeople&societe');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
llxHeader('',$langs->trans("ContactsAddresses"),'EN:Module_Third_Parties|FR:Module_Tiers|ES:Módulo_Empresas');
|
||||||
|
|
||||||
|
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$contact->fetch($_GET["id"], $user);
|
$contact->fetch($contactid, $user);
|
||||||
$contact->info($_GET["id"]);
|
$contact->info($contactid);
|
||||||
|
|
||||||
|
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|||||||
@ -172,11 +172,11 @@ if (strlen($search_phone))
|
|||||||
}
|
}
|
||||||
if (strlen($search_phoneper))
|
if (strlen($search_phoneper))
|
||||||
{
|
{
|
||||||
$sql .= " AND p.phone LIKE '%".$db->escape($search_phoneper)."%'";
|
$sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phoneper)."%'";
|
||||||
}
|
}
|
||||||
if (strlen($search_phonepro))
|
if (strlen($search_phonepro))
|
||||||
{
|
{
|
||||||
$sql .= " AND p.phone_perso LIKE '%".$db->escape($search_phonepro)."%'";
|
$sql .= " AND p.phone LIKE '%".$db->escape($search_phonepro)."%'";
|
||||||
}
|
}
|
||||||
if (strlen($search_phonemob))
|
if (strlen($search_phonemob))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2012 Destailleur Laurent <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -41,6 +41,7 @@ class Contrat extends CommonObject
|
|||||||
public $table_element='contrat';
|
public $table_element='contrat';
|
||||||
public $table_element_line='contratdet';
|
public $table_element_line='contratdet';
|
||||||
public $fk_element='fk_contrat';
|
public $fk_element='fk_contrat';
|
||||||
|
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
var $id;
|
var $id;
|
||||||
var $ref;
|
var $ref;
|
||||||
@ -411,7 +412,7 @@ class Contrat extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
$sql.= " FROM ".MAIN_DB_PREFIX."contrat";
|
||||||
if ($ref)
|
if ($ref)
|
||||||
{
|
{
|
||||||
$sql.= " WHERE ref='".$ref."'";
|
$sql.= " WHERE ref='".$this->db->escape($ref)."'";
|
||||||
$sql.= " AND entity IN (".getEntity('contract').")";
|
$sql.= " AND entity IN (".getEntity('contract').")";
|
||||||
}
|
}
|
||||||
else $sql.= " WHERE rowid=".$id;
|
else $sql.= " WHERE rowid=".$id;
|
||||||
@ -833,6 +834,7 @@ class Contrat extends CommonObject
|
|||||||
function delete($user)
|
function delete($user)
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
|
||||||
|
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
@ -1963,7 +1965,7 @@ class ContratLigne
|
|||||||
$sql.= " t.commentaire";
|
$sql.= " t.commentaire";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as t";
|
$sql.= " FROM ".MAIN_DB_PREFIX."contratdet as t";
|
||||||
if ($id) $sql.= " WHERE t.rowid = ".$id;
|
if ($id) $sql.= " WHERE t.rowid = ".$id;
|
||||||
if ($ref) $sql.= " WHERE t.rowid = '".$ref."'";
|
if ($ref) $sql.= " WHERE t.rowid = '".$this->db->escape($ref)."'";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -250,7 +250,11 @@ if ($action == 'add' && $user->rights->contrat->creer)
|
|||||||
{
|
{
|
||||||
$srcobject->fetch_thirdparty();
|
$srcobject->fetch_thirdparty();
|
||||||
$lines = $srcobject->lines;
|
$lines = $srcobject->lines;
|
||||||
if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines();
|
if (empty($lines) && method_exists($srcobject,'fetch_lines'))
|
||||||
|
{
|
||||||
|
$srcobject->fetch_lines();
|
||||||
|
$lines = $srcobject->lines;
|
||||||
|
}
|
||||||
|
|
||||||
$fk_parent_line=0;
|
$fk_parent_line=0;
|
||||||
$num=count($lines);
|
$num=count($lines);
|
||||||
|
|||||||
@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
|||||||
$langs->load("contracts");
|
$langs->load("contracts");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$contratid = isset($_GET["id"])?$_GET["id"]:'';
|
$contratid = GETPOST("id",'int');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'contrat',$contratid,'');
|
$result = restrictedArea($user, 'contrat',$contratid,'');
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ $result = restrictedArea($user, 'contrat',$contratid,'');
|
|||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$contrat = new Contrat($db);
|
$contrat = new Contrat($db);
|
||||||
$contrat->fetch($_GET["id"]);
|
$contrat->fetch($contratid);
|
||||||
$contrat->info($_GET["id"]);
|
$contrat->info($contratid);
|
||||||
|
|
||||||
$head = contract_prepare_head($contrat);
|
$head = contract_prepare_head($contrat);
|
||||||
|
|
||||||
|
|||||||
@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@ -43,5 +43,3 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('
|
|||||||
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
|
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
|
||||||
if ($result < 0) setEventMessage($object->error,'errors');
|
if ($result < 0) setEventMessage($object->error,'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
@ -65,9 +65,10 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
|||||||
$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
|
$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
|
||||||
$sql.= ", p.rowid as fk_country, p.code as country_code, p.libelle as country";
|
$sql.= ", p.rowid as fk_country, p.code as country_code, p.libelle as country";
|
||||||
$sql.= ", d.rowid as fk_county, d.code_departement as county_code, d.nom as county";
|
$sql.= ", d.rowid as fk_county, d.code_departement as county_code, d.nom as county";
|
||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_ziptown as z,".MAIN_DB_PREFIX."c_pays as p)";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_ziptown as z";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON z.fk_county = d.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON z.fk_county = d.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as r ON d.fk_region = r.code_region,";
|
||||||
|
$sql.= " ".MAIN_DB_PREFIX."c_pays as p";
|
||||||
$sql.= " WHERE z.fk_pays = p.rowid";
|
$sql.= " WHERE z.fk_pays = p.rowid";
|
||||||
$sql.= " AND z.active = 1 AND p.active = 1";
|
$sql.= " AND z.active = 1 AND p.active = 1";
|
||||||
if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'";
|
if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'";
|
||||||
@ -81,8 +82,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
|||||||
$sql.= ", p.code as country_code, p.libelle as country";
|
$sql.= ", p.code as country_code, p.libelle as country";
|
||||||
$sql.= ", d.code_departement as county_code , d.nom as county";
|
$sql.= ", d.code_departement as county_code , d.nom as county";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.'societe as s';
|
$sql.= " FROM ".MAIN_DB_PREFIX.'societe as s';
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON fk_departement = d.rowid";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX ."c_departements as d ON s.fk_departement = d.rowid";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON fk_pays = p.rowid';
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid';
|
||||||
$sql.= " WHERE";
|
$sql.= " WHERE";
|
||||||
if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'";
|
if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'";
|
||||||
if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'";
|
if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'";
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class Canvas
|
|||||||
/**
|
/**
|
||||||
* Shared method for canvas to assign values for templates
|
* Shared method for canvas to assign values for templates
|
||||||
*
|
*
|
||||||
* @param string &$action Action string
|
* @param string $action Action string
|
||||||
* @param int $id Object id (if ref not provided)
|
* @param int $id Object id (if ref not provided)
|
||||||
* @param string $ref Object ref (if id not provided)
|
* @param string $ref Object ref (if id not provided)
|
||||||
* @return void
|
* @return void
|
||||||
@ -181,7 +181,7 @@ class Canvas
|
|||||||
/**
|
/**
|
||||||
* Shared method for canvas to execute actions
|
* Shared method for canvas to execute actions
|
||||||
*
|
*
|
||||||
* @param string &$action Action string
|
* @param string $action Action string
|
||||||
* @param int $id Object id
|
* @param int $id Object id
|
||||||
* @return mixed Return return code of doActions of canvas
|
* @return mixed Return return code of doActions of canvas
|
||||||
* @deprecated This function is called if you add a doActions class inside your canvas. Try to not
|
* @deprecated This function is called if you add a doActions class inside your canvas. Try to not
|
||||||
|
|||||||
@ -1089,7 +1089,6 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save a new position (field rang) for details lines.
|
* Save a new position (field rang) for details lines.
|
||||||
* You can choose to set position for lines with already a position or lines without any position defined.
|
* You can choose to set position for lines with already a position or lines without any position defined.
|
||||||
@ -2039,7 +2038,7 @@ abstract class CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||||
$sql.= " WHERE entity IN (".getEntity($this->element, 1).")";
|
$sql.= " WHERE entity IN (".getEntity($this->element, 1).")";
|
||||||
if (! empty($id)) $sql.= " AND rowid = ".$id;
|
if (! empty($id)) $sql.= " AND rowid = ".$id;
|
||||||
if (! empty($ref)) $sql.= " AND ref = '".$ref."'";
|
if (! empty($ref)) $sql.= " AND ref = '".$this->db->escape($ref)."'";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -2121,11 +2120,11 @@ abstract class CommonObject
|
|||||||
|
|
||||||
foreach ($tab as $key => $value)
|
foreach ($tab as $key => $value)
|
||||||
{
|
{
|
||||||
// Test fetch_array ! is_int($key) because fetch_array seult is a mix table with Key as alpha and Key as int (depend db engine)
|
// Test fetch_array ! is_int($key) because fetch_array result is a mix table with some key as alpha and some key as int (depend db engine)
|
||||||
if ($key != 'rowid' && $key != 'tms' && $key != 'fk_member' && ! is_int($key))
|
if ($key != 'rowid' && $key != 'tms' && ! is_int($key))
|
||||||
{
|
{
|
||||||
// we can add this attribute to adherent object
|
// we can add this attribute to object properties
|
||||||
$this->array_options["options_$key"]=$value;
|
$this->array_options["options_".$key]=$value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -201,4 +201,3 @@ class dolprintIPP
|
|||||||
return $ipp->printer_attributes;
|
return $ipp->printer_attributes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
|||||||
@ -154,7 +154,7 @@ class ExtraFields
|
|||||||
{
|
{
|
||||||
$table=$elementtype.'_extrafields';
|
$table=$elementtype.'_extrafields';
|
||||||
|
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname))
|
||||||
{
|
{
|
||||||
if ($type=='boolean') {
|
if ($type=='boolean') {
|
||||||
$typedb='int';
|
$typedb='int';
|
||||||
@ -226,8 +226,7 @@ class ExtraFields
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (empty($pos)) $pos=0;
|
if (empty($pos)) $pos=0;
|
||||||
|
|
||||||
|
if (! empty($attrname) && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname) && ! is_numeric($attrname))
|
||||||
if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/",$attrname))
|
|
||||||
{
|
{
|
||||||
if(is_array($param) and count($param) > 0)
|
if(is_array($param) and count($param) > 0)
|
||||||
{
|
{
|
||||||
@ -681,6 +680,7 @@ class ExtraFields
|
|||||||
}
|
}
|
||||||
|
|
||||||
$out.='<select class="flat" name="options_'.$key.$keyprefix.'" id="options_'.$key.$keyprefix.'" '.($moreparam?$moreparam:'').'>';
|
$out.='<select class="flat" name="options_'.$key.$keyprefix.'" id="options_'.$key.$keyprefix.'" '.($moreparam?$moreparam:'').'>';
|
||||||
|
$out.='<option value="0"> </option>';
|
||||||
foreach ($param['options'] as $key=>$val )
|
foreach ($param['options'] as $key=>$val )
|
||||||
{
|
{
|
||||||
list($val, $parent) = explode('|', $val);
|
list($val, $parent) = explode('|', $val);
|
||||||
@ -975,11 +975,11 @@ class ExtraFields
|
|||||||
// Several field into label (eq table:code|libelle:rowid)
|
// Several field into label (eq table:code|libelle:rowid)
|
||||||
$fields_label = explode('|',$InfoFieldList[1]);
|
$fields_label = explode('|',$InfoFieldList[1]);
|
||||||
|
|
||||||
if(is_array($fields_label))
|
if(is_array($fields_label) && count($fields_label)>1)
|
||||||
{
|
{
|
||||||
foreach ($fields_label as $field_toshow)
|
foreach ($fields_label as $field_toshow)
|
||||||
{
|
{
|
||||||
$translabel=$langs->trans($obj->field_toshow);
|
$translabel=$langs->trans($obj->$field_toshow);
|
||||||
if ($translabel!=$field_toshow) {
|
if ($translabel!=$field_toshow) {
|
||||||
$value.=dol_trunc($translabel,18).' ';
|
$value.=dol_trunc($translabel,18).' ';
|
||||||
}else {
|
}else {
|
||||||
@ -1040,7 +1040,7 @@ class ExtraFields
|
|||||||
* Fill array_options property of object by extrafields value (using for data sent by forms)
|
* Fill array_options property of object by extrafields value (using for data sent by forms)
|
||||||
*
|
*
|
||||||
* @param array $extralabels $array of extrafields
|
* @param array $extralabels $array of extrafields
|
||||||
* @param object &$object Object
|
* @param object $object Object
|
||||||
* @param string $onlykey Only following key is filled
|
* @param string $onlykey Only following key is filled
|
||||||
* @return int 1 if array_options set / 0 if no value
|
* @return int 1 if array_options set / 0 if no value
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -114,8 +114,8 @@ class HookManager
|
|||||||
*
|
*
|
||||||
* @param string $method Name of method hooked ('doActions', 'printSearchForm', 'showInputField', ...)
|
* @param string $method Name of method hooked ('doActions', 'printSearchForm', 'showInputField', ...)
|
||||||
* @param array $parameters Array of parameters
|
* @param array $parameters Array of parameters
|
||||||
* @param Object &$object Object to use hooks on
|
* @param Object $object Object to use hooks on
|
||||||
* @param string &$action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
* @param string $action Action code on calling page ('create', 'edit', 'view', 'add', 'update', 'delete'...)
|
||||||
* @return mixed For doActions,formObjectOptions,pdf_xxx: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
|
* @return mixed For doActions,formObjectOptions,pdf_xxx: Return 0 if we want to keep standard actions, >0 if if want to stop standard actions, <0 means KO.
|
||||||
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Deprecated. Must always return an int and things to print into ->resprints.
|
* For printSearchForm,printLeftBlock,printTopRightMenu,formAddObjectLine,...: Return HTML string. TODO Deprecated. Must always return an int and things to print into ->resprints.
|
||||||
* Can also return some values into an array ->results.
|
* Can also return some values into an array ->results.
|
||||||
|
|||||||
@ -1492,9 +1492,9 @@ class Form
|
|||||||
/**
|
/**
|
||||||
* constructProductListOption
|
* constructProductListOption
|
||||||
*
|
*
|
||||||
* @param resultset &$objp Resultset of fetch
|
* @param resultset $objp Resultset of fetch
|
||||||
* @param string &$opt Option
|
* @param string $opt Option
|
||||||
* @param string &$optJson Option
|
* @param string $optJson Option
|
||||||
* @param int $price_level Price level
|
* @param int $price_level Price level
|
||||||
* @param string $selected Preselected value
|
* @param string $selected Preselected value
|
||||||
* @return void
|
* @return void
|
||||||
@ -2329,8 +2329,8 @@ class Form
|
|||||||
dol_syslog(get_class($this)."::select_type_paiements ".$selected.", ".$htmlname.", ".$filtertype.", ".$format,LOG_DEBUG);
|
dol_syslog(get_class($this)."::select_type_paiements ".$selected.", ".$htmlname.", ".$filtertype.", ".$format,LOG_DEBUG);
|
||||||
|
|
||||||
$filterarray=array();
|
$filterarray=array();
|
||||||
if ($filtertype == 'CRDT') $filterarray=array(0,2);
|
if ($filtertype == 'CRDT') $filterarray=array(0,2,3);
|
||||||
elseif ($filtertype == 'DBIT') $filterarray=array(1,2);
|
elseif ($filtertype == 'DBIT') $filterarray=array(1,2,3);
|
||||||
elseif ($filtertype != '' && $filtertype != '-1') $filterarray=explode(',',$filtertype);
|
elseif ($filtertype != '' && $filtertype != '-1') $filterarray=explode(',',$filtertype);
|
||||||
|
|
||||||
$this->load_cache_types_paiements();
|
$this->load_cache_types_paiements();
|
||||||
@ -2809,7 +2809,7 @@ class Form
|
|||||||
* Show a form to select a project
|
* Show a form to select a project
|
||||||
*
|
*
|
||||||
* @param int $page Page
|
* @param int $page Page
|
||||||
* @param int $socid Id third party
|
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||||
* @param int $selected Id pre-selected project
|
* @param int $selected Id pre-selected project
|
||||||
* @param string $htmlname Name of select field
|
* @param string $htmlname Name of select field
|
||||||
* @return void
|
* @return void
|
||||||
@ -3058,9 +3058,10 @@ class Form
|
|||||||
* @param string $page Page
|
* @param string $page Page
|
||||||
* @param int $selected Id mode pre-selectionne
|
* @param int $selected Id mode pre-selectionne
|
||||||
* @param string $htmlname Name of select html field
|
* @param string $htmlname Name of select html field
|
||||||
|
* @param string $filtertype To filter on field type in llx_c_paiement (array('code'=>xx,'label'=>zz))
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id')
|
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
if ($htmlname != "none")
|
if ($htmlname != "none")
|
||||||
@ -3070,7 +3071,7 @@ class Form
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
print '<table class="nobordernopadding" cellpadding="0" cellspacing="0">';
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$this->select_types_paiements($selected,$htmlname);
|
$this->select_types_paiements($selected,$htmlname,$filtertype);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||||
print '</tr></table></form>';
|
print '</tr></table></form>';
|
||||||
@ -3769,7 +3770,7 @@ class Form
|
|||||||
}
|
}
|
||||||
elseif ($typehour=='text')
|
elseif ($typehour=='text')
|
||||||
{
|
{
|
||||||
print '<input type="text" size="3" name="'.$prefix.'hour" class="flat" value="'.((int) $hourSelected).'">';
|
print '<input type="text" size="3" name="'.$prefix.'hour"'.($disabled?' disabled="disabled"':'').' class="flat" value="'.((int) $hourSelected).'">';
|
||||||
}
|
}
|
||||||
print $langs->trans('Hours');
|
print $langs->trans('Hours');
|
||||||
|
|
||||||
@ -4079,7 +4080,7 @@ class Form
|
|||||||
/**
|
/**
|
||||||
* Return HTML code to output a barcode
|
* Return HTML code to output a barcode
|
||||||
*
|
*
|
||||||
* @param Object &$object Object containing data to retrieve file name
|
* @param Object $object Object containing data to retrieve file name
|
||||||
* @param int $width Width of photo
|
* @param int $width Width of photo
|
||||||
* @return string HTML code to output barcode
|
* @return string HTML code to output barcode
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -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>';
|
||||||
@ -1148,7 +1148,7 @@ class FormFile
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
|
print '<td align="center">' . dol_print_date(dol_now(), "dayhour", "tzuser") . '</td>';
|
||||||
print '<td align="right"></td>';
|
print '<td align="right"></td>';
|
||||||
print '<td align="right" colspan="2">';
|
print '<td align="right">';
|
||||||
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
|
print '<input type="submit" name="save" class="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '">';
|
||||||
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
|
print '<input type="submit" name="cancel" class="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -1163,7 +1163,7 @@ class FormFile
|
|||||||
print '<td align="right"></td>';
|
print '<td align="right"></td>';
|
||||||
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
|
print '<td align="center">' . dol_print_date($link->datea, "dayhour", "tzuser") . '</td>';
|
||||||
print '<td align="center"></td>';
|
print '<td align="center"></td>';
|
||||||
print '<td align="right" colspan="2">';
|
print '<td align="right">';
|
||||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>'; // id= is included into $param
|
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '" class="editfilelink" >' . img_edit() . '</a>'; // id= is included into $param
|
||||||
if ($permtodelete) {
|
if ($permtodelete) {
|
||||||
print ' <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
|
print ' <a href="'. $_SERVER['PHP_SELF'] .'?action=delete&linkid=' . $link->id . $param . '" class="deletefilelink">' . img_delete() . '</a>'; // id= is included into $param
|
||||||
@ -1176,7 +1176,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
if ($nboflinks == 0)
|
if ($nboflinks == 0)
|
||||||
{
|
{
|
||||||
print '<tr ' . $bc[$var] . '><td colspan="4">';
|
print '<tr ' . $bc[$var] . '><td colspan="5">';
|
||||||
print $langs->trans("NoLinkFound");
|
print $langs->trans("NoLinkFound");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user